jotlake Posted November 20, 2015 Share Posted November 20, 2015 Hello, For our recipe-based applications, it would be nice to programmatically detect (within a PMAC application) which PLCC routines are running, so they can be started and stopped gracefully when required. For standard non-compiled PLC routines the running status can be checked using the Y:$3100-$311F memory range, but for PLCC routines this is not described in the SRM manual. When monitoring the data traffic for PEWIN32PRO2, I can see it uses some RP$50000 to RP$500xx program memory commands (for a TurboPmac) to determine which PLCC routines are loaded and running. The RP$xxxx commands are not described in the SRM, and there is also no description how to use an M variable to access P memory. I found a work-around using the COMMAND "RP$xxxx" trick and reading the ASCII command response buffer, but this is very time consuming and not flexible. - Is there a programmatic way to determine the PLCC running status, i.e. through X/Y status registers? - If not, is there a direct way to programmatically access program memory data like a RP$xxxx command does, for example with a M-var definition? Thanks and regards, Jan Link to comment Share on other sites More sharing options...
Omron Forums Support Posted November 20, 2015 Share Posted November 20, 2015 I am not aware of memory locations that tell you this for PLCCs, but it's probably much simpler to set a global flag (e.g. a P-Variable) when you turn your PLCC on, and unset it when you turn your PLCC off. If you are worried about the PLCC randomly turning off without your knowledge, instead of flags, you could put counters inside each PLCC and just check if the counter is still incrementing in order to determine if the PLCC is executing. Link to comment Share on other sites More sharing options...
jotlake Posted November 20, 2015 Author Share Posted November 20, 2015 I am not aware of memory locations that tell you this for PLCCs, but it's probably much simpler to set a global flag (e.g. a P-Variable) when you turn your PLCC on, and unset it when you turn your PLCC off. I already wrote a small C++ host program using the RP:$xxxx commands to determine the loaded and running PLCC's, similar to the PLCC status dialog in PEWIN32PRO2. A solution without extra administration inside PLCC routines itself would be preferable, to minimize the risk with implementation errors using our general-purpose framework to start and stop PLCC routines (based on production recipes). For example, enabling a PLCC twice will always force it to restart a the beginning, while an already running PLCC could be waiting somewhere in a while loop half way. Do you know a way (i.e. with M-variables) to access instruction/program memory by a PLC or PLCC program, like the RP:$xxxx command does? Link to comment Share on other sites More sharing options...
Omron Forums Support Posted November 20, 2015 Share Posted November 20, 2015 I have never done it in the way you describe, so I cannot say. If someone else on the forum here has an idea, please post it. Link to comment Share on other sites More sharing options...
Recommended Posts