The text of a manual · part 53 of 53
DL06 Micro PLC User Manual, Volume 1 of 2, pages 520 to 524
Pages 520 to 524 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 520
Chapter 5: Intelligent Box (IBox) Instructions
CTRVELO Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
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.
5–366
DL06 Micro PLC User Manual, 3rd Edition Rev. A
Rung 2: This CTRIO Velocity Mode IBox sets up Output #0 in CTRIO #1 to output 10,000 pulses at a Frequency of 1000 Hz. This example program requires that you load CTRVELO_IBox.cwb into your Hx-CTRIO module.
(example continued on next page)
Page 521
Chapter 5: Intelligent Box (IBox) Instructions
CTRVELO Example (cont’d) Rung 3: If the Velocity Mode parameters are OK, set the Direction Bit and Enable the output.
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–367
Page 522
Chapter 5: Intelligent Box (IBox) Instructions
CTRIO Write File to ROM (CTRWFTR) (IB-1006)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
DS5
Used
HPP
N/A
5–368
CTRIO Write File to ROM writes the runtime changes made to a loaded CTRIO Preset Table back to Flash ROM 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.
CTRWFTR 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 • 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
Parameter CTRIO# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K Output# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Success . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B Error . . . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B
DL06 Range K0-255 K0-3 See DL06 V-memory map - Data Words See DL06 V-memory map See DL06 V-memory map
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 523
Chapter 5: Intelligent Box (IBox) Instructions
CTRWFTR 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.
Rung 2: This CTRIO Edit Preset Table Entry IBox will change Entry 0 in Table #2 to be a RESET at Count 3456. This example program requires that you load CTRWFTR_IBox.cwb into your Hx-CTRIO module.
(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–369
Page 524
Chapter 5: Intelligent Box (IBox) Instructions
CTRWFTR Example (cont’d)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
Rung 3: If the file is successfully edited, use a Write File To ROM IBox to save the edited table back to the CTRIO's ROM, thereby making the changes retentive.
5–370
DL06 Micro PLC User Manual, 3rd Edition Rev. A