The text of a manual · part 51 of 53
DL06 Micro PLC User Manual, Volume 1 of 2, pages 500 to 509
Pages 500 to 509 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 500
Chapter 5: Intelligent Box (IBox) Instructions
CTRIO Initialize Preset Table (CTRINPT) (IB-1004)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
DS5
Used
HPP
N/A
5–346
CTRIO Initialize Preset Table, on a leading edge transition to this IBox, will create a single entry Preset Table in memory but not as a file, on a specific CTRIO Output resource. This IBox will take more than 1 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. CTRINPT 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 • Entry Type: specifies the Entry Type to add during the edit • Pulse Time: specifies a pulse time 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
DL06 Micro PLC User Manual, 3rd Edition Rev. A
Page 501
Chapter 5: Intelligent Box (IBox) Instructions
Parameter
DL06 Range
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
K0-255 K0-3 K0-5; See DL06 V-memory map - Data Words K0-65535; See DL06 V-memory map - Data Words K0-2147434528; See DL06 V-memory map See DL06 V-memory map - Data Words See DL06 V-memory map See DL06 V-memory map
CTRINPT Example Rung 1: This sets up the CTRIO card in slot 2 of the local base. Each CTRIO in the system will need a separate CTRIO I-box before any CTRxxxx I-boxes can be used for them. 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)
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–347
Page 502
Chapter 5: Intelligent Box (IBox) Instructions
CTRINPT Example (cont’d)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
Rung 2: This rung is a sample method for enabling the CTRINPT 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 CTRINPT instruction to create a single entry preset table, but not as a file, and use it for the output #0. In this case the single preset will be a set at a count of 15 for output #0. Operating procedure for this example code is to load the CTRINPT_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 15 and output #0 light will not come on. Now reset the counter with C1, enable C0 to execute CTRINPT command to create a single preset table with a preset to set output#0 at a count of 15, then turn encoder to value of 15+ (output #0 should turn on).
5–348
DL06 Micro PLC User Manual, 3rd Edition Rev. A
(example continued on next page)
Page 503
Chapter 5: Intelligent Box (IBox) Instructions
CTRINPT 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.
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–349
Page 504
Chapter 5: Intelligent Box (IBox) Instructions
CTRIO Initialize Preset Table (CTRINTR) (IB-1010)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
DS5
Used
HPP
N/A
5–350
CTRIO Initialize Preset Table, on a leading edge transition to this IBox, will create a single entry Preset Table in memory but not as a file, on a specific CTRIO Output resource.This IBox will take more than 1 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. CTRINTR 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 • Entry Type: specifies the Entry Type to add during the edit • Pulse Time: specifies a pulse time 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
DL06 Micro PLC User Manual, 3rd Edition Rev. A
Page 505
Chapter 5: Intelligent Box (IBox) Instructions
Parameter
DL06 Range
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
K0-255 K0-3 K0-5; See DL06 V-memory map - Data Words K0-65535; See DL06 V-memory map - Data Words K0-2147434528; See DL06 V-memory map See DL06 V-memory map - Data Words See DL06 V-memory map See DL06 V-memory map
CTRINTR Example Rung 1: This sets up the CTRIO card in slot 2 of the local base. Each CTRIO in the system will need a separate CTRIO I-box before any CTRxxxx I-boxes can be used for them. 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)
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–351
Page 506
Chapter 5: Intelligent Box (IBox) Instructions
CTRINTR Example (cont’d)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
Rung 2: This rung is a sample method for enabling the CTRINTR 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 CTRINTR instruction to create a single entry preset table, but not as a file, and use it for output #0, the new preset will be loaded when the current count is reset. In this case the single preset will be a set at a count of 25 for output #0. Operating procedure for this example code is to load the CTRINTR_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. Now turn on C0 to execute the CTRINTR command, reset the counter with C1, then turn encoder to value of 25+ (output #0 should turn on).
5–352
DL06 Micro PLC User Manual, 3rd Edition Rev. A
(example continued on next page)
Page 507
Chapter 5: Intelligent Box (IBox) Instructions
CTRINTR 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.
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–353
Page 508
Chapter 5: Intelligent Box (IBox) Instructions
CTRIO Load Profile (CTRLDPR) (IB-1001)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
DS5
Used
HPP
N/A
5–354
CTRIO Load Profile loads a CTRIO Profile File to a CTRIO Output resource on a leading edge transition to this IBox. This IBox will take more than 1 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.
CTRLDPR 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 • File#: specifies a CTRIO profile File number to be loaded • 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 File# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V,K Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Success . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B Error . . . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B
DL06 Range K0-255 K0-3 K0-255; See DL06 V-memory map - Data Words See DL06 V-memory map - Data Words See DL06 V-memory map See DL06 V-memory map
DL06 Micro PLC User Manual, 3rd Edition Rev. A
Page 509
Chapter 5: Intelligent Box (IBox) Instructions
CTRLDPR Example Rung 1: This sets up the CTRIO card in slot 2 of the local base. Each CTRIO in the system will need a separate CTRIO I-box before any CTRxxxx I-boxes can be used for them. The CTRIO has been configured to use V2000 through V2025 for its input data, and V2030 through V2061 for its output data.
1 2 3 4 5 6 Rung 2: This CTRIO Load Profile IBox will load File #1 into the working memory of Output 0 in CTRIO #1. This example program requires that you load CTRLDPR_IBox.cwb 7 into your Hx-CTRIO module. 8 9 10 11 12 13 14 A B C D (example continued on next page)
DL06 Micro PLC User Manual, 3rd Edition Rev. A
5–355