From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
11-02-2014 02:17 AM
Can you run two seperate Vi's in parallel? Will this make response considerably slower?
Solved! Go to Solution.
11-02-2014 03:34 AM
In general, yes, and in general the code will run truly in parallel (as much as can be accomplished with multi-threading). There are enough gotchas though that you'd be better off providing more details and getting a more tailored response.
Are you asking if you can run the same VI twice at the same time? If you can drop the same VI on a block diagram twice?
11-02-2014 10:48 AM
@Zwired1 wrote:
In general, yes, and in general the code will run truly in parallel (as much as can be accomplished with multi-threading)
There is no way you can make such a statement. The original question was too incomplete. Without details on what they are really asking, you can't make a blanket statement about what the code can and cannot do.
11-02-2014 11:00 AM
Hi, what more detail is needed? They are two entirely seperate independent vi's with no shared sub vis.
I just wanted to know if you can run two independent vi's at the same time, as in just have two seperate programs and run them.
11-02-2014 11:34 AM
That is more details.
Yes you can them in parallel without any problems.
11-02-2014 01:52 PM
I'd be in a LOT of trouble if I couldn't. I usually have a VI for each part of my system: DAQ reading, instrument control, state machine, user interface, data logging, etc. They all run in parallel and I have some sort of communications between them as necessary.
11-02-2014 10:34 PM
@eugeniap wrote:
Hi, what more detail is needed? They are two entirely seperate independent vi's with no shared sub vis.
I just wanted to know if you can run two independent vi's at the same time, as in just have two seperate programs and run them.
Separate isn't the same as independent. That's why they wanted more information.
Your second question asked about slowed response. That's another place you didn't offer anywhere near enough information for a true answer. How many loops are you running in each of these independent VIs? How many cores does your processor have? Are you including a 0ms wait in your loops to avoid railing your processor?
It's possible you'll see such a negligible change in processing that you won't notice. It's also possible you'll feel like you're draining your system. It's generally best to err on the side of too many details rather than too few when you're asking questions. If you don't know the answer, you likely don't know how each piece plays a part in the answer. More information allows others to pick out the relevant pieces and give you a better answer.
11-02-2014 11:24 PM
@eugeniap wrote:
Hi, what more detail is needed? They are two entirely seperate independent vi's with no shared sub vis.
I just wanted to know if you can run two independent vi's at the same time, as in just have two seperate programs and run them.
This question often occurs when the developer does not understand the paradigm shift that a "Dataflow" language like LabVIEW necessitates.
Unlike other development enviorments you may use, LabVIEW is unique in that reguard. Pararell threads are automatic with a dataflow language, what other specifics do you need?
11-03-2014 03:27 AM
I appologise if my response came across as rude, I was just asking what details were needed as I was unaware.
I didn't really want a detailed answer regarding running two independent vi's, just a yes or a no.
Also the speed question was just secondary, a passing comment, I will see when I test it.
Thanks for your help.
11-03-2014 08:33 AM