01-10-2017 04:19 AM
Hi everyone,
I am fairly new to Labview. I want to control pump using Arduino UNO circuit, Relay, and Labview. My assignment is running a pump for a certain period of time like 2 min or 5 min. I tried by using "Elapsed Time" option of LabView but can't turn off the relay after elapsed time.
I have attached my LabView code here. please suggest me for a solution. Thank you for time and assistance in advance.
Solved! Go to Solution.
01-10-2017 04:41 AM
01-10-2017 07:09 AM
While it is fine to post pictures of your Arduino board, it is not so helpful to post pictures of your code. Please post your actual VI (i.e. attach the file that has the extention ".vi").
Bob Schor
01-10-2017 10:27 AM
try inserting a "not" function at the bool output of your timer, connected to your "write".
01-10-2017 07:01 PM
Hello Mr. GerdW,
At first thanks for your quick response. Actually, the relay is connected to Arduino UNO (Powered from Arduino circuit and Digital I/O pin is also connected). I thought If the loop is finished, Arduino circuit along with relay will be closed. but the relay is not closing. Here is the problem....
01-10-2017 07:03 PM
Hello Mr. Bob_Schor'
Thanks for your quick reply. Here is my VI Code...
01-10-2017 11:21 PM
Mr. Apok'
Would you explain your suggestion? Apologies, I can't find out that place....
01-10-2017 11:32 PM
No need to create 3 messages to reply to different people and attach the same VI twice.
Your VI runs for 5 seconds. During that time, your relay will open or close each time you press your switch. Once the time is up, the loop ends. It will leave the relay in whatever state is was the last time you pressed the button.
If you want to do something when the loop ends, then create another digital write outside the loop that executes before you close the connection.
01-10-2017 11:39 PM
Try this Method
01-11-2017 01:01 AM
Hello PalaniveIT,
Thanks for the guidelines. I made a code according to your guideline. but two problems occur 1) after elapsed time (5sec) it starts automatically, 2) It runs for 4 sec, not 5 sec.
Time will be adjusted but I want the relay off permanently after 5 sec. I have attached the code for your verification.