Siemens 6AV6651-7KA01-3AA4 - S7-1200 + KTP400 Basic Starter Kit 6AV6651-7KA01-3AA4 Benutzerhandbuch

Produktcode
6AV6651-7KA01-3AA4
Seite von 364
 
Programming made easy 
 
6.5 Easy to monitor and test your user program 
Easy Book 
Manual, 03/2014, A5E02486774-AF 
117
 
6.5.4 
Diagnostic instructions to monitor the hardware 
6.5.4.1 
Reading the states of the LEDs on the CPU 
The LED instruction allows your user program to determine the state of the LEDs on the 
CPU. You can use this information for programming a tag for your HMI device. 
Table 6- 25  LED instruction 
LAD / FBD 
SCL 
Description 
 
ret_val := #LED( 
     laddr:=_hw_io_in_, 
     LED:=_uint_in_); 
RET_VAL returns the following LED states for the CPU 
 
RUN/STOP: green or yellow 
 
Error: red 
 
MAINT (maintenance): yellow 
 
Link: green 
 
Tx/Rx (transmit/receive): yellow 
6.5.4.2 
Instructions for reading the diagnostic status of the devices 
STEP 7 also includes instructions for reading the status information that is provided by the 
hardware devices on your network.  
Table 6- 26  Diagnostic instructions 
LAD / FBD 
SCL 
Description 
 
ret_val := #GET_DIAG( 
     mode:=_uint_in_, 
     laddr:=_hw_any_in_, 
     channel:=_uint_in_, 
     cnt_diag=>_uint_out_, 
     diag:=_uint_inout_, 
     
detail:=_variant_inout_); 
The GET_DIAG instruction reads the 
diagnostic information from a specified 
hardware device. 
 
ret_val := DeviceStates( 
     laddr:=hw_io_in_,  
     mode:=_uint_in_,  
     state:=_variant_inout_); 
The DeviceStates instruction reads the status 
of PROFINET or PROFIBUS devices. 
 
ret_val := ModuleStates( 
     laddr:=_hw_io_in_, 
     mode:=_uint_in, 
     state:=_variant_inout); 
The ModuleStates instruction reads the 
status of PROFINET or PROFIBUS modules.