USB - 3axes Stepper Motor Controller - M1645
osition
0x03
M V
sets the target velocity (only in Velocity-Mode)
0x09
M DG H
initializes the readout of the motor drivers status registers - 1.9 sould be used instead
0x0a
M DG L
same as M DG H
0x0b
M CPL
sets position and length of a Cover-Datagram
0x0c
M CD
sets the Cover-Datagram to be send directly to the motor driver chain
1.3
Read-from-Motor
0x02
SubCMD
MotNr
Value
Value
Value
Reads the value mapped by a subcommand.
Subcommands are:
0x01
M COUNT
reads the actual motor position
0x02
M POS
reads the target motor position
0x03
M V
reads the actual motor velocity
0x04
M VT
reads the target motor velocity
0x05
M XL
reads the x-latched register
0x06
M A
reads the actual acceleration
0x07
M LP
reads the LP-Bit
0x08
M RS
reads the status of the reference switches
0x09
M DG H
reads the driver chain status registers (high word) - 1.9 should be used instead
0x0a
M DG L
reads the driver chain status registers (low word) - 1.9 should be used instead
0x0b
M CPL
reads position and length of the Cover-Datagram
0x0c
M CD
reads the Cover-Datagram
1.4
Write Motor Conguration
Writes the conguration word for a certain Motor.
1
Bit
description
0
0x03
write cong word
1
motnr
number of the motor to congure
1
CC1
coil current multiplier
1: maximum 4V reference voltage, 0: maximum 2V
2
CC2
coil current
produces a reference voltage of CC2 ·
2
256
, CC2 = 0 . . . 255
3
Vmin MSB
minimum velocity MSB
R =
V min · 12
2
pulse div
· 65536 ,
V min = 0 . . . 2047
4
Vmin LSB
minimum velocity LSB
5
Vmax MSB
maximum velocity MSB - calculation identical to Vmin
6
Vmax LSB
maximum velocity LSB
7
Amax MSB
maximum acceleration MSB
R =
Amax · 144
2
pulse div+ramp div+29
,
Amax = 0 . . . 2048
8
Amax LSB
maximum acceleration LSB
9
aat
should be kept at 0x00
10
v0, ath MSB
should be kept at 0x07
11
ath LSB
should be kept at 0xf f
12
p mul
multiplication factor for the PD-ramp-calculation
13
p div
dierential factor for the PD-ramp-calculation
14
ref
reference switches
(MSB) 7
6
5
4
3
2
1
0 (LSB)
-
-
-
-
Dis L
Dis R
Soft
RnL
bit 7-4: not used, sould be 0
bit 3, Dis L:
0 - motor stops if V is negative and the left switch becomes active
1 - left switch disabled
bit 2, Dis R:
0 - motor stops if V is positive and the right switch becomes active
1 - right switch disabled
bit 1, Soft:
0 - motor stops immidiatly
1 - motor stops concerning Amax, Vmin
bit 0, RnL: swaps left and right switch
15
mode
Mode
0: Ramp-Mode - trapezoidal prole
1: Soft-Mode - exponential prole
2: Velocity-Mode - mode for constant velocity
3: Hold-Mode - stops the motor
16
pulse div
refere to the calculation of Vmin, Vmax, Amax
17
ramp div
refere to the calculation of Vmin, Vmax, Amax
18
ust
microstepping - 2
ust
microsteps per full-step, ust = 0 . . . 6
1.5
Read Motor Conguration
0x04
MotNr
Read the conguration of motor MotNr. The Controller will send back 19 bytes as described in 1.4
2
1.6
Read A/D-Channel
0x05
Channel
delay (MSB)
delay (LSB)
timeout(MSB)
timeout(LSB)
Reads the A/D-Converter channel Channel (Channel =0,1). If delay < 0, delay is counted down when a
trigger signal occured, before the A/D-conversion is started. When timeout is counted down the A/D-
conversion is started, even if no trigger signal was detected.
1.7
Set I/O
0x06
direction
value
Sets / Reads the digital I/O-channels.
The direction byte is coded as follows:
7
6
5
4
3
2
1
0
-
-
-
-
-
D2
D1
D0
where D?=1 denes the line to an input, D?=0 as output.
The value byte is coded as follows:
7
6
5
4
3
2
1
0
-
-
-
-
-
V2
V1
V0
where V?=1 sets the line high if it is an output, V?=0 sets it low.
The Controller will send back 1 byte with the contents of the ports register.
1.8
Send D/A
0x07
mul
value
Sets the general purpose D/A-channel to a given value.
U = value ·
mul+1
128
. value = 0 . . . 255, mul = 0, 1.
1.9
Motor Status
0x08
Reads the stepper motor driver status. The controller will send back 4 bytes.
0x08
M0
M1
M2
where M? is coded as follows
bit
name
description
7
OT
chip o due to overtemperature
6
OTPW
prewarning temperature exceeded
5
UV
driver undervoltage
4
OCHS
overcurrent high site
3
OLB
open load bridge B
2
OLA
open load bridge A
1
OCB
overcurrent bridge B low site
0
OCA
overcurrent bridge A low site
1.10
Microstepping Lookup Table
0x10
Reads the user denable microstepping lookup table. The controller will return 64 bytes corresponting
3
to a quater period of a full step. The two LSBs are inverted!
0x11
Reads the active microstepping lookup table. The controller returns 1 byte.
0x00
linear table active
0x01
sine table active
0x02
user dened table active
0x12
Selects active microstepping lookup table.
0x00
linear table active
0x01
sine table active
0x02
user dened table active
0x13
0x03
byte 1
. . .
byte 63
Sets the user dened microstepping lookup table. The two LSBs are inverted! byte 0 is xed to 0x03
2
Schematics
4
Abbildung 1: USB-Controller
5
Abbildung 2: Stepper-Controller
6
Abbildung 3: Stepper-Driver 1
7
Abbildung 4: Stepper-Driver 2
8
Abbildung 5: Stepper-Driver 3
9