09-28-2017 10:18 AM
Hi all,
I am trying to acquire Pressure data against engine crank angle.
What I want to see is pressure pulse vs engine crank angle.
Currently, I am using NI-6211 to get pressure signal through analog input.
As for crank angle, I use encoder which has 1024 pulse per revolution and Only A signal is used for edge counting for converting to rpm and for external clock source.
For start trigger of pressure data, TDC signal is used (PFI3).
So, when the start signal is triggered, acquisition starts by external clock of Encoder A signal (1 revolution -> 1024 samples).
There is no problem at low rpm but high rpm above 2500 or 3000 rpm, I encountered error (200019 and 200279).
It seems overwritten at high rpm.
Theoretically, at 3500 rpm, sampling rate is just around 60K samples /second.
It's still under maximum rate of my device (250Ks/s).
I am stuck to figure out what cause this error..
I have played around with figure of Sample to read.
Sometimes it works and another time it didn't work.
Any suggestion or problem in my code?
Attached is Vi that I made.
Thank you.
Peter,
Solved! Go to Solution.
09-28-2017 10:37 AM
It looks like your error -200279 (the negatives are important) is related to a buffer overflow. Since you are using continuous samples for both of your tasks, maybe you can change it to "N samples". If you need higher performance out of your hardware, you can switch the DAQmx functions rather than express VIs.
09-29-2017 02:20 AM
Thanks for prompt reply.
Let me try on N samples mode.
If I still encounter same error with N samples mode, What else I can do to go through this problem?
Actually, all my measurement is under maximum sampling rate of my device.
So, It should work well... I spent few weeks due to this matter,,,
any more suggestions?
10-01-2017 01:00 AM
I have tried as you suggested.
I still got the same error.
At high rpm above 3000 rpm, I encountered the error.
Is there any way to solve this matter?
10-01-2017 04:28 AM
Hi all,
I am trying to measure engine intake & Exhaust pressure pulse against crank angle.
Crank angle is measured by 1024 PPR encoder which is used as external clock.
Also, TDC sensor is used as start trigger.
I have tried both continuous and finite mode to avoid error, but I still got same error.
For example, at 1000 rpm, the sampling rate of DAQ system is 1000rev/min * 1024 pulse/rev / 1min/ 60s =17066 Hz * 2channel =34,133 Hz
This is far lower than aggregate sampling rate of my device (NI-USB 6211 - 250k sampls /s).
It shouldn't be any problem.
I don't know how to figure out this problem.
Is it external clock problem?
I will appreciate any assistance and comment on this issue.
10-01-2017 04:56 AM - edited 10-01-2017 04:58 AM
The main problem is that you use Express VI and the useless dynamic data type.
Move to using real DAQmx programming. That Express VI opens and releases HW resources at EVERY iterations.
http://www.ni.com/product-documentation/5434/en/
edit: I recommend using a Producer-consumer design pattern. Your producer loop only does the data acquisition, and NOTHING else. Thus, data logging and data manipulation will not affect the DAQ sampling.
You can use a Queue to transmit the measurement data to a parallel consume loop, where you can do data logging etc just fine...
10-01-2017 05:38 AM
It was already suggested what you need to do: forget using Express VIs, and program your task using DAQmx VIs. By the way, you started two posts with the same topic, I ask an admin to merge them together:
10-01-2017 06:33 AM
No reason to start a new thread for the same problem. So I merged them.
As far as your latest VI:
If you want continuous aquisition, then 1) get rid of that Boolean control and 2) use the logging tab in the DAQ Assistant to do your logging. So your code should not have the case structure, sequence structure, or Write To Measurement File.
If you want finite aquisition when you press the button, the 1) change the button to be latched (eliminates need to reset it) and 2) use an Event Structure.
10-05-2017 05:24 AM
Once I programmed DAQmx VI instead of Express Vi, it works well without any problem.
For high speed data acquisition, programmed DAQmx Vi would be better.
Thank all who gave help. It was very helpful!