Hi,
How do I access the Cockpit’s data in a PLCnext Engineer project? Specifically I would like access to:
„Overview: Diagnostic and status indicators“ variables -->BF-C, BF-D, SF, RUN, FAIL, DBG, D, E
„Overview: Utilization“ variables → Memory (RAM), Retain memory, (I found CPU load in DeviceState system variable)
„Device“ variables → Device health Status
„Network“ variables → MAC Address, Port X1/2’s Baudrate/Duplex mode/Link state
„PLC runtime“ variables → Program memory, Data memory
Also, is there a way to identify the state of the „key switch“ on a 2152?
Purpose of request: I would like to pass these variables to an HMI (via OPC UA) to indicate the PLC’s status.
Thanks in advance,
Kevin
Hi Kevin.
If the variables you are looking for are not available in the list of Global Variables in PLCnext Engineer, then it may be possible to get them through function blocks in the PLCnextBase library.
For example:
RSC Device Interface Services The RSC Device Interface Services provide a range of functions for accessing properties of the operating system and the controller hardware. You can call the information with the following interfaces and defined parameters. The following headers are required to use the service; integrate these headers via #include, if necessary:
* „Overview: Diagnostic and status indicators“ variables -->BF-C, BF-D, SF, RUN, FAIL, DBG, D, E
* „Network“ variables → MAC Address, Port X1/2’s Baudrate/Duplex mode/Link state
* „PLC runtime“ variables → Program memory, Data memory
=> can all be retrieved using the function block PBCL_SysDeviceStatus_1. The required item identifiers are listed in the PLCnext Technology Info Center, here:
Thanks Martin, I will use PLCnextBase per your recommendation.