
60
SM-Universal Encoder Plus User Guide
www.controltechniques.com
Issue Number: 6
The following commands are supported:
Example of a SC.HiPEr positional data transfer via serial comms
Requesting the position from a SC.HiPEr encoder (12/14 = Turns/Position).
Pr
x.44
has to be set to a one (encoder comms set-up for transmit / receive registers Pr
x.42
and Pr
x.43
) to open the parameter channels. For position, only two bytes need to
be sent from the SM-Universal Encoder Plus, the address and command being 0x42
(hex). For simplicity the address is chosen as the broadcast address 0xFF, which can be
seen by encoders of any address.
The 16-bit word to be placed through drive serial comms, or a SM-Applications, is made
up of a transfer command byte (the highest byte) and the data to be transferred (the
least significant byte). To alert the SM-Universal Encoder Plus to the fact that there is
new data in Pr
x.42
, the most significant bit of the transfer command byte (bit 15 of the
full word) must be set. To alert the SM-Universal Encoder Plus that this is the first byte
to be transferred, bit 13 of the full word should be high. The first byte to be sent is the
address, so the full word to be placed in Pr
x.42
is below in binary:
Most significant end
1010 0000
: 1111
1111
Transfer Command
: Data to transfer
0xa0
: 0xff
Gives the decimal number 41215.
Once placed into Pr
x.42
, the parameter will be read by the option and its value returned
to zero to signify that the next word can be entered. This is the last byte required to send
(as the option will add the checksum) so bit 15 and bit 14 of the full word must be set.
The data byte to be sent is the read position command 0x42. The last byte to be sent is
the Hiperface command, so the full word to be placed in Pr
x.42
is below in binary:
Most significant end
1100 0000
: 0100
0010
Transfer Command
: Data to transfer
0xc0
: 0x42
Gives the decimal number 49218.
Once placed into the Pr
x.42
, the parameter will be read by the SM-Universal Encoder
Code
Command
0x42
Read position
0x43
Set position
0x44
Read analogue value
0x46
Read counter
0x47
Increment counter
0x49
Clear counter
0x4a
Read data (maximum of 10 bytes)
0x4b
Store data (maximum of 9 bytes)
0x4c
Data field status
0x4d
Create a data field
0x4e
Available memory
0x50
Read encoder status
0x52
Read type
Содержание SM-Universal Encoder Plus
Страница 73: ...SM Universal Encoder Plus User Guide 73 Issue Number 6 www controltechniques com ...
Страница 112: ...0471 0005 06 ...