The text of a manual · part 57 of 61
DL205 PLC User Manual, Volume 1 of 2: Chapter 5: RLL and Intelligent Box Instructions, pages 543 to 552
Pages 543 to 552 of 592, from DL205 PLC User Manual, Volume 1 of 2
The original document is the PDF (13 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 PLC Direct D2-08ND3 and Koyo D2-08ND3
Page 543
Chapter 5: Intelligent Box (IBox) Instructions
ECWX Example (cont’d) Rung 2: Using ECOM100# K0, read X0-X7 from Slave K7 and write them to slave K5 as fast as possible. Store them in this local PLC in C200-C207, and write them to C300-C307 in slave K5. Both the ECRX and ECWX work with the ECOM100 Config IBox to simplify all networking by handling all of the interlocks and proper resource sharing. They also provide very simplified error reporting. You no longer need to worry about any SP "busy bits" or "error bits", or what slot number a module is in, or have any counters or shift registers or any other interlocks for resource management. In this example, SP1 (always ON) is driving both the ECRX and ECWX IBoxes in the same rung. On the scan that the Network Read completes, the Network Write will start that same scan. As soon as the Network Write completes, any pending operations below it in the program would get a turn. If there are no pending ECOM100 IBoxes below the ECWX, then the very next scan the ECRX would start its request again. Using the ECRX and ECWX for all of your ECOM100 network reads and writes is the fastest the PLC can do networking. For local Serial Ports, DCM modules, or the original ECOM modules, use the NETCFG and NETRX/NETWX IBoxes.
DL205 User Manual, 4th Edition, Rev. A
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
5–321
Page 544
Chapter 5: Intelligent Box (IBox) Instructions
1
2
3 4 5 6 7 8 9 10 11 12 13 14 A B C D
NETCFG Network Configuration (NETCFG) (IB-700) 230 240 250-1 260
DS5
Used
HPP
N/A
5–322
Network Config defines all the common information necessary for performing RX/WX Networking using the NETRX and NETWX IBox instructions via a local CPU serial port, DCM or ECOM module. You must have the Network Config instruction at the top of your ladder/stage program with any other configuration IBoxes. If you use more than one local serial port, DCM or ECOM in your PLC for RX/WX Networking, you must have a different Network Config instruction and Network # for EACH RX/WX network in your system that utilizes any NETRX/NETWX IBox instructions. The 2nd parameter "CPU Port or Slot" is the same value as in the high byte of the first LD instruction if you were coding the RX or WX rung yourself. This value is CPU and port specific. Use KF1 for local CPU serial port 2. Use K3 if a DCM or ECOM is located in slot 3 of a local 205 base. The Workspace parameter is an internal, private register used by the Network Config IBox and MUST BE UNIQUE in this one instruction and MUST NOT be used anywhere else in your program. NETCFG Parameters • Network#: specifies a unique # for each ECOM(100) or DCM network to use • CPU Port or Slot: specifies the CPU port number or slot number of DCM/ECOM(100) used • Workspace: specifies a V-memory location that will be used by the instruction
Parameter Network# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K CPU Port or Slot . . . . . . . . . . . . . . . . . . . . . . . K Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . V
DL205 User Manual, 4th Edition, Rev. A
DL205 Range K0-255 K0-FF See DL205 V-memory map - Data Words
Page 545
Chapter 5: Intelligent Box (IBox) Instructions
NETCFG Example The Network Configuration IBox coordinates all of the interaction with other Network IBoxes (NETRX/NETWX). You must have a Network Configuration IBox for each serial port network, DCM module network, or original ECOM module network in your system. Configuration IBoxes must be at the top of your program and must execute every scan. This IBox defines Network# K0 to be for the local CPU serial port #2 (KF1). For local CPU serial ports or DCM/ECOM modules, use the same value you would use in the most significant byte of the first LD instruction in a normal RX/WX rung to reference the port or module. Any NETRX or NETWX IBoxes that need to reference this specific network would enter K0 for their Network# parameter. The Workspace register is used to maintain state information about the port or module, along with proper sharing and interlocking with the other NETRX and NETWX IBoxes in the program. This V-memory register must not be used anywhere else in the entire program.
NOTE: The Network Configuration 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.
DL205 User Manual, 4th Edition, Rev. A
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
5–323
Page 546
Chapter 5: Intelligent Box (IBox) Instructions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
Network RX Read (NETRX) (IB-701)
230 240 250-1 260 DS5
Used
HPP
N/A
5–324
Network RX Read performs the RX instruction with built-in interlocking with all other Network RX (NETRX) and Network WX (NETWX) IBoxes in your program to simplify communications networking. It will perform the RX on the specified Network #, which corresponds to a specific unique Network Configuration (NETCFG) at the top of your program. The Workspace parameter is an internal, private register used by this IBox and MUST BE UNIQUE in this one instruction and MUST NOT be used anywhere else in your program. Whenever this IBox has power, it will read element data from the specified slave into the given destination V-memory buffer, giving other Network RX and Network WX IBoxes on that Network # a chance to execute. For example, if you wish to read and write data continuously from 5 different slaves, you can have all of these NETRX and NETWX instructions in ONE RUNG driven by SP1 (Always On). They will execute round-robin style, automatically! NETRX Parameters • Network#: specifies the (CPU port’s, DCM’s, ECOM’s) Network # defined by the NETCFG instruction • Workspace: specifies a V-memory location that will be used by the instruction • Slave ID: specifies the slave PLC that will be targeted by the NETRX instruction • From Slave Element (Src): specifies the slave address of the data to be read • Number of Bytes: specifies the number of bytes to read from the slave device • To Master Element (Dest): specifies the location where the slave data will be placed in the master PLC • Success: specifies a bit that will turn on once the request is completed successfully • Error: specifies a bit that will turn on if the instruction is not successfully completed
Parameter Network# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Slave ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K From Slave Element (Src) X,Y,C,S,T,CT,GX,GY,V Number of Bytes . . . . . . . . . . . . . . . . . . . . . . . K To Master Element (Dest) . . . . . . . . . . . . . . . . V Success . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B Error . . . . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B
DL205 User Manual, 4th Edition, Rev. A
DL205 Range K0-255 See DL205 V-memory map - Data Words K0-90 See DL205 V-memory map K1-128 See DL205 V-memory map - Data Words See DL205 V-memory map See DL205 V-memory map
Page 547
Chapter 5: Intelligent Box (IBox) Instructions
NETRX Example Rung 1: The Network Configuration IBox coordinates all of the interaction with other Network IBoxes (NETRX/NETWX). You must have a Network Configuration IBox for each serial port network, DCM module network, or original ECOM module network in your system. Configuration IBoxes must be at the top of your program and must execute every scan. This IBox defines Network# K0 to be for the local CPU serial port #2 (KF1). For local CPU serial ports or DCM/ECOM modules, use the same value you would use in the most significant byte of the first LD instruction in a normal RX/WX rung to reference the port or module. Any NETRX or NETWX IBoxes that need to reference this specific network would enter K0 for their Network# parameter. The Workspace register is used to maintain state information about the port or module, along with proper sharing and interlocking with the other NETRX and NETWX IBoxes in the program. This V-memory register must not be used anywhere else in the entire program.
(example continued on next page)
NOTE: The Network Configuration 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.
DL205 User Manual, 4th Edition, Rev. A
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
5–325
Page 548
Chapter 5: Intelligent Box (IBox) Instructions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
NETRX Example (cont’d)
5–326
Rung 2: Using Network# K0, read X0-X7 from Slave K7 and write them to slave K5 as fast as possible. Store them in this local PLC in C200-C207, and write them to C300-C307 in slave K5. Both the NETRX and NETWX work with the Network Config IBox to simplify all networking by handling all of the interlocks and proper resource sharing. They also provide very simplified error reporting. You no longer need to worry about any SP "busy bits" or "error bits", or what port number or slot number a module is in, or have any counters or shift registers or any other interlocks for resource management. In this example, SP1 (always ON) is driving both the NETRX and NETWX IBoxes in the same rung. On the scan that the Network Read completes, the Network Write will start that same scan. As soon as the Network Write completes, any pending operations below it in the program would get a turn. If there are no pending NETRX or NETWX IBoxes below this IBox, then the very next scan the NETRX would start its request again. Using the NETRX and NETWX for all of your serial port, DCM, or original ECOM network reads and writes is the fastest the PLC can do networking. For ECOM100 modules, use the ECOM100 and ECRX/ECWX IBoxes.
DL205 User Manual, 4th Edition, Rev. A
Page 549
Chapter 5: Intelligent Box (IBox) Instructions
Network WX Write (NETWX) (IB-702)
230 240 250-1 260 DS5
Used
HPP
N/A
1 2 3 4 5 6 7 8 9 NETWX Parameters 10 • Network#: specifies the (CPU port’s, DCM’s, ECOM’s) Network # defined by the NETCFG instruction 11 • Workspace: specifies a V-memory location that will be used by the instruction • Slave ID: specifies the slave PLC that will be targeted by the NETWX instruction • From Master Element (Src): specifies the location in the master PLC where the data will be sourced 12 from • Number of Bytes: specifies the number of bytes to write to the slave PLC 13 • To Slave Element (Dest): specifies the slave address the data will be written to • Success: specifies a bit that will turn on once the request is completed successfully 14 • Error: specifies a bit that will turn on if the instruction is not successfully completed A Parameter DL205 Range B C D Network WX Write performs the WX instruction with built-in interlocking with all other Network RX (NETRX) and Network WX (NETWX) IBoxes in your program to simplify communications networking. It will perform the WX on the specified Network #, which corresponds to a specific unique Network Configuration (NETCFG) at the top of your program. The Workspace parameter is an internal, private register used by this IBox and MUST BE UNIQUE in this one instruction and MUST NOT be used anywhere else in your program. Whenever this IBox has power, it will write data from the master's V-memory buffer to the specified slave starting with the given slave element, giving other Network RX and Network WX IBoxes on that Network # a chance to execute. For example, if you wish to read and write data continuously from 5 different slaves, you can have all of these NETRX and NETWX instructions in ONE RUNG driven by SP1 (Always On). They will execute round-robin style, automatically!
Network# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Slave ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K From Master Element (Src) . . . . . . . . . . . . . . . V Number of Bytes . . . . . . . . . . . . . . . . . . . . . . . K To Slave Element (Dest) . . X,Y,C,S,T,CT,GX,GY,V Success . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B Error . . . . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B
K0-255 See DL205 V-memory map - Data Words K0-90 See DL205 V-memory map - Data Words K1-128 See DL205 V-memory map See DL205 V-memory map See DL205 V-memory map
DL205 User Manual, 4th Edition, Rev. A
5–327
Page 550
Chapter 5: Intelligent Box (IBox) Instructions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
NETWX Example
5–328
Rung 1: The Network Configuration IBox coordinates all of the interaction with other Network IBoxes (NETRX/NETWX). You must have a Network Configuration IBox for each serial port network, DCM module network, or original ECOM module network in your system. Configuration IBoxes must be at the top of your program and must execute every scan. This IBox defines Network# K0 to be for the local CPU serial port #2 (KF1). For local CPU serial ports or DCM/ECOM modules, use the same value you would use in the most significant byte of the first LD instruction in a normal RX/WX rung to reference the port or module. Any NETRX or NETWX IBoxes that need to reference this specific network would enter K0 for their Network# parameter. The Workspace register is used to maintain state information about the port or module, along with proper sharing and interlocking with the other NETRX and NETWX IBoxes in the program. This V-memory register must not be used anywhere else in the entire program.
(example continued on next page)
NOTE: The Network Configuration 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.
DL205 User Manual, 4th Edition, Rev. A
Page 551
Chapter 5: Intelligent Box (IBox) Instructions
NETWX Example (cont’d) Rung 2: Using Network# K0, read X0-X7 from Slave K7 and write them to slave K5 as fast as possible. Store them in this local PLC in C200-C207, and write them to C300-C307 in slave K5. Both the NETRX and NETWX work with the Network Config IBox to simplify all networking by handling all of the interlocks and proper resource sharing. They also provide very simplified error reporting. You no longer need to worry about any SP "busy bits" or "error bits", or what port number or slot number a module is in, or have any counters or shift registers or any other interlocks for resource management. In this example, SP1 (always ON) is driving both the NETRX and NETWX IBoxes in the same rung. On the scan that the Network Read completes, the Network Write will start that same scan. As soon as the Network Write completes, any pending operations below it in the program would get a turn. If there are no pending NETRX or NETWX IBoxes below this IBox, then the very next scan the NETRX would start its request again. Using the NETRX and NETWX for all of your serial port, DCM, or original ECOM network reads and writes is the fastest the PLC can do networking. For ECOM100 modules, use the ECOM100 and ECRX/ECWX IBoxes.
DL205 User Manual, 4th Edition, Rev. A
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
5–329
Page 552
Chapter 5: Intelligent Box (IBox) Instructions
1 2
3
4 5 6 7 8 9 10 11 12 13 14 A B C D
CTRIO Configuration (CTRIO) (IB-1000) 230 240 250-1 260
DS5
Used
HPP
N/A
CTRIO Config defines all the common information for one specific CTRIO module which is used by the other CTRIO IBox instructions (for example, CTRLDPR - CTRIO Load Profile, CTREDRL - CTRIO Edit and Reload Preset Table, CTRRTLM CTRIO Run to Limit Mode, ...). The Input/Output parameters for this instruction can be copied directly from the CTRIO Workbench configuration for this CTRIO module. Since the behavior is slightly different when the CTRIO module is in an EBC Base via an ERM, you must specify whether the CTRIO module is in a local base or in an EBC base.
CTRIO in Local Base
CTRIO in EBC Base
You must have the CTRIO Config IBox at the top of your ladder/stage program along with any other configuration IBoxes. If you have more than one CTRIO in your PLC, you must have a different CTRIO Config IBox for EACH CTRIO module in your system that utilizes any CTRIO IBox instructions. Each CTRIO Config IBox must have a UNIQUE CTRIO# value. This is how the CTRIO IBoxes differentiate between the different CTRIO modules in your system. The Workspace parameter is an internal, private register used by the CTRIO Config IBox and MUST BE UNIQUE in this one instruction and MUST NOT be used anywhere else in your program. CTRIO Parameters • CTRIO#: specifies a specific CTRIO module based on a user defined number • Slot: (local base): specifies which PLC slot is occupied by the module (always K0 for EBC base) • Workspace: specifies a V-memory location that will be used by the instruction • CTRIO Location: specifies where the module is located (PLC local base or ERM to EBC base) • Input (local base): This needs to be set to the same V-memory register as is specified in CTRIO Workbench as ‘Starting V address for inputs’ for this unique CTRIO. • Output (local base): This needs to be set to the same V-memory register as is specified in CTRIO Workbench as ‘Starting V address for outputs’ for this unique CTRIO. • Word Input (EBC base): The starting input V-memory address as defined by the I/O configuration in the ERM Workbench • Bit Input (EBC base): The starting input Bit address as defined by the I/O configuration in the ERM Workbench • Word Output (EBC base): The starting output V-memory address as defined by the I/O configuration in the ERM Workbench • Bit Output (EBC base): The starting output Bit address as defined by the I/O configuration in the ERM Workbench
5–330
DL205 User Manual, 4th Edition, Rev. A