From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
06-01-2012 08:37 AM
Does anyone have an example VI using USB-8451 with ST Micro Electronics L6470 micro stepping motor driver? I am new to SPI interface and very slowly learning how to use labview in conjunction with USB-8451 to use SPI for controlling the stepper motor. I attached the data sheets for the Eval board that is used to interface with the motor and the L6470 chip.
Any help would be appreciated. I'm using labview 10.0.
06-04-2012 02:58 PM
Hey wpn,
Are you using the SPI and I2C Driver API? It can be found here:
SPI and I2C Driver API - National Instruments
http://sine.ni.com/nips/cds/view/p/lang/en/nid/210637
This will have examples, such as One SPI Port with One Command Sent.vi, that may prove useful in getting started. If you have the driver installed then the examples will be located at <Program Files>\National Instruments\LabVIEW 2010\examples\IEIP\SPIandI2C.
Hope this helps!
--Ryan S.
06-04-2012 03:06 PM
Ryan
Thanks for the help. But I am trying to use the USB 8451 to interface the controller via SPI. I found a couple of examples and currently working communicating with the controller.
Thanks again.
06-05-2012 08:40 AM
Ryan
After going through the manual for the L6470, I learned that I need to toggle the CS line at the end of each byte.
- CS high --> low
- send x25 (command address)
- the output should be x00
- CS low -> high
- CS high -> low
- send x00
- the output should be x00
- CS low -> high
- CS high -> low
- send x00
- the output should be x8A (actual response)
- CS low -> high
The parameter I am trying to read is a 12 bit, so looks like I need to send x00 command twice to get the actual response bytes.
None of the examples that ship with 8451 does multiple command sequence in the scripting. Can some one please help me here with a sample programm.
thanks
06-05-2012 04:54 PM
Hey wpn,
There may not be an example for exactly what you're trying to do. However, based on what you're trying to do, it sounds like scripts are the way to go. You mention the shipping examples but have you looked at the General SPI Write Script.vi example? It can be found in the Example Finder by, from LabVIEW, selecting Help >> Find Examples. Then, once in the Example Finder, navigate to the example by selecting Hardware Input and Output >> I2C and SPI >> SPI Advanced >> General SPI Write Script.vi. You may need to modify this example to accomplish your exact needs but it should get you started. Hope this helps!
--Ryan S.
06-05-2012 04:57 PM
Ryan
I figured it out. Thanks for the help.
02-18-2017 11:17 AM
Hi sir
Could you please send me examples you mentioned ?
I m trying to communicate sbRIO9637 board with mcp3201 but I couldn't could you please help me ?
02-20-2017 08:43 AM
Hi gnrttr,
You should be able to follow the instructions posted to find the examples mentioned. If you're still having trouble, I recommend creating a new forum thread, as this one is several years old and a new thread will be more visible.