LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cDAQmx analog input gets slower and slower

Hi Martin,

 


@Martin_Kunze wrote:

I have a CDAQmx with four sloty. In one slot is a 24bit alaog input card NI9209.

 

the AI card can sample with more than 10K in high res mode.

To clear up a little bit...


What you wrote is plain wrong according to the datasheet I linked to in a previous message.

Please read the datasheet! (Or provide correct information about your hardware setup.)

 

 


@Martin_Kunze wrote:

I have tried the recent version on the target and it's just the same.

The first 10 measurements are correct and the eleventh and so on are wrong.


Do you get an error after the 10th measurement?

 

Btw. how is your "Fetch ini data" related to any DAQmx problems?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 11 of 25
(1,648 Views)

Hi Kevin

 

I have created the vi some time ago with the daq assistent or express vi and vonverted that into code.

Just found out that the hint from Gerd was correct. The card needs 52ms for a high res value and 2ms for high speed.

Unfortunately the effect is still the same even with corrected values.

 

 

0 Kudos
Message 12 of 25
(1,646 Views)

Hi Geard

 

you are right!

I have adjusted the values and put the vi in the recent posting.

No I didnt get an Error after the 10'th measurement.

0 Kudos
Message 13 of 25
(1,645 Views)

MAX and the shipping examples are troubleshooting tools that are readily available to you and quick to try.  You can decide not to bother, of course, just as I can decide how much enthusiasm I'm going to have about continuing in this thread.

 

Willing to help, but not forever.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 14 of 25
(1,640 Views)

Hi Kevin

 

I don't want to bother you.

On the remote target I have no NIMAX.

I simply try the repeat the same measurement and after a certain time the values are wrong and they stay wrong.

It seams as if the wrong measurements are in a buffer and the are getting more and more.

after 10 calls of this funcrion the values are getting more and more wrong.

This ends up with 9,4V as a detected input voltage for the first values and the secound value is the correct first value.

Some measurements later the first two measurements are 9,4V and the third ist the correct first.

That seams like something resides in a buffer or so even after the task is cleared.

 

Regards

 

Martin

0 Kudos
Message 15 of 25
(1,637 Views)

Last version of the VI.

Sorry for picking the wrong vi before.

0 Kudos
Message 16 of 25
(1,641 Views)

Hi Martin,

 


@Martin_Kunze wrote:

Just found out that the hint from Gerd was correct. The card needs 52ms for a high res value and 2ms for high speed.

Unfortunately the effect is still the same even with corrected values.


Your VI might look like this:

Glad you took the advice to read the manual…

 

When this "effect" still occurs: There really is no error shown?

How many samples do you read when request for "-1"? Do you always get the expect 2 samples?

Why do your images show values in "Ohm" when your DAQmx task is set to read voltages?

Why do you still want to apply a user scaling named " "?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 17 of 25
(1,638 Views)

Hi Geard,

 

the size of the Array is always 2 elements - as expected.

This doesn't change anyway.

No errors shown - ever.

 

I have to calulate ohm from the given voltage.

This is possible due to the usage of a constant current source and a resitor.

0 Kudos
Message 18 of 25
(1,634 Views)

This is the current version.

Martin_Kunze_0-1604500555558.png

 

0 Kudos
Message 19 of 25
(1,623 Views)

I'm not sure exactly what you mean by a "remote target", but if MAX is not an available option I sure can't fault you for not using it.

 

I'm sure I don't have a comprehensive understanding of your test setup, but it's starting to sound like it *could* be a hardware-oriented problem.  When a device gives an initial reasonable reading but then drifts off toward the limit of its voltage range, it may indicate a problem with wiring, terminal configuration, or crosstalk/ghosting from another channel.

 

Reading back over the thread, I found a mention of relays used to direct your signal to AI.  That worries my troubleshooting sniffer a bit too.  I don't know your equipment, but relays can have kickback effects when an active circuit is suddenly opened up.  It's conceivable one of these events could have damaged your DAQ device in the past.   I'm no expert in these electrical issues, but FWIW your symptom of initial good readings followed by drifting toward the voltage rails doesn't particularly sound like a damaged device to me.  Mentioning it as a possibility "just in case."

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 20 of 25
(1,621 Views)