04-19-2016 11:45 AM
I am writing a program to control several different peristaltic pumps. I want each pump to turn on and stay on for as long as I tell it to and then turn off and sit for as long as I tell it to. I am using an Arduino Mega 2560 and Labview 2014. I've been learning Labview for this project over the last 4-5 months, so am relatively new to the program.
The interface is Tab Control with three tabs: Set Up, Program and Manual. Through the Set Up, I select the Robot and the VISA Resource and then select Initialize which send the info to a sub VI called "Initialize Robots". The sub VI assigns the right input/output and sets up a servo that I use to control the drain. The Error Out goes to a while loop that allows me to turn on and turn off the power to the entire system (via a solid state relay).
Through the Program Tab, I select which pump to use and how long to turn it on and off form as well as how many times to repeat different subsections. The Time Left in Step and Time Remaining have yet to be programed, but the Number of Layers, Drain Time, and Drying Time are all valid inputs.
Through the Manual Tab, I can control the individual pumps and be able to test that I have the right drying time and drain time input (sometimes, it takes some trial and error to make sure the drain time is adequate for different size containers).
Problem:
I appreciate any help on the specific problem or any suggetions on best practices I can incorporate (especially with respect to multiple parallel while loops).
Thanks!
Solved! Go to Solution.
04-19-2016 07:22 PM
There are two major things wrong here.
Also, I'd highly recommend that you switch to LINX. LIFA has been unsupported for well over a year now and was replaced by LINX some time ago. It is the same basic design but it's designed much better (you won't ever need to set digital pin modes). One thing that makes it a bit faster is that you can set multiple digital pins in a single command. This is also true of many other functions including the digital and analog reads. So, for example, in your "Manual" case, all the digital read VI's would reduce to a single LINX command and all the digital write VI's would reduce to a single LINX command.
04-19-2016 09:49 PM
I appreciate the quick response! I'll make sure to avoid local variables for the Arduino resource.
As far as LIFA, I know it's been unsupported for a little while, but I had trouble installing LINX on my computer until about 2 weeks ago (which I think came from the fact I had two versions of Labview installed on my computer and the install was looking in the wrong folder). I'll have to brush up on the new commands for sure.
Thanks!
04-19-2016 10:40 PM
You can install LINX for multiple version of LabVIEW. I currently have it installed for both 2011 and 2015 on the same computer. If you install it via VIPM, there's usually few, if any, issues. Make sure that you select the correct version of LabVIEW in VIPM before installing.
04-25-2016 08:46 PM
hello
help me
i want to run Flow meter with lab and ardiuno but i can not if you did please send to me
thanks