Global variable PLCMODE_RUN

Hello everyone,

I’m writing to ask whether PLCnext Engineer has a system variable equivalent to PLCMODE_RUN. We used this variable extensively in PC WORX to monitor whether the PLC was operating in RUN mode.

Now that we’re migrating to PLCnext Engineer, we’d like to know which variable or function can be used for the same purpose.

Thank you in advance for your support.

Recent versions of PLCnext Engineer include a global variable named PLC_STATE, which is of type PLC_STATE_TYPE:

PLC_STATE_TYPE : STRUCT
    VALUE : UDINT;
    VALUE_INFO : STRING;
    FLAGS : DWORD;
    FLAGS_INFO : STRING;
END_STRUCT

More information:

Hello Martin,

Thanks for your support with this. I upgraded the firmware on my AXC F 2152, and I was finally able to use the PLC_STATE structure. It works perfectly!