05-16-2013 04:40 AM
Hi there,
Im using labview 2011, Ni cdaq 9172, and the modules 9203(A) 9201(V) 9211(temperature) 9263(outputs) 9212(A) 9401(freq). i updated my code but im having a problem the trigger configuration.
05-17-2013 10:55 AM
Hello asnaev,
Are you running into an error? If so, please post a screenshot.
Are you trying to synchronize your counter and current tasks? Or are you looking for a reference trigger with pre-trigger samples? Currently, you are using a reference trigger, but not asking for any pre-trigger samples, so it is effectively a start trigger. What is your goal?
If you are just starting with triggers, I would recommend looking at the DAQmx Example vis found in the NI Example Finder under Hardware Input and Output>> DAQmx.
08-25-2020 08:55 AM
Hello,
I am trying to do synchronous acquisition of several AIs and same number of DIs. AIs are gauge readings, DIs are flags indicating whether the gauge has low or high amplification. (The gauges are switching their range following the actual value, which is changing quite rapidly).
I prepared the code below; diagrams show 1) start of acquisition, 2) checking number of samples in buffers, 3) reading samples, 4) stopping the acquisition. However, it does not work: indicated number of samples in buffers remains zero (both for AIs and DIs).
The hardware is USB-6341.
What is wrong?
Thank you.
START acquisition
CHECK number of samples
READ samples
STOP acquisition
08-25-2020 12:54 PM
Nothing jumped out at me in the individual segments. Are you getting an error, and if so what is the error code and description?
I'm inclined to think that your higher level code doesn't call these routines in the right order, or doesn't iterate the check-read pair soon enough after start or frequently enough while running. That could lead to a buffer overflow error in the tasks, after which the "available samples" for the errored-out tasks will show 0. But if this theory is right, you should be able to catch that error.
But again, the screenshots have the appearance of code that *could* work when called appropriately. What's your sample rate? How often do you iterate your check-read cycle? Are you getting task errors?
-Kevin P
08-25-2020 02:24 PM
Now, I tried once more. The code runs perfectly on a real device, but not on simulated device... So I just cannot debug on my notebook as I did up to now (I did not have DIs indicating range up to now)...
Thank you very much for reviewing the code!