LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cRIO Module Output Amplitude

Hello,

 

I am curious on output amplitude when running a VI and sending signals to analog output modules. I have an NI 9264 and an NI 9266 and am running an executable with an fpga file. My question is on the fpga file how do I know what the amplitude is going to be? For example if I set a variable to 1 and send it straight to the analog voltage module channel 0, I will get 1 volt on that channel. However, for the NI 9266, it is a 0-20mA module. If I send a variable 10 to that module am I going to get 10mA or is it going to try to output 10Amps and clip at 20mA? I am just unsure of how to scale that output as a variable to what kind of output I am going to get.

 

Thanks,

 

Matt

0 Kudos
Message 1 of 5
(1,652 Views)

Modules for FPGA are give a value from 0 to 65535,  a 16-bit integer.  So 0 is 0 and 65535 is 10 V on a 0-10V module.   Same numbers are 0 and 20 mA on a 0-20 mA module.

 

So if you want to send 10 mA to a 0-20ma module 10/20*65536 = 32768.   Check the manual for the module for more details.  It might be divide by 65535.

0 Kudos
Message 2 of 5
(1,620 Views)

Hi,

 

most often in the FPGA you use FXP datatypes to handle AI/AO values.

FXP are similar to floating point values, but with a fixed value range/resolution. A ±10V module will accept FXP values in the range of ±16.000, a 0-20mA module will probably accept FXP values in the range of 0-32.00e-3.

 

I just checked in a recent cRIO project of mine:

  • a NI9263 expects FXP <±,20,5> datatype, giving a range of -16.00000…+15.99997.
  • a NI9207 gives FXP<±,24,-4> datatype, resulting in a range of -3.125e-2…+3.125e-2 for its current inputs…

 

Again: RTFM (read the friendly manual). Don't forget to learn from the example VIs provided by NI for each cRIO module!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 5
(1,611 Views)

Thank you Gerd, 

 

This is interesting because for my analog voltage module I know I am sending a sine wave of amplitude 5 out to the module and that's what I am getting on the hardware so I am not sure what RavensFan is referring to. Also I was not aware there were examples for each cRIO module, I will try to find those. Then with the manual, I have the getting started guides and the datasheets but I am not sure that I ever found a different manual for the modules and they don't mention anything about the coding side to it.

 

Thanks for the help,

Matt

0 Kudos
Message 4 of 5
(1,587 Views)

@MGardner5 wrote:

Thank you Gerd, 

 

This is interesting because for my analog voltage module I know I am sending a sine wave of amplitude 5 out to the module and that's what I am getting on the hardware so I am not sure what RavensFan is referring to. Also I was not aware there were examples for each cRIO module, I will try to find those. Then with the manual, I have the getting started guides and the datasheets but I am not sure that I ever found a different manual for the modules and they don't mention anything about the coding side to it.

 

Thanks for the help,

Matt


C-series modules can be used in both cDAQ chassis and cRIO chassis.  If you were using a cDAQ, then you'd be using DAQmx drivers and you can write the data as a double precision floating point number.

 

When it is in a cRIO chassis and executing through an FPGA like you are talking about,  then you can't use floating point numbers.  I just created a simulated project, and like Gerd says, it uses a fixed point data type with a range of ~ +/-16

 

I did not realize the c-series modules in a cRIO chassis used a fixed point.  What I am talking about was from my experience with an FPGA, but it turns out it was an R series card in a PXI chassis.  There the analog inputs and outputs were I16 integers.  So any engineering number like +/- 10 V had to be rescaled to an I16 integer of -32768 to 32767.  (Earlier I thought it was a U16.)

0 Kudos
Message 5 of 5
(1,576 Views)