Jump to content
OMRON Forums

check if program exists


jtaseff
 Share

Recommended Posts

Say I have a bunch of programs which all get loaded through gpascii. They all have numbers #defined, such as #define progMeasurePart 100 or #define progDrillPart 101.

 

Is there a way to check if these are loaded/exist in PMAC by number?

 

The only way I can figure out is checking if (prog[n].Number==progMeasurePart). However, then I have to loop through from prog[0] up to an unknown number of programs that might exist until I find or don't find the one that matches the number I want. This structure is also not documented.

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I think the easiest way to do this is to try to list the first line of the program. For example:

 

list prog 100,1

 

might return:

 

0:linear inc

 

but for a non-existent program

 

list prog 173,1

 

would return:

 

stdin:19:1: error #22: PROGRAM NOT IN BUFFER: list prog 173,1

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share


×
×
  • Create New...