LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Running Two VI's Independently

Evening all,

Of course before deciding to come to the forums I did what research I could. I am extremely new to the LabView scene, being relied on at my job for what little I have taught myself. Which is now enough to get things working but I want to further my knowledge to make things much more efficient and user-friendly.

 

My Question

I know that there are numerous ways to go about running multiple vi's, but I want to ask the community what would be the best way for what I'm trying to accomplish.

 

My Equipment

We currently use ni9213 modules for basic temperature monitoring and ni9209's for reading our pressure transducers. No big deal.

I have designed a VI that uses ni9482's to control some pneumatically actuated valves (we now use manual needle valves, we do high pressure testing fyi). This program works just as fine by itself.

 

What I want to do

I'd like to run these two VI's independently from each other, there is no need to acquire data from one another, and it is best to have our valves able to be controlled constantly.

 

Any suggestions on what would be the most effective, efficient or easiest way to go about this? Static calls? Dynamic Calls? SubVI's? 

Any ideas, hints, tricks would be greatly appreciated.

 

Thanks!

My employees don't have to know I'm here.
0 Kudos
Message 1 of 7
(2,294 Views)

If you are extremely new, then I would recommend separate VIs for each instrument each in their own loop. You can communicate between loops using user events or queues. Some people recommended the queue message handler, but I find that extremely complicated. Learn how to use State Machines. Each separate loop for your instruments can be there own state machine.

 

mcduff

0 Kudos
Message 2 of 7
(2,291 Views)

Hey there,

 

Welcome to the forum.

 

I have been working with the QSM-PC architecture to do these kind of things.

 

There is a well explained paper by Mezintel published here along with templates AND demos you can play with: http://www.mezintel.com/blog/labview-queued-state-machine/

 

There's definitely a learning curve and it takes a while to get used to it, but once you're familiar with it, it's extremely powerful and easy to develop sophisticated VIs.

 

If you're not familiar with State Machines I'd recommend getting your hands dirty with this type of structure first before diving into Queued State Machines.

 

As suggested by Mcduff, you could also just use two separate loops for each VI, which is probably the easiest and quickest solution for your problem.

 

Good luck!

0 Kudos
Message 3 of 7
(2,284 Views)

As what I have understand, you need to make temperature monitoring, pressure reading, controlling your valves worked simultaneously.

A good approach is to use multiple-loops or producer-consumer architecture. You dedicate one loop for every functionality that you want to be independent with the others.

0 Kudos
Message 4 of 7
(2,272 Views)

Awesome, I'll mess around with it see what I come up with. Thanks!

My employees don't have to know I'm here.
0 Kudos
Message 5 of 7
(2,228 Views)

Thanks! I'll definitely look into it. I'll mess around with everyone's suggestions and see what works best for me. Thanks again, I'll come back to mark a solution when I can.

My employees don't have to know I'm here.
0 Kudos
Message 6 of 7
(2,227 Views)

So far I'm liking this suggestion the best. I'll play with some of the other suggested designs, see what works best for my setup and mark a solution when I'm done. Thanks again boss.

My employees don't have to know I'm here.
0 Kudos
Message 7 of 7
(2,221 Views)