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

The text of a manual · part 40 of 40

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

Pages 374 to 379 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 374

Chapter 5: Intelligent Box (IBox) - Counter

CTRIO Velocity Mode (CTRVELO) (IB-1013) DS5

Used

HPP

N/A

1 2 This IBox will take more than 1 PLC scan to execute. Either the Success or Error bit will turn on when the 3 command is complete. If the Error Bit is on, you can use the CTRIO Read Error Code (CTRRDER) IBox to get 4 extended error information. The Workspace register is for internal use by this IBox 5 instruction and MUST NOT be used anywhere else in your program. 6 CTRVELO Parameters 7 • CTRIO#: specifies a specific CTRIO module based on a user defined number (see CTRIO Config Ibox) 8 • Output#: specifies a CTRIO output to be used by the instruction • Frequency: specifies the output pulse rate (20Hz - 20KHz) 9 • Duty Cycle: specifies the % of on time versus off time. This is a hex number. Default of 0 is 50%, also entering 50 will yield 50%. 50% duty cycle is defined as on half the time and off half the time • Step Count: specifies the target position as a 32-bit Hex number, a value of Kffffffff will cause the 10 profile to run continuously as long as the output is enabled • Workspace: specifies a V-memory location that will be used by the instruction 11 • 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 12 Parameter DL05 Range 13 14 A B C D CTRIO Velocity Mode loads the Velocity command and given parameters on a specific Output resource on a leading edge transition to this IBox.

CTRIO# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K Output# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K Frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . V,K Duty Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . V,K Step Count . . . . . . . . . . . . . . . . . . . . . . . . . . V,K Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Success . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B Error . . . . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B

K0-255 K0-3 K20-20000; See DL05 V-memory map - Data Words K0-99; See DL05 V-memory map K0-2147434528; See DL05 V-memory map See DL05 V-memory map - Data Words See DL05 V-memory map See DL05 V-memory map

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

5–251

Page 375

Chapter 5: Intelligent Box (IBox) - Counter

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

CTRVELO Example

5–252

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 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.

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

Page 376

Chapter 5: Intelligent Box (IBox) - Counter

CTRVELO Example Rung 3: If the Velocity Mode parameters are OK, set the Direction Bit and Enable the output.

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–253

Page 377

Chapter 5: Intelligent Box (IBox) - Counter

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

CTRIO Write File to ROM (CTRWFTR) (IB-1006) DS5

Used

HPP

N/A

5–254

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 • Error: specifies a bit that will turn on if the instruction does not complete successfully

Parameter CTRIO# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K Output# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Success . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B Error . . . . . . . . . . . . . . . . . . . . . . . X,Y,C,GX,GY,B

DL05 Range K0-255 K0-3 See DL05 V-memory map - Data Words See DL05 V-memory map See DL05 V-memory map

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

Page 378

Chapter 5: Intelligent Box (IBox) - Counter

CTRWFTR Example

1 2 3 4 5 6 Rung 2: This CTRIO Edit Preset Table Entry IBox will change Entry 0 in Table #2 to be a 7 RESET at Count 3456. This example program requires that you load CTRWFTR_IBox.cwb into your Hx-CTRIO module. 8 9 10 11 12 13 14 A (example continued on next page) 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.

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

5–255

Page 379

Chapter 5: Intelligent Box (IBox) - Counter

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

CTRWFTR Example (cont’d)

5–256

Rung 3: If the file is successfully editted, use a Write File To ROM IBox to save the edited table back to the CTRIO's ROM, thereby making the changes retentive.

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