JeffB Posted February 27, 2023 Posted February 27, 2023 My understanding is 1. Read Coord[].ProgActive and .ProgRunning 2. If both true then read Coord[].Program.Number 3. If number matches motion program number than it is running. Is this procedure correct? Does it work for SubPrograms? Quote
leandro.martins Posted February 27, 2023 Posted February 27, 2023 I was looking for something like the Coord[].Program.Number I think if you are interested just when the program in in the run status, then it's not necessary to check the Coord[].ProgActive. From my understanding, a program could be active but not running (in pause or step), but if it's running, it will always be active. I'll test this later today. Quote
JeffB Posted February 27, 2023 Author Posted February 27, 2023 Thanks for the feedback. It seems like even when there is no motion program running (IDE task manager says none are running) it still returns the last? motion program that was running. Curious if you observe that also. Quote
leandro.martins Posted February 27, 2023 Posted February 27, 2023 I've observed the same behaviour. Actually, it's not necessary to run. The Coord[].Program.Number returns the program assigned. For example, if I simply command a &1b10 without running, it returns 10. It could be a good idea check program number only on the rising edge of the Coord[].ProgRunning. Quote
steve.milici Posted February 28, 2023 Posted February 28, 2023 Coord[x].Program.Number will only return the addressed top-level program in the CS. The following command sequence will report the currently running program (or subprogram) number in the first line (and display only one line of the program at the current program counter): &1 list pc,1 prog100000 3:X-10 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.