The text of a manual · part 58 of 61
DL205 PLC User Manual, Volume 1 of 2: Chapter 5: RLL and Intelligent Box Instructions, pages 553 to 562
Pages 553 to 562 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 553
Chapter 5: Intelligent Box (IBox) Instructions Parameter
DL205 Range
1 2 3 CTRIO Example (local base) Rung 1: This sets up the CTRIO module in slot 2 of the local base. Each CTRIO module in the system will need a separate CTRIO Config IBox before any CTRxxxx IBoxes can be used. 4 The CTRIO has been configured to use V2000 through V2025 for its input data, and V2030 through V2061 for its output data. 5 6 7 8 CTRIO Example (EBC base) 9 Overview: ERM Workbench must first be used to assign memory addresses to the I/O modules in the EBC base. Once the CTRIO module memory addresses are established using ERM Workbench, they are used in CTRIO Workbench and in a CTRIO IBox instruction to 10 configure and define a specific CTRIO module. For this example, the CTRIO module uses V2000 - V2017 for its Word Input data and B40416.0 - B40423.15 for its Bit Input data. 11 The module uses V2100 - V2123 for its Word Output data and B40515.0 - B40522.15 for its Bit Output data. The starting addresses, V2000 and V40416 (for inputs) and V2100 and V40515 (for outputs) are entered into CTRIO Workbench I/O Map to configure this specific 12 CTRIO module. These starting addresses are the memory locations used in the CTRIO IBox instruction as the Word Input, Bit Input, Word Output and Bit Output addresses as shown 13 below. For more information on this topic, refer to the CTRIO User Manual “Program Control” chapter. 14 A B C D NOTE: The CTRIO Configuration IBox instructions do not require a permissive contact. The top line will be CTRIO# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K Slot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Input (Word, Bit) . . . . . . . . . . . . . . . . . . . . . . V,B Output (Word, Bit) . . . . . . . . . . . . . . . . . . . . V,B
K0-255 K0-7 See DL205 V-memory map - Data Words See DL205 V-memory map - Data Words See DL205 V-memory map - Data Words identified in BOLD italics, and the instruction name and ID will be in BOLD characters.
DL205 User Manual, 4th Edition, Rev. A
5–331
Page 554
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 Add Entry to End of Preset Table (CTRADPT) (IB-1005) 230 240 250-1 260
DS5
Used
HPP
N/A
5–332
CTRIO Add Entry to End of Preset Table, on a leading edge transition to this IBox, will append an entry to the end of a memory based Preset Table on a specific CTRIO Output resource. This IBox will take more than one PLC scan to execute. Either the Success or Error bit will turn on when the command is complete. If the Error Bit is on, you can use the CTRIO Read Error Code (CTRRDER) IBox to get extended error information. Entry Type: K0: Set K1: Reset K2: Pulse On (uses Pulse Time) K3: Pulse Off (uses Pulse Time) K4: Toggle K5: Reset Count Note that the Pulse Time parameter is ignored by some Entry Types. The Workspace register is for internal use by this IBox instruction and MUST NOT be used anywhere else in your program. CTRADPT Parameters • CTRIO#: specifies a specific CTRIO module based on a user defined number (see CTRIO Config) • Output#: specifies a CTRIO output to be used by the instruction • Entry Type: specifies the Entry Type to be added to the end of a Preset Table • Pulse Time: specifies a pulse time in msecs for the Pulse On and Pulse Off Entry Types • Preset Count: specifies an initial count value to begin at after Reset • Workspace: specifies a V-memory location that will be used by the instruction • Success: specifies a bit that will turn on once the instruction has successfully completed • Error: specifies a bit that will turn on if the instruction does not complete successfully
Parameter CTRIO# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K Output# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K Entry Type . . . . . . . . . . . . . . . . . . . . . . . . . . . V,K Pulse Time . . . . . . . . . . . . . . . . . . . . . . . . . . . V,K Preset Count . . . . . . . . . . . . . . . . . . . . . . . . . V,K Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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 K0-3 K0-5; See DL205 V-memory map - Data Words K0-65535; See DL205 V-memory map - Data Words K0-2147434528; See DL205 V-memory map See DL205 V-memory map - Data Words See DL205 V-memory map See DL205 V-memory map
Page 555
Chapter 5: Intelligent Box (IBox) Instructions
CTRADPT Example
1 2 3 4 5 6 NOTE: The CTRIO Configuration IBox instruction does not require a permissive contact. The top line will be identified in BOLD italics, and the instruction name and ID will be in BOLD characters. 7 Rung 2: This rung is a sample method for enabling the CTRADPT command. A C-bit is used to allow the programmer to control the command from Data View for testing purposes. 8 Turning on C0 will cause the CTRADPT instruction to add a new preset to the preset table for output #0 on the CTRIO in slot 2. The new preset will be a command to RESET (entry 9 type K1=reset), pulse time is left at zero as the reset type does not use this, and the count at which it will reset will be 20. Operating procedure for this example code is to load the CTRADPT_ex1.cwb file to your 10 CTRIO, then enter the code shown here, change to RUN mode, enable output #0 by turning on C2 in Data View, turn encoder on CTRIO to value above 10 and output #0 light will 11 come on and stay on for all counts past 10. Now reset the counter with C1, enable C0 to execute CTRADPT command to add a reset for output #0 at a count of 20, turn on C2 to 12 enable output #0, then turn encoder to value of 10+ (output #0 should turn on) and then continue on to count of 20+ (output #0 should turn off ). 13 14 A B C D Rung 1: This sets up the CTRIO module in slot 2 of the local base. Each CTRIO module in the system will need a separate CTRIO Config IBox before any CTRxxxx IBoxes can be used. The CTRIO has been configured to use V2000 through V2025 for its input data, and V2030 through V2061 for its output data.
(example continued on next page)
DL205 User Manual, 4th Edition, Rev. A
5–333
Page 556
Chapter 5: Intelligent Box (IBox) Instructions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
CTRADPT Example (cont’d)
5–334
Rung 3: This rung allows the programmer to reset the counter from the ladder logic.
Rung 4: This rung allows the operator to enable output #0 from the ladder code.
DL205 User Manual, 4th Edition, Rev. A
Page 557
Chapter 5: Intelligent Box (IBox) Instructions
CTRIO Clear Preset Table (CTRCLRT) (IB-1007)
230 240 250-1 260 DS5
Used
HPP
N/A
1 2 3 4 5 CTRCLRT Parameters 6 • CTRIO#: specifies a specific CTRIO module based on a user defined number (see CTRIO Config) • Output#: specifies a CTRIO output to be used by the instruction 7 • Workspace: specifies a V-memory location that will be used by the instruction • Success: specifies a bit that will turn on once the instruction has successfully completed 8 • Error: specifies a bit that will turn on if the instruction does not complete successfully 9 Parameter DL205 Range 10 11 12 13 14 A B C D CTRIO Clear Preset Table will clear the RAM based Preset Table on a leading edge transition to this IBox. This IBox will take more than one PLC scan to execute. Either the Success or Error bit will turn on when the command is complete. If the Error Bit is on, you can use the CTRIO Read Error Code (CTRRDER) IBox to get extended error information. The Workspace register is for internal use by this IBox instruction and MUST NOT be used anywhere else in your program.
CTRIO# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K Output# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Success . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B Error . . . . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B
K0-255 K0-3 See DL205 V-memory map - Data Words See DL205 V-memory map See DL205 V-memory map
DL205 User Manual, 4th Edition, Rev. A
5–335
Page 558
Chapter 5: Intelligent Box (IBox) Instructions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
CTRCLRT Example
5–336
Rung 1: This sets up the CTRIO module in slot 2 of the local base. Each CTRIO module in the system will need a separate CTRIO Config IBox before any CTRxxxx IBoxes can be used. The CTRIO has been configured to use V2000 through V2025 for its input data, and V2030 through V2061 for its output data.
NOTE: The CTRIO Configuration IBox instruction does not require a permissive contact. The top line will be identified in BOLD italics, and the instruction name and ID will be in BOLD characters.
Rung 2: This rung is a sample method for enabling the CTRCLRT command. A C-bit is used to allow the programmer to control the command from Data View for testing purposes. Turning on C0 will cause the CTRCLRT instruction to clear the preset table for output #0 on the CTRIO in slot 2. Operating procedure for this example code is to load the CTRCLRT_ex1.cwb file to your CTRIO, then enter the code shown here, change to RUN mode, enable output #0 by turning on C2 in Data View, turn encoder on CTRIO to value above 10 and output #0 light will come on and stay on until a count of 20 is reached, where it will turn off. Now reset the counter with C1, enable C0 to execute CTRCLRT command to clear the preset table, turn on C2 to enable output #0, then turn encoder to value of 10+ (output #0 should NOT turn on).
DL205 User Manual, 4th Edition, Rev. A
Page 559
Chapter 5: Intelligent Box (IBox) Instructions
CTRCLRT Example (cont’d) Rung 3: This rung allows the programmer to reset the counter from the ladder logic.
Rung 4: This rung allows the operator to enable output #0 from the ladder code.
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–337
Page 560
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 Edit Preset Table Entry (CTREDPT) (IB-1003) 230 240 250-1 260
DS5
Used
HPP
N/A
5–338
CTRIO Edit Preset Table Entry, on a leading edge transition to this IBox, will edit a single entry in a Preset Table on a specific CTRIO Output resource. This IBox is good if you are editing more than one entry in a file at a time. If you wish to do just one edit and then reload the table immediately, see the CTRIO Edit and Reload Preset Table Entry (CTREDRL) IBox. This IBox will take more than one PLC scan to execute. Either the Success or Error bit will turn on when the command is complete. If the Error Bit is on, you can use the CTRIO Read Error Code (CTRRDER) IBox to get extended error information. Entry Type: K0: Set K1: Reset K2: Pulse On (uses Pulse Time) K3: Pulse Off (uses Pulse Time) K4: Toggle K5: Reset Count Note that the Pulse Time parameter is ignored by some Entry Types. The Workspace register is for internal use by this IBox instruction and MUST NOT be used anywhere else in your program. CTREDPT Parameters • CTRIO#: specifies a specific CTRIO module based on a user defined number (see CTRIO Config Ibox) • Output#: specifies a CTRIO output to be used by the instruction • Table#: specifies the Table number of which an Entry is to be edited • Entry#: specifies the Entry location in the Preset Table to be edited • Entry Type: specifies the Entry Type to add during the edit • Pulse Time: specifies a pulse time in msecs for the Pulse On and Pulse Off Entry Types • Preset Count: specifies an initial count value to begin at after Reset • Workspace: specifies a V-memory location that will be used by the instruction • Success: specifies a bit that will turn on once the instruction has successfully completed • Error: specifies a bit that will turn on if the instruction does not complete successfully
DL205 User Manual, 4th Edition, Rev. A
Page 561
Chapter 5: Intelligent Box (IBox) Instructions Parameter
DL205 Range
1 2 3 4 5 CTREDPT Example 6 Rung 1: This sets up the CTRIO module in slot 2 of the local base. Each CTRIO module in the system will need a separate CTRIO Config IBox before any CTRxxxx IBoxes can be used. The CTRIO has been configured to use V2000 through V2025 for its input data, and V2030 7 through V2061 for its output data. 8 9 10 11 12 NOTE: The CTRIO Configuration IBox instruction does not require a permissive contact. The top line will be 13 identified in BOLD italics, and the instruction name and ID will be in BOLD characters. 14 A B C D CTRIO# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K Output# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K Table# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V,K Entry# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V,K Entry Type . . . . . . . . . . . . . . . . . . . . . . . . . . . V,K Pulse Time . . . . . . . . . . . . . . . . . . . . . . . . . . . V,K Preset Count . . . . . . . . . . . . . . . . . . . . . . . . . V,K Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Success . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B Error . . . . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B
K0-255 K0-3 K0-255; See DL205 V-memory map - Data Words K0-255; See DL205 V-memory map - Data Words K0-5; See DL205 V-memory map - Data Words K0-65535; See DL205 V-memory map - Data Words K0-2147434528; See DL205 V-memory map See DL205 V-memory map - Data Words See DL205 V-memory map See DL205 V-memory map
(example continued on next page)
DL205 User Manual, 4th Edition, Rev. A
5–339
Page 562
Chapter 5: Intelligent Box (IBox) Instructions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
CTREDPT Example (cont’d)
5–340
Rung 2: This rung is a sample method for enabling the CTREDPT command. A C-bit is used to allow the programmer to control the command from Data View for testing purposes. Turning on C0 will cause the CTREDPT instruction to change the second preset from a reset at a count of 20 to a reset at a count of 30 for output #0 on the CTRIO in slot 2. Operating procedure for this example code is to load the CTREDPT_ex1.cwb file to your CTRIO, then enter the code shown here, change to RUN mode, enable output #0 by turning on C2 in Data View, turn encoder on CTRIO to value above 10 and output #0 light will come on and stay on until a count of 20 is reached, where it will turn off. Now reset the counter with C1, enable C0 to execute CTREDPT command to change the second preset, turn on C2 to enable output #0, then turn encoder to value of 10+ (output #0 should turn on) and then continue past a count of 30 (output #0 should turn off ). Note that we must also reload the profile after changing the preset(s), this is why the CTRLDPR command follows the CTREDPT command in this example.
DL205 User Manual, 4th Edition, Rev. A