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

The text of a manual · part 46 of 60

DL205 PLC User Manual, Volume 1 of 2, pages 451 to 460

Pages 451 to 460 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 451

Chapter 5: Standard RLL Instructions

ASCII Print from V-memory (PRINTV)

230 240 250-1 260 DS Used HPP N/A

The ASCII Print from V–memory instruction will send an ASCII string out of the designated communications port from a specified series of V–memory registers for a specified length in number of bytes. Other features include user specified Append Characters to be placed after the desired data string for devices that require specific termination character(s), Byte Swap options, and user specified flags for Busy and Complete. • Number: must be DL260 port 2 (K2). • Address: specifies the beginning of series of V–memory registers that contain the ASCII string to print. • of Bytes: specifies the length of the string to print. • Characters: specifies ASCII characters to be added to the end of the string for devices that require specific termination characters. • Swap: swaps the high–byte and low–byte within each V–memory register of the string while printing. See the SWAPB instruction for details. • Bit: will be ON while the instruction is printing ASCII data. • Bit: will be set once the ASCII data has been printed and reset when the PRINTV instruction permissive bits are disabled.

Parameter Port Number Start Address Number of Bytes Bits: Busy, Complete

DL260 Range port 2 (K2) All V-memory (See page 3-56) All V-memory (See page 3-56) or K1-128 C0-3777

See the facing page for an example using the PRINTV instruction. Discrete Bit Flags SP53 SP71 SP116 SP117

Description On if the CPU cannot execute the instruction. On when a value used by the instruction is invalid. On when CPU port 2 is communicating with another device. On when CPU port 2 has experienced a communication error.

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-227

Page 452

Chapter 5: Standard RLL Instructions

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

ASCII Swap Bytes (SWAPB) ASCII Swap Bytes instruction swaps byte positions (high–byte to low–byte and low–byte 230 The to high–byte) within each V-memory register of a series of V-memory registers for a specified 240 number of bytes. 250-1 • Address: specifies the beginning 260 of a series of V–memory registers DS Used HPP N/A

5-228 the instruction will use to begin byte swapping

• of Bytes: specifies the number of bytes, beginning with the Starting Address, to byte swap

Parameter Starting Address Number of Bytes

DL260 Range All V-memory (See page 3-56) All V-memory (See page 3-56) or K1 to 128

Discrete Bit Flags SP53 SP71

Byte Swap Preferences

Description On if the CPU cannot execute the instruction. On when a value used by the instruction is invalid.

Byte High Low

No Byte Swapping (AIN, AEX, PRINTV, VPRINT)

A B C D E

V2000 V2001 V2002 V2003

0005h A B C D xx E

Byte Swap All Byte High Low

A B C D E

B A D C E

V2000 V2001 V2002 V2003

0005h B A C D xx E

Byte Swap All but Null Byte High Low

A B C D E

B A D C E

DL205 User Manual, 4th Edition, Rev. D

V2000 V2001 V2002 V2003

0005h B A C D xx E

Page 453

Chapter 5: Standard RLL Instructions

SWAPB Example The AIN Complete bit is used to trigger the SWAPB instruction. Use a one–shot so the SWAPB only executes once.

ASCII Clear Buffer (ACRB) The ASCII Clear Buffer instruction will clear the

230 ASCII receive buffer of the specified communications 240 port number. 250-1 Port Number: must be DL260 port 2 (K2) 260 DS Used HPP N/A

ACRB Example The AIN Complete bit or the AIN diagnostic bits are used to clear the ASCII buffer.

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-229

Page 454

Chapter 5: Standard RLL Instructions

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

Intelligent Box (IBox) Instructions (DL250-1/DL260 Only)

5-230

A new class of instructions, called Ibox Instructions, became available with the introduction of DirectSOFT. These powerful, yet easy-to-use instructions simplify many of the more complicated tasks that could previously be accomplished only through the use of multiple RLL Instructions. The IBox Instructions are supported by DL250-1 and DL260 PLCs. The D2-250-1 CPU requires firmware version v4.60 or later, and the D2-260 CPU requires firmware version v2.40 or later. For more information on DirectSOFT or to download our free version, please visit our Web site at: www.automationdirect.com. Analog Helper IBoxes Instruction Analog Input / Output Combo Module Pointer Setup (ANLGCMB) Analog Input Module Pointer Setup (ANLGIN) Analog Output Module Pointer Setup (ANLGOUT) Analog Scale 12-Bit BCD to BCD (ANSCL) Analog Scale 12-Bit Binary to Binary (ANSCLB) Filter Over Time - BCD (FILTER) Filter Over Time - Binary (FILTERB) Hi/Low Alarm - BCD (HILOAL) Hi/Low Alarm - Binary (HILOALB)

IBox #

Page

IB-462 IB-460 IB-461 IB-423 IB-403 IB-422 IB-402 IB-421 IB-401

5-232 5-234 5-236 5-238 5-239 5-240 5-242 5-244 5-246

Discrete Helper IBoxes Instruction Off Delay Timer (OFFDTMR) On Delay Timer (ONDTMR) One Shot (ONESHOT) Push On / Push Off Circuit (PONOFF)

Ibox #

Page

IB-302 IB-301 IB-303 IB-300

5-248 5-250 5-252 5-253

Memory IBoxes Instruction Move Single Word (MOVEW) Move Double Word (MOVED)

Ibox #

Page

IB-200 IB-201

5-254 5-255

Math IBoxes Instruction

Ibox #

Page

BCD to Real with Implied Decimal Point (BCDTOR) Double BCD to Real with Implied Decimal Point (BCDTORD) Math - BCD (MATHBCD) Math - Binary (MATHBIN) Math - Real (MATHR) Real to BCD with Implied Decimal Point and Rounding (RTOBCD) Real to Double BCD with Implied Decimal Point and Rounding (RTOBCDD) Square BCD (SQUARE) Square Binary (SQUAREB) Square Real(SQUARER) Sum BCD Numbers (SUMBCD) Sum Binary Numbers (SUMBIN) Sum Real Numbers (SUMR)

IB-560 IB-562 IB-521 IB-501 IB-541 IB-561 IB-563 IB-523 IB-503 IB-543 IB-522 IB-502 IB-542

5-256 5-257 5-258 5-260 5-262 5-263 5-264 5-265 5-266 5-267 5-268 5-269 5-270

DL205 User Manual, 4th Edition, Rev. D

Page 455

Chapter 5: Standard RLL Instructions Communication IBoxes Instruction ECOM100 Configuration (ECOM100) ECOM100 Disable DHCP (ECDHCPD) ECOM100 Enable DHCP (ECDHCPE) ECOM100 Query DHCP Setting (ECDHCPQ) ECOM100 Send E-mail (ECEMAIL) ECOM100 Restore Default E-mail Setup (ECEMRDS) ECOM100 E-mail Setup (ECEMSUP) ECOM100 IP Setup (ECIPSUP) ECOM100 Read Description (ECRDDES) ECOM100 Read Gateway Address (ECRDGWA) ECOM100 Read IP Address (ECRDIP) ECOM100 Read Module ID (ECRDMID) ECOM100 Read Module Name (ECRDNAM) ECOM100 Read Subnet Mask (ECRDSNM) ECOM100 Write Description (ECWRDES) ECOM100 Write Gateway Address (ECWRGWA) ECOM100 Write IP Address (ECWRIP) ECOM100 Write Module ID (ECWRMID) ECOM100 Write Name (ECWRNAM) ECOM100 Write Subnet Mask (ECWRSNM) ECOM100 RX Network Read (ECRX) ECOM100 WX Network Write (ECWX) NETCFG Network Configuration (NETCFG) Network RX Read (NETRX) Network WX Write (NETWX)

Ibox #

Page

IB-710 IB-736 IB-735 IB-734 IB-711 IB-713 IB-712 IB-717 IB-726 IB-730 IB-722 IB-720 IB-724 IB-732 IB-727 IB-731 IB-723 IB-721 IB-725 IB-733 IB-740 IB-741 IB-700 IB-701 IB-702

5-272 5-274 5-276 5-278 5-280 5-283 5-286 5-290 5-292 5-294 5-296 5-298 5-300 5-302 5-304 5-306 5-308 5-310 5-312 5-314 5-316 5-319 5-322 5-324 5-327

Counter I/O IBoxes (Work with H2-CTRIO and H2-CTRIO2) Instruction CTRIO Configuration (CTRIO) CTRIO Add Entry to End of Preset Table (CTRADPT) CTRIO Clear Preset Table (CTRCLRT) CTRIO Edit Preset Table Entry (CTREDPT) CTRIO Edit Preset Table Entry and Reload (CTREDRL) CTRIO Initialize Preset Table (CTRINPT) CTRIO Initialize Preset Table (CTRINTR) CTRIO Load Profile (CTRLDPR) CTRIO Read Error (CTRRDER) CTRIO Run to Limit Mode (CTRRTLM) CTRIO Run to Position Mode (CTRRTPM) CTRIO Velocity Mode (CTRVELO) CTRIO Write File to ROM (CTRWFTR)

Ibox #

Page

IB-1000 IB-1005 IB-1007 IB-1003 IB-1002 IB-1004 IB-1010 IB-1001 IB-1014 IB-1011 IB-1012 IB-1013 IB-1006

5-330 5-332 5-335 5-338 5-342 5-346 5-350 5-354 5-357 5-359 5-362 5-365 5-368

NOTE: Check your CPU firmware version using DirectSOFT: PLC Menu > Diagnostics > System Information. The latest firmware and update tool are available from:

http://support.automationdirect.com/firmware/index.html

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-231

Page 456

Chapter 5: Standard RLL Instructions

1 2

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

Analog Input/Output Combo Module Pointer Setup (ANLGCMB) (IB-462) 230 240 250-1 260

DS5

Used

HPP

N/A

5-232

The Analog Input/Output Combo Module Pointer Setup instruction generates the logic to configure the pointer method for an analog input/output combination module on the first PLC scan following a Program to Run transition. The ANLGCMB IBox instruction determines the data format and Pointer addresses based on the CPU type, the Base# and the module Slot#. The Input Data Address is the starting location in user V-memory where the analog input data values will be stored, one location for each input channel enabled. The Output Data Address is the starting location in user V-memory where the analog output data values will be stored by ladder code or external device, one location for each output channel enabled. Since the IBox logic only executes on the first scan, the instruction cannot have any input logic. ANLGCMB Parameters • # (K0-Local): specifies which base the module is in. • Slot #: specifies which slot is occupied by the analog module. • of Input Channels: specifies the number of analog input channels to scan. • Data Format (0-BCD 1-BIN): specifies the analog input data format (BCD or Binary) - the binary format may be used for displaying data on some OI panels. • Data Address: specifies the starting V-memory location that will be used to store the analog input data. • of Output Channels: specifies the number of analog output channels that will be used. • Data Format (0-BCD 1-BIN): specifies the format of the analog output data (BCD or Binary). • Data Address: specifies the starting V-memory location that will be used to source the analog output data. NOTE The ANLGCMB instruction does not currently support the F2-8AD4DA-1 or F2-8AD4DA-2.

DL205 User Manual, 4th Edition, Rev. D

Page 457

Chapter 5: Standard RLL Instructions Parameter

DL205 Range

1 2 3 4 ANLGCMB Example In the following example, the ANLGCMB instruction is used to set up the pointer method for 5 an analog I/O combination module that is installed in option slot 2. Four input channels are enabled and the analog data will be written to V2000 - V2003 in BCD format. Two output channels are enabled and the analog values will be read from V2100 - V2101 in BCD format. 6 7 8 9 10 11 12 NOTE: An Analog I/O IBox instruction is used without a permissive contact. The top line will be identified in BOLD italics, and the instruction name and ID will be in BOLD characters. 13 14 A B C D Base # (K0-Local) ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠K Slot # ⸠ ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠K Number of Input Channels ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠K Input Data Format (0-BCD 1-BIN)⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠K Input Data Address ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠V Number of Output Channels ⸠ ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠K Output Data Format (0-BCD 1-BIN) ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠K Output Data Address ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠V

K0-3 K0-7 K1-8 BCD: K0; Binary: K1 See DL205 V-memory map - Data Words K1-8 BCD: K0; Binary: K1 See DL205 V-memory map - Data Words

No permissive contact or input logic is used with this instruction

DL205 User Manual, 4th Edition, Rev. D

5-233

Page 458

Chapter 5: Standard RLL Instructions

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

Analog Input Module Pointer Setup (ANLGIN) (IB-460)

240 250-1 260 230

DS5

Used

HPP

N/A

5-234

Analog Input Module Pointer Setup generates the logic to configure the pointer method for one analog input module on the first PLC scan following a Program to Run transition. This IBox determines the data format and Pointer addresses based on the CPU type, the Base#, and the Slot#. The Input Data Address is the starting location in user V-memory where the analog input data values will be stored, one location for each input channel enabled. Since this logic only executes on the first scan, this IBox cannot have any input logic. ANLGIN Parameters • # (K0-Local): specifies which base the analog module is in. • Slot #: specifies which PLC slot is occupied by the analog module. • of Input Channels: specifies the number of input channels to scan. • Data Format (0-BCD 1-BIN): specifies the analog input data format (BCD or Binary) - the binary format may be used for displaying data on some OI panels. • Data Address: specifies the starting V-memory location that will be used to store the analog input data.

Parameter Base # (K0-Local) ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ K Slot # ⸠ ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ K Number of Input Channels ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ K Input Data Format (0-BCD 1-BIN)⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ K Input Data Address ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ V

DL205 User Manual, 4th Edition, Rev. D

DL205 Range K0-3 K0-7 K1-8 BCD: K0; Binary: K1 See DL205 V-memory map - Data Words

Page 459

Chapter 5: Standard RLL Instructions

ANLGIN Example

1 2 3 4 5 6 7 NOTE: An Analog I/O IBox instruction is used without a permissive contact. The top line will be identified in BOLD italics, and the instruction name and ID will be in BOLD characters. 8 9 10 11 12 13 14 A B C D In the following example, the ANLGIN instruction is used to set up the pointer method for an analog input module that is installed in option slot 1. Eight input channels are enabled and the analog data will be written to V2000 - V2007 in BCD format.

No permissive contact or input logic is used with this instruction

DL205 User Manual, 4th Edition, Rev. D

5-235

Page 460

Chapter 5: Standard RLL Instructions

1

2

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

Analog Output Module Pointer Setup (ANLGOUT) (IB-461) 230 240 250-1 260

DS5

Used

HPP

N/A

5-236

Analog Output Module Pointer Setup generates the logic to configure the pointer method for one analog output module on the first PLC scan following a Program to Run transition. This IBox determines the data format and Pointer addresses based on the CPU type, the Base#, and the Slot#. The Output Data Address is the starting location in user V-memory where the analog output data values will be placed by ladder code or external device, one location for each output channel enabled. Since this logic only executes on the first scan, this IBox cannot have any input logic. ANLGOUT Parameters • # (K0-Local): specifies which base the analog module is in • #: specifies which PLC slot is occupied by the analog module • of Output Channels: specifies the number of analog output channels that will be used • Data Format (0-BCD 1-BIN): specifies the format of the analog output data (BCD or Binary) • Data Address: specifies the starting V-memory location that will be used to source the analog output data

Parameter Base # (K0-Local) ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ K Slot # ⸠ ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ K Number of Output Channels ⸠ ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ K Output Data Format (0-BCD 1-BIN)⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ K Output Data Address ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ V

DL205 User Manual, 4th Edition, Rev. D

DL205 Range K0-3 K0-7 K1-8 BCD: K0; Binary: K1 See DL205 V-memory map - Data Words