04-24-2017 02:41 AM
Hi all,
I am trying to interface a magnetic encoder which supports the SPI interface with Labview for some motor experiments. I currently have a NI USB 6009 and a NI USB 6289 for data acquisition. I have Labview 2016 with just the DAQ modules installed. I just want to do basic data readout from the encoder.
I saw there were some hardware/software requirements for using SPI with Labview. I would like to know if I can achieve SPI communication with my setup or not. I'd appreciate any help with the same.
Cheers!
Solved! Go to Solution.
04-24-2017 03:41 AM
I recommend you just buy an USB-8452. You could possibly get your setup to work, but it will be slow and possibly a lot of coding. Just buy a module made for SPI.
04-24-2017 09:13 AM - edited 04-24-2017 09:15 AM
I'm not sure what your environment needs are, but an Arduino can also be used as a cheap SPI device. I used one of those NI SPI devices in the past for simple reading of registers and it worked fine, and the API drivers are simple enough. I then saw the LIFA and LINX toolkits allow for doing SPI with an Arduino and I was able to replace my NI SPI device with a $20 Arduino and get the same functionality. The API for SPI on the Arduino using LIFA at the time was very similar to the functions provided for NI's hardware so it was easy enough for me to replace one with the other. I assume there are other features that the NI SPI device has that an Arduino doesn't, but for me reading simple registers could be done on either.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord