SSI with Labjack T4 for Absolute Encoders | LabJack
 

SSI with Labjack T4 for Absolute Encoders

7 posts / 0 new
Last post
patrick
patrickmcgarey's picture
SSI with Labjack T4 for Absolute Encoders

I'm curious if the T4 is capable reading an SSI-based absolute encoder that has inputs Clock+, Clock-, and outputs Data+, Data- all using RS422 protocol (see attached coms specs)? The only information I can find on the forums relates to the U-Series devices and not the T series. I would assume I could generate a pair of clocks as well as read in digital data but perhaps there is a simplier approach similar to SPI, which I have previously used with Labjack. Or perhaps this is not an ideal application for the Labjack.

LabJack Support
labjack support's picture
It looks like SPI, so I would

It looks like SPI, so I would try using SPI.  From your attachment it looks like CPOL=1 and CPHA=0 so SPI_MODE=2.

https://labjack.com/support/datasheets/t-series/digital-io/spi

Looks like you need a 120 ohm load resistor on the lines.

patrick
patrickmcgarey's picture
I see where you are coming

I see where you are coming from, I'm just curios about pinout because the sensor expects a differential connection for clock and data, which is why its four wire (data+,data-,clock+,clock-). I'm not sure how that related to MOSI and MISO, as i really only have MISO (master in slave out). The only workaround seems to be to convert differential to single ended connection, but that would require more hardware. Any thoughts on how you might wire this SSI sensor to Labjack that would allow for using SPI functions?

patrick
patrickmcgarey's picture
I see where you are coming

I see where you are coming from, I'm just curios about pinout because the sensor expects a differential connection for clock and data, which is why its four wire (data+,data-,clock+,clock-). I'm not sure how that related to MOSI and MISO, as i really only have MISO (master in slave out). The only workaround seems to be to convert differential to single ended connection, but that would require more hardware. Any thoughts on how you might wire this SSI sensor to Labjack that would allow for using SPI functions?

LabJack Support
labjack support's picture
Usually you can use those

Usually you can use those single-ended.  Ignore the - lines and try just using the + lines referred to GND.  If possible, use a scope or similar to look at Data+ versus GND and see if it looks like a good logic signal.

patrick
patrickmcgarey's picture
Hi, I managed to get this

Hi, I managed to get this working using a single ended to differntial chip for clock signal (output) and a differential to single ended chip for MISO (output). Now I have a questions about how the data is returned in SPI using eReadNameArray. I'm able to get an integer out (0-255). but I wanted to know the best way to read the raw bits. I know my sensor, which is 1000/ppr, has a 10 bit output. Perhaps something in SPI_OPTIONS or other function. Somehow just reading the first byte of the current output produces a course measurement of the angle but I need to have more significant digits. Thanks for any help.

LabJack Support
labjack support's picture
The integer outputs is simply

The integer outputs is simply how the binary data is being interpretd. For example a value of 33 in decimal is 0x21 (hexadecimal) or 0b00100001 (binary).

Devices that provide data which is not an even number of bytes usually do so with extra (trash) bit. So we have to transfer two bytes (16-bits), but 6 of those bits are meaningless.

It is possible to get the LJ to send a specific number of bits. Under SPI_OPTIONs the number of bits to be transmitted during the final byte can be specified. For example, if you send two bytes and set the value in SPI_OPTIONs to two then a total of 10-bits will be sent.