LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Automated Voltage Control

Good Afternoon,

 

I am working on a bladder molding project, where I am heating a carbon fiber lay-up and expanding it to a female tool using an inflatable bladder.  I have all of the sensors, controls and VI's up and working, but I would like to automate the process.  Unfortunately I am reasonably new to Labview, and am unsure about the best way to go about it.  Below is my system description:

 

1. Laptop

2. instruNet 100 (#iNet-100) precision direct to sensors data acquisition box

3. 2 k-type thermocouples (data in)

4. Tekscan thin-film force sensor (data in)

5. Proportion Air proportional air valve (data in, data out)(0-5V, 0-200psi control)

 

NOTE:  I have acquired drivers for the instruNet-100 DAQ so it can be used with Labview (instruNetLV)

 

Currently, I have my thermocouples monitoring the temperature until they reach the desired value.  One this value is reached, I manually adjust the voltage output on the air valve (usually by 0.1V increments) until the inflatable bladder expands, resulting in the thin film pressure sensor to read the forming pressure.  All of this data is monitored by graphs in real time, and is transferred to a comma-delimited excel file upon completion.

 

What I want to do, is have the user input the 1)temperature at pressurization 2) pressurization rate 3) stop pressurization at pressure, ect, ect.  Once these values are input, I want the program to run, pressurize at the rate specified, stop at the pressure specified, and hold for a time specified.

 

I have been beating my head against a wall experimenting with event structures, nested while loops, ect to try and do this, with no avail.  I believe I have a grasp on the user input values and using them as I have explained, but I have no clue how to automatically adjust the voltage output.  Also, I would like to keep monitoring the data values during the entire trial run.

 

Any ideas? 

 

Thanks!

 

Attachments:

 

1.  Front panel (graphs)

2.  Front panel (channel configuration)

3.  Block diagram

 

 

0 Kudos
Message 1 of 12
(3,674 Views)

Casemo,

 

This sounds like a perfect project for a state machine.

https://decibel.ni.com/content/groups/northeast-oh-labview-users/blog/2009/09/08/state-machines

 

You can set up each state to check on a specific condition then stop and advance to the next state. For timing use a wait(ms) vi as well as the flat sequence structure. 

 

If you have any questions, don't hesitate to ask.

Kyle Hartley
Senior Embedded Software Engineer

Message 2 of 12
(3,623 Views)

Good Afternoon,

 

So I have been working on my programming, and have made some headway.  Unfortunately I am stuck at a step.

 

My program can now auto pressurize up to the desired pressure, over the desired timeframe.  I am stuck at the next step, depressurization and monitoring.  Once I get to this step, it bugs out and displays the message repeatedly. 

 

Any help?

0 Kudos
Message 3 of 12
(3,582 Views)

What does "bugs out and display the message repeatedly" mean?

 

What message?

 

I don't see where you implemented a state machine architecture like it was suggested.  So I don't see how you have different steps such as pressurization, depressurization, or monitoring.

0 Kudos
Message 4 of 12
(3,578 Views)

Sorry for my vagueness.  This is how I have it all set up.

 

I have a "build array" block takes in conditions e.g.. Temp at start temp, pressure at Max pressure; which then goes to a Boolean array to number block.  When the temperature is below the start temp, the array outputs 0 and does nothing in the case structure.  When the temperature is at start temp, the array outputs 1, and starts pressuring.  When the temp and pressure are at the user defined values, the output it 3.  This is where my problem is.

 

After pressurization, under case value 3 in the master case structure, I have nested case structure that counts and increments.  Once this increment (hold time) is complete, the nested case structure will output true, where I want it to write 0V to the pressure control and then prompt the user to notify a complete cycle.  In my programming though, once the hold time is at its user defined value, nothing writes to the voltage output, and the message just pops up uncontrollably. 

0 Kudos
Message 5 of 12
(3,571 Views)

Casemo,

 

Quickly looking over your code, you have a one button dialog in a while loop. I look at the condition for the case statement that surrounds the dialog and it checks if the incremented value is greater than the hold time. So once the hold time has been reached it sends the notification then the next iteration it looks like it will send it again as the the condition still holds.

 

Maybe you should have the while loop stop when the hold time is reached then the next flat sequence pane send a notification.

 

I still suggest you use a state machine for your process as readability will be much easier. From labview if you go File>>New and go to From Template there is Standard State Machine layout in there.

Kyle Hartley
Senior Embedded Software Engineer

Message 6 of 12
(3,559 Views)

Kyle,

 

I will put together a state machine today and see how it goes.  I was under the impression that I had put together a state machine, where I get my states from a built array of boolean values.  I am unsure how to update the state any other way.
If what I have is not a state machine, how can I update the state without user input?
0 Kudos
Message 7 of 12
(3,539 Views)

So I have transferred my programming into a state machine.

 

The one question I have is:

 

1) My original program has my obtain values from my DAQ and graph them.  These items go inside of the while loop, but outside of the the first case structure, correct?

0 Kudos
Message 8 of 12
(3,498 Views)

Almost there.

 

I have added all my input information, and test ran it on my system.  Works great.

 

There is a small issue with a lag during the pressurization process.  It takes about 5 seconds for the device to start pressurizing, and it cycles repeatedly in a uniform fashion until it reaches the pressure.  I  am wondering if this is because of the working voltage resolution of the air pressure valve only changes when > 0.05 V is supplied, or if it is a timing delay issue during the system run. 

 

Will continue working on the system in the morning.  Any ideas?

0 Kudos
Message 9 of 12
(3,478 Views)

@Casemo wrote:

Kyle,

 

I will put together a state machine today and see how it goes.  I was under the impression that I had put together a state machine, where I get my states from a built array of boolean values.  I am unsure how to update the state any other way.
If what I have is not a state machine, how can I update the state without user input?

 

It is similar but it appeared that you were just prepairing for how to run the code which could be 1 step of the state machine. You would need a data line that contains the current state passed to a shift register so you can switch between states. So when one state is done it changes the value of the state variable and then the main loop repeats but with the updated state value.

 

In some of your states you may need another loop for performing tedious tasks like incrementing the voltage out. 

 

 

Sorry for the belated reply.

Kyle Hartley
Senior Embedded Software Engineer

0 Kudos
Message 10 of 12
(3,444 Views)