JVL Industri Elektronik A/S - User Manual - Integrated Stepper Motors MIS23x, 34x, 43x 325
16.7 Serial communication
This section describes control of the SMC75 motor via the serial interface (RS232/
RS485).
The communication is not made in ASCII values and it is thus not possible to use pro-
grams like Hyper terminal to control the motor.
The interface is RS232 compatible and uses 8 data bits and no parity.
The SMC75 motor is completely controlled by reading and writing to registers.
The registers are numbered 1-255. The width of the registers is 16 bits or 32 bits.
To protect communication from errors, the data is transmitted twice.
First the data byte is transmitted and then an inverted version (255-x) is transmitted.
The easiest way to become familiar with the registers and MacTalk communication is to
use the MacRegIO program. This program lists all of the registers, and the serial com
-
mands sent and received can be monitored.
16.7.1 Supported commands
16.7.2 Read register
This command can read a register. All registers are read as 32-bit. If the register is only
16-bit, the high part must be discarded.
Block description
Sync Response Sync Description
0x50 0x52 Read register
0x51 0x52 Read register block
0x52 0x11 (Acknowledge) Write register
0x54 0x11 (Acknowledge) Enter safe mode
0x55 0x11 (Acknowledge) Exit safe mode
0x56 0x11 (Acknowledge) Write to flash
0x57 None Reset controller
0x59 None Group write register
0x61 0x61 Program status and command
0x62 0x11 (Acknowledge) Write program flash
0x63 0x63 Read program flash
Master sends SMC75 Response
<Read><Address><RegNum><End> <Write><MAddress><RegNum><Len><Data><End>
Block name Protected Example Description
<Read> No 50h,50h,50h Read command
<Address> Yes 07h,F8h (Address 7) The address of the SMC75
<RegNum> Yes 05h,FAh (RegNum 5) The register number to read
<End> No AAh, AAh Command termination
<Write> No 52h,52h,52h Write command
<MAddress> Yes 00h,FFh (Address 0)
This will always be 0, because this is the
address of the master
<RegNum> Yes 05h,FAh (RegNum 5)
This will always be the same as
requested
<Len> Yes 04h,FBh (Len = 4) The length will always be 4
<Data> Yes
E8h,17h, 03h,FCh,
00h, FFh, 00h,FFh
(Data = 1000)
The data read from the register
<End> No AAh, AAh Command termination