Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
Chopperp Guru Joined: 03/01/2018 Location: AustraliaPosts: 1106
Posted: 12:02pm 04 Mar 2020
Copy link to clipboard
Print this post
FYI
I had a small software initialisation problem when my CMM program first starts up.
In one of my Library files which gets loaded, runs then gets unloaded, I have a line calling 3 subroutines :- Gts1: Gts2: Gts3
The subroutines themselves just do some initial temperature measurements but some of the readings weren't correct. (They are called separately at different times in the main program & work fine).
I finally got around to looking at it today & found that the first subroutine wasn't doing anything. The others were.
Running it by itself worked as did placing it elsewhere in the program.
I changed the order of the routines to Gts2: Gts1: Gts3 & low & behold, Gts2 did nothing while Gts1 & Gts3 worked. Bit strange.
As a test, I put each on a separate line in the main program & that worked.
I then did the same in the Library file & that solved the problem.
BrianChopperP
CaptainBoing Guru Joined: 07/09/2016 Location: United KingdomPosts: 2171
Posted: 03:12pm 04 Mar 2020
Copy link to clipboard
Print this post
In multi-statement lines,if the sub program names are in the first column with a colon directly following, they can get mistaken for line labels... e.g.
GTS1:GTS2:GTS3
isn't the same as
GTS1:GTS2:GTS3
Check for that. I only ever put labels in column one. you could mitigate it by putting spaces either side of the colons which prevents them being interpreted as labels.
For this reason I tend to be pretty regimented in my formatting... I'd make a great Python programmer Edited 2020-03-05 05:15 by CaptainBoing
Chopperp Guru Joined: 03/01/2018 Location: AustraliaPosts: 1106
Posted: 09:25pm 04 Mar 2020
Copy link to clipboard
Print this post
Ah, I thought that there would be a logical answer. Forgot about labels.
Thanks.
BrianChopperP
Chopperp Guru Joined: 03/01/2018 Location: AustraliaPosts: 1106