TEACHn (n=1 ∼ 2)
This instruction changes a parameter of position data that have already been configured and defined.
n1 (Positioning Module Slot number)
Must be zero (0) for PLC-S since the CPU module is in the 0th slot.
n2 (Device Memory Block)
This flag configures the start address that stores the parameters in the format as shown below.
+ 0 | Setting Item & Position Data Number |
+ 1 | Setting Data (DWORD) |
+ 2 |
The detailed format of the setting item and position data numbers are as follows.
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Setting Item | Position Data Number: 1..30 (H001..H01E) |
Example) H1014: Operation Speed of Position Data No. 20
Type | Setting Item | Position Data Number | |||||||||||||||
WORD | F | E | D | C | B | A | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
Value | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | |
Hex Value | 1 | 0 | 1 | 4 | |||||||||||||
Contents | Operation Speed | 12 bit data represents the position data. H014 is converted to 20 in decimal. |
PLC-S can use a maximum of 30 position data numbers.
Setting data is to specify the speed or the coordinate value of the double word length according to the setting items. Below is an example of a sequence program to change the operation speed of the X-Axis position data number 18 to 12345.
Execution Order | Offset | Instruction | Setting Value | Setting Contents | Type |
1 | +0 (d0100) | MOV H1012 D0100 | H1012 | *Item: Speed *Position Data No: No.18 (H012 = 18) | Setting Item and Position Data Number |
2 | +1 (d0101) | DMOV 12345 D0101 | 12345 | *Speed: 12345 *Speed can be configured from 1 to 100,000 and can use two word (DWORD). | Setting Data |
3 | +2 (d0102) | ||||
4 |
| TEACH1 H0000 D0100 M0200 |
| *Set the start address of the instruction TEACH1 to D100. *M0100: Word that stores the Error Code | TEACH instruction |