background image

GE  
Automation & Controls

 

 

 

 

For Public Disclosure

 

Programmable Control Products 

 

RX7i, RX3i and RSTi-EP CPU Programmer's Reference 
Manual GFK-2950C 

 
 

 
 

PACSystems* 
RX7i, RX3i and RSTi-EP 
CPU Programmer's 
Reference Manual

 

GFK-2950C

 

February 2018 

Summary of Contents for PACSystems RX7i

Page 1: ...ntrols For Public Disclosure Programmable Control Products RX7i RX3i and RSTi EP CPU Programmer s Reference Manual GFK 2950C PACSystems RX7i RX3i and RSTi EP CPU Programmer s Reference Manual GFK 2950...

Page 2: ...uded herein Changes modifications and or improvements to equipment and specifications are made periodically and these changes may or may not be reflected herein It is understood that GE may make chang...

Page 3: ...nternational Americas Direct Dial 1 780 420 2010 if toll free 800 option is unavailable Customer Care Email digitalsupport ge com Primary language of support English Europe the Middle East and Africa...

Page 4: ...ication Program 6 2 1 1 Blocks 6 2 1 2 Functions and Function Blocks 6 2 1 3 How Blocks Are Called 7 2 1 4 Nested Calls 7 2 1 5 Types of Blocks 8 2 1 6 Local Data 18 2 1 7 Parameter Passing Mechanisms...

Page 5: ...nctions Handle Numerical Data 51 3 9 1 Data Types 51 3 9 2 Floating Point Numbers 53 3 10 User Defined Types UDTs 55 3 10 1 Working with UDTs 55 3 10 2 UDT Properties 55 3 10 3 UDT Limits 56 3 10 4 RU...

Page 6: ...cts 96 4 4 6 Transition Contacts 97 4 5 Control Functions 102 4 5 1 Do I O 103 4 5 2 Edge Detectors 106 4 5 3 Drum 108 4 5 4 For Loop 112 4 5 5 Mask I O Interrupt 114 4 5 6 Read Switch Position 115 4...

Page 7: ...4 8 9 Data Initialize Communications Request 158 4 8 10 Data Initialize DLAN 159 4 8 11 Move 160 4 8 12 Move Data 162 4 8 13 Move Data Explicit 163 4 8 14 Move From Flat 164 4 8 15 Move to Flat 166 4...

Page 8: ...er Function Blocks 217 4 13 3 Standard Timer Function Blocks 228 Chapter 5 Function Block Diagram FBD 233 5 1 Note on Reentrancy 234 5 2 Advanced Math Functions 235 5 2 1 EXPT Function 237 5 3 Bit Ope...

Page 9: ...78 6 2 3 To enable Constant Sweep mode and use a new timer value 278 6 2 4 To change the timer value without changing the selection for sweep mode state 278 6 2 5 To read the current timer state and v...

Page 10: ...7 Mask Unmask I O Interrupt 306 6 18 1 Masking Unmasking Module Interrupts 306 6 19 SVC_REQ 18 Read I O Forced Status 308 6 20 SVC_REQ 19 Set Run Enable Disable 309 6 21 SVC_REQ 20 Read Fault Tables 3...

Page 11: ...uality 338 6 33 12 Redundancy 338 6 33 13 ENO and Power Flow to the Right 338 6 33 14 Parameter Block for SVC_REQ 57 339 Chapter 7 PID Built In Function Block 343 7 1 Operands of the PID Function 344...

Page 12: ...2 Statement Types 368 8 2 1 Assignment Statement 369 8 2 2 Function Call 370 8 2 3 RETURN Statement 373 8 2 4 IF Statement 374 8 2 5 CASE Statement 375 8 2 6 FOR DO Statements 377 8 2 7 WHILE Statemen...

Page 13: ...p Group 129 416 9 4 20 Corrupted User Program on Power Up Group 130 417 9 4 21 Window Completion Failure Group 131 417 9 4 22 Password Access Failure Group 132 418 9 4 23 Null System Configuration for...

Page 14: ...GBC Software Exception Category 21 441 9 5 20 Block Switch Category 22 442 9 5 21 Reset of IOC Category 27 442 9 6 Diagnostic Logic Blocks DLBs 443 9 6 1 DLB Operation 444 9 6 2 Executing DLBs 446 9...

Page 15: ...___________________________________ 343 Figure 15 PID in Function Block Diagram____________________________________________________________________ 343 Figure 16 PID_IND Diagram_______________________...

Page 16: ...fications see PACSystems RX7i RX3i and RSTi EP CPU Reference Manual GFK 2222 Programming Features are described in Chapter 2 through Chapter 8 Elements of an Application Program Chapter 2 Program Data...

Page 17: ...e Rack Remote Slot Remote Sub Slot and Device ID Requires RX3i firmware version 9 40 or later B Oct 2017 Added Redundancy and FA_OK System Bits S Section 3 8 1 A May 2017 Changed the document Title an...

Page 18: ...isting systems Support for existing Series 90 modules expansion racks and remote racks protects your hardware investment You can upgrade on your timetable without disturbing panel wiring The RX3i supp...

Page 19: ...X3i PROFIBUS Modules User s Manual GFK 2301 PACSystems RX3i Max On Hot Standby Redundancy User s Manual GFK 2409 PACSystems RX3i Ethernet Network Interface Unit User s Manual GFK 2439 PACMotion Multi...

Page 20: ...5 Chapter 2 Program Organization This chapter provides information about the operation of application programs in a PACSystems CPU Structure of the Application Program Controlling Program Execution I...

Page 21: ...is a named section of executable logic that can be downloaded to and run on the target controller The logic in a block can include functions function blocks and calls to other blocks 2 1 2 Functions...

Page 22: ...E and resumes execution at the point after the block call instruction Note To halt the CPU when there is not enough stack space to execute a block there are two choices The best method is to add logic...

Page 23: ...cution unless Y0 is set to FALSE within the logic of the block For all block types the maximum number of input parameters is one less than the maximum number of output parameters This is because the E...

Page 24: ...a parameterized block and the block is called by _MAIN L references will be inherited from the P references wherever encountered in the parameterized block for example L0005 P0005 Note It is possible...

Page 25: ...s on arguments relative to this general rule S memory addresses cannot be used as arguments to any output parameter This is because user logic is not allowed to write to S memory Indirect references u...

Page 26: ...to the next Note A member variable is not passed into or out of a UDFB as a parameter A member variable is used only within the logic of that function block A UDFB cannot be triggered by an interrupt...

Page 27: ...DFB named Motors Each instance variable has elements corresponding to parameters In1 Out1 and Y0 and internal variables modelno speed and temp Instances are created as symbolic variables never as mapp...

Page 28: ...1 to 1024 INPUTS by reference constant reference value or value result Default value Retentive for value or value result Not applicable for reference OUTPUTS by result INT UINT and WORD 1 to 512 INPUT...

Page 29: ...UDFB type does not create an instance A nested instance cannot be of the same type as the UDFB being defined because this would set up an infinitely recursive definition Nor can any level of a nested...

Page 30: ...an argument to a parameterized block can be invoked by the parameterized block s logic The output parameters and their corresponding instance data elements of a UDFB instance that is passed as an arg...

Page 31: ...ock is called by _MAIN L references will be inherited from the P references wherever encountered in the external block for example L0005 P0005 Initialization of C Variables When an external block is s...

Page 32: ...UINT and WORD 1 to 512 INPUTS by reference OUTPUTS by reference DINT REAL and DWORD 1 to 256 INPUTS by reference OUTPUTS by reference LREAL 1 to 128 INPUTS by reference OUTPUTS by reference UDT3 1 to...

Page 33: ...ta as well as the P data that is available to all blocks The _MAIN block cannot use L External blocks and parameterized blocks can use the Local Data L of their calling block as well as the P data of...

Page 34: ...ed by constant reference the CPU passes a reference address pointer symbolic variable pointer or I O variable pointer into the function block instance or parameterized block The instance or block can...

Page 35: ...th the called block and the address of its argument is saved All logic within the called block that reads or writes to the parameter is reading or writing to this stack memory When the called block co...

Page 36: ...emory location contains the value 1 The same relay passes negative power flow if the memory location contains the value 0 Usually an instruction that receives negative power flow does not execute and...

Page 37: ...truction in the FBD editor b Whether the inputs to the FBD instruction are resolved To determine the order of execution of FBD instructions in the FBD editor the FBD compiler performs the following st...

Page 38: ...tement directs the PLC to perform a specified action Statements provide variable assignments conditional evaluations iteration and the ability to call other blocks For details on ST statements paramet...

Page 39: ...blocks The nested Master Control Relay MCRN function can be used to execute a portion of the program logic with negative power flow Logic is executed in a forward direction and coils in that part of t...

Page 40: ...iscrete input state changes rising falling edge analog range limits low high alarms and high speed signal counting events Module Interrupts are generated by VME modules A single interrupt is supported...

Page 41: ...blocks do not accumulate time if used in a block that is executed as a result of an interrupt Blocks that are triggered by interrupts can make calls to other blocks The application stack used during...

Page 42: ...ut Module IC697MDL650 the first input can be configured to generate an interrupt on either the rising or falling edge of the input signal If the interrupt is enabled in the module configuration that i...

Page 43: ...r this block are ignored Preemptive Block Scheduling Preemptive scheduling allows you to assign a priority to each interrupt trigger The priority values range from 1 to 16 with 1 being the highest A s...

Page 44: ...s how that data is stored in the PACSystems CPU s memory Variables Reference Memory User Reference Size and Default Genius Global Data Transitions and Overrides Retentiveness of Logic and Data Data Sc...

Page 45: ...mbers with no fractional part Data types are described in How Program Functions Handle Numerical Data In the programming software all variables in a project are displayed in the Variables tab of the N...

Page 46: ...mbolic variables cannot be used with indirect references for example Name For a full description refer to Indirect References Only global scope Symbolic variables can be used in EGD pages A variable m...

Page 47: ...nd logic independently When the HWC and logic are coupled in the PACSystems controller you cannot clear the HWC and the logic independently As for any download you cannot RUN Mode Store RMS the HWC an...

Page 48: ...of elements in array BYTE variable 8 BYTE array 8n where n is the number of array elements W DINT variable 2 DINT array Number of elements in array times 2 DWORD variable 2 DWORD array Number of eleme...

Page 49: ...f the variable is evaluated and the corresponding array element is accessed Note The numbering of array elements is zero based For example to access an element of the array named ABC you could write A...

Page 50: ...nstant with an index variable In LD Diagnostic Logic Blocks support the use of array elements with variable indexes Where Array Elements with Variable Indexes are Not Supported The following do not su...

Page 51: ...that uses a variable index compare the value of the index variable with the number of elements in the array Tip In LD use a RANGE instruction Notes Checking before executing each instruction that uses...

Page 52: ...rences are retained across a power cycle to the CPU Indirect References An indirect reference allows you to treat the contents of a variable assigned to an LD instruction operand as a pointer to other...

Page 53: ...IT IN ST and Q Restrictions The use of Bit in Word references has the following restrictions Bit in Word references cannot be used on legacy transition contacts POSCON NEGCON and transition coils POSC...

Page 54: ...temporary references These references are never checked for multiple coil use and can therefore be used many times in the same program even when coil use checking is enabled this is not a recommended...

Page 55: ...Reference Words 0 maximum available user RAM 1152 words L per block 8192 words 8192 words P per program 8192 words 8192 words Managed Memory Symbolic Discrete 0 83 886 080 bits 32768 Symbolic Non Dis...

Page 56: ...r the automatic and repeated transfer of G I Q AI AQ and R data No special application programming is required to use global data since it is integrated into the I O scan All devices that have Genius...

Page 57: ...en to the reference is the same as the previous value of the reference Therefore when a reference is written and its new value is the same as its previous value its transition bit is turned OFF When i...

Page 58: ...e not saved on STOP Mode to RUN Mode transitions symbolic variables that have a data type other than BOOL symbolic variables of BOOL type that are configured as retentive Retentive data is also preser...

Page 59: ...in these registers Symbolic variable Global From any program block or host computer Symbolic variables have system global scope by default However symbolic variables with local scope can be created us...

Page 60: ...IN Examples of other system status references include FST_SCN ALW_ON and ALW_OFF Note S bits are read only bits do not write to these bits However you can write to SA SB and SC bits Listed below are a...

Page 61: ...uring operation this contact is set to 1 If used in conjunction with a legacy non smart battery this indication is not reliable Battery less CPUs including CPE302 CPE305 CPE310 and CPE330 Energy Pack...

Page 62: ...For details refer to Battery Status Group 18 in Chapter 9 The CPU may set this contact when an I O module or special purpose module has reported a low battery In this case a fault will be reported in...

Page 63: ...en the CPU is power cycled SB0012 NUL_CFG Set when an attempt is made to put the CPU in RUN Mode when there is no configuration data present To clear this bit clear the CPU fault table or power cycle...

Page 64: ...fault Configurable Fault References Configurable Faults Default Action Description SBUS_ER diagnostic System bus error The BSERR signal was generated on the VME system bus SFT_IOC diagnostic Non reco...

Page 65: ...the module APL_FLT diagnostic Application fault ADD_RCK diagnostic New rack added extra or previously faulted rack has returned ADD_IOC diagnostic Extra I O Bus Controller or reset of I O Bus Controll...

Page 66: ...data type is 32768 to 32767 Register 1 Two s Complement value 16 1 S s sign bit 0 positive 1 negative DINT Double Precision Integer Stored in 32 bit data memory locations two consecutive 16 bit memor...

Page 67: ...uces a double integer result The DIV function takes a double integer dividend and an integer divisor to product an integer result ASCII ASCII Eight bit encoded characters A single word reference is re...

Page 68: ...x10308 Note The programming software allows 32 bit and 64 bit arguments DWORD DINT REAL and LREAL to be placed in discrete memories such as I M and R in the PACSystems target This is not allowed on Se...

Page 69: ...duced by overflow are used as operands to other REAL or LREAL functions they may cause an undefined result This undefined result is referred to as an NaN Not a Number For example the result of adding...

Page 70: ...ic 3 10 2 UDT Properties Name The UDT s name Maximum length 32 characters Description The user defined description of the UDT Memory Type The type of symbolic or I O variable memory in which a variabl...

Page 71: ...ry type You cannot alias a variable to a UDT variable or UDT variable element A FAULT contact supports a BOOL element of a UDT I O variable but not a BOOL element of a UDT parameter in a UDFB or param...

Page 72: ...a types and sequence 2 Create an array of length 6 named ABC of the COMMREQ6 data type 3 The array resides in symbolic memory You can convert the symbolic variable to an I O variable 4 Populate the va...

Page 73: ...some input parameters of some functions This occurs when the function during the course of its execution actually writes a value to the input parameter Data flow is prohibited in these cases because d...

Page 74: ...ment of the BOOL array must be 8n 1 where n 0 1 2 3 and so on For example M00033 is byte aligned because 33 8 4 1 The parameter in question must support discrete memory reference addresses The instruc...

Page 75: ...mples include changing the type of contact or coil or changing a reference address used for an existing function block The following are word for word changes Switching between two symbolic variables...

Page 76: ...ng categories Advanced Math Functions Bit Operation Functions Coils Contacts Control Functions Conversion Functions Counters Data Move Functions Data Table Functions Math Functions Program Flow Functi...

Page 77: ...ngent of the IN operand and expresses the result in radians Logarithmic LN_REAL LN_LREAL Calculates the natural logarithm of the operand IN LOG_REAL LOG_LREAL Calculates the base 10 logarithm of the o...

Page 78: ...of IN The power flow output is energized when the function is performed unless Overflow or one of the following invalid conditions occurs IN 0 for LOG or LN IN1 0 for EXPT IN is negative infinity for...

Page 79: ...ormed without Overflow unless one of these invalid REAL operations occurs If IN 0 Q is set to 0 and ENO is set FALSE If IN is a NaN Not a Number Q will also be a NaN value and ENO will be set false Ex...

Page 80: ...t in output Q The SIN COS and TAN functions accept a broad range of input values where 263 IN 263 263 is approximately 9 22x1018 Input values outside this range will produce incorrect results The powe...

Page 81: ...ion produces a result Q such that 2 Q 2 ASIN IN The ACOS function produces a result Q such that Q 0 ACOS IN The ATAN function accepts the broadest range of input values where IN Given a valid value fo...

Page 82: ...l invert Sets the state of each bit in output bit string Q to the opposite state of the corresponding bit in bit string IN1 Logical OR OR_DWORD OR_WORD Compares the bit strings IN1 and IN2 bit by bit...

Page 83: ...1 of the first WORD or DWORD being the Least Significant Bit LSB The last bit of the last WORD or DWORD is the Most Significant Bit MSB For example if you specify three WORDs of data beginning at ref...

Page 84: ...Position Parameter Description Allowed Operands Optional Length displayed as The number of WORDs or DWORDs in the bit string 1 Length 256 Constants No IN The data to operate on All Constants may only...

Page 85: ...is not active and the previous EN was OFF the bit pointed to by the current step number is cleared The current step number is incremented or decremented based on the direction DIR operand Then the bit...

Page 86: ...erands for Bit Sequencer Warning Do not write to the Control Block memory with other instructions Overlapping references may cause erratic operation of BIT_SEQ Parameter Description Allowed Operands O...

Page 87: ...is in M memory and the Length is 3 the bit sequencer occupies 3 bits the other 5 bits of the byte are not used If ST is in R memory and the Length is 17 the bit sequencer uses 4 bytes all of R1 and R...

Page 88: ...ected The function passes power flow to the right unless the value for BIT is outside the specified range Operands for Bit Set Bit Clear Parameter Description Allowed Operands Optional Length The numb...

Page 89: ...the bits are numbered 1 through 16 for a WORD not 0 through 15 They are numbered 1 through 32 for a DWORD Operands for Bit Test Parameter Description Allowed Operands Optional Length The number of WOR...

Page 90: ...combine strings or to control many outputs with one simple logical structure The Logical OR function is the equivalent of two relay contacts in parallel multiplied by the number of bits in the string...

Page 91: ...perate on All No IN2 Must be the same data type as IN1 The first WORD or DWORD of the second string to operate on All No Q Must be the same data type as IN1 The first WORD or DWORD of the operation s...

Page 92: ...whenever it receives power You can specify a string length of 1 to 256 WORDs or DWORDs Operands for Logical NOT Parameter Description Allowed Operands Optional Length The number of WORDs or DWORDs in...

Page 93: ...at the next bit position after a miscompare or if all bits compared successfully upon the next invocation of the function the compare starts at the beginning Tip If you want to start the next comparis...

Page 94: ...n S SC memories No Q The output copy of the compare mask bit string All except constants No BN The number of the bit where the latest miscompare occurred or the highest bit number in the inputs if no...

Page 95: ...tes M0001 through M0016 is compared with M0017 through M0032 M0033 through M0048 contains the mask value The value in R0001 determines the bit position in the two input strings where the comparison st...

Page 96: ...g to be rotated the output parameter Q must use the same memory location as the input parameter IN The entire rotated string is written on each scan that power is received A string length of 1 to 256...

Page 97: ...to the right As bits are shifted out of the low end of the string LSB the same number of bits is shifted in at the high end MSB Shift Left and Shift Right A string length Length of 1 to 256 words can...

Page 98: ...f bits in the string Length all bits in Q are set to the value B1 OK is set FALSE and B2 is set to B1 All except variables in S SC memories No B1 The bit value to shift into the array flow No B2 The b...

Page 99: ...followed by a continuation contact at the beginning of any rung following the continuation coil Coils are always located at the rightmost position of a line of logic 4 3 1 Coil Checking The level of c...

Page 100: ...PLC to continue the present rung s LD logic power flow value TRUE or FALSE at the continuation contact on a following rung The flow state of the continuation coil is passed to the continuation contac...

Page 101: ...not receive power flow it does not change the value of its discrete reference Therefore whether or not the coil itself continues to receive power flow the reference stays ON until the reference is res...

Page 102: ...ternal device Doing so will destroy the coil s one shot nature and the coil may not behave as described Do not use a transition contact with the same reference address used on a transition coil becaus...

Page 103: ...apply to POSCOILs and NEGCOILs do not apply to PTCOILs and NTCOILs Warning PTCOIL and NTCOIL instructions should not be used in a parameterized block or user defined function block UDFB with a parame...

Page 104: ...Multiple instances of PTCOIL and or NTCOIL can be associated with the same BOOL variable but the transition status of each instance of the PTCOIL or NTCOIL associated with the BOOL variable is unique...

Page 105: ...of the PTCOIL is not affected by the presence of the fourth rung which also writes to Xsition PTCOIL behaves the same way when the fourth rung is removed POSCOIL If a POSCOIL is used in place of the...

Page 106: ...high alarm bit associated with the analog WORD reference is ON Low Alarm Contact LOALR if the low alarm bit associated with the analog WORD reference is ON No Fault Contact NOFLT if its associated BO...

Page 107: ...ation contact has no associated variable Notes If the flow of logic does not execute a continuation coil before it executes a continuation contact the state of the continuation contact is no flow The...

Page 108: ...lot bus module fault locating system variable with a FAULT NOFLT contact Note The fault indication of a given module is cleared when the associated fault is cleared from the fault table For I O point...

Page 109: ...U configuration A high alarm contact passes power flow if the high alarm bit associated with the analog reference is ON The low alarm contact LOALR detects a low alarm associated with an analog refere...

Page 110: ...address I Q AI AQ with the FAULT NOFLT contacts To locate a fault use the rack slot bus module fault locating system variables with a FAULT NOFLT contact For I O point fault reporting you must configu...

Page 111: ...N true 1 Operands Parameter Description Allowed Operands Optional BOOLV BOOLV may be a predefined system variable or a user defined variable NCCON If BOOLV is ON the normally closed contact does not p...

Page 112: ...not be used in a parameterized block or user defined function block UDFB with a parameter or member In these cases an R_TRIG or F_TRIG should be used instead Do not use POSCON or NEGCON transition co...

Page 113: ...erent intervals within the Controller scan multiple times during a Controller scan resulting in the transition bit being ON for only a portion of the scan several Controller scans apart resulting in t...

Page 114: ...to again causing the NEGCON to stop passing power flow POSCON and NEGCON Example 2 Bit M00017 is set by a BIT_SET function and then cleared by a BIT_CLR function The positive transition contact X1 ac...

Page 115: ...e following conditions are met The input power flow to NTCON is ON The value of the BOOL variable associated with NTCON is OFF The transition bit associated with the NTCON is ON The transition bit dep...

Page 116: ...weep On all other sweeps the PTCON instruction does not pass power flow POSCON If a POSCON is used in place of the PTCON in the following example keeping the rest of the logic identical the same alter...

Page 117: ...OOP instruction and END_FOR instruction a specified number of times or until EXIT_FOR is encountered Mask I O Interrupt MASK_IO_INTR Mask or unmask an interrupt from an I O module when using I O varia...

Page 118: ...on the I O modules Program execution then returns to the function that follows the DO_IO If the range of references includes an option module HSC APM etc all the input data I and AI or all the output...

Page 119: ...eference is automatically calculated from the length of the END ST range Operands Parameter Description Allowed Operands Optional ST The starting address of the set of input or output points or words...

Page 120: ...uts are not updated This allows the current values of inputs to be compared with their values at the beginning of the scan This form of DO_IO allows input points to be scanned one or more times during...

Page 121: ...nce data that can be a member or an input of the function block so that the transition state follows that of the function block instance and not the function block If an edge detector function block i...

Page 122: ...When the CLK input transitions from false to true the output Q is true for one function block execution The output Q then remains false until a new rising edge is detected When the Controller transiti...

Page 123: ...imers Therefore special care must be taken when programming Drum in parameterized blocks Drum functions in parameterized blocks can be programmed to track true real time as long as the guidelines and...

Page 124: ...except the _MAIN block which has a P memory area instead When the _MAIN block calls another block the P mappings from the _MAIN block are accessed by the called block as L mappings If you use a parame...

Page 125: ...rol Block Then the function copies the value in the Preset Step reference to the Q reference bits When R is active the function ignores S flow No PTN Pattern The starting address of an array of words...

Page 126: ...has been in a particular step longer than the step s specified Fault Timeout All except S and constant Yes FF First Follower The starting address of Length 8 1 bytes of memory where Length is the numb...

Page 127: ...y setting the increment to a negative number For example if the START value is 21 the END value is 1 and the increment value is 5 the statements of the FOR loop are executed five times and the index v...

Page 128: ...s 1 and the value for M00017 END is 10 The INDEX R00001 increments by the value of the INC operand which is assumed to be 1 when omitted starting at 1 until it reaches the ending value 10 The ADD func...

Page 129: ...r Description Allowed Types Allowed Operands Optional MASK Selects unmask or mask operation Unmask 0 Mask 1 BOOL variable or Bit reference in non discrete memory data flow I Q M T G S SA SB SC R P L A...

Page 130: ...Allowed Operands Optional POS Memory location at which to write current switch position value 1 RUN I O Enabled 2 RUN Outputs Disabled 3 STOP Mode All except S SA SB SC No MODE Memory location to whic...

Page 131: ...e inputs will be scanned BOOL variable or bit reference in a non BOOL variable Power flow No OUT If true the outputs will be scanned BOOL variable or bit reference in a non BOOL variable Power flow No...

Page 132: ...stop I O scans then cause certain I O to be scanned from the program Inputs I00010 and I00011 form a latch circuit with the contact from M00001 This keeps the SUS_IO function active on each sweep unt...

Page 133: ...nel does not have its interrupt enabled in the configuration Operands Parameter Description Allowed Types Allowed Operands Optional SUSP Selects a suspend or resume operation 1 ON suspend 0 OFF resume...

Page 134: ...AL to INT Convert to UINT 16 bit unsigned integer BCD4_TO_UINT Converts BCD4 to UINT INT_TO_UINT Converts INT to UINT DINT_TO_UINT Converts DINT to UINT REAL_TO_UINT Converts REAL to UINT Convert to D...

Page 135: ...n receives power flow it performs the appropriate angle conversion on the REAL or LREAL value in input IN and places the result in output Q DEG_TO_RAD and RAD_TO_DEG pass power flow to the right when...

Page 136: ...lays or presets to external devices such as high speed counters Operands Parameter Description Allowed Operands Optional IN The UINT or INT value to convert to BCD4 All except S SA SB and SC No Q The...

Page 137: ...ctly as input for another program function The function passes power flow when power is received unless the conversion would result in a value that is outside the range 0 to 99 999 999 Operands Parame...

Page 138: ...single precision signed integer INT value which it outputs to Q REAL_TO_INT does not change the original REAL data Note The output data can be used directly as input for another program function The...

Page 139: ...NING The sum is output by ADD_INT to the reference TOTAL Example UINT to INT Whenever input M00344 is set the UINT value in R00234 is converted to a signed integer INT and passed to the ADD function w...

Page 140: ...ata can be used directly as input for another program function as in the example The function passes power flow when power is received unless the resulting data is outside the range 0 to 65 535 Warnin...

Page 141: ...TAL Example INT to UINT Whenever input I0002 is set the INT value in L00050 is converted to an unsigned single precision integer UINT and passed to the ADD_UINT function where it is added to the UINT...

Page 142: ...ed integer DINT value which it outputs to Q These functions do not change the original REAL or LREAL data The output data can be used directly as input for another program function The function passes...

Page 143: ...ned double precision integer DINT and passed to the ADD_DINT function where it is added to the DINT value in R00797 The sum is output by ADD_DINT to the reference TOTAL Example INT to DINT Whenever in...

Page 144: ...uses 8 bits to store the exponent and the sign and only 24 bits to store the mantissa Warning Converting from DINT to REAL may result in the loss of significant digits for numbers with more than 7 si...

Page 145: ...unsigned integer value in L00001 is 825 The value placed in L00016 is 825 000 Example INT to REAL The integer value of input IN is 678 The value placed in R00010 is 678 000 Example LREAL to REAL The d...

Page 146: ...ional IN The REAL value to convert to LREAL All except S SA SB and SC No Q The LREAL equivalent value of the original REAL value All except S SA SB and SC No Example The REAL value of the square root...

Page 147: ...inal data is not changed Note The output data can be used directly as input for another program function TRUNC_DINT and TRUNC_INT pass power flow when power is received unless the specified conversion...

Page 148: ...ounts up to a designated value The output is ON whenever the Current Value is the Preset Value 4 7 1 Data Required for Counter Function Blocks Warning Do not use two consecutive words registers as the...

Page 149: ...rent address and you change word 2 directly your change will have no effect as PV will overwrite word 2 If you use the same address for the PV operand and word 2 you can change the Preset Value in wor...

Page 150: ...se erratic counter operation Note For DNCTR to function properly you must provide an initial reset to set the CV to the value in PV If DNCTR is not initially reset CV will decrement from 0 and the out...

Page 151: ...er up Warning Do not use the Address of the up counter with other instructions Overlapping references cause erratic counter operation Operands Parameter Description Allowed Operands Optional Address T...

Page 152: ...the storage area the up counter increments by 1 increasing the current value of the parts in storage by a value of 1 When a part leaves the storage area the down counter decrements by 1 decreasing th...

Page 153: ...D_BYTE BUS_RD_DWORD BUS_RD_WORD Reads data from a module on the bus Bus Read Modify Write BUS_RMW_BYTE BUS_RMW_DWORD BUS_RMW_WORD Uses a read modify write cycle to update a data element in a module on...

Page 154: ...peration Move from Flat MOVE_FROM_FLAT Copies reference memory data to a UDT variable or UDT array Provides the option of locking the symbolic or I O variable memory area being written to during the c...

Page 155: ...rray elements are processed without exceeding the end of the array For a two dimensional array this method works only if all elements are treated identically for example all are initialized to the sam...

Page 156: ...o the index of the last element is one less than the value assigned to Q DINT or DWORD variable Data flow I Q M T G R P L AI AQ W symbolic I O variable No Array Size Dimension 2 Returns the value of t...

Page 157: ...st element of an array is zero the loop must iterate Q 1 times SUB_DINT performs the subtraction and the result is converted to an INT value and assigned to variable D1_size In the following rungs the...

Page 158: ...references is updated BLKCLR_WORD passes power to the right whenever it receives power Note The input parameter IN is not included in coil checking Operands Parameter Description Allowed Operands Opti...

Page 159: ..._UINT BLKMOV_WORD Operands Note For each mnemonic use the corresponding data type for the Q operand For example BLKMOV_DINT requires Q to be a DINT variable Parameter Description Allowed Operands Opti...

Page 160: ...function adds to the module s base address which is part of the memory region configuration to compute the address to be read or written BUS Read The BUS_RD function reads data from the bus This func...

Page 161: ...F The offset in bytes DWORD constant or variable All except S SC No ST The status of the operation WORD variable All except variables located in S SC and constants Yes Q Reference for data read from t...

Page 162: ...SS and optional address region RGN and offset OFF The original value is stored in parameter OV The function combines the data with the data mask MSK The operation performed AND OR is selected with th...

Page 163: ...constant or variable All except S SC Yes OFF The offset in bytes DWORD constant or variable All except S SC No ST The status of the operation WORD variable All except variables located in S SC and con...

Page 164: ...RGN and OFF parameters The function sets the Q output on if the semaphore was available 0 and was acquired It passes power flow to the right whenever power is received and no errors occur during execu...

Page 165: ...Note An interrupt block can preempt the execution of a BUS_WRT function On the bus only 256 bytes are written coherently i e written without being preempted by an interrupt Mnemonics BUS_WRT_DINT BUS...

Page 166: ...N operand to the communications TASK in the intelligent or specialty module at the rack slot location specified by the SYSID operand The command block contents are sent to the receiving device and the...

Page 167: ...ress 4 Idle Timeout Value This parameter is ignored in No Wait mode Address 5 Maximum Communication Time This parameter is ignored in No Wait mode Address 6 to Address 133 Data Block The data block co...

Page 168: ...EQ This is a WAIT mode COMMREQ and the CPU does not support it The specified target address SYSID operand is not present The specified task TASK operand is not valid for the device The data length is...

Page 169: ...eout Value Because this parameter is ignored in NO WAIT mode no value is input R00021 Maximum Communication Time Value Because this parameter is ignored in NO WAIT mode no value is input R00022 to end...

Page 170: ...Chapter 4 Ladder Diagram LD Programming GFK 2950C February 2018 155 The programming logic displayed in example 2 can be simplified by replacing the six MOVE functions with one DATA_INIT_COMM function...

Page 171: ...s power to the right whenever it receives power Notes The output parameter is not included in coil checking If you replace one DATA_INIT instruction except DATA_INIT_ASCII or DATA_INIT_COMM with anoth...

Page 172: ...ow many bytes of constant text are copied to consecutive reference addresses starting at output Q LEN must be an even number DATA_INIT_ASCII passes power to the right whenever it receives power Note T...

Page 173: ...any words of constant data to copy to consecutive reference addresses starting at output Q The length should be equal to the size of the COMMREQ function s entire command block DATA_INIT_COMM passes p...

Page 174: ...ith a DLAN Interface module which is a limited availability specialty system If you have a DLAN system refer to the DLAN DLAN Interface Module User s Manual GFK 0729 for details Operands Parameter Des...

Page 175: ...clude all the bits in a byte the transition bits associated with that byte which are not in the array are cleared when the Move function receives power flow The input IN can be either a variable provi...

Page 176: ...t into successive memory locations up to the length specified All S SA SB SC allowed only for WORD DWORD BOOL types No Q The location of the first destination data item For MOVE_BOOL any discrete refe...

Page 177: ...s Parameter Description Allowed Operands Optional Length The length of IN the number of elements to copy 1 Length 32 767 Constant No IN The location of the data item to copy If IN is 0 Q is set to its...

Page 178: ...d is required only when the same memory is used in more than one interrupt block or in the main program and an interrupt block If DC is True an interrupt block cannot preempt the copy operation If DC...

Page 179: ...should be a UDT array of at least six elements assigned to output Q During logic execution n bytes of data are copied from reference memory to the first six UDT array elements where n is the length o...

Page 180: ...interrupt block If DC is True an interrupt block cannot preempt the copy operation If DC is False or not present then interrupts can preempt the copy Using DC can impact interrupt latency if the amoun...

Page 181: ...put should be used only when using interrupt blocks and is required only when the same memory is used in more than one interrupt block or in the main program and an interrupt block If DC is True an in...

Page 182: ...ta copied to the reference memory mapped to the variable assigned to Q If IN is 0 length is assigned the constant 1 and the variable or structure assigned to Q is set to its default value Discrete or...

Page 183: ...Warning The use of overlapping input and output reference address ranges in multiword functions is not recommended as it may produce unexpected results The reset input R takes precedence over the func...

Page 184: ...e byte aligned However 16 bits beginning with the reference address specified are displayed online All except data flow constants S No Q The data shifted out of ST The same number of data items will b...

Page 185: ...tional IN The variable whose size in bits is calculated Variable of any data type except BYTE arrays in non discrete memory and double segment structures No Q The number of bits used by the variable a...

Page 186: ...However because of the difference in byte significance word and multiword data for example 16 bit integers INT UINT 32 bit integers DINT or floating point REAL numbers must be adjusted when being tran...

Page 187: ...FO_RD_UINT FIFO_RD_WORD Removes the entry at the bottom of the First In First Out FIFO table and decrements the pointer by one FIFO Write FIFO_WRT_DINT FIFO_WRT_DWORD FIFO_WRT_INT FIFO_WRT_UINT FIFO_W...

Page 188: ...DINT SEARCH_LT_DWORD SEARCH_LT_INT SEARCH_LT_UINT SEARCH_LT_WORD Searches for all array values less than a specified value SEARCH_NE_BYTE SEARCH_NE_DINT SEARCH_NE_DWORD SEARCH_NE_INT SEARCH_NE_UINT SE...

Page 189: ...of the following conditions occurs It receives no power flow N SNX 1 is greater than Length N DNX 1 is greater than Length Note For each mnemonic use the corresponding data type for the SR and DS oper...

Page 190: ...rs Length 16 To copy the seven registers M0011 M0017 to Q0026 Q0032 N is set to 7 SNX is set to 3 to designate the third register M0011 of the block starting at M0009 and DNX is set to 5 to designate...

Page 191: ...es power it compares the value in input parameter IN against each range specified by the array element values of LL and UL Output Q sets a bit ON 1 for each corresponding array element where the value...

Page 192: ...es low order to high are 1 1 1 0 1 0 1 and 0 The bit value displayed will be set ON 1 for the low order bit of R00200 The ok output will be set ON 1 Array Range Example 2 The lower limit LL array cont...

Page 193: ...p around when the table is full When FIFO_RD receives power flow the data at the first location of the table is copied to output Q Next each item in the table is moved down to the next lower location...

Page 194: ...on specified in CART This table location pointed to would be the bottom or oldest data item in the table The number in STK_PTR is then decremented A copy of the oldest data item in the PRODUCT table i...

Page 195: ...full PTR 0 The pointer does not wrap around when the table is full When FIFO_WRT receives power flow the pointer is incremented by 1 Then input data is written into the table at the pointer location...

Page 196: ...word sized elements When the enabling input UNPACK is ON a data item from P_CODE is copied to the table location pointed to by the value in STK_PTR Output node FL passes power when PTR LEN firing the...

Page 197: ...r location to become 0 the output EM is set ON i e EM indicates whether or not the table is empty If the table is empty when LIFO_RD receives power flow no read occurs The pointer always indicates the...

Page 198: ...on in the table no data is written and LIFO_WRT does not pass power to the right The pointer always indicates the last item entered into the table If the table is full it is not possible to add more e...

Page 199: ...to IN Data types BYTE DINT DWORD INT UINT WORD Searching begins at AR INX where AR is the starting address and INX is the index value into the memory block The search continues either until a register...

Page 200: ...t equal to IN SEARCH_GE_WORD searches for a WORD value that is greater than or equal to IN All No ONX The one based position within the memory block of the search target A value of 1 points to the fir...

Page 201: ...block Operands Note For each mnemonic use the corresponding data type for the IN and Q operands For example SORT_INT requires IN and Q to be INT variables Parameter Description Allowed Operands Optio...

Page 202: ...ontent at the new pointer location is copied to output Q TBL_RD always passes power to the right when it receives power Note The TBL_RD and TBL_WRT functions can operate on the same or different table...

Page 203: ...e pointer PTR increments by 1 If this new pointer location is the last item in the table the output FL is set to ON The next time TBL_WRT executes PTR is automatically set back to 1 After incrementing...

Page 204: ..._DINT ADD_INT ADD_REAL ADD_LREAL ADD_UINT Addition Adds two numbers Divide4 DIV_DINT DIV_INT DIV_MIXED DIV_REAL DIV_LREAL DIV_UINT Division Divides one number by another and outputs the quotient Note...

Page 205: ...he overflow If signed or double precision integers are used the sign of the result for DIV and MUL functions depends on the signs of I1 and I2 Maximum Values MAXINT16 Maximum signed 16 bit 7FFF hex 32...

Page 206: ...ower flow unless one of the following conditions occurs For INT type IN is 32 768 For DINT type IN is 2 147 483 648 For REAL or LREAL type IN is NaN Not a Number Operands Parameter Description Allowed...

Page 207: ...N2 32 bit base 10 number with sign up to 10 digits long ADD_REAL Q 32 bit IN1 32 bit IN2 32 bit base 10 number sign and decimals up to 8 digits long excluding the decimals ADD_LREAL Q 64 bit IN1 64 bi...

Page 208: ...once every PLC scan while I0001 is closed For example if I0001 stays closed for five scans the output increments five times even though I00001 only closed once during that period Example2 for ADD To...

Page 209: ...NT Q 16 bit IN1 16 bit IN2 16 bit base 10 number unsigned up to 5 digits long DIV_INT Q 16 bit IN1 16 bit IN2 16 bit base 10 number with sign up to 5 digits long DIV_DINT Q 32 bit IN1 32 bit IN2 32 bi...

Page 210: ...2 Divisor the value to divide into IN1 shown to the right of DIV in the equation IN1 DIV IN2 Q All except S SA SB SC No Q The quotient of IN1 IN2 If an Overflow occurs the result is the largest value...

Page 211: ...ated using the formula Q IN1 IN1 DIV IN2 IN2 where DIV produces an integer number The power flow output is always ON when the function receives power flow unless there is an attempt to divide by zero...

Page 212: ...bit base 10 number with sign up to 10 digits long MUL_REAL Q 32 bit IN1 32 bit IN2 32 bit base 10 number sign and decimals up to 8 digits long excluding the decimals MUL_LREAL Q 64 bit IN1 64 bit IN2...

Page 213: ...and which can be used with a following DIV_DINT function For example the following logic could be used to scale a 10 volt input AI1 to 25000 engineering units in R5 An alternate but less accurate way...

Page 214: ...HI All except S SA SB SC No OHI Outputs High Maximum output value The upper limit of the scaled data Must be the same data type as IHI When the IN input is at the IHI value the OUT value is the same a...

Page 215: ...ith sign up to 5 digits long SUB_DINT Q 32 bit IN1 32 bit IN2 32 bit base 10 number with sign up to 10 digits long SUB_REAL Q 32 bit IN1 32 bit IN2 32 bit base 10 number sign and decimals up to 8 digi...

Page 216: ...th normal power flow End of Logic END Provides an unconditional end of logic The program executes from the first rung to the last rung or the END instruction whichever is encountered first Jump JUMPN...

Page 217: ...tion block that contains the ARG_PRES instruction Cannot be an array element or structure element An alias to a parameter should resolve only to the parameter name All except flow and constants No Q T...

Page 218: ...rameterized block It cannot be used in an external block You cannot call a _MAIN block The called block must exist in the target before making the call There is no limit to the number of calls that ca...

Page 219: ...can also be constants If a formal parameter is an array of BOOL type and has a length evenly divisible by 16 then a variable or array residing in word oriented memory can be passed on to the parameter...

Page 220: ...ctions For example if you have an equation such as E A B C D 4 a parameterized block named AVG_4 could be called as shown in the example to the right In this example the average of the values in R0000...

Page 221: ...d to enter a text explanation in the program When you insert a Comment instruction into the LD logic it displays After you key in a comment the first few words are displayed You can set the Comment mo...

Page 222: ...evious states This includes coils associated with timers counters latches and relays Any JUMPN can be either a forward or a backward jump i e its LABELN can be either in a further or previous rung The...

Page 223: ...and coils are turned off Block calls within the scope of an active Master Control Relay will not execute However any timers in the block will continue to accumulate time A rung may not contain anythin...

Page 224: ...s The ENDMCRN function has no outputs there can be nothing after an ENDMCR instruction in a rung Operands for MCRN ENDMCRN The Master Control Relay function has a single operand a name that identifie...

Page 225: ...transmits the BOOLEAN ON OFF state of the element on its immediate left to the element on its immediate right A vertical wire may intersect with one or more horizontal wires on each side The state of...

Page 226: ..._DATA EQ_DINT EQ_INT EQ_REAL EQ_LREAL EQ_UINT Tests two numbers for equality Greater or Equal GE_DINT GE_INT GE_REAL GE_LREAL GE_UINT Tests whether one number is greater than or equal to another Great...

Page 227: ...AL LREAL and UINT Tip To compare values of different data types first use conversion functions to make the types the same When it receives power flow CMP always passes power flow to the right unless I...

Page 228: ...low If the _DINT or _INT operations are fed the largest possible value with any sign they cannot determine if it is an overflow value The power flow output of the previous operation would need to be c...

Page 229: ...ameter Description Allowed Operands Optional IN1 The first value to be compared the value on the left side of the relational statement PACMotion ENUM variable or structure variable For details refer t...

Page 230: ...Operands Optional IN The value to compare against the range delimited by L1 and L2 Must be the same data type as L1 and L2 All except S SA SB SC No L1 The start point of the range May be the upper lim...

Page 231: ...d and T_MIN 1 minute These contacts represent specific locations in S memory T_10MS 0 01 second timed contact S0003 T_100MS 0 1 second timed contact S0004 T_SEC 1 0 second timed contact S0005 T_MIN 1...

Page 232: ...Blocks TOF When the input IN transitions from ON to OFF the timer starts timing until a specified period of time has elapsed then sets the output Q to OFF Timer On Delay TON When the input IN transiti...

Page 233: ...a different location than word 2 in the timer s or counter s three word array If you use a different address and you change word 2 directly your change will have no effect as PV will overwrite word 2...

Page 234: ...y to ensure these rules are followed The best use of a timer function is to invoke it with a particular reference address exactly one time each scan With parameterized blocks it is important to use th...

Page 235: ...urce block Recursion If you use recursion that is if you have a block call itself either directly or indirectly and your parameterized block contains an OFDT ONDTR or TMR you must follow two additiona...

Page 236: ...dress exactly one time each scan Do not invoke an OFDT with the same reference address more than once per scan inappropriate accumulation of time would result When an OFDT appears in a program block i...

Page 237: ...perands for OFDT Warning Do not use the Address Address 1 or Address 2 addresses with other instructions Overlapping references cause erratic timer operation Parameter Description Allowed Operands Opt...

Page 238: ...is de energized Note If PV equals zero the time is disabled and the reset is activated and the output of the time becomes high Subsequent removal of the reset or activation of input will have no effec...

Page 239: ...til ENABLE goes low RESET goes high or current value becomes equal to the maximum time C RESET goes high Q goes low accumulated time is reset CV 0 D RESET goes low timer then starts accumulating again...

Page 240: ...m LD Programming GFK 2950C February 2018 225 Example for On Delay Stopwatch Timer A retentive on delay timer is used to create a signal Q0011 that turns on 8 0 seconds after Q0010 turns on and turns o...

Page 241: ...rs in a program block it will only accumulate time once per scan Subsequent calls to that same program block within the same scan will have no effect on its TMRs Do not program a TMR function with the...

Page 242: ...lue used when the timer is enabled or reset 0 PV 32 767 If PV is out of range it has no effect on Word 2 All except S SA SB SC Yes CV The current value of the timer All except S SA SB SC and constant...

Page 243: ...persists from one execution of the timer to the next Instance variables are automatically located in symbolic memory You cannot specify an address You can specify a stored value for each element The...

Page 244: ...s TOF TON or TP Must be same type as the instruction NA No IN Timer input Controls when the timer will accumulate time TON and TP will begin to time when IN transitions from OFF to ON TOF will begin t...

Page 245: ...t1 When IN goes OFF the timer starts to measure time and ET increments ET continues to increment until its value equals the preset time PT t2 When ET equals PT Q is set to OFF and ET remains at the pr...

Page 246: ...t The output Q remains OFF and ET continues to increment until its value equals the preset time PT t1 When ET equals PT the output Q is goes ON and ET remains at the preset time PT Q remains ON until...

Page 247: ...il its value equals that of the specified preset time PT Q is set to 0 on until ET equals PT t1 When ET equals PT Q is set to OFF The value of ET is held until IN is set to OFF t2 When IN is set to OF...

Page 248: ...st functions and function blocks implemented in FBD are the same as their LD counterparts Instructions that are implemented differently are discussed in detail in this chapter FBD has the following ge...

Page 249: ...terrupt to trigger while one instance of the block is in process change the values of the wires and then return control to the original block This will result in improper operation There is a work aro...

Page 250: ...inverse cosine of the IN operand and expresses the result in radians For details refer to Inverse Trig ASIN ACOS and ATAN in Chapter 4 Inverse trig Calculates the inverse sine of the IN operand and e...

Page 251: ...Reference Manual GFK 2950C Function Description Calculates the sine of the operand IN where IN is expressed in radians For details refer to Trig Functions in Chapter 4 Calculates the tangent of the op...

Page 252: ...d results that are different from those in the LD implementation of this function Operands of the EXPT Function Parameter Description Allowed Types Allowed Operands Optional Solve Order Calculated by...

Page 253: ...is placed in Q For details refer to Logical AND Logical OR Compares the bit strings IN1 and IN2 bit by bit When a pair of corresponding bits are both 0 places a 0 in the corresponding location in out...

Page 254: ...ails refer to Bit Operation Functions in Chapter 4 Shift Bits Left Shifts all the bits in a word or string of words to the left by a specified number of places For details refer to Bit Operation Funct...

Page 255: ...ither bit is 0 or both bits are 0 AND places a 0 in string Q in that location Tip You can use the Logical AND function to build masks or screens where only certain bits are passed the bits opposite a...

Page 256: ...s by pulsing the input to the function at twice the desired rate of flashing The input pulse should be one scan long one shot type coil or self resetting timer You can use XOR to quickly compare two b...

Page 257: ...state of the corresponding bit in bit string IN1 All bits are altered on each scan that input is received making output string Q the logical complement of input string IN1 Operands Parameter Descripti...

Page 258: ...the program When you type in a comment the first few words are displayed To increase the size of the text box and display more text select the box and drag one of the handles There are no operands for...

Page 259: ...Equal Tests two numbers for equality For details refer to Comparison Functions Greater Than or Equal Tests whether one number is greater than or equal to another For details refer to Comparison Functi...

Page 260: ...ion Block Diagram FBD GFK 2950C February 2018 245 Function Description Range Tests whether one number is within the range defined by two other supplied numbers For details refer to Relational Function...

Page 261: ...or Equal IN1 IN2 GT Greater Than IN1 IN2 LE Less Than or Equal IN1 IN2 LT Less Than IN1 IN2 Tip To compare values of different data types first use conversion functions to make the types the same Ope...

Page 262: ...nally a copy of the scanned I O can be placed in internal memory rather than at the real input points For details refer to Control Functions in Chapter 4 Mask I O Interrupt Mask or unmask an interrupt...

Page 263: ...spend I O Interrupt Suspend or resume an I O interrupt when using I O variables If not using I O variables use SVC_REQ 32 Suspend Resume I O Interrupt described in Chapter 6 For details refer to Contr...

Page 264: ...L or symbolic memory that the counter uses to store its current value preset value and control word For details refer to Counters in Chapter 4 Up Counter Counts up to a designated value The output is...

Page 265: ...he number of elements in an array For details refer to Data Move Functions in Chapter 4 Array Size Dim1 Returns the value of the Array Dimension 1 property of an array For details refer to Data Move F...

Page 266: ...in a module on the bus Other BUS_RMW functions BUS_RMW_DWORD BUS_RMW_WORD For details refer to Data Move Functions in Chapter 4 Bus Test and Set Handles semaphores on the bus Other BUS_TS function BU...

Page 267: ...Fan Out Copies the input value to multiple outputs of the same data type as the input For details refer to Fan Out below Move Data Copies data as individual bits so the new location does not have to...

Page 268: ...or I O variable memory area being written to during the copy operation For details refer to Data Move Functions in Chapter 4 Move to Flat Copies data from symbolic or I O variable memory to reference...

Page 269: ...scription Allowed Types Allowed Operands Optional Solve Order Calculated by the FBD editor NA NA No IN The input to copy to the outputs BOOL DINT DWORD INT REAL UINT or WORD variable or constant All e...

Page 270: ...erence IN is treated as an array of bits LEN therefore indicates the number of bits to acquire from the IN parameter to make up the stored value If IN is a constant bits are counted from the least sig...

Page 271: ...number of bits to move If IN is a constant and Q is BOOL 1 LEN 16 If IN is a constant and Q is not BOOL 1 LEN 256 All other cases 1 LEN 32 767 LEN is also interpreted differently depending on the dat...

Page 272: ...5 Divides one number by another and outputs the quotient Note Take care to avoid overflow conditions when performing divisions For details refer to Divide below Modulo Division Divides one number by a...

Page 273: ...the result in an output location For details refer to Subtract below The output is calculated when the instruction is performed without Overflow unless an invalid operation occurs 5 9 1 Overflow If a...

Page 274: ...rmed on 32767 1 Q will be set to 32768 If an ADD_UINT operation is performed on 65535 16 Q will be set to 15 Minimum number of inputs 2 Maximum number of inputs 8 Operands of the ADD Function Paramete...

Page 275: ...und Notes DIV rounds down it does not round to the closest integer For example 24 DIV 5 4 Be careful to avoid overflows Operands for DIV_UINT DIV_INT DIV_DINT and DIV_REAL Parameter Description Allowe...

Page 276: ...alid conditions occurs 0 divided by 0 Results in an application fault IN1 and or IN2 is NaN Not a Number Operands for Modulus Function Parameter Description Allowed Types Allowed Operands Optional Sol...

Page 277: ...bit IN2 16 bit base 10 number with sign up to 5 digits long DINT Q 32 bit IN1 32 bit IN2 32 bit base 10 number with sign up to 10 digits long REAL Q 32 bit IN1 32 bit IN2 32 bit base 10 number sign a...

Page 278: ...laces the result in the output location Q Operands Parameter Description Allowed Types Allowed Operands Optional Solve Order Calculated by the FBD editor NA NA No IN The value to be negated INT DINT R...

Page 279: ...on Displays as SUB_INT Q 16 bit IN1 16 bit IN2 16 bit base 10 number with sign up to 5 digits long SUB_DINT Q 32 bit IN1 32 bit IN2 32 bit base 10 number with sign up to 10 digits long SUB_REAL Q 32 b...

Page 280: ...ized or not or parameterized block and execute it After the block s execution is complete control returns to the point in the logic immediately following the CALL instruction For details refer to Prog...

Page 281: ...lue and control word Function Description Off Delay Timer The timer s Current Value CV resets to zero when its enable parameter EN is set to ON CV increments while EN is OFF When CV PV Preset Value EN...

Page 282: ...e user logic cannot modify the values Function Description Timer Off Delay When the input IN transitions from ON to OFF the timer starts timing until a specified period of time has elapsed then sets t...

Page 283: ...apter 4 Convert to BCD8 8 digit Binary Coded Decimal DINT_TO_BD8 Converts DINT 32 bit signed integer to BCD8 For details refer to Conversion Functions in Chapter 4 Convert to INT 16 bit signed integer...

Page 284: ...rsion Functions in Chapter 4 Convert to LREAL 64 bit signed real or floating point values Converts a REAL value to LREAL For details refer to Conversion Functions in Chapter 4 Convert to WORD 16 bit s...

Page 285: ...e the original input data The output data can be used directly as input for another program function as in the examples The function passes data to Q unless the data is out of range 0 through 65 535 O...

Page 286: ...tput data can be used directly as input for another program function as in the example The function passes the converted data to Q unless the resulting data is outside the range 0 to 65 535 Operands P...

Page 287: ...to DINT does not change the original data The output data can be used directly as input for another program function The function passes data to Q unless the data is out of range Operands Parameter De...

Page 288: ...D value and stores the result in the variable assigned to Q The output data can be used directly as input for another program function The function passes data to Q unless the data is out of range Ope...

Page 289: ...puts to Q DINT_TO_DWORD does not change the original DINT data The output data can be used directly as input for another program function The function passes data to Q unless the data is out of range...

Page 290: ...Set Run Enable Disable SVC_REQ 20 Read Fault Tables SVC_REQ 21 User Defined Fault Logging SVC_REQ 22 Mask Unmask Timed Interrupts SVC_REQ 23 Read Master Checksum SVC_REQ 24 Reset Module SVC_REQ 25 Dis...

Page 291: ...each time power flow is enabled to the function additional enable disable logic preceding the request may be necessary depending upon the application For example repeated calling of SVC_REQ 24 would...

Page 292: ...able No Bit reference in a non BOOL variable I Q M T G R P L AI AQ W non discrete symbolic I O variable FNC Function number Service Request number The constant or variable that identifies the requeste...

Page 293: ...550ms 2 55 seconds Constant sweep time is enabled with no timer value programmed or with an old value of 0 for the timer 6 2 1 To disable Constant Sweep mode Enter SVC_REQ 1 with this parameter block...

Page 294: ...nstant Sweep Address 1 Current timer value If the word address 1 contains the hexadecimal value FFFF no timer value has been programmed SVC_REQ 1 Example If contact OV_SWP is set the Constant Sweep Ti...

Page 295: ...t value or to a value defined using SVC_REQ 3 for the controller communications window or SVC_REQ 4 for the systems communications window The window will terminate when it has no more tasks to complet...

Page 296: ...elected 6 4 1 To disable the controller communications window Enter SVC_REQ 3 with this parameter block Address High Byte Low Byte Address 0 0 6 4 2 To re enable or change the controller communication...

Page 297: ...e Backplane Communications window mode Enter SVC_REQ 4 with this parameter block Address High Byte Low Byte Address Mode 0 Limited 2 Run to Completion 1ms value 255ms SVC_REQ 4 Example When enabling o...

Page 298: ...e Background Task window mode Enter SVC_REQ 5 with this parameter block Address High Byte Low Byte Address Mode 0 Limited 2 Run to Completion 1ms value 255ms SVC_REQ 5 Example When enabling contact FS...

Page 299: ...zero in the first word of the parameter block Address 0 Address 1 Ignored The function returns the current checksum word count in the second word of the parameter block No range is specified for the r...

Page 300: ...g check summed is read from the CPU operating system This number is increased by 16 with the results of the ADD_UINT function being placed in the hold new count for set parameter The second service re...

Page 301: ...2 0 numeric data format 80h numeric data format 1 BCD format 81h BCD format 2 unpacked BCD format 82h unpacked BCD format 3 packed ASCII format with embedded spaces and colons 83h packed ASCII format...

Page 302: ...y 3 2005 at 2 45 30 p m 14 45 30 in 24 hour format 1 change or 0 read Address 0 read 1 BCD format Address 1 1 BCD format High Byte Low Byte Address High Byte Low Byte month year Address 2 07 July 05 y...

Page 303: ...conds and 999 999 999 decimal nanoseconds which corresponds to December 31st 2099 at 11 59 pm This is the maximum POSIX value that SVC_REQ 7 will accept for changing the clock This is also the maximum...

Page 304: ...h Address 4 02h 08h hours Address 5 00h 09h minutes Address 6 03h 04h seconds Address 7 05h 07h day of week Address 8 00h 05h Unpacked BCD 4 Digit Year In Unpacked BCD format each digit of the time an...

Page 305: ...Value year Address 2 05 month Address 3 06 day of month Address 4 15 hours Address 5 12 minutes Address 6 15 seconds Address 7 30 day of week Address 8 04 Numeric 4 Digit Year In numeric format the ye...

Page 306: ...Example Mon Oct 5 2005 at 11 13 25 p m 23 13 25 in 24 hour format 1 change or 0 read Address 0h read 3 ASCII format Address 1 3h ASCII format High Byte Low Byte High Byte Low Byte year year Address 2...

Page 307: ...1 83h ASCII format 4 digit High Byte Low Byte High Byte Low Byte year hundreds year thousands Address 2 30h 0 32h 2 year ones year tens Address 3 35h 5 30h 0 month tens space Address 4 31h 1 20h spac...

Page 308: ...rmat It writes the value 4608 equivalent to 12 00 BCD to NOON and the value 0 to MIN_SEC Rung 2 requests the current date and time using the parameter block located at P00300 Rung 3 moves the new time...

Page 309: ...8 allows the timer to keep going during a time consuming task for example while waiting for a response from a communications line Warning Be sure that resetting the watchdog timer does not adversely a...

Page 310: ...unsigned 16 bit integer Output The parameter block is an output parameter block only it has a length of one word Address time since start of scan SVC_REQ 9 Example The elapsed time from the start of...

Page 311: ...last character is always a null character If the target name has fewer than seven characters null characters are appended to the end Address Low Byte High Byte Address character 1 character 2 Address...

Page 312: ...always a null character If the Controller ID has fewer than seven characters null characters are appended to the end Address Low Byte High Byte Address character 1 character 2 Address 1 character 3 c...

Page 313: ...ntroller Run State Use SVC_REQ 12 to read the current RUN state of the CPU Output The output parameter block has a length of one word Address 1 run disabled 2 run enabled SVC_REQ 12 Example When conta...

Page 314: ...the Hardware Configuration Scan tab to determine when to transition to STOP Mode For details on Hardware Configuration parameters refer to PACSystems RX7i RX3i and RSTi EP CPU Reference Manual GFK 22...

Page 315: ...parameter block Address 0 clear Controller Fault Table 1 clear I O Fault Table SVC_REQ 14 Example When inputs I0346 and I0349 are on the Controller Fault Table is cleared When inputs I0347 and I0349...

Page 316: ...15 reads the Controller Fault Table the extended Controller Fault Table the I O Fault Table or the extended I O Fault Table Controller Fault Table Output Format Address I O Fault Table Output Format H...

Page 317: ...tes short 01 24 bytes long I O extended and non extended fault tables 02 5 bytes short 03 21 bytes long Note PACSystems CPUs always return the Long values for both extended and non extended formats SV...

Page 318: ...secutive scans The example uses a parameter block located at R0600 After the SVC_REQ function executes the second third and fourth words of the parameter block identify the I O module that faulted Hig...

Page 319: ...s the number of seconds that have elapsed since the last time the block was called It performs the final operation on rung 4 by subtracting the time obtained by SVC_REQ 16 the last time the block was...

Page 320: ...Chapter 6 Service Request Function GFK 2950C February 2018 305 Note Higher resolution in nanoseconds can be obtained by using SVC_REQ 50 Read Elapsed Time Clock...

Page 321: ...es not have its interrupt enabled in the configuration 6 18 1 Masking Unmasking Module Interrupts During module configuration interrupts from a module can be enabled or disabled If a module s interrup...

Page 322: ...values are moved into the parameter block which starts at P00347 on the first scan Address P00347 1 Interrupts from input are masked Address 1 P00348 70 Input type is I Address 2 P00349 33 Offset is 3...

Page 323: ...te SVC_REQ 18 does not detect overrides in G or M memory types Use S0011 OVR_PRE to detect overrides in I Q G M and symbolic memory types The parameter block has a length of one word used for output o...

Page 324: ...e requested operation is not SET RUN DISABLE mode 1 or SET RUN ENABLE mode 2 The parameter block is an input parameter block only with this format Address 1 SET RUN DISABLE mode 2 SET RUN ENABLE mode...

Page 325: ...h Read I O Fault Table 01h Read Extended Controller Fault Table 80h Read Extended I O Fault Table 81h Read I O Fault Table with Remote Fault Record 41h or Read Extended I O Fault Table with Remote Fau...

Page 326: ...used Unused Address 3 Address 14 Unused Unused Minutes Seconds Address 15 Address 17 Time Since Last Clear in BCD Format Minutes Seconds Day of Month Hour Day of month Hour Year Month Year Month Numbe...

Page 327: ...Long short Address 21 Memory type Long Short7 Unused Unused Address 22 Offset Slot Rack Address 23 Slot Rack Task Address 24 Bus address I O Bus Number block Fault action Fault group Address 25 Point...

Page 328: ...t Rack Address 24 Remote Slot Remote Rack Address 25 Remote Sub Slot Remote Device ID Address 26 Bus address I O Bus Number block Address 27 Point Address 28 Fault action Fault group Address 29 Fault...

Page 329: ...ce is available to accommodate the number of fault entries requested If the amount of data requested exceeds the register space available the CPU returns a fault indicating that reference memory is ou...

Page 330: ...r Year Month Year Month Number of faults since last clear Address 18 Number of faults since last clear Number of faults in queue Address 19 Number of faults in queue Number of faults read Address 20 N...

Page 331: ...38 Reference address offset Slot Rack Address 39 Slot Rack Task Address 40 Bus address I O bus number block Fault action Fault group Address 41 point Error code Address 42 Fault action Fault group Fa...

Page 332: ...9 Slot Rack Address 40 Remote Slot Remote Rack Address 41 Remote Sub Slot Remote Device ID Address 42 Bus address I O bus number block Address 43 point Address 44 Fault action Fault group Address 45 F...

Page 333: ...moved to the parameter block and the I O Fault Table is read When the SVC_REQ function successfully executes coil OK is turned on SVC_REQ 20 Example 2 Extended Format When Read_PLC_Xt transitions on...

Page 334: ...active the fault data array referenced by IN is logged as a fault to the Controller Fault Table If EN is not enabled the ok bit is cleared If the error code is out of range the ok bit is cleared and t...

Page 335: ...its output is set to OFF If the first byte of text is zero then only Application Msg will display in the fault description The next 1 23 bytes will be considered binary data for user data logging Thi...

Page 336: ...r unmasked Successful execution occurs unless some number other than 0 or 1 is entered as the requested operation or mask value The parameter block is an input and output parameter block To determine...

Page 337: ...0 not valid 1 valid Address 2 Master Configuration Checksum Valid 0 not valid 1 valid Address 3 Number of LD SFC Blocks including _MAIN Address 4 Size of User Program in Bytes DWORD data type Address...

Page 338: ...an input parameter block only Address Module slot low byte Module rack high byte Rack 0 Slot 1 indicates that a reset is to be sent to the daughterboard Note It is important to invoke SVC_REQ 24 for...

Page 339: ...vice request uses only an input parameter block Address 0 Disable C applications inclusion in checksum calculation 1 Enable C application inclusion in checksum calculation The parameter block is uncha...

Page 340: ...a length of three words Address Power down elapsed seconds low order Address 1 Power down elapsed seconds high order Address 2 100 S ticks The first two words are the power down elapsed time in second...

Page 341: ...ther than 0 or 1 is passed in as the first parameter The memory type parameter is not 70 I memory The I O module associated with the specified address is not an appropriate module for this operation T...

Page 342: ...esponding input references during the sweep after the one in which the SVC_REQ 45 was executed This function has no parameter block Note This service request is provided for conversion of Series 90 30...

Page 343: ...ticks low order Address 3 nanosecond ticks high order The first two words are the elapsed time in seconds The second two words are the number of nanoseconds elapsed in the current second The resoluti...

Page 344: ...ck The second rung of logic calculates the number of seconds that have elapsed since the last time the block was called The third rung calculates the number of nanoseconds to be added to or subtracted...

Page 345: ...e start of the sweep The data is unsigned 32 bit integer Output The parameter block is an output parameter block only it has a length of two words Address time nanoseconds since start of scan low orde...

Page 346: ...You can read up to 32 words 64 bytes inclusively per invocation of SVC_REQ 56 6 32 1 Discrete Memory Discrete memory can be read as individual bits or as bytes For more information refer to Memory Typ...

Page 347: ...2 bits in increments of 8 bits The value must reside in the low byte of address 3 The high byte must be set to zero Address 4 Destination memory The CPU memory area to write the read data to This does...

Page 348: ...t multiple of 8 03 02 Invalid storage or destination reference address A specified memory area is not I Q T M G R AI AQ or W or the offset is out of range or the offset is not byte aligned for discret...

Page 349: ...ter Block for SVC_REQ 56 Example Address Offset Address Input Value Definition Address 0 R00040 56 Data type G byte mode Address 1 R00041 0 Address written from low word Address 2 R00042 0 Address wri...

Page 350: ...ata written in word 8 starting address 7 of the parameter block The number of words written is calculated from the first word that changed to the end of the array For example if you specify 8 words to...

Page 351: ...nsition You can however read such values from storage after power up or STOP Mode to RUN Mode transition by using SVC_REQ 56 6 33 6 Maximum of One Active Instruction When SVC_REQ 57 is active it does...

Page 352: ...in use one of the following solutions To retain the most up to date data and continue writing with SVC_REQ 57 to nonvolatile storage 1 Stop the PACSystems 2 Power cycle the PACSystems A power cycle wh...

Page 353: ...nonvolatile storage are included in the transfer lists Each redundancy CPU maintains its own separate logic driven user nonvolatile storage by means of SVC_REQ 57 during its logic scan If the values o...

Page 354: ...the reference address calculated from the offset defined at address 1 and address 2 The length can be one of the following Description Valid range The number of words 16 bit registers to read from W...

Page 355: ...r ending offset is out of range or the offset is not byte aligned for discrete memory areas 04 02 Invalid request Spare bits or spare words in the parameter block are not set to zero 01 03 Storage bus...

Page 356: ...0 R00050 56 Data type G byte mode Address 1 R00051 0 Address written from low word Address 2 R00052 0 Address written from high word Address 3 R00053 10 Length 10 bytes Address 4 R00054 0 Storage disa...

Page 357: ......

Page 358: ...ased on the error The PID function uses PID loop gains and other parameters stored in a 40 word reference array of 16 bit integer words to solve the PID algorithm at the desired time interval Figure 1...

Page 359: ...that the process variable matches the set point zero error INT BOOL array of length 16 or more Constant All except S SA SB and SC No PV Process Variable input from the process being controlled Often...

Page 360: ...ariable so that the process variable matches the set point zero error INT BOOL array of length 16 or more Constant All except S SA SB and SC No PV Process Variable input from the process being control...

Page 361: ...an be defined as constants in BLKMOV functions so the program can set and change them as needed The LD version of the PID function does not pass power flow if there is an error in the configurable par...

Page 362: ...d Dead Band Integral values defining the upper and lower Dead Band limits If no Dead Band is required these values must be 0 If the PID Error SP PV or PV SP is above the value and below the value the...

Page 363: ...cimal places The least significant digit represents 0 001 counts per second or 1 count per 0 001 second Displayed as Repeats Sec with three decimal places For example Ki entered as 1400 is displayed a...

Page 364: ...nnot change more than 32 000 CV Counts times the solution time interval seconds divided by Minimum Slew Time For example if the Sample Period is 2 5 seconds and the Minimum Slew Time is 500 seconds CV...

Page 365: ...tion is applied to the error term When it is set to 1 the derivative action is applied to PV only Bit 3 Deadband action When the Deadband action bit is 0 the actual error value is used for the PID cal...

Page 366: ...of the PID input contacts as long as the PID Enable contact has power Control Word is a discrete data structure with the first five bit positions defined in the following format Bit Word Value Functi...

Page 367: ...te values Do not write to this location 24 26 Address 23 Address 25 Previous Solution Time Internal storage of time of last PID solution Normally do not write to these locations Some special circumsta...

Page 368: ...es of the output CV it is also possible to add or subtract any CV count value directly to from the Manual Command word word 14 of the reference array The PID function block uses the CV Upper Clamp and...

Page 369: ...s the Sample Period or 10 ms whichever is larger If the Sample Period is set for execution on every sweep value 0 the PID function is restricted to a minimum of 10 ms between solutions If the sweep ti...

Page 370: ...st solution The ISA PID_ISA algorithm has different coefficients for the terms PID Output Kc Error Error dt Ti Td Derivative CV Bias where Kc is the controller gain Ti is the Integral time and Td is t...

Page 371: ...SP PV where PV PV previous PV and SP SP previous SP However in direct acting mode the error term is PV SP the sign of the change in the error term is reversed error Error previous Error PV SP 7 4 3 D...

Page 372: ...mit value When the CV output is modified to impose either slew rate or amplitude limits or both the stored integral term would normally accumulate a large value over time This phenomenon is known as r...

Page 373: ...han 0 2 seconds or 0 4 seconds worst case On the other hand the Sample Period should not be too small such as less than the total time constant divided by 1000 or the Ki Error dt term for the PID inte...

Page 374: ...rocess PV Unit Reaction Curve Input from Process The following process model parameters can be determined from the PV unit reaction curve K Process open loop gain final change in PV change in CV at ti...

Page 375: ...different values to check if CV can be moved to Upper and Lower Clamp Record the PV value at some CV point and load it into SP 3 Set a small gain such as 100 Maximum CV Maximum PV into Kp and turn of...

Page 376: ...st peak in the closed loop response 1 Determine the three process model parameters K Tp and Tc for use in estimating initial PID loop gains 2 Calculate the Reaction rate R K Tc 3 For Proportional cont...

Page 377: ...initial PID loop gains 2 Calculate Kp Ki and Kd as follows Kp 2 Tc 3 K Tp Ki Tc Kd Ki 4 if Derivative term is used 3 Once initial gains are determined convert them to integers 4 Calculate the Process...

Page 378: ...seful technique The block can be switched to Manual mode with M1 so that the Manual Command R113 can be adjusted Bits M4 or M5 can be used to increase or decrease R113 and the PID CV by 1 every 100ms...

Page 379: ...Chapter 7 PID Built In Function Block 364 PACSystems RX7i RX3i and RSTi EP CPU Programmer s Reference Manual GFK 2950C Figure 17 PID Example Logic...

Page 380: ...locks refer to Program Organization in Chapter 2 8 1 Language Overview 8 1 1 Statements A structured text program consists of a series of statements which are constructed from expressions and language...

Page 381: ...REAL LREAL Subtraction9 Group 6 INT DINT UINT REAL LREAL BYTE WORD DWORD Comparison Group 7 ANY12 Equality ANY12 Inequality Group 8 AND BOOL BYTE WORD DWORD Boolean AND Group 9 XOR BOOL BYTE WORD DWO...

Page 382: ...e target These symbols have the following functions assigns an expression to a variable required to designate the end of a statement used for array indexing where the array index is an integer For exa...

Page 383: ...return from a subroutine The return statement provides an early exit from a block RETURN EXIT Terminates iterations before the terminal condition becomes TRUE 1 EXIT IF Specifies that one or more sta...

Page 384: ...ion of the same data type Notes Assignment statements can affect transition bits Assignment statements take override bits into account Format Variable Expression Where Variable is a simple variable ar...

Page 385: ...upported Example cos IN inReal Q outReal ENO outBool Category Functions More information Advanced Math ASIN ATAN ACOS COS SIN TAN LOG LN EXP EXPT SQRT_INT SQRT_DINT SQRT_REAL Chapter 4 Math ABS_INT AB...

Page 386: ...ble which must be the same type as the instruction Writing or forcing values to the instance data elements IN PT Q ET ENO or TI may cause erratic operation of the timer function block Instance data ca...

Page 387: ...der as follows Inputs Instance location if required Length parameter if required Outputs starting with the last output parameter The ENO parameter is specified in a formal function or block call All b...

Page 388: ...g GFK 2950C February 2018 373 8 2 3 RETURN Statement The return statement provides an early exit from a block For example in the following lines of code the third line will never execute The variable...

Page 389: ...LSEIF can be used for the else if clause in an IF statement Operation The following sequence of evaluation occurs if both optional parts are present If BooleanExpression1 is TRUE 1 StatementList1 is e...

Page 390: ...ory in your computer The number of constants and constant ranges in a single conditional statement is limited by the memory in your computer Format CASE Integer_Expression OF Int1 Single Value Stateme...

Page 391: ...n OF 0 ColorVariable Red 1 ColorVariable Yellow 2 3 4 ColorVariable Green 5 9 ColorVariable Blue ELSE ColorVariable Violet END_CASE The following code fragment uses a nested CASE OF END_CASE construct...

Page 392: ...Optional The increment or decrement value for each iteration of the loop Must be an expression variable or constant of the same data type as Int_Variable If Step_Value is not specified the control va...

Page 393: ...array of 100 elements starting at R1000 given that R1000 is at R1000 by assigning a value of 10 to all array elements FOR R1000 1 TO 100 DO R1000 10 END_FOR The following code fragment assigns the va...

Page 394: ...END_WHILE Where BooleanExpression Any expression that resolves to a Boolean value StatementList Any set of Structured Text statements Operation If BooleanExpression is FALSE 0 the loop is immediately...

Page 395: ...tatementList Any set of Structured Text statements Operation The StatementList is executed If the BooleanExpression is FALSE 0 then the loop is repeated otherwise if the BooleanExpression is TRUE 1 th...

Page 396: ...resolve only to the parameter name Can be a BOOL DINT DWORD INT REAL UINT WORD variable variable array head name or variable array head name element 000 Input or output parameter value of a function...

Page 397: ...he statement following the loop terminator END_FOR END_WHILE END_REPEAT An EXIT statement is typically used within an IF statement Format EXIT Where ConditionForExiting An expression that determines w...

Page 398: ...e or rack may impair the ability of the PACSystems controller to control a machine or process Other conditions such as when a new module comes online and becomes available for use may be displayed to...

Page 399: ...es 9 1 1 System Response to Faults Hardware failures require that either the system be shut down or the failure be tolerated I O failures may be tolerated by the control system but they may be intoler...

Page 400: ...al or diagnostic When a fatal or diagnostic fault within a configurable group occurs the CPU executes the configured fault action instead of the action specified within the fault Note The fault action...

Page 401: ...able Status is Online when update is complete Total Faults The total number of faults since the table was last cleared Entries Overflowed The number of entries lost because the fault table has overflo...

Page 402: ...onfiguration Task Number Not used for most faults When used provides additional information for Technical Support representatives Fault Extra Data Provides additional information for diagnostics by Te...

Page 403: ...riable is set to publish either internal or external the I O Fault Table displays the variable name Unpublished I O variables will not be displayed in this field Ref Address If the fault is on a point...

Page 404: ...roup is the highest classification of a fault It identifies the general category of the fault Action Fatal Diagnostic or Informational For definitions of these actions refer to Fault Actions and Fault...

Page 405: ...roller Fault Table since the last power up or clearing of the fault tables IO_FLT SC0011 Any new fault in the I O Fault Table since the last power up or clearing of the fault tables SY_PRES SC0012 Ind...

Page 406: ...LT IO_PRES LOS_SIO diagnostic SA0015 Loss of intelligent module does not respond or missing a configured module SY_FLT SY_PRES IOC_FLT diagnostic SA0022 Non fatal bus or I O Controller error more than...

Page 407: ..._PRES SY_FULL IO_FULL diagnostic SA0022 Controller fault table full 64 entries I O Fault Table full 64 entries Sets SY_FLT SY_PRES IO_FLT IO_PRES APL_FLT diagnostic SA0003 Application fault Sets SY_FL...

Page 408: ...nning without a configuration is equivalent to suspending the I O scans Sets SY_FLT and SY_PRES SFT_CPU fatal SB0013 CPU software fault A non recoverable error has been detected in the CPU May be caus...

Page 409: ...ntact instructions logic can be executed in response to faults associated with configured racks and modules Fault Locating Reference Name Format These fault names can only be programmed on the FAULT a...

Page 410: ...device is added back into the system Whenever an Addition of fault is logged the CPU initializes all fault references associated with the device to the NoFlt state These references remain in the NoFl...

Page 411: ...FAULT and NOFLT contacts described in Using Alarm Contacts provide access to the point faults The full support of point fault contacts depends on the capability of the I O module Some Series 90 30 mod...

Page 412: ...or Block Checksum Failure Group N A No 18 Battery Status Group N A No 19 Constant Sweep Time Exceeded N A No 20 System Fault Table Full N A No 21 I O Fault Table Full N A No 22 User Application Fault...

Page 413: ...m Verify that both the BTM and the BRM are seated properly in their respective racks and that all cables are properly connected and seated 2 Replace the cables 3 Replace the BRM 4 Replace the BTM 2 Ra...

Page 414: ...Module Hot Removed The CPU logs this fault when it detects hot removal of an option module such as the LAN interface module No correction necessary All Others Module Failure During Configuration The C...

Page 415: ...rection Refer to the LAN Interface manual GFK 0868 or GFK 0869 previously GFK 0533 7 Extra Option Module Note This fault is logged for an RX3i CPE310 that is configured as a CPU310 or a CPE330 configu...

Page 416: ...module 2 Update the configuration file Fault Extra Data for Genius I O Block Model Number Mismatch Byte Value 0 FF flag byte 1 Serial Bus address 2 Installed module type refer to Installed Configured...

Page 417: ...ouped Block 127 7F Genius Network Adapter GENA Refer to GENA Application ID Numbers below 131 83 Phase B 115Vac 4 input 2 output Analog Block 132 84 Phase B 24Vdc 4 input 2 output Analog Block 133 85...

Page 418: ...ule I O Types Byte 2 of Fault Extra Data Value Description 01 Input only 02 Output only 03 Combination Genius Configured Module I O Types Byte 3 of Fault Extra Data Value Description Decimal Hexadecim...

Page 419: ...a revision that supports the feature 2 Change the module configuration Fault Extra Data for Unsupported Feature Byte Value 8 Contains a reason code indicating what feature is not supported 0x5 GBC re...

Page 420: ...crease the configured size of the reference data 26 hex 38 decimal Bad Program Specification The I O specification of a program is corrupted Correction Contact Technical Support 27 hex 39 decimal Unre...

Page 421: ...led If the CPU firmware does not support redundancy the ECC jumper must be in the disabled position Correction Set the ECC jumper to the disabled position jumper on one pin or removed entirely All Oth...

Page 422: ...ounters a bus error Default action Diagnostic Configurable 4 Unrecognized VME Interrupt Source The CPU generates this error when a module generates an interrupt not expected by the CPU unconfigured or...

Page 423: ...tion Non configurable 6E hex 110 decimal Time of Day Clock not Battery Backed The battery backed value of the time of day clock has been lost Correction 1 Replace the battery Do not remove power from...

Page 424: ...ble 1A0 hex 416 decimal Missing 12 Volt Power Supply A power supply that supplies 12 volts is required to operate the LAN Interface module Correction 1 Install replace a 100 watt power supply 2 Connec...

Page 425: ...application program to send COMMREQs to the module at a slower rate or check the completion status of each COMMREQ before sending the next 4 More Than One BTM in a Rack There is more than one BTM pre...

Page 426: ...gram or block in which the error occurred Action Non configurable All Error Codes Program or Block Checksum Failure The CPU generates this error when a program or block is corrupted Correction 1 Clear...

Page 427: ...n only while the CPU is powered up If a low battery condition occurs while the CPU is powered down the CPU logs a Low Battery fault upon power up as soon as it detects the signal from the smart batter...

Page 428: ...eep Correction If Constant Sweep 0 1 Increase constant sweep time 2 Remove logic from application program Note Error code 1 is not used 9 4 14 System Fault Table Full Group 20 The fault group System F...

Page 429: ...ase the program s stack size or adjust application program to reduce nesting 11 hex 17 decimal Program Run Time Error A run time error occurred during execution of a program Correction Correct the spe...

Page 430: ...eferences are inherited from the P references wherever encountered in the parameterized block for example L0005 P0005 For a discussion of the use of local data with parameterized blocks refer to Param...

Page 431: ...ower supply with a higher capacity model or reconfigure system to reduce load on power supply 3 Power supply switched off The switch on the power supply was moved to the OFF position 4 Power supply ha...

Page 432: ...n a power cycle when the battery was not detached or replaced the battery has failed and should be replaced Correction Replace the battery on the CPU For instructions on replacing the battery refer to...

Page 433: ...that level Action Non configurable 0 Password Access Failure Correction Retry the request with the correct password 9 4 23 Null System Configuration for RUN Mode Group 134 The fault group Null System...

Page 434: ...n SVC_REQ 13 User Shut Down executes in the application program Correction None required Information only alarm 94 hex 148 decimal Units Contain Mismatched Firmware Update Recommended This fault is lo...

Page 435: ...tra Data Value First Byte Description DEVICE_NOT_AVAILABLE CF Specific device is not available in the system BAD_DEVICE_DATA CC Data stored on device has been corrupted and is no longer reliable Or Fl...

Page 436: ...specifically clear the condition Action Non configurable 0 Communications Failure During Store Correction Clear the fault and retry the download of the program or configuration file 1 Communications L...

Page 437: ...s below 54 and greater Miscellaneous internal system events No corrective action is required unless this fault occurs with other specific faults The fault may contain useful information for Technical...

Page 438: ...output memory 14 T Discrete temporary status memory 16 M Discrete momentary internal memory 18 SA Discrete system memory A 1A SB Discrete system memory B 1C SC Discrete system memory C 1E S Discrete s...

Page 439: ...ry contains up to 21 bytes of I O fault extra data that contains additional information related to the fault Not all entries contain I O fault extra data 9 5 2 I O Fault Groups Group Number Group Name...

Page 440: ...rcuit Configuration Point Fault 83 hex Circuit Configuration Output Fuse Blown 84 hex Circuit Configuration Analog Fault 2 Input Channel Low Alarm 01 hex Circuit Configuration Input Channel High Alarm...

Page 441: ...lt 3 GENA Circuit Fault 80 hex Byte 2 GENA Fault Remote I O Scanner Fault Remote I O Scanner Circuit Fault Byte 1 Circuit Type Byte 2 I O Type Loss of Block 2 Not Specified 0 A D Communications Lost 1...

Page 442: ...faults have occurred 19 GBC detected high error count on Genius Bus and dropped off the bus for at least 1 5 seconds 1 NA NA GBC Software Exception 21 Datagram queue full 1 R W request queue full 2 Lo...

Page 443: ...ult extra data area If the GBC reports the fault the first byte is generated by the GBC and the second byte contains the circuit configuration and is encoded as shown in the following table Value Byte...

Page 444: ...an 2 amps in the user wiring Correction Fix the cause of the over current 8 Low or No Current Flow The GBC generates this error when there is very low or no current flow in the user circuit Correction...

Page 445: ...ausing the high alarm 4 Input Channel Under Range The GBC generates this error when the Genius Analog module reports an under range condition on an input channel Correction Correct the problem causing...

Page 446: ...us Analog input block Correction Correct the problem causing the condition Low Level Analog Faults 1 Input Channel Low Alarm The GBC generates this error when the Genius Analog module reports a low al...

Page 447: ...nction sensor fault on a thermocouple block or an internal error in an RTD block Correction Correct the problem causing the condition 80 hex 128 decimal Input Channel Shorted The GBC generates this er...

Page 448: ...munications on a Genius device Correction 1 Verify power and serial bus wiring to the block 2 Replace the block Fault Extra Data for Loss of Block The Loss of Block fault provides four bytes of fault...

Page 449: ...starts communicating again Action Diagnostic Correction Informational only None required Fault Extra Data for Addition of Block The Addition of Block fault provides four bytes of fault extra data The...

Page 450: ...n be set higher than the default value if needed but the bus should be examined electrically use an oscilloscope for waveform check Bus Outputs Disabled The GBC operating software generates this error...

Page 451: ...it detects a failure in a Genius block s calibration memory Correction Replace the Genius block s electronics module 40 hex 64 decimal Shared RAM Fault The GBC generates this error when it detects an...

Page 452: ...No corrective action is necessary 9 5 10 Loss of or Missing IO Controller Category 10 The fault category Loss of IOC has no fault types or fault descriptions associated with it Default action Diagnost...

Page 453: ...e request rate to the GBC 9 5 12 Forced and Unforced Circuit Categories 12 and 13 The fault categories Forced Circuit and Unforced Circuit report point conditions and therefore are not technically fau...

Page 454: ...Category 15 The fault category Addition of I O Module applies to discrete and analog I O modules There are no fault types or fault descriptions associated with this category Action Diagnostic Addition...

Page 455: ...he fault category IOC Hardware Failure has no fault types or fault descriptions Action Diagnostic The Genius operating software generates this error when it detects a hardware failure in the bus commu...

Page 456: ...ue for Read Write requests in the GBC is full The requests may be from the Genius Bus or from COMMREQs Correction Adjust the system to reduce the request rate to the GBC 3 Low priority mail queue from...

Page 457: ...Replace the Bus Switching Module BSM Fault Extra Data for Block Switch Byte Number Description Value Description 1 Circuit configuration 1 Circuit is an input 2 Circuit is an input 3 Circuit is an ou...

Page 458: ...ble allocation return to what it was before the DLB was downloaded You can also remove the DLBs from the Logic Developer target at which point the target s logic and variable allocation will be identi...

Page 459: ...lders under the Active Blocks node or to folders under the Program Blocks node Note that only active blocks can be dragged Downloading executing or modifying a DLB does not affect the equality of the...

Page 460: ...ive an LD DLB the name _MAIN You cannot modify an active LD DLB while it is executing on the Controller You cannot perform a Test Edit Online Edit Mode and Online Test Mode You cannot perform word for...

Page 461: ...time when the user requests for DLB execution to start It then stops executing until it is manually instructed to run again Figure 23 Properties of Diagnostic Logic Block DLB Target Properties The Ta...

Page 462: ...ust have Program logic and HWC equal to the controller Logic EQ Target in programmer mode Sufficient privilege to write to the controller Operation Minimum PACSystems RX3i Privilege Level Required Sto...

Page 463: ...here are no DLBs on the controller but there is at least one active DLB you will be prompted for confirmation and notified that all active DLBs will be made inactive If you choose to abort the upload...

Page 464: ...itor DLB Icon shows the DLB state in the Navigator Downloaded to controller or Executing A Proficy View application can monitor the execution of the DLB by using its Local Symbolic Variables in Panels...

Page 465: ...LB in the controller are as follows 1 Create an LD block named MonitorScan and place it in the Toolchest For information on working with the Toolchest refer to the online help The logic in the DLB blo...

Page 466: ...Chapter 9 Diagnostics GFK 2950C February 2018 451...

Page 467: ...from Toolchest and Drop in Active Blocks Node 3 In the DLB block properties set the Execution Mode to Sweep Figure 26 Set DLB Execution Mode to Sweep Properties Tab 4 Go online to the Controller and...

Page 468: ...Figure 28 Initialize Local Symbolic Variables 7 Notice the change in the DLB Icon and the DLB status in the Status bar DLB Block Icon Status Bar Once Started Figure 29 DLB Icon and Status Bar after Ex...

Page 469: ...on our web site www geautomation ip com Additional Resources For more information please visit the GE s Automation Controls web site www geautomation com Copyright 2014 2018 General Electric Company A...

Reviews: