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

The text of a manual · part 48 of 60

DL205 PLC User Manual, Volume 1 of 2, pages 471 to 480

Pages 471 to 480 of 598

The original document is the PDF (12 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the AutomationDirect D2-04TD1, AutomationDirect D2-08TD2, AutomationDirect D2-16ND3-2, AutomationDirect D2-32ND3, Konnect-It D2-04TD1, Koyo D2-04TD1, Konnect-It D2-08TD2, Koyo D2-08TD2, and 5 more models

Page 471

Chapter 5: Standard RLL Instructions

HILOALB Example In the following example, the HILOALB instruction is used to monitor a binary value that is in V2000. If the value in V2000 meets/exceeds the High limit of the binary value in V2011, C101 will turn on. If the value continues to increase to meet/exceed the High-High limit value in V2010, C100 will turn on. Both bits would be on in this case. The High and High-High limits and alarms can be set to the same V-memory location/value if one “High” limit or alarm is desired to be used. If the value in V2000 meets or falls below the low limit of the binary value in V2012, C102 will turn on. If the value continues to decrease to meet or fall below the Low-Low limit in V2013, C103 will turn on. Both bits would be on in this case. The Low and Low-Low limits and alarms can be set to the same V-memory location/value if one “Low” limit or alarm is desired to be used. SP1

DL205 User Manual, 4th Edition, Rev. D

1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D

5-247

Page 472

Chapter 5: Standard RLL Instructions

1

2

3 4 5 6 7 8 9 10 11 12 13 14 A B C D

Off Delay Timer (OFFDTMR) (IB-302) 230 240 250-1 260

DS5 Used

HPP

5-248

N/A

Off Delay Timer will delay the “turning off” of the Output parameter by the specified Off Delay Time (up to 99.99 seconds) based on the power flow into the IBox. Once the IBox receives power, the Output bit will turn on immediately. When the power flow to the IBox turns off, the Output bit WILL REMAIN ON for the specified amount of time (in hundredths of a second). Once the Off Delay Time has expired, the output will turn Off. If the power flow to the IBox comes back on BEFORE the Off Delay Time, then the timer is RESET and the Output will remain On - so you must continuously have NO power flow to the IBox for AT LEAST the specified Off Delay Time before the Output will turn Off. This IBox utilizes a Timer resource (TMRF), which cannot be used anywhere else in your program. OFFDTMR Parameters • Number: specifies the Timer (TMRF) number which is used by the OFFDTMR instruction • Delay Time (0.01sec): specifies how long the Output will remain on once power flow to the Ibox is removed (up to 99.99 seconds). • specifies the output that will be delayed “turning off” by the Off Delay Time.

Parameter Timer Number ⸠ ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ T Off Delay Time ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠K,V Output⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠X, Y, C, GX,GY, B

DL205 User Manual, 4th Edition, Rev. D

DL205 Range T0-377 K0-9999; See DL205 V-memory map - Data Words See DL205 V-memory map

Page 473

Chapter 5: Standard RLL Instructions

OFFDTMR Example In the following example, the OFFDTMR instruction is used to delay the “turning off”of output C20. Timer 2 (T2) is set to 5 seconds, the “off-delay” period. When C100 turns on, C20 turns on and will remain on while C100 is on. When C100 turns off, C20 will remain on for the specified Off Delay Time (5 secs), and then turn off.

Example timing diagram

C100 5 sec

5 sec

C20

DL205 User Manual, 4th Edition, Rev. D

1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D

5-249

Page 474

Chapter 5: Standard RLL Instructions

1

2

3 4 5 6 7 8 9 10 11 12 13 14 A B C D

On Delay Timer (ONDTMR) (IB-301) 230 240 250-1 260

DS5

Used

HPP

N/A

5-250

On Delay Timer will delay the “turning on” of the Output parameter by the specified amount of time (up to 99.99 seconds) based on the power flow into the IBox. Once the IBox loses power, the Output is turned off immediately. If the power flow turns off BEFORE the On Delay Time, then the timer is RESET and the Output is never turned on, so you must have continuous power flow to the IBox for at least the specified On Delay Time before the Output turns On. This IBox utilizes a Timer resource (TMRF), which cannot be used anywhere else in your program. ONDTMR Parameters • Number: specifies the Timer (TMRF) number which is used by the ONDTMR instruction • Delay Time (0.01sec): specifies how long the Output will remain on once power flow to the Ibox is removed (up to 99.99 seconds). • specifies the output that will be delayed “turning on” by the On Delay Time.

Parameter Timer Number ⸠ ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ T On Delay Time ⸠ ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠K,V Output⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠X, Y, C, GX,GY, B

DL205 User Manual, 4th Edition, Rev. D

DL205 Range T0-377 K0-9999; See DL205 V-memory map - Data Words See DL205 V-memory map

Page 475

Chapter 5: Standard RLL Instructions

ONDTMR Example In the following example, the ONDTMR instruction is used to delay the “turning on” of output C21. Timer 1 (T1) is set to 2 seconds, the “on-delay” period. When C101 turns on, C21 is delayed turning on by 2 seconds. When C101 turns off, C21 turns off immediately.

Example timing diagram

C101 2 sec

2 sec

C21

DL205 User Manual, 4th Edition, Rev. D

1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D

5-251

Page 476

Chapter 5: Standard RLL Instructions

One Shot (ONESHOT) (IB-303)

One Shot will turn on the given bit output parameter for one scan on an OFF to ON transition 1 of the power flow into the IBox. This IBox is simply a different name for the PD Coil (Positive

Differential). 2

Parameters 3 ONESHOT • Output: specifies the output that will be on for one scan 4 5 Parameter DL205 Range 6 7 ONESHOT Example In the following example, the ONESHOT instruction is used to turn C100 on for one PLC 8 scan after C0 goes from an off to on transition. The input logic must produce an off to on transition to execute the One Shot instruction. 9 10 11 Example Timing Diagram 12 C0 13 C100 14 A B C D 230 240

250-1 260

DS5 Used

HPP

N/A

Discrete Output⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ X, Y, C

Scan time

5-252

DL205 User Manual, 4th Edition, Rev. D

See DL205 V-memory map

Page 477

Chapter 5: Standard RLL Instructions

Push On/Push Off Circuit (PONOFF) (IB-300)

1

2

PONOFF Parameters

3 • Input: specifies the input that will toggle the specified output 4 • Output: specifies the output that will be “turned on/off” or toggled • State: specifies a work bit that is used 5 by the instruction 6 7 Parameter DL205 Range 8 9 PONOFF Example In the following example, the PONOFF instruction is used to control the on and off states of the output C20 with a single input C10. When C10 is pressed once, C20 turns on. When 10 C10 is pressed again, C20 turns off. C100 is an internal bit used by the instruction. 11 12 13 14 NOTE: Neither a permissive nor input logic is required with this instruction. A B C D 230 240

Push On/Push Off Circuit toggles an output state whenever its input power flow transitions from off to on. Requires an extra bit parameter for scan-to-scan state information. This extra bit must NOT be used anywhere else in the program. This is also known as a “flip-flop circuit.”

250-1 260

DS5 Used

HPP

N/A

Discrete Input ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ X,Y,C,S,T,CT,GX,GY,SP,B,PB Discrete Output ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ X,Y,C,GX,GY,B Internal State⸠ ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ X, Y, C

See DL205 V-memory map See DL205 V-memory map See DL205 V-memory map

No permissive contact or input logic is used with this instruction

DL205 User Manual, 4th Edition, Rev. D

5-253

Page 478

Chapter 5: Standard RLL Instructions

1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D

Move Single Word (MOVEW) (IB-200)

230 240 250-1 260 DS5 Used HPP

5-254

N/A

Move Single Word moves (copies) a word to a memory location directly or indirectly via a pointer, either as a HEX constant, from a memory location, or indirectly through a pointer. MOVEW Parameters • WORD: specifies the word that will be moved to another location • WORD: specifies the location to which where the “From WORD” will be moved

Parameter From WORD ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠V,P,K To WORD⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠V,P

DL205 Range K0-FFFF; See DL205 V-memory map - Data Words See DL205 V-memory map - Data Words

MOVEW Example In the following example, the MOVEW instruction is used to move 16 bits of data from V2000 to V3000 when C100 turns on.

DL205 User Manual, 4th Edition, Rev. D

Page 479

Chapter 5: Standard RLL Instructions

Move Double Word (MOVED) (IB-201)

1

2

MOVED Parameters

3 • DWORD: specifies the double word that will be moved to another location 4 • DWORD: specifies the location to which where the “From DWORD” will be moved 5 6 Parameter DL205 Range 7 8 MOVED Example 9 In the following example, the MOVED instruction is used to move 32 bits of data from V2000 and V2001 to V3000 and V3001 when C100 turns on. 10 11 12 13 14 A B C D 230 240

Move Double Word moves (copies) a double word to two consecutive memory locations directly or indirectly via a pointer, either as a double HEX constant, from a double memory location, or indirectly through a pointer to a double memory location.

250-1 260

DS5 Used HPP

N/A

From DWORD ⸠ ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠V,P,K To DWORD⸠ ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠V,P

K0-FFFFFFFF; See DL205 V-memory map - Data Words See DL205 V-memory map - Data Words

DL205 User Manual, 4th Edition, Rev. D

5-255

Page 480

Chapter 5: Standard RLL Instructions

1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D

BCD to Real with Implied Decimal Point (BCDTOR) (IB-560)

230 240 250-1 260 DS5 Used HPP

5-256

N/A

BCD to Real with Implied Decimal Point converts the given 4-digit WORD BCD value to a Real number, with the implied number of decimal points (K0-K4). For example, BCDTOR K1234 with an implied number of decimal points equal to K1, would yield R123.4 BCDTOR Parameters • (WORD BCD): specifies the word or constant that will be converted to a Real number • of Decimal Points: specifies the number of implied decimal points in the Result DWORD • (DWORD REAL): specifies the location where the Real number will be placed

Parameter Value (WORD BCD) ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠V,P,K Number of Decimal Points ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ K Result (DWORD REAL)⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ V

DL205 Range K0-9999; See DL205 V-memory map - Data Words K0-4 See DL205 V-memory map - Data Words

BCDTOR Example In the following example, the BCDTOR instruction is used to convert the 16-bit data in V2000 from a 4-digit BCD data format to a 32-bit REAL (floating point) data format and store into V3000 and V3001 when C100 turns on. K2 in the Number of Decimal Points implies the data will have two digits to the right of the decimal point.

DL205 User Manual, 4th Edition, Rev. D