Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-6346 SPI and PWM?

Solved!
Go to solution

I am having to find an alternative to a cRIO system and I think I may have found what I need in the USB-6346, but I am having trouble finding direct answers to some questions I have. I need to know if the USB-6346 can communicate with several modules over SPI and can it send out at least two PWM signals to control some motors? If not, are any of the other USB-63## modules more suited to this task? In all, it needs to communicate with four SPI modules, read two analog voltage inputs, output two PWM signals, and preferably have a couple general use DIO pins left over.

0 Kudos
Message 1 of 11
(2,356 Views)

Implementing SPI on 6346 is not easy as you would have to do bit-bang implementation on the software, instead, it is easier to use the USB-8452 to do the SPI communication and use the 6346 just for PWM/DO/AI/AO.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 11
(2,351 Views)

Thank you for the quick response. This will be a closed-loop system in which the PWM signal will be directly related to the data received from the SPI modules. Would using two USB modules be a problem? Sorry if these are basic questions.

0 Kudos
Message 3 of 11
(2,349 Views)

If this is supposed to be closed-loop systems, using a Windows-based DAQ system will add delay in the loop speed compared to something implemented on cRIO with RT+FPGA.

 

IMHO, I would reconsider going back to cRIO if this is going to be a closed-loop system. Please provide more information about the application and what is your expected response time for the loop so that other forum users can weigh in their perspectives.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 4 of 11
(2,346 Views)

I can't go into too much detail, but the system will be dampening out movement oscillating at frequencies less than about 100 Hz. The SPI modules detect the movement and the PWM controls a motor to cancel out the movement. I need to be able to receive SPI data and send out the corresponding required PWM in about 200 us.

 

Unfortunately for reasons outside of our control cRIO is no longer an option for us.

0 Kudos
Message 5 of 11
(2,341 Views)
Solution
Accepted by topic author MichaelBoyte

200us resolution guaranteed response time is NOT POSSIBLE on a Windows OS. Just the driver layer overheads are going to be more than 200us. You might have to re-evaluate your options.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 6 of 11
(2,331 Views)

Just curious, why is the CompactRIO no longer an option for you?  Availability?  Price?  Functionality?

0 Kudos
Message 7 of 11
(2,284 Views)

Availability. We wouldn't be able to get it for about a year.

0 Kudos
Message 8 of 11
(2,268 Views)

Hmm, makes sense.  Seems like there are CompactRIO shortages everywhere.  Have you considered migrating your application to sbRIO?  Usually there is a matching sbRIO product for each cRIO CPU and FPGA gate size.  As long as you weren't using a specialty cRIO module, most I/O functionality can be reproduced on the sbRIO.  For the SPI and PWM signals you need, you can use the DIO lines on the sbRIO, and NI provides LabVIEW FPGA shipping examples for implementing these interfaces.

0 Kudos
Message 9 of 11
(2,257 Views)

Thank you! I had not heard of sbRIO and so far it looks like it might be exactly what I need.

0 Kudos
Message 10 of 11
(2,235 Views)