LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help Start LabView Code for Hydraulic System

I am very new to LabView and have been given a project which requires the use of LabView, any help would be much appreciated. The system that I want to control is a machine that can pull apart large bullets (ie. 20mm to 76mm) using hydraulic cylinders. 

Here is a list of the equipment I have:
cFP-2021
cFP-SG-140
cFP-AI-110
cFP-AO-210
Hydrualic Servo Valve (input signal 0-10 V)
Strainsert Universal Flat Load Cell (7500 lb)
3000 psi pressure transducer
Linear Transducer

I have attached a picture that depicts how the system is hooked up and a movie of how the machine works.  If anyone could help me start the LabView program I would really appreciate it, since I really have no idea where to even start.

 

Image - http://www.mediafire.com/imageview.php?quickkey=ndftex2i1ji&thumb=4

Movie - http://www.mediafire.com/?dxn4sunxdze

Thanks,
0 Kudos
Message 1 of 21
(4,296 Views)
So this is what I have so far, If someone could help me with the graph and the velocity calculation, basically I need a timer for the amount of time the inner while loop is running so that I have something to plot against, and a total time so I can calculate the velocity.

Thanks,

Here is a pic and the vi
Download All
0 Kudos
Message 2 of 21
(4,262 Views)
Hello,

You can use the "Get Date/Time In Seconds" (under Programming»Timing) at the beginning and at the end of your loop.  From this you can find the total time your while loop has run.

If you are using your FieldPoint as a Real-Time target, you can also use the timestamp from the shared variables.

Hope that this helps!
Kameralina

0 Kudos
Message 3 of 21
(4,238 Views)
I'm wondering if anyone can help me with getting the initial value without it going into the max function, so basically I need to execute the functions in the RED box after the case structure
see attached picture

thanks in advance
0 Kudos
Message 4 of 21
(4,207 Views)

You have a race condition with respect to the Linear Temp indicator.  You are reading a local variable of it and writing to the indicator.  Whether the local variable has the value from this iteration of the loop or the previous iteration of the loop all depends on "who wins the race" and which wires get executed first.  It will lead to unpredictable results.

Is that what you mean by "I need to execute the function in the red box after the case structre"?  Use a wire from the line go into the indicator in the true case to go to the functions in the red box. (By the way, what happens in the false case?)

You should also eliminate the local variable for "Load Cell Constant" and just take a wire from outside the loop and tunnel it into the loop.

I don't understand the question about the"getting the initial value without it going into the max function".  It seems like a different questions then second part of the sentence.

0 Kudos
Message 5 of 21
(4,198 Views)
let me try to explain a little better

I need to constantly read the values of the feild point modules, but their not starting at a value of zero because the sensors aren't starting at zero, so I was trying to get an intial reading by using the case structure, so when it is true it reads the first value and stores it as initial temp, and I also get the offset value so that when the current linear measurement is outputted it starts at zero, when the case is false it just passes the shift register value through so the case is only true when the program is first run.

My problem is that what you said the "race situation" and I'm not really sure how to get that right.

So what happens is when the field point is read it gets multiplied my the linear constant and then goes to the subtract block and also to the case structure, but at this time linear temp doesn't not have a value and the current measurement isn't offset so the reading is wrong and then the max measurement gets that wrong value and then the next iteration everything this is fine because linear temp has the right value now
0 Kudos
Message 6 of 21
(4,180 Views)
I reread my response and last part was a little confusing so I edited to make more sense hopefully (edited part in red)

So what happens is when the field point is read it gets multiplied my the linear constant and then goes to the subtract block and also to the case structure, but at this time linear temp doesn't not have a value and the current measurement isn't offset so the reading is wrong and then the max measurement gets that wrong value and then the next iteration the current measurement is fine because linear temp has the right value now


0 Kudos
Message 7 of 21
(4,169 Views)
Ok so I figured out how to read my values right, so does that look like a good technique

But now I'm on to the harder part of the code and I'm really lost
What I need to do is when the user presses "Run" I need to measure the speed (from "current linear measurement") and adjust a servo valve accordingly to have a speed of 10mm/s by using an analog output module from 0-10V, then once the bullet "pops" and there is no force detected on the load cell I need to stop the movement and continue to read the values, the user will then remove the bullet and casing and then return the machine to its starting position.

can anyone help me get started


Download All
0 Kudos
Message 8 of 21
(4,120 Views)
is there a way to get a time stamp when i click on a true/false button
0 Kudos
Message 9 of 21
(4,098 Views)
Of course.  Put it in the case structure attached to that button.
0 Kudos
Message 10 of 21
(4,095 Views)