SIEMENS AG
as200_ag_zustand
This function reads the PLC status (RUN or STOP) from the PLC and stores
the data in a storage area of the PG/PC.
buffer[0] = 0
buffer[0] <> 0
If there were no errors, the function supplies 0 as the return value otherwise an
error message which can be evaluated in accordance with the error table (see
error_message).
See also as200_ag_info
C-Adapter
int
as200_ag_zustand (void * buffer);
Example:
C-Adapter
#include <w95_s7.h>
int
error;
adr_ table_type plc_adr_table[2] = { {2,0,2,0},{0,0,2,0} };
char state;
:
error = load_tool(1,"S7ONLINE",plc_adr_table);
:
error = as200_ag_zustand(&state);
if (state == 0); //plc in run
if (state != 0); //plc in stop
:
error = unload_tool();
:
Toolbox for Data Link PGs/PCs to SIMATIC S7
AG is in RUN
AG is in STOP
42
PRODAVE S7