![DMM DYN2 Series Скачать руководство пользователя страница 53](http://html1.mh-extra.com/html/dmm/dyn2-series/dyn2-series_specification-manual_2513774053.webp)
53
DYN2MS-02F-0116A17
7.7 Application Examples
■ EXAMPLE 1
Condition:
Make 3rd axis motor right now position be the absolute zero. position(= 0), ID = 3. One byte dummy data 0x00,
Packet Length = 4.
Method:
B3 = 0x03
B2 = 0x80 + (PacketLenght-4)*32 + Set_Origin =0x80 + 0x00=0x80
B1 = 0x80 + 0x00 = 0x80
S = B3 + B2 + B1 = 0x03 + 0x80 + 0x80 = 0x103
B0 = 0x80 + Mod(S,128) = 0x83
As shown in the Sample Code, by calling the subroutine:
Send_Package(0x03,0), when Global_Func = (char)Set_Origin = 0x00.
The code will generate above B3~B0.
The motor power on position is the default absolute zero position, or it is the position set by using set absolute
zero function (0x00).
■ EXAMPLE 2
Condition:
Make 3th axis motor back to absolute zero position(= 0), ID = 3. Move to position 0 = 0x00, One byte data,
PacketLenght = 4.
Method:
B3 = 0x03
B2 = 0x80 + (PacketLenght-4)*32 + Go_Absolute_Pos=0x80 + 0x01=0x81
B1 = 0x80 + 0x00 = 0x80
S = B3 + B2 + B1 = 0x03 + 0x81 + 0x80 = 0x104
B0 = 0x80 + Mod(S,128) = 0x84
■ EXAMPLE 3
Condition:
Make 3th axis motor move 120(steps) from right now position, ID = 3.
120 = 0x78 = 0x0111 1000 > 63,Two byte data, high 7bits 000 0000=0x00, lower 7bits = 111 1000 = 0x78. And
use function Go_Relative_Pos (=0x03), Packet Length = 5.
Method:
B4 = 0x03
B3 = 0x80 +(PacketLength-4)*32+Go_Relative_PosP = 0x80+0x03 = 0xa3
B2 = 0x80 + 0x00 = 0x80
B1 = 0x80 + 0x78 = 0xf8
S = B4 + B3 + B2 + B1 = 0x03 + 0xa3 + 0x80 + 0xf8 = 0x21e
B0 = 0x80 + Mod(S , 128) = 0x80 + 0x1e = 0x9e
DYN232M
DYN232M
D Y N A C S E RV O S Y S T E M - R S 2 3 2 M O T I O N
TM
TM
DTPU
P O S I T I O N I N G