© Vestamatic GmbH
Ar
t.-Nr
.:
85301221 E1 •
V
estamatic GmbH • Dohrw
eg 27 • D-41066 Mönchengladbach • www
.v
estamatic.com
IF SMI RS-485
Subject to modifications.
4.1.1 RS-485 BUS
The communication BUS between Host controller and IF SMI RS-485
module is RS-485. The following configuration is used:
Baud rate: 19200
Data bits: 8
Stop bits: 1
Parity:
None
Signal:
-7V to +10V Common-Mode Input Voltage Range
4.1.2 Power supply
The IF SMI RS-485 module needs the following power supply signals:
L, N (230VAC/50Hz)
4.1.3 SMI BUS
The SMI bus exists out of the following signals:
I+
(SMI BUS)
I-
(SMI BUS)
4.1.4 Master Up/Down button
The IF SMI RS-485 has an master UP/DOWN button, to operate all con-
nected SMI motors at simultaneously.
4.1.5 Base Address
The IF SMI RS-485 is selected by its base address. Each IF SMI RS-485
module connected to a shared RS-485 BUS must have an unique base
address. A maximum of 16 IF SMI RS-485 modules can be connected to
the same RS-485 BUS, which makes it possible to control 16 x 16 = 256
SMI motors.
5.2 CRC16 Calculation
Example code CRC16 calculation in C-language:
#define CRC_CONSTANT
0xA001
word Crc16 (byte* pb, byte len)
{
byte i;
word crc;
for (crc=0xffff; len--; pb++)
{
crc ^= (byte)*pb;
for (i=8; i--; )
if (crc & 0x01)
{
crc >>= 1;
crc ^= CRC_CONSTANT;
}
else
crc >>= 1;
}
// return crc result
return crc;
}
5. Protocol
This chapter describes the communication protocol between the IF SMI RS-485
module and Host controller.
4.2 Termination RS-485 BUS
A terminating resistor is simply a resistor placed at the extreme end or
ends of a cable. The value of the terminating resistor is ideally the same
value as the characteristic impedance of the cable.
5.1 Message structure
[SID] [LEN] [CMD] [DATA] [CRC16]
SID
Slave ID
LEN
Message length (without CRC)
CMD
Command byte
DATA
Optional data bytes
CRC16
16 bits checksum (LSB first)
The IF SMI RS-485 module has 4 DIP
switches, which represents the base
address of the module from 0 to 15 (decimal)
or 0 to F (hexadecimal). The base address
is part of the Slave ID:
DIP switch
Base address
Slave ID
0000
0
0xC0
0001
1
0xC1
0010
2
0xC2
0011
3
0xC3
0100
4
0xC4
0101
5
0xC5
0110
6
0xC6
0111
7
0xC7
1000
8
0xC8
1001
9
0xC9
1010
10
0xCA
1011
11
0xCB
1100
12
0xCC
1101
13
0xCD
1110
14
0xCE
1111
15
0xCF
As a general rule moreover, termination resistors should be placed at
both
far ends of the cable. Although properly terminating both ends is absolute-
ly critical for most system designs, it can be argued that in one special
case only one termination resistor is needed. This case occurs in a system
when there is a single transmitter and that single transmitter is located at
the far end of the cable. In this case there is no need to place a termina-
tion resistor at the end of the cable with the transmitter, because the signal
is intended to always travel away from this end of the cable.
There is a Terminating resistor with a value of 120
B
delivered by every IF SMI RS-485 module. If the
Terminating resistor is recommended than he must be
placed between the A and B from the connector on
the PCB.
5.3 Steer commands
#define MSG_UP
0x10
#define MSG_DOWN
0x11
#define MSG_STOP
0x12
#define MSG_STEP_UP
0x13
#define MSG_STEP_DOWN
0x14
#define MSG_SET_POS
0x15
#define MSG_SET_TILT
0x16
#define MSG_SET_POS_STEP_UP
0x17 (Software V10D or higher)
#define MSG_SET_POS_STEP_DOWN 0x18 (Software V10D or higher)
#define MSG_GOTO_POS1
0x19 (Software V10E or higher)
#define MSG_GOTO_POS2
0x1A (Software V10E or higher)
4.1 Overview IF SMI RS-485
The IF SMI RS-485 module is an intelligent module that translates RS-485
commands to SMI commands.
2/ 7
G