03-25-2014 05:33 PM
Hi!
I've got the hardware used for the FRC competition; CompactRIO, NI 9403 and Digital Sidecar (am-0866) connected to the NI 9403, however I've only got LabVIEW, not LabVIEW FRC. I want to write a PWM signal to the PWM output channels on the sidecar in order to control two servos. I've got a PWM example program to run, but how do I know which digital output on the module relates to which PWM output on the sidecar? Is it possible to access respective PWM channel in normal LabVIEW as you can in LabVIEW FRC? How would I do that?
I would really appreciate some help, thank you!
03-25-2014 06:41 PM
Which PWM example are you using? Do you have the LabVIEW FPGA toolkit? Do you have the LabVIEW Real-Time Toolkit? You need both to fully program the cRIO. The PWM signals are just digital outputs, switched on and off at high frequency by the FPGA. You could figure out the pins with a multimeter - turn on one digital output, see which channel is on on the sidecar. I'm going to guess they're in some logical order, but that is just a guess.
The FRC tools are a huge framework and they abstract the interface between the FPGA and the host (RT) code. Without it, how you access the PWM depends on how the FPGA is coded to generate that signal.
03-26-2014 08:18 AM
I am using the PWM generation example under Hardware Input and Output/CompactRIO/Signal Generation and Processing/Digital/Pulse Width Modulation. I've got LabVIEW FPGA and Real time installed. I will proceed with trying the outputs with a multimeter.
If I won't be able to make the sidecar-solution work. Would it be possible to drive the servo (A digital Hitech servo) with the signal cable connected to an analog output module on crio?
03-26-2014 12:28 PM
I'm not sure why the digital sidecar solution wouldn't work once you identify the correct channels. I'm pretty sure the sidecar is just a breakout box with maybe a fuse and some limited signal processing. The code doesn't tie directly into the sidecar and the code doesn't know if the sidecar is connected - all the signal generation is done on the cRIO. If the servo expects a PWM signal, then connecting it to an analog output probably won't work since that's not a PWM signal.
03-27-2014 05:19 PM
Yes, you are right, the sidecar works like charm. Thank you!