The text of a manual · part 29 of 39
Series 90-30/20/Micro PLC CPU Instruction Set Reference Manual: Chapter 12 - Control Functions, pages 249 to 258
Pages 249 to 258 of 337, from Series 90-30/20/Micro PLC CPU Instruction Set Reference Manual
The original document is the PDF (4.4 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the GE Fanuc IC692CPU211D / IC692MDR541C, Fanuc IC692CPU211D / IC692MDR541C, GE IC692CPU211D / IC692MDR541C and GE Fanuc IC693CPU311X
Page 249
12 In the first byte of word address + 1, the Long/Short indicator defines the quantity of fault specific data present in the fault entry. It can be: PLC Fault Table: I/O Fault Table:
00 = -8 bytes (short) 01 = 24 bytes (long) 02 =, 5 bytes (short) 03 = 21 bytes (long)
Example 1 In the following example, when input %I0251 is on and input %I0250 is on, the last entry in the PLC fault table is read into the parameter block. When input %I0251 is off and input %I0250 is on, the last entry in the I/O fault table is read into the parameter block. The parameter block is located at location %R0600.
| _____ |%I0250 %I0251 | | | - - | | - - - - - | | - - - |MOVE_| | | | | | INT | | | | | CONST, |IN Q|– %R0600 | 0000 | LEN | | | 0001| | |_____| | | _____ |%I0250 %I0251 | | | - - | | - - - - - |/| - - - |MOVE_| | | | | | INT | | | | | CONST, |IN Q| - %R0600 | 0001 | LEN | | | 0001| | |_____| | | _____ |ALW_ON | | | - - | | - - - | SVC_| - | | | | | REQ | | | | | CONST, |FNC | | 0015 | | | | | |%R0600, |PARM | | |_____| |
GFK-0467M
Chapter 12 Control Functions
12-61
Page 250
12
Example 2 In the next example, the PLC is shut down when any fault occurs on an I/O module except when the fault occurs on modules in rack 0, slot 9 and in rack 1, slot 9. If faults occur on these two modules, the system remains running. The parameter for “table type” is set up on the first sweep. The contact IO_PRES, when set, indicates that the I/O fault table contains an entry. The PLC CPU sets the normally open contact in the next sweep after the fault logic places a fault in the table. If faults are placed in the table in two consecutive sweeps, the normally open contact is set for two consecutive sweeps. The example uses a parameter block located at %R0600. After the SVCREQ function executes, the fourth word of the parameter block contains the rack and slot location of the I/O module that faulted: 1
%R0600 long/short
%R0601 reference address
%R0602 rack number slot number
%R0603
I/O bus no.
bus address
%R0604 point address
%R0605 fault data
In the program, the EQ_INT blocks compare the rack/slot address in the table to hexadecimal constants. The internal coil %M0007 is turned on when the rack/slot where the fault occurred meets the criteria specified above. If coil %M0007 is on, its normally closed contact is off, preventing the shutdown. Conversely, if coil %M0007 is off because the fault occurred on a different module, its normally closed contact is on and the shutdown occurs.
12-62
Series 90™-30/20/Micro PLC CPU Instruction Set Reference Manual – May 2002
GFK-0467M
Page 251
12
| _____ |FST_SCN | | | - - | | - - - |MOVE_| - | | | | | INT | | | | | CONST, |IN Q| - %R0600 | 0001 | LEN | | | 0001| | |_____| | | _____ | IO_PRES| | %T0001 | - - | | - - - | SVC_| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ( ) - | | | | | REQ | | | | | CONST, |FNC | | 0015 | | | | | |%R0600, |PARM | | |_____| | | _____ |%T0001 | | | - - | | - - - | EQ_ | - | | | | | INT | | | | %M0007 |%R0603, |I1 Q| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ( ) - | | | | | | | CONST, |I2 | | 0109 |_____| | | _____ |%T0001 | | | - - | | - - - | EQ_ | - | | | | | INT | | | | %M0007 |%R0603, |I1 Q| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ( ) - | | | | | | | CONST, |I2 | | 0265 |_____| | | _____ | IO_PRES %M0007 | | | - - | | - - - - - - - |/| - - - | SVC_| - | | | | | REQ | | | | | | | | CONST, |FNC | | 0013 | | | | | | %R0001, |PARM | | |_____| |
GFK-0467M
Chapter 12 Control Functions
12-63
Page 252
12
SVCREQ #16: Read Elapsed Time Clock Use the SVCREQ function with function number 16 in order to read the value of the system’s elapsed time clock. This clock tracks elapsed time in seconds since the PLC powered on. The timer will roll over approximately once every 100 years. This function has an output parameter block only. The parameter block has a length of 3 words. seconds from power on (low order)
address seconds from power on (high order)
address + 1
100 microsecond ticks address + 2
The first two words are the elapsed time in seconds. The last word is the number of 100 microsecond ticks in the current second.
Example In the following example, when internal coil %M0233 is on, the value of the elapsed time clock is read and coil %M0234 is set. When it is off, the value is read again. The difference between the values is then calculated, and the result is stored in register memory at location %R0250. The parameter block for the first read is at %R0127; for the second read, at %R0131. The calculation ignores the number of hundred microsecond ticks and the fact that the DINT type is actually a signed value. The calculation is correct until the time since power-on reaches approximately 50 years.
| _____ |%M0233 | | %M0234 | - - | | - - - | SVC_| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (S) - | | | | | REQ | | | | | CONST, |FNC | | 00016 | | | | | |%R0127, |PARM | | |_____| | | _____ _____ |%M0233 %M0234 | | | | %M0234 | - - |/| - - - - - - - | | - - - | SVC_| - - - - - - - - - - - - - - - - - - | SUB_| - - - - - - - - - - - - - - - - - - - - - - - - (R) - | | | | | | | REQ | | DINT| | | | | | | CONST, |FNC | %R0131, |I1 Q| - %R0250 | 00016 | | | | | | | | | | %R0131, |PARM | %R0127, |I2 | | |_____| |_____| |
12-64
Series 90™-30/20/Micro PLC CPU Instruction Set Reference Manual – May 2002
GFK-0467M
Page 253
12
SVCREQ #18: Read I/O Override Status Use SVCREQ function #18 in order to read the current status of overrides in the CPU.
Note This feature is available only for 331 or higher CPUs. For this function, the parameter block has a length of 1 word. It is an output parameter block only. 0 = No overrides are set.
address
1 = Overrides are set.
Note SVCREQ #18 reports only overrides of %I and %Q references.
Example In the following example, the status of I/O overrides is always read into location %R1003. If any overrides are present, output %T0001 is set on.
| _____ _____ |%I0001 | | | | | - - |/| - - - | SVC_| - - - - - - - - - - | EQ_ |– | | | | | | | REQ | | INT | | | | | | %T0001 | CONST, |FNC | CONST, |I1 Q| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ( ) - | 00018 | | 00001 | | | | | | | |%R1003, |PARM | %R1003, |I2 | | |_____| |_____| |
GFK-0467M
Chapter 12 Control Functions
12-65
Page 254
12
SVCREQ #23: Read Master Checksum Use SVCREQ function #23 to read the master checksums for the user program and the configuration. The SVCREQ output is always set to ON if the function is enabled, and the output block of information (see below) starts at the address given in parameter 3 (PARM) of the SVCREQ function. When a RUN MODE STORE is active, the program checksums may not be valid until the store is complete. Therefore, two flags are provided at the beginning of the output parameter block to indicate when the program and configuration checksums are valid. For this function, the output parameter block has a length of 12 words with this format: Master Program Checksum Valid (0 = not valid, 1 = valid)
address
Master Configuration Checksum Valid (0 = not valid, 1 = valid)
address + 1
Number of Program Blocks (including _MAIN)
address + 2
Size of User Program in Bytes (DWORD data type)
address + 3
Program Additive Checksum address + 5
Program CRC Checksum (DWORD data type)
address + 6
Size of Configuration Data in Bytes address + 8
Configuration Additive Checksum address + 9
Configuration CRC Checksum (DWORD data type)
address + 10
Example In the following example, when input %I0251 is ON, the master checksum information is placed into the parameter block, and the output coil (%Q0001) is turned on. The parameter block is located at %R0050. | _____ |%I0251 | | %Q0001 | - - | | - - - | SVC_| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ( ) - | | | | | REQ | | | | | CONST, |FNC | | +0023 | | | | | |%R0050, |PARM | | |_____| |
12-66
Series 90™-30/20/Micro PLC CPU Instruction Set Reference Manual – May 2002
GFK-0467M
Page 255
12
SVCREQ #24: Reset Smart Module Use SVCREQ function #24 to reset a daughterboard or smart module. The SVCREQ output is set ON unless an invalid number for rack and/or slot is entered as shown below. For this function, the parameter block has a length of 1 word. It is an input parameter block only. Module Slot (low byte)
address
Module Rack (high byte)
Note:
Rack 0, Slot 1 shall indicate a reset is to be sent to the daughterboard.
Example In the following example, when input %I0346 is on and input %I0349 is on, the module indicated by the Rack/Slot present in %R0500 is reset. The parameter block containing the modules rack and slot for the reset module Service Request is located at %R0500. The parameter block is set up elsewhere in the program.
| _____ |%I0349 %I0346 | | | - - | | - - + - - | | - - + - - - - - - - | SVC_| - | | | | | | | | | REQ | | |%I0348 | | | | + - - | | - - +CONST, |FNC | | 0024 | | | | | | %R0500, |PARM | | |_____| | | _____ | |
GFK-0467M
Chapter 12 Control Functions
12-67
Page 256
12
SVCREQ #26/30: Interrogate I/O Use SVCREQ function #26 (or #30 - they are identical; i.e., you can use either number to accomplish the same thing) to interrogate the actual modules present and compare them with the rack/slot configuration, generating addition, loss, and mismatch alarms, as if a store configuration had been performed. This SVCREQ will generate faults on both the PLC and I/O fault tables, depending on the fault. This function has no parameter block and always outputs power flow.
Note The time for this SVCREQ to execute depends on how many faults exist. Therefore, execution time of this SVCREQ will be greater for situations where more modules are at fault.
Example In the following example, when input %I0251 is ON, the actual modules are interrogated and compared to the rack/slot configuration. Output %Q0001 is turned on after the SVCREQ is complete. | _____ |%I0251 | | %Q0001 | - - | | - - - | SVC_| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ( ) - | | | | | REQ | | | | | CONST, |FNC | | +0026 | | | | | |%R0050, |PARM | | |_____| |
Note This Service Request is not available on Micro PLCs.
12-68
Series 90™-30/20/Micro PLC CPU Instruction Set Reference Manual – May 2002
GFK-0467M
Page 257
12
SVCREQ #29: Read Elapsed Power Down Time Use the SVCREQ function #29 to read the amount of time elapsed between the last power-down and the most recent power-up. The SVCREQ output is always set to ON, and the output block of information (see below) starts at the address given in parameter 3 (PARM) of the SVCREQ function.
Note This function is available only in the 331 or higher CPUs. This function has an output parameter block only. The parameter block has a length of 3 words. Power-Down Elapsed Seconds (low order)
address
Power-Down Elapsed Seconds (high order)
address + 1
100 Microsecond ticks address + 2
The first two words are the power-down elapsed time in seconds. The last word is the remaining power-down elapsed time in 100 microsecond ticks (which is always 0). Whenever the PLC can not properly calculate the power down elapsed time, the time will be set to 0. This will happen when the PLC is powered up with CLR M/T pressed on the HHP. This will also happen if the watchdog timer times out before power-down.
Example In the following example, when input %I0251 is ON, the Elapsed Power-Down Time is placed into the parameter block, and the output coil (%Q0001) is turned on. The parameter block is located at %R0050. | _____ |%I0251 | | %Q0001 | - - | | - - - | SVC_| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ( ) - | | | | | REQ | | | | | CONST -|FNC | | +0029 | | | | | |%R0050 -|PARM | | |_____| |
GFK-0467M
Chapter 12 Control Functions
12-69
Page 258
12
SVCREQ #45: Skip Next Output & Input Scan (Suspend I/O) Use the SVCREQ function #45 to skip the next output and input scans. Any changes to the output reference tables during the sweep in which the SVCREQ #45 was executed will not be reflected on the physical outputs of the corresponding modules. Any changes to the physical input data on the modules will not be reflected in the corresponding input references during the sweep after the one in which the SVCREQ #45 was executed. This function has no parameter block.
Note The DOIO Function Block is not affected by the use of SVCREQ #45. It will still update the I/O when used in the same logic program as the SVCREQ #45.
Example In the following example, when the “Idle” contact passes power flow, the next Output and Input Scan are skipped. IDLE SVC_ REQ
12-70
CONST 00045
FNC
%R0001
PARAM
Series 90™-30/20/Micro PLC CPU Instruction Set Reference Manual – May 2002
GFK-0467M