Menus 15 to 17
SM-Uni Enc Pl
Parameter
structure
Keypad and
display
Parameter
x.00
Parameter
description format
Advanced parameter
descriptions
Macros
Serial comms
protocol
Electronic
nameplate
Performance
Feature look-
up table
244 Unidrive SP Advanced User Guide
www.controltechniques.com Issue Number: 7
Example of a EnDat transfer
Requesting the position from a 12/13 Endat encoder.
To request the position the following data output must be sent:
The 16 bit word to be placed through drive 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 Solutions Module 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 Solutions Module 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 command, so the full word to be placed in Pr x.42 is below in binary:
Once placed into Pr x.42, the parameter will be read by the Solutions Module and its value returned to zero to signify that the next word can be
entered.
The next two words only require the most significant bit to be high:
32768
32768
Once placed into Pr x.42, the parameter will be read by the Solutions Module and its value returned to zero to signify that the next word can be
entered. This is the last byte required to send 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 most significant byte of data, so the full word to be placed in Pr x.42 is below in binary:
Once placed into Pr x.42, the parameter will be read by the Solutions Module and its value returned to zero to signify that the data has been sent.
Next the receive parameter (Pr x.43) should be read. If the most significant bit is high (if the value is higher equal of higher than 32,768) new data has
been place there by the Solutions Module. This data should be read by the user and then the parameter should be set to zero by the user to alert the
Solutions Module that the next word should be placed into this parameter.
In this particular example the position with SinCos interpolation according to Pr x.04 and Pr x.05 was turn 1,860 and position 59,887. The position
requires dividing by 16 to produce a 13 bit position as will be given from the read position data transfer, this gives a position of 7,485. The returned
data from the encoder and read through Pr x.43 is given below:
All the returned values have been offset by 32,768 which is the most significant bit. The last byte has an additional offset of 16,384 to denote that it is
the last byte.
Words 5 to 8 are the position with the least significant bit in word 5. Below are the numbers laid out in the correct order:
Shifted to turns and position (which is 12 bits then 13 bits):
0111 0100 0100 (end of turns and start of the position) 1 1101 0011 1110
1860 7486
So the absolute position is 1860/7486 which should be compared to the displayed interpolated position of 1860/7485.
Command = 0x00
1
st
byte
Address = not needed = 0x00
Data (LSB) = not needed = 0x00
Data (MSB) = not needed = 0x00
4
th
byte
Most significant end
1010 0000 : 000 0000
Transfer command : Data to transfer
0xa0 : 0x00
Gives the decimal number 40960
Most significant end
1100 0000 : 0000 0000
Transfer command : Data to transfer
0xc0 : 0x00
Gives the decimal number 49152
Word
number
Returned value Data in decimal Data in binary
1 32,832 00 0000 0000
2 32,832 00 0000 0000
3 32,832 00 0000 0000
4 32,832 00 0000 0000
5 32,832 00 0000 0000
6 32,927 159 1001 1111
7 32,846 78 0100 1110
8 49,268 116 0111 0100
Word 8 Word 7 Word 6 Word 5
116 78 159 00
0111 0100 0100 1110 1001 1111 0000 0000
http://nicontrols.com