03-31-2018 04:03 PM
I am using the LabVIEW for the graduation project.
I have three pistons and three proximty sensors and a motor running conveyor.
When a sensor senses the material on the conveyor the motor stops and then moves the piston to remove the material from the conveyor and after ten seconds the motor acts again.
The problem is that I did not find on delay timer in labview where I want the timer to take the number of seconds and signal from one of the sensors to operate and then after the specified seconds the timer output goes out in order to stop the piston and then the motor works again and the conveyor moves waiting for the sensor sense again.
Solved! Go to Solution.
03-31-2018 05:49 PM
Hi Khalil,
It sounds like your project is really sequential : do that, when done do something else, etc.
Have you taken a look at the State Machine Fundametals examples in LabVIEW ? That would be a good start.
As for the delay, I think that using the Elapsed Time Express VI can help.
What did you try on your side ? Do you have a VI to share ?
03-31-2018 09:09 PM
Do you want us to do your Graduation Project for you? Probably not good idea -- your future Employer will quickly see that you don't know LabVIEW, and you'll be out of a job.
Learn LabVIEW. There may not be a function that does "exactly what you want", but that's one reason there are sub-VIs, LabVIEW routines that you write that do "exactly what you want".
Are you familiar with something called a "State Machine"? It looks to me like your task can be described as being in one of several States, and when it enters a new State, it "does something" (possibly for some period of time).
Bob Schor
04-01-2018 02:22 PM
No thanks I do not want you to do for me my graduation project.
If I wanted to, I would not ask here basically.
But I just asked to know how to use the on delay timer in labview
Thanks for your reply
04-01-2018 02:41 PM
i will look at the State Machine Fundametals examples in LabVIEW
yes i have a VI to share ,iam alreay using Elapsed Time
thanks for your reply
04-01-2018 03:08 PM
You are making the classic Beginner's Mistake, trying to develop a somewhat-complex routine using a single VI. Here's a Very Good Rule of Thumb (not mine -- I learned it from Peter Blume's "The LabVIEW Style Book") -- Every Block Diagram Should Fit On A Single (modest-sized) Screen. Strive to be within 768 x 1024.
To restate this slightly, Any VI that does something non-trivial should be composed of (possibly many) sub-VIs, with each sub-VI dedicated to "doing one thing". Now, the "One Thing" might be a multi-step process ("Initialize the System", which involves querying the User, turning on the Safeties, powering up the Motors, and turning on the Pumps), but each of those "Conceptual Steps" is just a lower-level of the same idea, a single VI that "Query the User", "Turn on Safeties", etc. When you write your LabVIEW code in this way, an experienced, or even a Novice, LabVIEW Developer can "see the Big Picture" and get some idea of what you are doing. Furthermore, you've isolated the Details to a VI of its own (which means you can test the rest of your code by putting in a "Dummy VI" that "fakes" Turning on the Safeties, for example), making Debugging and Maintenance much simpler. Otherwise, there is so much detail in that huge Block Diagram that "You Can't See the Forest for the Trees".
Bob Schor
04-02-2018 10:17 AM
A text analogy to putting everything in one main VI is putting all your C code in main(). Good text code mostly (or even exclusively!) only call functions in main(). Good LabVIEW coding consists of mostly (or even exclusively!) subVIs in the main VI.