Jump to content
OMRON Forums

Recommended Posts

Posted

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?

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

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.
 

Posted

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.

Posted

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.

Posted

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

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...