The text of a manual · part 20 of 32
SYSMAC C200H-NC211 Position Control Unit Operation Manual: SECTION 7 The TEACH Command, pages 157 to 165
Pages 157 to 165 of 259, from SYSMAC C200H-NC211 Position Control Unit Operation Manual
The original document is the PDF (1.1 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 Omron C200H-NC211
Page 157
SECTION 7 The TEACH Command 7-1 7-2 7-3 7-4 7-5
IR Area Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Execution Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Teaching from the Programming Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TRANSFER DATA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Present Position Preset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
153 155 156 158 165
151
Page 158
Section 7
The TEACH Command Section Overview
This section explains the TEACH command. When the origin and present position are defined (i.e., when the no-origin flag is OFF), you can use TEACH to write the present position as fixed data into the C200H PC’s DM area available for use by Special I/O Units. Setting the TEACH command bit (bit 09 of word n for the X axis, bit 09 of word n+5 for the Y axis) writes the present position as the target position for the designated positioning action. Data are set as absolute positions rather than increments. TEACH can be executed within a single scan. The following diagram uses Unit #10 as an example and refers to the X axis. The case of the Y axis is the same. CW
CCW 0
Present position
Positioning axis
DM 1052 DM 1053 DM 1054
Data set using TEACH is valid immediately and can be used for positioning actions without turning off the power or transferring data. Note that data rewritten using the Programming Console is not valid until data has been transferred again.
152
Page 159
Section 7-1
IR Area Settings
7-1
IR Area Settings In C200H PCs, IR words 100 to 199 are used for Special I/O Units. When a Position Control Unit is used, they are allocated as I/O refresh areas. For a detailed table of words and bits in the IR area, refer to Section 5-1 IR Area Allocations.
Present Position
When the no-origin flag is OFF, and pulse output is stopped at the position to be taught, the present position is set in words n+13 and n+14. 11 n+10 No-origin flag (The no-origin flag is OFF when this bit is 0.) 15
00 n+13 x103 x102 x101 x100 n+14 direction x106 x105 x104 n+14 direction x106 x105 n+13 x104 x103 x102 x101 x100
This bit sets the direction. 0: CW 1: CCW
TEACH Positioning Action Number
X: Bits 15-08 of word n+1 Y: Bits 15-08 of word n+6 15 n=1
08 x101 x100
Set to an integer between 00 and 19.
The number set here indicates the positioning action under START for which the present position is to be set as the target position.
153
Page 160
Section 7-1
IR Area Settings TEACH Command Bit
X: Bit 09 of word n Y: Bit 09 of word n+5 09
TEACH command bit (TEACH begins at the rising edge of this bit.)
When this bit turns ON, the settings it enables are effective in the same scan.
154
Page 161
Execution Example
7-2
Section 7-2
Execution Example
TEACH positioning action no. word n+1, bits 15-08
TEACH word n, bit 09
1 0 1
Teaching completed flag word n+10, bit 09 Busy flag word n+10, bit 12
0 1 0 within 4 scans
155
Page 162
Teaching from the Programming Console
7-3
Section 7-3
Teaching from the Programming Console The following example shows how to teach positions from the Programming Console for Unit No. 0. It assumes that ORIGIN SEARCH has been executed, and writes the present position into words DM 1053 and 1054 as an absolute position (i.e., relative to the origin). Programming Console Display
10013 ^OFF 10013 ^ON
Key sequence SHIFT
CONT
A
B
A
0
1
#
PLAY
SHIFT
C101 10013 1000 ^OFF
CHG
CH
A
B
A
B
1
B
0
1
*
RESET
A
0
MONTR
10009 C101 ^OFF 1000 10009 C101 ^OFF 1000
156
PLAY
REC
SET
RESET
1
MONTR
0
WRITE
A
0
To specify position data 10
10013 C101 ^OFF 1000
1
REC
LOW-SPEED JOG
SET
C101 10013 0000 ^OFF
D
B
0
3
MONTR
Page 163
Teaching from the Programming Console
Section 7-3
TEACHING From a Program
Origin Searched
No
Search Origin
Yes Move Sequence Number into N+1 bits 8-15
Position Shaft
D/F Teach bit n bit 9
157
Page 164
TRANSFER DATA
7-4
Section 7-4
TRANSFER DATA Use TRANSFER DATA when the set data automatically transferred from the C200H PC to the Position Control Unit is insufficient. Although only the data from the area designated for any particular Unit is automatically transferred when the Unit is powered up or restarted by the AR area restart bit, TRANSFER DATA can also be used to access data from any data area in the PC. In other words (as described in Section 3-2 Data Configuration and Allocation), Position Control Units are consecutively allocated 200 words each from the DM area, and this data is automatically transferred. TRANSFER DATA, however, can transfer data from other parts of the DM area, as well as from the LR, HR, and other areas. Transfer can take place during positioning actions. After transfer, the contents of the buffer must also be transferred. Be sure to execute transfer of buffer contents during a pause while in operating mode. Position, speed, acceleration, and deceleration data are all transferable. Transfer overwrites the RAM of the NC211, but does not affect the DM area in the C200H.
NC211 Unit #5
C200H PC
RAM area for Transfer X axis
Y axis
Parameters
Parameters
Positioning actions
Positioning actions
Speeds
Speeds
DM 1500 to 1699 Automatically transferred at start-up or restart via AR area restart bit. (The same data is written to the buffer.)
Acceleration Acceleration Deceleration Deceleration DM 0100 to 0299 (Pins 7 to 9 of the DIP switch on the back panel set to 1)
Buffer transfer X TRANSFER DATA
I/O memory
IR area, LR area, HR area, AR area etc.
Buffer
Y
Positioning actions
Positioning actions
Speeds
Speeds
Acceleration Acceleration Deceleration Deceleration
Note If expanded DM is not used, the data for speed, acceleration, and deceleration cannot be transferred with the data for positioning actions.
158
Page 165
TRANSFER DATA
Section 7-4
Normal Transfer Positioning actions, speeds, acceleration, and deceleration can be transferred from a data area of the PC other than the one allocated to the Position Control Unit. Any data area in the C200H PC may be designated. This data is directly transferred from the designated area to memory within the Unit; the data set for the Unit in the allocated section of DM area is not affected. Parameters set in DM words m through m+21 are not changed when TRANSFER DATA is executed. Data Preparation
Up to 26 transfers (three words each) can be made each time normal TRANSFER DATA is executed. Each transfer consists of one positioning action, three speeds, or speed units, acceleration, and deceleration. In any case, three words are required for each transfer. This data must be prepared in a PC data area in the required format and in consecutive words. (Refer to 3-3 DM Area Allocations for the content of each word/bit.) With data expansion, 59 transfers are possible. Position Control Unit’s Rewritten Data
PC Data Areas Available for TRANSFER DATA Data Area
Words
DM area
0000 to 0999
DM area ( for Special I/O Units)
1000 to 1999
I/O area
000 to 255
LR area
000 to 63
HR area
00 to 99
AR area
00 to 27
Transfer #0
Positioning action #0
Transfer #1
Positioning action #1
Transfer #19
Positioning action #19
Transfer #53
Speed #1 Speed #2 Speed #3
Transfer #54
Speed #4 Speed #5 Speed #6
Transfer #57
Speed #13 Speed #14 Speed #15
Transfer #58
Speed units Acceleration Deceleration
Positioning Action Data Expansion Transfer #20 Positioning action #20
Transfer #52
Positioning action #52
159