Showing results for 
Search instead for 
Did you mean: 

Problem with pressure and volume indicator diagram

Hello everyone


Im new to this forum and also new to LabView.

At the moment i am working on a indicator diagram for a diesel engine locatet at our school (machine engineering in switzerland).

I use a pressure sensor as well as a crank angle encoder. 

I have now tried to count the crank angle, calculate it into a volumina and then get it into a diagramm with the pressure.

Once the diagram is drawn, i export it to excel via right click.


The diesel engine test stand is not yet finished, so i only simulated the signal. It worked fine at low frequencies. I simulated a continuous sine signal for the pressure and two rectangular signals for the angle (the encoder has a reference mark for every full turn and a resolution of min. 360 marks per turn).

Like ii mentioned this works fine so far, yet the program may be crude 🙂


Now to my actual problem:

If i simulate signals that are about the real engine speed, the counting does not work anymore. If the engine turns at 3000RPM that means there are 18000 encoder signals per second, witch might be too much for the hardware to keep up.


Does anyone of you know what the problem is, and how it would be possible to solve it? Is the way i programmed it totally wrong? like i said, i dont know much about LabView or electronics.


I would very much appreciate your help.


In the attachements you find the "actual" program as well as the programm with the simulated signals.


Sorry for the bad language, im swiss german 🙂




Download All
0 Kudos
Message 1 of 8

Hey Patrick,


I don't understand if the problem occurs with real hardware (which hardware?) or only with the simulated signal. I take a look at both VIs, but is hard to understand. Are both VIs important for your issue? Could you strip down the VI a little bit and reorder the used elements?

Regards, Stephan

0 Kudos
Message 2 of 8

Hi Stephan


Thanks for your quick response

You are right, the program i sent was very hard to read. I attached a new one that has more overview and explanational texts.

This is the application for the hardware, the other file was just for the simulations.


I Use a NI PCI6221. Then with the express vi i get the signals into labview.

I think my problem is, that the base level trigger and the pointtopoint increment counter are just to slow... I read something about the DAQmx functions but i do not know how this works.


Thanks for your help, im a little bit worried that what i tried is not possible and that i have to start over again... time runs out 😕


And again sorry for the language, im not really used to use english.




0 Kudos
Message 3 of 8

Hi Patrick,


thank you for the additional information and the new VI.


You wrote at your first post, that the problem occures if the diesel engine reaches 3000RPM (18.000 encoder signals per second). I can see in your VI, that you use one analog Input to measure the encoder signal. Is this neccessary, because a encoder signal is usually a digital signal?

If its not necessary to use a analog input, you can use a digital input with a counter, because a counter is mutch faster compred to the current solution.


I also recognized, that you use a sample rate of 70kS/s for your encoder signal. Is this sampling rate high enough for your signal?

I think you need minimum 2 measurment points from the low level of the signal and 2 measurment points from the high level of the encoder signal. 18.000x4measurment_points=72.000kS/s which is more than you configured. What happens if you set the sampling rate to ~100kS/s?


Regards, Stephan

Message 4 of 8
Hi Stephan

You are right it is not necessary to use a analog signal. I didnt think of this.
I will try to do something like this tomorrow (in switzerland its already 10pm).
Is the digital counter a daqmx function? Or can this be done directly in the daq assistant? Is it necessary to work with tasks and daqmx? Because i dont know these well (well i d have to learn it then :-))

About the sampling rates:
Thanks for the explanation. I am really just starting to understand how this whole signal processing works. I will try it with the values you mentioned.

Again, thank you very much for your help

0 Kudos
Message 5 of 8

Hi Patrick,


you are still using the DAQmx function, because the DAQ Assistant use the DAQmx functions inside. The only difference between the DAQ Assistant and the DAQmx functions is that the Assistant is easier to configurate, if you aren't familiar with the DAQmx functions.


If you want to use a DAQ Assistant with a counter, take a look at this page (Part 4. Configuring DAQmx Express VI using the DAQ Assistant (Counter Input))


NI-DAQmx Express VI Tutorial - Developer Zone - National Instruments


Message 6 of 8

Hi Stephan 


Thanks for all the help!

Today i found solution that works fine for my requirements and wich is very similar to what you proposed.

First i put the two encoder signals in respective PFI ports on the DAQ device so that they are digital and suitable for triggering.

I then used the program labview signalexpress (which is just like the daq express but standalone). There i took the analog Signal of the pressure sensor (ai4) with a sample rate of 100kHz. I then used the angular signal for external triggering and the reference signal as a start trigger. For the number of samples i can directly set the number of degrees i want to "record" (720 for two turns of the crank angle). This is automatically written in a txt file and i can easily integrate it via VBA in my exsisting excel file to draw the diagram. Looks fine and needs only little fine tuning.


It was interesting to learn something about signal processing, which is really not my strenght.

I really appreciate that you took your time to support me on this.


Best wishes




0 Kudos
Message 7 of 8

Hey Patrick,


nice to hear that your data aquisition works now like expected. You are welcome.


Regards, Stephan

0 Kudos
Message 8 of 8