The text of a manual · part 39 of 53
DL06 Micro PLC User Manual, Volume 1 of 2, pages 380 to 389
Pages 380 to 389 of 524
The original document is the PDF (6.4 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the AutomationDirect Direct Logic DL06 and Koyo DL06 D0-06DD1
Page 380
Chapter 5: Standard RLL Instructions - ASCII
ASCII Print from V–memory (PRINTV)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
DS5
Used
HPP
N/A
5–226
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. • CPU/DCM: select either CPU or DCM module for communications • Slot Number: select PLC option slot number if using DCM module • Port Number: must be K2 when using CPU port 2 • Start Address: specifies the beginning of series of V–memory registers that contain the ASCII string to print • Number of Bytes: specifies the length of the string to print • Append Characters: specifies ASCII characters to be added to the end of the string for devices that require specific termination characters • Byte Swap: swaps the high–byte and low–byte within each V–memory register of the string while printing. See the SWAPB instruction for details. • Busy Bit: will be ON while the instruction is printing ASCII data • Complete Bit: will be set once the ASCII data has been printed and reset when the PRINTV instruction permissive bits are disabled. See the previous page for an example using the PRINTV instruction. Parameter
DL06 Range
Port Number Start Address Number of Bytes Bits: Busy, Complete port 2 (K2) All V–memory All V–memory or k1–128 C0–3777
DL06 Micro PLC User Manual, 3rd Edition Rev. A
Page 381
Chapter 5: Standard RLL Instructions - ASCII
ASCII Swap Bytes (SWAPB) DS5
Used
HPP
N/A
The ASCII Swap Bytes instruction swaps byte positions (high–byte to low–byte and low–byte to high–byte) within each V–memory register of a series of V–memory registers for a specified number of bytes. • Starting Address: specifies the beginning of a series of V–memory registers the instruction will use to begin byte swapping • Number of Bytes: specifies the number of bytes, beginning with the Starting Address, to byte swap. • Byte Swap: All - swap all bytes specified All but null - swap all bytes specified except the bytes with a null Parameter DL06 Range Starting Address Number of Bytes
All V–memory All V–memory or K1–128
Discrete Bit Flags
Description
SP53 SP71
On if the CPU cannot execute the instruction. On when a value used by the instruction is invalid.
Byte Swap Preferences Byte High Low
No Byte Swapping (AIN, AEX, PRINTV, VPRINT) A
B
C
D
E xx
V2477 V2500 V2501 V2502
0005h B A D C xx E
V2477 V2500 V2501 V2502
Byte High Low 0005h A B C D E xx
Byte Swap All A
B
C
D
E xx
B
A
D
C xx
E
Byte Swap All but Null A
B
B
A
C
D
D
C
E
E
Byte High Low xx xx
V2477 V2500 V2501 V2502
0005h B A D C xx E
DL06 Micro PLC User Manual, 3rd Edition Rev. A
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
5–227
Page 382
Chapter 5: Standard RLL Instructions - ASCII
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
SWAPB Example The AIN Complete bit is used to trigger the SWAPB instruction. Use a one–shot so the SWAPB only executes once.
21
AIN complete C1
SWAPB Starting Address: V2001 Number of Bytes: K32 Byte Swap: All
ASCII Clear Buffer (ACRB) DS5
Used
HPP
N/A
5–228
The ASCII Clear Buffer instruction will clear the ASCII receive buffer of the specified communications port number. Port Number: must be DL06 port 2 (K2)
ACRB Example The AIN Complete bit or the AIN diagnostic bits are used to clear the ASCII buffer. Ain Complete C1 33 Intercharacter timeout C2 Firstcharacter timeout C3 AIN overflow error C4
DL06 Micro PLC User Manual, 3rd Edition Rev. A
ACRB K2
Page 383
Chapter 5: Standard RLL Instructions
This page intentially left blank.
DL06 Micro PLC User Manual, 3rd Edition Rev. A
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D 5–229
Page 384
Chapter 5: Intelligent Box (IBox) Instructions
Intelligent Box (IBox) Instructions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D 5–230
The Intelligent Box Instructions (IBox) listed in this section are additional instructions made available when using DirectSOFT 5 to program your DL06 PLC (the DL06 CPU requires firmware version v2.10 or later to use the new features in DirectSOFT 5). For more information on DirectSOFT 5 and to download a free demo version, please visit our Web site at: www.automationdirect.com. Analog Helper IBoxes Instruction
Ibox #
Page
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)
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
Ibox #
Page
IB-302 IB-301 IB-303 IB-300
5-248 5-250 5-252 5-253
Ibox #
Page
IB-200 IB-201
5-254 5-255
Ibox #
Page
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
Off Delay Timer (OFFDTMR) On Delay Timer (ONDTMR) One Shot (ONESHOT) Push On / Push Off Circuit (PONOFF)
Memory IBoxes Instruction Move Single Word (MOVEW) Move Double Word (MOVED)
Math IBoxes Instruction 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)
DL06 Micro PLC User Manual, 3rd Edition Rev. A
Page 385
Chapter 5: Intelligent Box (IBox) 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)
Counter I/O IBoxes 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-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
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
DL06 Micro PLC User Manual, 3rd Edition Rev. A
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D 5–231
Page 386
Chapter 5: Intelligent Box (IBox) Instructions
Analog Input/Output Combo Module Pointer Setup (ANLGCMB) (IB-462)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
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 placed 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 • Base # (K0-Local): must be 0 for DL06 PLC • Slot #: specifies which PLC option slot is occupied by the analog module (1–4) • Number of Input Channels: specifies the number of analog input channels to scan • Input 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 • Input Data Address: specifies the starting V-memory location that will be used to store the analog input data • Number of Output Channels: specifies the number of analog output channels that will be used • Output Data Format (0-BCD 1-BIN): specifies the format of the analog output data (BCD or Binary) • Output 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 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
DL06 Range K0 (local base only) K1-4 K1-8 BCD: K0; Binary: K1 See DL06 V-memory map - Data Words K1-8 BCD: K0; Binary: K1 See DL06 V-memory map - Data Words
DL06 Micro PLC User Manual, 3rd Edition Rev. A
Page 387
Chapter 5: Intelligent Box (IBox) Instructions
ANLGCMB Example In the following example, the ANLGCMB instruction is used to setup the pointer method for 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.
Permissive contacts or input logic cannot be used with this instruction
DL06 Micro PLC User Manual, 3rd Edition Rev. A
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
5–233
Page 388
Chapter 5: Intelligent Box (IBox) Instructions
Analog Input Module Pointer Setup (ANLGIN) (IB-460)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
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 • Base # (K0-Local): must be 0 for DL06 PLC • Slot #: specifies which PLC option slot is occupied by the analog module (1–4) • Number of Input Channels: specifies the number of input channels to scan • Input 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 • Input 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
DL06 Range K0 (local base only) K1-4 K1-8 BCD: K0; Binary: K1 See DL06 V-memory map - Data Words
DL06 Micro PLC User Manual, 3rd Edition Rev. A
Page 389
Chapter 5: Intelligent Box (IBox) Instructions
ANLGIN Example In the following example, the ANLGIN instruction is used to setup 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.
Permissive contacts or input logic cannot be used with this instruction
DL06 Micro PLC User Manual, 3rd Edition Rev. A
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
5–235