214 Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Chapter 4 Input/Output Instructions (MSG, GSV, SSV, IOT)
Structured Text
GSV(PROGRAM,DISCRETE,LASTSCANTIME,
discrete_info.LastScanTime);
GSV(PROGRAM,DISCRETE,MAXSCANTIME,discrete_info.MaxScanTim
e);
Example 3: This example gets status information about task IO_test and places the data in a
user-defined structure io_test_info.
Relay Ladder
Structured Text
GSV(TASK,IO_TEST,LASTSCANTIME,io_test_info.LastScanTime);
GSV(TASK,IO_TEST,MAXSCANTIME,io_test_info.MaxScanTime);
GSV(TASK,IO_TEST,WATCHDOG,io_test_info.WatchDog);
Set Enable And Disable Flags
The following example uses the SSV instruction to enable or disable a program.
You could also use this method to enable or disable an I/O module, which is
similar to using inhibit bits with a PLC-5 processor.