Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

simulated device inputs

Hello all,

I am reading samples (from C++, via the nidaqmx library) with values between 0 and 10000 from the input channel of a simulated device (NI-USB 9229) generating a sinusoid with min/max -60/60V!
Is this normal? Or have I just misunderstood something? (This page seems to imply that I should get values from the sinusoid)

Thanks a lot!
--Cristina.
Message Edited by acgrama on 03-29-2010 11:13 AM
0 Kudos
Message 1 of 7
(3,624 Views)
I am working in Differential mode, if that helps (it's the only mode available for NI USB 9229 if I understood correctly).
0 Kudos
Message 2 of 7
(3,605 Views)

Hi Cristina,

 

Which instance of DAQmx Read are you calling?

2010-03-29_111523.png

 

The DAQmxReadAnalogF64 (highlighted above) will scale the binary data into an actual voltage using the scaling coefficients from your device (set when the device is calibrated).  I suspect you might be reading back binary data which is the 16-bit code that the device is returning before scaling is applied.

 

 

Best Regards,

John Passiak
0 Kudos
Message 3 of 7
(3,596 Views)

Hi John,

 

thanks for the feedback, this seems like a valid explanation! Indeed, I am using the DAQmxReadAnalogF64.

Unfortunately, we have received the card from our clients, so I have no idea how it was calibrated.

 

Can I control this scaling step in another way? Or what can I do to obtain values within the expected range?

 

Thank you!

0 Kudos
Message 4 of 7
(3,593 Views)

Hi acgrama,

 

Another possibility is that you might be using a custom scale as part of your task.  Could you try the following:

1.  Acquire voltage using a Test Panel in Measurement and Automation Explorer. 

 

2.  Try running an Analog Input shipping example, such as ContAcq-IntClk.

 

If the above two tests show the same problem, could you try reading back the calibration coefficients from your device with the following function:

2010-03-29_120451.png

 

Best Regards,

John Passiak
Message 5 of 7
(3,590 Views)

Oh I just noticed you are on a simulated device so calibration doesn't really apply to you.  Nonetheless could you try running the shipping example and test panel?

 

 

Best Regards,

John Passiak
0 Kudos
Message 6 of 7
(3,588 Views)

Thank you for the suggestion. I had forgotten about the shipping examples -- when it returned correct values, I realised I had forgotten a normalisation step in our app that modified the values: that was the culprit!

 

I'm sorry for having wasted your time! However, it was your suggestion that made me see the forest again instead of the trees, as it were 😄 (And I also learned about the calibration coefficients methods, which might prove useful to know in our project)

Message Edited by acgrama on 03-30-2010 04:04 PM
Message Edited by acgrama on 03-30-2010 04:05 PM
0 Kudos
Message 7 of 7
(3,560 Views)