T7 Serial protocols pros/cons | LabJack
 

T7 Serial protocols pros/cons

3 posts / 0 new
Last post
Chris Knudsen
chriskner's picture
T7 Serial protocols pros/cons

Hi All,

I'm in a position where I can choose the type of serial interface to use to connect a T7 to my external gadget.

This is in an application where we could be acquiring many (<80) ADC inputs using the T7's ADC (as fast as possible, Streaming) while occasionally sending/receiving status messages via a serial bus (where the T7 is the master).

Looking at the T7 datasheet, this warning caught my attention:

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

Baud rates up to 38400 are supported, but the device's processor is heavily loaded at that rate.

So, my questions are:

When using the T7 for streaming A2D data via Ethernet, with an occasional serial transfer (on the same connection), which serial protocol has the least impact on A2D streaming rate performance? 

Is Async Serial a particularly burdensome interface for the T7 to support?  For some reason are the SPI and I2C interfaces less taxing on the CPU?

Notes:

  • The serial transfer should be considered low-priority.
  • LAU script *may or may not* be used for the serial engine (run concurrently with stream?).  I would rather avoid the lua stuff.
  • Serial transers will tend to have a small payload.  Perhaps 50 bytes.  Perhaps once every 2 seconds.
  • Everything is Python (except maybe a LUA script, downloaded/saved on the T7).

I look forward to any suggestions.

Regards,

Chris

LabJack Support
labjack support's picture
Async is more work for the T7

Async is more work for the T7's processor than I2C or SPI. Both I2C and SPI present the same processor load, but SPI can usually run at a higher clock speed. That means the processor can get back to shipping out data more quickly. However, if you are short on IO lines then I2C may work as well.

 

  • The serial transfer should be considered low-priority. Running the communication will block Stream data transmission for a short period of time.
  • LAU script *may or may not* be used for the serial engine (run concurrently with stream?).  I would rather avoid the lua stuff. Both stream and Lua need a lot of processor time. Normally I don't recommend using both concurrently.
  • Serial transers will tend to have a small payload.  Perhaps 50 bytes.  Perhaps once every 2 seconds. You will want to be sure that your stream buffer is large and split the packet up if possible.
  • Everything is Python (except maybe a LUA script, downloaded/saved on the T7).

 

It sounds like you have a lot going on. Keep in mind that you may need to split some operations off onto another device.

Chris Knudsen
chriskner's picture
Thanks for the quick response

Thanks for the quick response. 

SPI looks to be the best choice for us.

As expected, LabJack Support continues to be the best in the business.