09-23-2022 01:37 AM
Hi,
I am using NI hardware, USB6215 as an interface to received analog data (voltage 0 to 10V ) from machine output channel (output Angle data , 0 to 10V).
I use NI Max application software (test panel) to test the input voltage through analog input Channel 0, terminal selection using RSE.
i found that the data input to NI hardware is normal (data increase gradually).
In Labview program, i use DAQ assistance. I found the output data from DAQ, data pin is abnormal because the data increase not gradually, sometime have a big jump.
It means that something wrong in NI hardware or DAQ .
Can anybody can advise me how to find out the root cause.
Thank you.
Best regards.
09-23-2022 09:00 AM
99% of the time, the problem is not in the hardware but in the software developed to acquire from it. Almost any experienced LabVIEW developer would recommend keeping away from DAQ Assistant and learning to use the DAQmx drivers.
This is a good starting point for learning DAQmx drivers (skip the DAQ Assistant part) - https://www.ni.com/en-us/support/documentation/supplemental/06/learn-10-functions-in-ni-daqmx-and-ha...
Also, it is a best practice to attach the code to the discussion so others can easily understand and even debug than imagine the implementation based on your descriptions in words.
09-26-2022 10:22 PM
Hi, Santhosh
I tried to used DAQmx to extract machine data. Attached the program code for your reference.
can you advice me why i can't get the data even there is no error shown when i run the program.
thank you.
09-27-2022 08:40 AM
...but I'll bet you there's an error shown when you *stop* the program. Your code *is* generating an error that you don't see until you click stop to end your loop and populate your error indicator.
Your first problem is trying to run 3 separate simultaneous AI tasks on a device that will only support 1. The solution is to put your 3 channels into just 1 common task. Just chain the channel config calls one after another to add them to the same task. Here's how you could adjust your own code's config to do it:
That brings us to your second problem -- trying to keep up with a 2000 Hz acquisition while only reading 1 sample at a time in a software loop. A better plan is to read ~ 1/10 sec worth of samples, i.e. 200 at a time. You'll need to select a multi-channel multi-sample version of DAQmx Read, then you can specify the # samples to read at a time.
-Kevin P