Hi everyone
How can I read the PLC mode(RUN/STOP/STARTUP)? and I have seen the internal DPE for S7 Plus driver(State.Connections.OpState) but it is in dyn_uint data type so I am unable to use this to indicate PLC mode.
Are there any functions to read/write the dyn_uint DPE's in Script like dpGet and dpSet?
How to convert the dyn_uint to int or uint?
How to Get The PLC Mode
- nmnogueira
- Posts:125
- Joined: Thu May 05, 2011 12:59 pm
Re: How to Get The PLC Mode
You can read the PLC status from _S7_Conn.OpState
- chandra
- Posts:32
- Joined: Fri Oct 06, 2017 12:25 pm
Re: How to Get The PLC Mode
Hello
_S7_Conn.OpState is in dyn_uint format how to use this?
_S7_Conn.OpState is in dyn_uint format how to use this?
- nmnogueira
- Posts:125
- Joined: Thu May 05, 2011 12:59 pm
Re: How to Get The PLC Mode
Sorry I thought you were using the S7 driver, not the S7 plus.
You were right, you should be reading from State.Connections.OpState.
You can use dpGet to read from a dyn_int DPE, and access an element using val notation, where i is the element position in the dyn variable. If you only have one connection, you should use val[1] to get the connection state.
You were right, you should be reading from State.Connections.OpState.
You can use dpGet to read from a dyn_int DPE, and access an element using val notation, where i is the element position in the dyn variable. If you only have one connection, you should use val[1] to get the connection state.
- chandra
- Posts:32
- Joined: Fri Oct 06, 2017 12:25 pm
Re: How to Get The PLC Mode
Hi
It is working
thank you
It is working
thank you