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

The text of a manual · part 27 of 40

DL05 Micro PLC User Manual, Volume 1 of 2: Chapter 5: Standard RLL and Intelligent Box Instructions, pages 244 to 253

Pages 244 to 253 of 379, from DL05 Micro PLC User Manual, Volume 1 of 2

The original document is the PDF (5.8 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 D0-05AA

Page 244

Chapter 5: Standard RLL - Network Instructions In the following example, when X1 is on and the port busy relay SP116 (see special relays) is not on, the RX instruction will access port 2 operating as a master. Ten consecutive bytes of data (V2000 – V2004) will be read from a CPU at station address 5 and copied into V-memory locations V2300–V2304 in the CPU with the master port. DirectSOFT 5 DirectSOFT X1

SP116

LD KF205 The constant value KF205 specifies the port number (2) and the slave address (5)

Master CPU

Slave CPU

LD K10 The constant value K10 specifies the number of bytes to be read (2-128 bytes allowed) LDA O 2300 Octal address 2300 is converted to 4C0 HEX and loaded into the accumulator . V2300 is the starting location for the Master CPU where the specified data will be read into

V2277

X

X

X

X

X

X

X

X V1777

V2300

3

4

5

7

3

4

5

7

V2000

V2301

8

5

3

4

8

5

3

4

V2001

V2302

1

9

3

6

1

9

3

6

V2002

V2303

9

5

7

1

9

5

7

1

V2003

V2304

1

4

2

3

1

4

2

3

V2004

V2305

X

X

X

X

X

X

X

X V2005

RX V2000 V2000 is the starting location in the for the Slave CPU where the specified data will be read from HandheldProgrammer Keystrokes $

B STR

1

W ANDN

SHFT

ENT SP STRN

B

B

G

1

1

6

ENT

SHFT

L D ANDST 3

SHFT

K JMP

SHFT

F

SHFT

L D ANDST 3

SHFT

K JMP

B

A

SHFT

L D 3 ANDST

C

D

SHFT

R ORN

X SET

A 0

1

A 2

A

A 0

0

3

2 C

5

0

C

A 2

F 0

5

ENT

ENT A

0 A

0

SHFT

0

ENT

ENT

DL05 Micro PLC User Manual, 6th Edition, Rev. A

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

5–121

Page 245

Chapter 5: Standard RLL - Network Instructions

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

Write to Network (WX) DS5

Used

HPP

Used

5–122

The Write to Network instruction is used to write a block of data from the master device to a slave device on WX the same network. The function parameters are loaded A aaa into the accumulator and the first and second level of the stack. Listed below are the program steps necessary to execute the Write to Network function. Step 1:, Load the slave address (0–90 BCD) into the low byte and “F2” into the high byte of the accumulator (the next two instructions push this word down to the second layer of the stack). Step 2:, Load the number of bytes to be transferred into the accumulator, 2-128 bytes are allowed, (the next instruction pushes this word onto the top of the stack). Step 3:, Load the starting Master CPU address into the accumulator. This is the memory location where the data will be written from. This parameter requires a HEX value. Step 4:, Insert the WX instruction which specifies the starting V-memory location (Aaaa) where the data will be written to in the slave. Helpful Hint: For parameters that require HEX values, the LDA instruction can be used to convert an octal address to the HEX equivalent and load the value into the accumulator. Operand Data Type ....................................A V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . C Stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . S Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CT Special Relay . . . . . . . . . . . . . . . . . . . . . . . . . . SP Program Memory . . . . . . . . . . . . . . . . . . . . . . . $

DL05 Micro PLC User Manual, 6th Edition, Rev. A

DL05 Range aaa All (See page 3–28) All V-memory (See page 3–28) 0–377 0–377 0–777 0–377 0–177 0–177 0–777 0–2048 (2K program mem.)

Page 246

Chapter 5: Standard RLL - Network Instructions In the following example when X1 is on and the module busy relay SP116 (see special relays) is not on, the WX instruction will access port 2 operating as a master. Ten consecutive bytes of data is read from the Master CPU and copied to V-memory locations V2000–V2004 in the slave CPU at station address 5. DirectSOFT DirectSOFT5 X1

SP116

LD KF205 The constant value KF205 specifies the port number (2) and the slave address (5)

Master CPU

Slave CPU

LD K10 The constant value K10 specifies the number of bytes to be written (2-128 bytes allowed) LDA O 2300

V2277

X

X

X

X

X

X

X

X V1777

V2300

3

4

5

7

3

4

5

7

V2301

8

5

3

4

8

5

3

4

V2001

V2302

1

9

3

6

1

9

3

6

V2002

V2303

9

5

7

1

9

5

7

1

V2003

V2304

1

4

2

3

1

4

2

3

V2004

V2305

X

X

X

X

X

X

X

X V2005

V2000

Octal address 2300 is . converted to 4C0 HEX and loaded into the accumulator V2300 is the starting location for the Master CPU where the specified data will be read from. WX V2000 V2000 is the starting location in the for the Slave CPU where the specified data will be written to HandheldProgrammer Keystrokes $

B STR

1

W ANDN

SHFT

ENT SP STRN

B

C

E

1

1

SHFT

L D 3 ANDST

SHFT

K JMP

SHFT

L D 3 ANDST

SHFT

SHFT

L D ANDST 3

SHFT

W ANDN

X SET

A

6 SHFT

K JMP

B

A

C

D

A 2

0 A

3 A

0

5

1

2

0 C

ENT F

0 0

C

A 2

F 0

5

ENT A

A 0

SHFT

0

ENT

ENT

DL05 Micro PLC User Manual, 6th Edition, Rev. A

ENT

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

5–123

Page 247

Chapter 5: Intelligent Box (IBox) Instructions

Box (IBox) Instructions 1 Intelligent The Intelligent Box Instructions (commonly refered to as IBox Instructions) listed in this section are additional, and much different looking, instructions made available with the 2 release of DirectSOFT 5. The DL05 PLC requires firmware version v5.10 or later to use the new DirectSOFT 5 features. For more information on DirectSOFT 5, please visit our website at: www.automationdirect.com. 3 Analog Helper IBoxes 4 Instruction Ibox # Page 5 6 7 8 Discrete Helper IBoxes 9 Instruction Ibox # Page 10 11 Memory IBoxes Instruction Ibox # Page 12 13 Math IBoxes 14 Instruction Ibox # Page A B C D

5–124

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-126 5-128 5-130 5-132 5-134 5-136 5-138 5-140 5-142

Off Delay Timer (OFFDTMR) On Delay Timer (ONDTMR) One Shot (ONESHOT) Push On / Push Off Circuit (PONOFF)

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

5-144 5-146 5-148 5-149

Move Single Word (MOVEW) Move Double Word (MOVED)

IB-200 IB-201

5-150 5-151

Math - BCD (MATHBCD) Math - Binary (MATHBIN) Square BCD (SQUARE) Square Binary (SQUAREB) Sum BCD Numbers (SUMBCD) Sum Binary Numbers (SUMBIN)

IB-521 IB-501 IB-523 IB-503 IB-522 IB-502

5-152 5-154 5-156 5-157 5-158 5-159

DL05 Micro PLC User Manual, 6th Edition, Rev. A

Page 248

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-160 5-162 5-164 5-166 5-168 5-171 5-174 5-178 5-180 5-182 5-184 5-186 5-188 5-190 5-192 5-194 5-196 5-198 5-200 5-202 5-204 5-207 5-210 5-212 5-215

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-218 5-220 5-223 5-226 5-230 5-234 5-238 5-242 5-244 5-246 5-249 5-251 5-254

DL05 Micro PLC User Manual, 6th Edition, Rev. A

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

Page 249

Chapter 5: Intelligent Box (IBox) - Analog Helper

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) DS5

Used

HPP

N/A

5–126

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 DL05 PLC • Slot #: specifies the single PLC option slot that is occupied by the module • 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

DL05 Micro PLC User Manual, 6th Edition, Rev. A

DL05 Range K0 (local base only) K1 K1-8 BCD: K0; Binary: K1 See DL05 V-memory map - Data Words K1-8 BCD: K0; Binary: K1 See DL05 V-memory map - Data Words

Page 250

Chapter 5: Intelligent Box (IBox) - Analog Helper

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.

No permissive contact or input logic is used with this instruction

DL05 Micro PLC User Manual, 6th Edition, Rev. A

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

5–127

Page 251

Chapter 5: Intelligent Box (IBox) - Analog Helper

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) DS5

Used

HPP

N/A

5–128

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 DL05 PLC • Slot #: specifies the single PLC option slot that is occupied by the module • 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

DL05 Range K0 (local base only) K1 K1-8 BCD: K0; Binary: K1 See DL05 V-memory map - Data Words

DL05 Micro PLC User Manual, 6th Edition, Rev. A

Page 252

Chapter 5: Intelligent Box (IBox) - Analog Helper

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.

No permissive contact or input logic is used with this instruction

DL05 Micro PLC User Manual, 6th Edition, Rev. A

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

5–129

Page 253

Chapter 5: Intelligent Box (IBox) - Analog Helper

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) DS5

Used

HPP

N/A

5–130

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 • Base # (K0-Local): must be 0 for DL05 PLC • Slot #: specifies the single PLC option slot that is occupied by the module • 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 Output Channels . . . . . . . . . . . . . . . K Output Data Format (0-BCD 1-BIN). . . . . . . . . . K Output Data Address . . . . . . . . . . . . . . . . . . . . . V

DL05 Range K0 (local base only) K1 K1-8 BCD: K0; Binary: K1 See DL05 V-memory map - Data Words

DL05 Micro PLC User Manual, 6th Edition, Rev. A