Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 30 of 39

Series 90-30/20/Micro PLC CPU Instruction Set Reference Manual: Chapter 12 - Control Functions, pages 259 to 268

Pages 259 to 268 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 259

12

SVCREQ #46: Fast Backplane Status Access This function is a method of communicating a few bits to or from one or more smart modules very quickly across the PLC backplane compared with the normal communication method. This increase in communication speed is achieved by limiting the amount of data and the number of replies. Use SVCREQ function #46 to perform one of the following fast backplane access functions: •

Read a word of extra status data from one of more specified smart modules.

•

Write a word of extra status data from one of more specified smart modules.

•

Read/Write: Read a word of extra status data from one or more specified modules and write the data value between 0 and 15 to the same module, all in one operation.

Notes Currently, the only module designed to support this Service Request is the DSM314 (Digital Servo Module). A COMM_REQ or DOIO function block should not be performed with the specified module(s) during the same logic sweep during which either of the data write functions are performed, since they can cause the write data to be lost. Two functions that write to a module (Write or Read/Write) should not be performed with the same module during the same logic sweep because they can cause the first write data to be lost. This Service Request is also known as “SNAP.” This Service Request has a variable length as described below. The first word of the parameter block determines which function will be used and has the following format: 1 = Read extra data address (word 1)

2 = Write extra data 3 = Read/write extra data

GFK-0467M

Chapter 12 Control Functions

12-71

Page 260

12

Read Extra Status Data (Function #1) The Read Extra Data function reads a word of extra status data from each of the modules specified by a list in the parameter block and places the status data values into the parameter block. The parameter block requires (N + 4) words of reference memory, where N is the number of modules to which the data will be written. Use the table on the following page to interpret the output values. Table 12-5. Parameter Block for Read Extra Data Function Location

12-72

Field

Meaning

Address

Function

1 = read extra status data

Address + 1

Error Code

An error code is placed here if the function fails because any of the modules is not present, inappropriate, or not working. For details, see “Error Codes” on page 12-75.

Address + 2

Error rack & slot

The rack & slot number at which the error occurred

Address + 3

First rack & slot

Rack and slot number (in the form RRSS in hexadecimal, where RR is the rack number and SS is the slot number) of the 1st module from which the data will be read

Address + 4

Read data from first module

The data read from the first module will be place here

Address + 5

Second rack & slot

Rack and slot number (in the form RRSS in hexadecimal, where RR is the rack number and SS is the slot number) of the 2nd module from which the data will be read

Address + 6

Read data from second module

The data read from the second module will be place here

Address + (I * 2) + 1

Ith rack & slot

Rack and slot number (in the form RRSS in hexadecimal, where RR is the rack number and SS is the slot number) of the Ith module from which the data will be read

Address + (I * 2) + 2

Read data from Ith module

The data read from the Ith module will be place here

Address + (N * 2) + 1

Last rack & slot

Rack and slot number (in the form RRSS in hexadecimal, where RR is the rack number and SS is the slot number) of the last module from which the data will be read

Address + (N * 2) + 2

Read data from last module

The data read from the last module will be place here

Address + (N * 2) + 3

End of list indicator

A zero in this word indicates the end of the list of modules

Series 90™-30/20/Micro PLC CPU Instruction Set Reference Manual – May 2002

GFK-0467M

Page 261

12

Write Data (Function #2) The write data function writes a data value between 0 and 15 from the parameter block to one or more modules specified by a list in the parameter block. The parameter block requires (N + 4) words of reference memory, where N is the number of modules to which the data will be written. Table 12-6. Parameter Block for Write Data Function Location

GFK-0467M

Field

Meaning

Address

Function

2 = write data

Address + 1

Error Code

An error code is placed here if the function fails because any of the modules is not present, inappropriate, or not working. No error code is set if the function executes but any of the modules does not receive the write data properly. For details, see “Error Codes” on page 12-75.

Address + 2

Error rack & slot

The rack & slot number at which the error occurred

Address + 3

First rack & slot

Rack and slot number (in the form RRSS in hexadecimal, where RR is the rack number and SS is the slot number) of the 1st module to which the data will be sent

Address + 4

Write data for first module

This data value will be written to the first module

Address + 5

Second rack & slot

Rack and slot number (in the form RRSS in hexadecimal, where RR is the rack number and SS is the slot number) of the 2nd module to which the data will be sent

Address + 6

Write data for second module

This data value will be written to the second module

Address + (I * 2) + 1

Ith rack & slot

Rack and slot number (in the form RRSS in hexadecimal, where RR is the rack number and SS is the slot number) of the Ith module to which the data will be sent

Address + (I * 2) + 2

Write data for Ith module

This data value will be written to the Ith module

Address + (N * 2) + 1

Last rack & slot

Rack and slot number (in the form RRSS in hexadecimal, where RR is the rack number and SS is the slot number) of the last module to which the data will be sent

Address + (N * 2) + 2

Write data for last module

This data value will be written to the last module

Address + (N * 2) + 3

End of list indicator

A zero in this word indicates the end of the list of modules

Chapter 12 Control Functions

12-73

Page 262

12

Read/Write Data (Function #3) The read/write function reads a word of extra status data from a module specified in the parameter block, then writes a data value between 0 and 15 from the parameter block to that module. This read write process is repeated for each module in a list in the parameter block. The parameter block (N * 3) + 3 words of reference memory, where N is the number of modules with which data will be exchanged. Table 12-7. Parameter Block for Read/Write Data Function Location

12-74

Field

Meaning

Address

Function

3 = read/write

Address + 1

Error Code

An error code is placed here if the function fails because any of the modules is not present, inappropriate, or not working. No error code is set if the function executes but any of the modules does not receive the write data properly. For details, see “Error Codes” on page 12-75.

Address + 2

Error rack & slot

The rack & slot number at which the error occurred

Address + 3

First rack & slot

Rack and slot number (in the form RRSS in hexadecimal, where RR is the rack number and SS is the slot number) of the 1st module with which data will be exchanged

Address + 4

Read data from first module

The data read from the first module will be placed here

Address + 5

Write data for first module

This data value will be written to the first module

Address + 6

Second rack & slot

Rack and slot number (in the form RRSS in hexadecimal, where RR is the rack number and SS is the slot number) of the 2nd module with which data will be exchanged

Address + 7

Read data from second module

The data read from the second module will be placed here

Address + 8

Write data for second module

This data value will be written to the second module

Address + ((I-1) * 3) + 3

Ith rack & slot

Rack and slot number (in the form RRSS in hexadecimal, where RR is the rack number and SS is the slot number) of the Ith module with which data will be exchanged

Address + ((I-1) * 3) + 4

Read data from Ith module

The data read from the Ith module will be placed here

Address + ((I-1) * 3) + 5

Write data for Ith module

This data value will be written to the Ith module

Address + ((N-1) * 3) + 3

Last rack & slot

Rack and slot number (in the form RRSS in hexadecimal, where RR is the rack number and SS is the slot number) of the last module with which data will be exchanged

Address + ((N-1) * 3) + 4

Read data from last module

The data read from the last module will be placed here

Address + ((N-1) * 3) + 5

Write data for last module

This data value will be written to the last module

Address + (N * 3) + 3

End of list indicator

A zero in this word indicates the end of the list of modules

Series 90™-30/20/Micro PLC CPU Instruction Set Reference Manual – May 2002

GFK-0467M

Page 263

12

Table 12-8. Error Codes Value

Description

1

Success, the function has executed normally.

-1

Module not present in the specified slot.

-2

Module inappropriate, module in the specified slot is not a smart module or does not support this functionality.

-3

Module not working, module in the specified slot is not communicating with the CPU properly.

-4

Read data parity error, parity error occurred during a read operation from an expansion or remote rack.

-5

Invalid function specified in the command block.

Example 1 The following example shows a Read (Specified in %R0001) of a single module, located at Rack 2, Slot 4 (specified in %R0004). If the function completes successfully, the data read will be stored in %R0005. If an error occurs, however, an error code will be written to %R0002, and the rack/slot location of the module generating the error will appear in %R0003. Note that since this is a Read function for a single module, Address + 5 and Address + 6 are not used. Therefore, the corresponding memory locations, %R0006 and %R0007, are filled with zeros from the BLKMV instruction’s IN6 and IN7 inputs. If an additional module were to be read, %R0006 and %R0007 would be used for the additional module. For more information on the Read function, see Table 12-5 earlier in this chapter. %M0201

%M0202 BLKMV_ WORD

CONST 0001

IN1

CONST 0000

IN2

CONST 0000

IN3

CONST 0204

IN4

CONST 0000

IN5

CONST 0000

IN6

CONST 0000

IN7

%M0202

Q

%R0001 0001

Address %R0001 %R0002 %R0003 %R0004 %R0005 %R0006 %R0007

Value 0001 0000 0000 0204 0000 0000 0000

Description 1 = Read Error Code Error Location Rack 2, Slot 4 Read Data Not Used Not Used

%M0204 SVC_ REQ

GFK-0467M

CONST 0046

FNC

%R0001 0001

PARM

Chapter 12 Control Functions

12-75

Page 264

12

Example 2 In this example the BLKMV and two MOVE instructions write the required data to the parameter block, which starts at %R0001 (specified by the SVCREQ PARM input). When enabled, the SVCREQ reads the extra status word data from the module in Rack 0, Slot 4 and from the module in Rack 1, Slot 1. It writes a value of 0005 to the module in Rack 0, Slot 4,and a value of 0009 to the module in Rack 1, Slot 1. (Note that the modules do not need to be listed in the parameter block in order by slot numbers.) Data read from the module in Rack 0, Slot 4 will be placed into %R0008. Data read from the module in Rack 1, Slot 1 will be placed in %R0005.

%M0201 MOVE_ WORD

BLKMV_ WORD

CONST 0003

IN1

CONST 0000

IN2

CONST 0000

IN3

CONST 0101

IN4

CONST 0000

IN5

CONST 0009

IN6

CONST 0004

IN7

Q

%R0001 0003

Q

%R0008 0000

Parameter Block Address %R0001 %R0002 %R0003 %R0004 %R0005 %R0006 %R0007 %R0008 %R0009

MOVE_ WORD

IN1

IN1 LEN 0001

%M0201

CONST 0005

CONST 0000

Q

Value 0003 0000 0000 0101 0000 0009 0004 0000 0005

Description 3 = Read/Write Error Code Error Location (Rack/Slot) Rack 1, Slot 1 (1st Module) Read 1st Module Data Write 1st Module Data Rack 0, Slot 4 (2nd Module) Read 2nd Module Data Write 2nd Module Data

%R0009 0000

LEN 0001

%M0201

%M0204 SVC_ REQ

12-76

CONST 0046

FNC

%R0001 0003

PARM

Series 90™-30/20/Micro PLC CPU Instruction Set Reference Manual – May 2002

GFK-0467M

Page 265

12

SVCREQ #48: Reboot After Fatal Fault Auto Reset Compatibility for SVCREQ 48 CPU - This Service Request is supported by firmware release 10.00 (or later version) for Series 9030 CPUs 331, 340, 341, 350, 36x, and 37x. Software - This Service Request is only supported by VersaPro Version 1.1 (or later version) PLC software. Logicmaster does not support this feature.

Warning The Reboot After Fatal Fault feature should not be used (Ignore Fatal Faults parameter set to Disabled) in applications where an automatic PLC restart under fault condition could produce an unsafe condition in the controlled equipment. It is the responsibility of the system designer to determine whether this feature can be used safely with their equipment. Failure to follow this warning could result in injury or death to personnel and/or damage to equipment. Description The Reboot After Fatal Fault Service Request lets the PLC automatically resume normal operation after a fatal fault has occurred. Following the fatal fault, the PLC will automatically reset and resume execution. The faults will not be cleared, but will be treated as non-fatal. If fatal faults are present following the power up, the PLC will still be allowed to transition to run mode. This feature is enabled by the Ignore Fatal Faults (or Fatal Fault Override) parameter in the CPU’s hardware configuration. SVCREQ 48 sets the maximum number of retries and the time period during which the retries may occur. If the number of retries allowed within the time period is exceeded, the CPU mode is set to STOP/FAULT. If the period is 0, the CPU mode is set to STOP/FAULT when the number of retries allowed is exceeded. If the operator cycles power, fatal faults are ignored. The current fault count and time period are initialized. The total number of fatal faults is unchanged, but the total number of retries is incremented. System bit %S0021 is set to 1 whenever retry is successful and remains set until all fatal faults are cleared, or the mode is set to STOP/FAULT.

GFK-0467M

Chapter 12 Control Functions

12-77

Page 266

12

Table 12-9. Parameter Block for Reboot after Fatal Fault Location

Field

Meaning

Word 1

Service Request Status

See Return Status Definition, below. User program must initialize this word to zero.

Word 2

Unlimited Retries

0 = Disable (number of retries is set by Word 3) 1 = Enable (Words 3 and 4 ignored)

Word 3

Number of Retries Allowed

Range is 0 to 128 0 = Automatic Reboot is Disabled 1 to 128 = Maximum number of retries that are allowed to occur within the period set in Word 4.

Word 4

Retry Period (in minutes)

Range is 0 to 5940 minutes (99 hours) 0 = No time limit on maximum number of retries set in Word 3. Auto Reboot will be allowed for the number of retries. 1 to 5940 = Auto Reboot is disabled if the number of retries specified is exceeded within the period specified.

Table 12-10. Return Status Definitions for Reboot after Fatal Fault Status

12-78

Description

Notes

Power Flow

-5

Invalid Retry Period

Valid range is 0 to 5940

-4

Invalid No. of Retries

Valid range is 0 to 128

No

-3

Invalid Unlimited Retries

Must be 0 or 1

No

-2

Configuration Disabled

Ignore Fatal Faults (Fatal Fault Override) option must be enabled in hardware configuration.

No

0

No Action

Command requires no change

Yes

1

Auto Reset Enabled

Valid command enables reboot after Fatal Fault

Yes

2

Auto Reset Disabled

Valid command disables Reboot after Fatal Fault. Ignore Fatal Faults remains enabled.

Series 90™-30/20/Micro PLC CPU Instruction Set Reference Manual – May 2002

No

GFK-0467M

Page 267

12

SVCREQ 49 Auto Reset Statistics Service Request 49 provides access to two variables which record total number of fatal faults and retires that have occurred. The range of these variables is 0 to 65535. These variables do not roll over if their maximum value is exceeded. (Service Request 48 is used to configure the maximum number of retries allowed and the time limit during which the retries can occur.) Table 12-11. Parameter Block for Auto Reset Statistics Word 1

Service Request Status

See Return Status Definitions below. User program must initialize this word to zero.

Word 2

Command

0 = Return total number of Fatal Faults and Number of Retries that have occurred. 1 = Initialize the Total Number of Fatal Faults and Total Number of Retries to Zero.

Word 3

Returned Value = Total number of Fatal Faults that have occurred.

User program should initialize to zero.

Word 4

Returned Value = Total number of Auto Reset Retries

User program should initialize to zero.

Table 12-12. Return Status Definitions for Auto Reset Statistics Status

Description

-2

Configuration Disabled

-1 1

Notes

Power Flow

Ignore Fatal Faults (Fatal Fault Override) option must be enabled in hardware configuration.

No

Invalid Command

Command must be 0 or 1.

No

Normal Status

Valid Command

Yes

CPU Compatibility for SVCREQ 49 This Service Request is supported by Firmware Release 10.00 for the Series 90-30 CPUs 331, 340, 341, 350, 36x, and 37x.

GFK-0467M

Chapter 12 Control Functions

12-79

Page 268

12

PID The Proportional plus Integral plus Derivative (PID) control function is the best known general purpose algorithm for closed loop process control. The Series 90 PID function block compares a Process Variable (PV) feedback with a desired process Set Point (SP) and updates a Control Variable (CV) output based on the error. The block uses PID loop gains and other parameters stored in an array of 40 16 bit words (discussed on page 12-82) to solve the PID algorithm at the desired time interval. All parameters are 16 bit integer words for compatibility with 16 bit analog process variables. This allows %AI memory to be used for input Process Variables and %AQ to be used for output Control Variables. The example shown below includes typical inputs. _____ %S00007 | | (enable), - | | - - -| PID_| - (ok) Power flow out if OK | | | IND | | | (set point) %R00010, |SP CV| - %AQ0001 Control Variable +21000 | | +25000 | | (process variable) %AI0001, |PV | +20950 | | | | %M0001 | |, - | | - - - |MAN | | | | | %M0002 | |, - | | - - - |UP | | | | | %M0002 |DN |, - | | - - - | | |_____| %R00100

RefArray is 40 %R words

(reference array address)

As scaled 16 integer numbers, many parameters must be defined in either PV counts or units or CV counts or units. For example, the SP input must be scaled over the same range as PV because the PID block calculates the error from the difference of these two inputs. The PV and CV counts can be –32000 or 0 to 32000, matching analog scaling or from 0 to 10000, to display variables as 0.00% to 100.00%. The PV and CV Counts do not have to have the same scaling, in which case there will be scale factors included in the PID gains.

Note The PID will not execute more often than once every 10 milliseconds. This could change your results if you set it up to execute every sweep and the sweep is less than 10 milliseconds. In such a case, the PID function will not run until enough sweeps have occurred to accumulate an elapsed time of 10 milliseconds. For example, if the sweep time is 9 milliseconds, the PID function will execute every other sweep with an elapsed time of 18 milliseconds for every time it executes.

12-80

Series 90™-30/20/Micro PLC CPU Instruction Set Reference Manual – May 2002

GFK-0467M