The text of a manual · part 60 of 60
DL205 PLC User Manual, Volume 1 of 2, pages 591 to 598
Pages 591 to 598 of 598
The original document is the PDF (12 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 D2-04TD1, AutomationDirect D2-08TD2, AutomationDirect D2-16ND3-2, AutomationDirect D2-32ND3, Konnect-It D2-04TD1, Koyo D2-04TD1, Konnect-It D2-08TD2, Koyo D2-08TD2, and 5 more models
Page 591
Chapter 5: Standard RLL Instructions
CTRRTPM Example (cont’d)
1 2 3 4 5 6 7 8 Rung 3: If the Run To Position Mode parameters are OK, set the Direction Bit and Enable the output. 9 10 11 12 13 14 A B C D Rung 2: This CTRIO Run To Position Mode IBox sets up Output #0 in CTRIO #1 to output pulses at a Frequency of 1000 Hz, use the ‘Greater than Ch1/Fn1’ comparison operator, until the input position of 1500 is reached. This example program requires that you load CTRRTPM_IBox.cwb into your Hx-CTRIO(2) module.
DL205 User Manual, 4th Edition, Rev. D
5-367
Page 592
Chapter 5: Standard RLL Instructions
1 2
3 4 5 6 7 8 9 10 11 12 13 14 A B C D
CTRIO Velocity Mode (CTRVELO) (IB-1013) 230 240 250-1 260
DS5
Used
HPP
N/A
5-368
CTRIO Velocity Mode loads the Velocity command and given parameters on a specific Output resource 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. CTRVELO Parameters • specifies a specific CTRIO module based on a user defined number (see CTRIO Config Ibox) • specifies a CTRIO output to be used by the instruction • specifies the output pulse rate (H2-CTRIO: 20Hz - 25KHz / H2-CTRIO2: 20Hz - 250 KHz) • 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 • Count: This DWORD value specifies the number of pulses to output. A Step Count value of -1 (or 0xFFFFFFFF) causes the CTRIO to output pulses continuously. Negative Step Count values must be V-Memory references. • specifies a V-memory location that will be used by the instruction • specifies a bit that will turn on once the instruction has successfully completed • specifies a bit that will turn on if the instruction does not complete successfully
Parameter 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
DL205 User Manual, 4th Edition, Rev. D
DL205 Range K0-255 K0-3 K20-20000; See DL205 V-memory map - Data Words K0-99; See DL205 V-memory map 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 593
Chapter 5: Standard RLL Instructions
CTRVELO Example
1 2 3 4 5 6 NOTE: The CTRIO Configuration IBox instruction does not require a permissive contact. The top line will be 7 identified in BOLD italics, and the instruction name and ID will be in BOLD characters. Rung 2: This CTRIO Velocity Mode IBox sets up Output #0 in CTRIO #1 to output 10,000 8 pulses at a Frequency of 1000 Hz. This example program requires that you load CTRVELO_ IBox.cwb into your Hx-CTRIO(2) module. 9 10 11 12 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.
DL205 User Manual, 4th Edition, Rev. D
5-369
Page 594
Chapter 5: Standard RLL Instructions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D 5-370
CTRVELO Example (cont’d) Rung 3: If the Velocity Mode parameters are OK, set the Direction Bit and Enable the output.
DL205 User Manual, 4th Edition, Rev. D
Page 595
Chapter 5: Standard RLL Instructions
CTRIO Write File to ROM (CTRWFTR) (IB-1006)
230 240 250-1 260 DS5
Used
HPP
N/A
1 2 The Workspace register is for internal use by this IBox instruction and MUST NOT be used 3 anywhere else in your program. 4 CTRWFTR Parameters 5 • specifies a specific CTRIO module based on a user defined number (see CTRIO Config Ibox) 6 • specifies a CTRIO output to be used by the instruction 7 • specifies a V-memory location that will be used by the instruction • specifies a bit that will turn on once the 8 instruction has completed successfully • specifies a bit that will turn on if the instruction 9 does not complete successfully Parameter DL205 Range 10 11 12 13 14 A B C D 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 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.
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. D
5-371
Page 596
Chapter 5: Standard RLL Instructions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D 5-372
CTRWFTR Example 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 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(2) module.
(Example continued on next page)
DL205 User Manual, 4th Edition, Rev. D
Page 597
Chapter 5: Standard RLL Instructions
CTRWFTR Example (cont’d) 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.
DL205 User Manual, 4th Edition, Rev. D
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
5-373
Page 598
Chapter 5: Standard RLL Instructions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
Notes:
5-374
DL205 User Manual, 4th Edition, Rev. D