LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Engine Data Acquisition System

Hello all. I would really appreciate some help with regards to my project. I'm trying to generate in-cylinder pressure v/s crank angle graph, from a single cylinder engine. I'm using the following hardware:

 

1. KISTLER pressure sensor. Output is voltage.

2. Automation Direct encoder. Output directly gives me the angular position in degrees. It has a maximum capacity of 2500 pulses/revolution.

3. NI USB 6343. 

4. Engine is connected to a Dynamo meter to get the readings. Maximum speed at 3600 RPM. 

 

I've attached below the image of my Lab View program, front panel and block diagram (labview.PNG). Here is what I'm getting so far:

 

1. When I open the Pressure Data (DAQ Assist) and test run it, I generate the perfect Pressure graph, shown by the image of the Blue graph. (Pressure.PNG)

 

2. When I open the Crank Angle (DAQ Assist) and test run it, it shows me the accurate crank angle readings in degrees.

 

3. But when I try to generate the XY graph on the front panel, I get a weird looking graph, shown in the front panel screenshot attached below. (CaptureP vs CA.PNG)

 

The graph that I'm expecting should be exactly the same as the graph with the blue curve (Pressure.PNG), which rises to maximum pressure and then drops down. However, my XY graph isn't generating that graph and gives me weird plots. (CaptureP vs CA.PNG)

 

Could someone please tell me what am I doing wrong over here. Individually both my sensors are generating the accurate results, however, when I try to sync both sensors, so that I obtain a graph which shows me pressure at a corresponding crank angle, I don't seem to achieve it. 

 

Please have a look at the images I've attached below.

 

Thank you.

 

Download All
0 Kudos
Message 1 of 26
(4,823 Views)

Can you attach the VI (backsaved to 2017 or earlier if you're using 2018)?

 

I'm a bit suspicious of the crank angle measurement, but if you avoid the Dynamic Data Type wires you'll probably be able to get a clearer look at what's going on.

 

Is the measurement single-shot for half a rotation? If not, is there a reason why you only have values between 0 and 180? Also, which arrangement of booleans are going where? (I see the stop button to the stop terminal, but there's another from the Crank measurement going somewhere)

 

Edit: You can try setting the "Reset" input to the Build XY Graph to be false, by default it seems to be true. I'm not sure that's your problem though. I'd recommend graphing all 3 at the same time then you can check everything is as expected at each step (rather than running separately).


GCentral
0 Kudos
Message 2 of 26
(4,800 Views)

Hi, you seem to have all of the right hardware, but need some software pointers.  I have seen an example somewhere but I cant find it at the moment.  I dont think this will be possible with express VI's.  Start by using the example finder and look for the encoder examples and voltage continuous acquisition.  The key to your problem is synchronisation.  the two express VI's are not synchronised at all.  By using lower level DAQ functions you will be able to use the analogue input clock to trigger the counter read task.  So although you cannot put the analogue input and encoder counter in the same task, you will be able to use a common clock between the two tasks and then you will be able to get the system working as you need. I hope that helps,

Michael.

0 Kudos
Message 3 of 26
(4,798 Views)

Hey, I'm using 2017 version of Lab View.  The measurement is continuous as long as the engine is running . I want to get real time data from the engine. 

 

As far as the stop button is going, I'm sure one is for the while loop. I think the other was created by mistake.

0 Kudos
Message 4 of 26
(4,797 Views)

What do u mean by lower level DAQ? 

0 Kudos
Message 5 of 26
(4,795 Views)

With regards to 2017 - great - could you upload a copy of your VI?

Good to know about the plan regarding continuous operation. Should the graph hold all historic data? Or just the most recent rotation?

 

With regards to lower-level DAQ, Michael probably means something like this:

ai.png

 

Here, DAQmx (the lower level DAQ driver than DAQ Assistant) is used to create two channels (one uses a counter to measure angular position, the other is set to AI Voltage but there's a pressure available - I just don't have a simulated sensor) and various Read and Timing nodes, along with bundle, unbundle and build array (these are the operations carried out by the Build XY Graph node).

 

The shift register (pair of arrows on the side of the loop) stores data between iterations. Usually (and in this case) you should initialize the outer, left side of the SR in order to prevent old data being used for an initialization condition (I did not do that here, but you should).

 

Apologies for the layout - I used auto-cleanup...


GCentral
Message 6 of 26
(4,787 Views)

Hi, thanks for the input. Here's a copy of my VI. I've attached it below.

0 Kudos
Message 7 of 26
(4,782 Views)

As far as the plot goes, it should be a smooth curve like the one I've attached (Pressure.PNG).

0 Kudos
Message 8 of 26
(4,778 Views)

Each time you call the Pressure DAQ Assistant, you get 100 samples at a rate of 1kHz (so 0.1s of data).

Each time you call the Crank Angle Assistant, you get 1 point (no timing info).

 

When you build the arrays, your inputs are not the same length, and because of the way the Build XY Graph works, that will probably create a mess for your graph (there's no better way to do this though...)

 

The solution is to change the behaviour of the Crank Angle Assistant to measure 100 samples at 1kHz. When you change to "Continuous" sampling, you can try and click Ok. You'll get an error message (click no). You need to go to the "Advanced Timing" tab and select a clock source - choose ai/Sample Clock (assuming both are connected to the same device).

 

The hiding of the information needed to solve this problem is one of the problems with the DAQ Assistant. If you use DAQmx, all of these details are easy to control and view on the block diagram (although that makes it take up more space).


GCentral
0 Kudos
Message 9 of 26
(4,775 Views)

I dont have LV2017 here but the image is almost exactly what I meant.  1 point though: the shift register works but will grow in memory size until the application crashes!  limit the number of times the loop can run, maybe a for loop instead of while loop to be safe.

 

(removed comment about clocks as I read the diagram wrong and it was all right, sorry)

0 Kudos
Message 10 of 26
(4,761 Views)