03-24-2017 11:56 AM
Hardware: PCI-6289, SCXI 1102C,CB 68 LPR
I have a bunch of thermocouples, a pressure transmitter connected to the DAQ and created a NI Daqmx Task as seen in the picture. I am acquiring 1k samples at 2kHz. I am able to read the data, calibrate and display it.
Totally unfamiliar with DAQ. I am saving all files with Write to Measurement File Express VI
Problem: Timing the loops; (Correct me if I am wrong)1000 S/2000 Sps = 0.5 ms interval and so I get 1000 samples every 500ms. How much wait time should I add in the acquire loop. When left with no wait function, the reading takes too longand so I used 50 ms wait time. Saving data in the Acquisition loop gives me strange timing values in the beginning. See acquire 1. I save the same data after calibration in another loop with 50 ms wait time. see calibration1. The data is blank for the first 50 ms and the same data repeats 10 times.
Goal: To save data at periodic intervals like 5 or 10 seconds. I tried using express wait. It records the extra 50 ms values which i dont want(See acquire 2). I would like to save single values.
I have added the Application as well. It will be missing some APIs though. Please look into the Acquisition and calibration sub VI.
Let me know if you need more info
03-27-2017 01:47 AM
Hi Goku,
with DAQ acquisition you normally do not use any wait functions in your acquisition loops. You rather connect the 'number of samples per channel' input with the number of samples you want to acquire with every call of the DAQmx Read VI and define a suitable timeout (better not timeout=-1 since you would wait indefinitely).
Best regards,
Christoph
03-30-2017 12:54 PM
Hi Christoph,
I want to acquire data continuously and display it but want to save it to file for every 5 seconds or setpoint. I have removed wait function and at the moment, data is saved for an additional 5-7ms between the time period as seen in the attachment. Could you tell me why this happening
03-31-2017 01:15 AM
Hi,
I really don't understand what you are refering to. Where can I find those 5-7 ms in your attached file? What kind of code are you refering to? Please enable me or the other community members to be able to help you by providing all necessary explainations (code, comments, screenshots).
Best regards,
Christoph