取消
显示结果 
搜索替代 
您的意思是: 

parallel sub vi

Hello,
 
I want to know the best approach to my problem ?
 
Look at the attached file (click on boucle_gen.vi). I have many devices which are initalize in the Fichier init sub VI (this part is allright).
 
How can I repeat the patern (3 index files and read qw.vi) ?
Is it possible to use the same subVI in parallel where different datas transit in it ? (I guess no)
 
Thanks
 
 
0 项奖励
1 条消息(共 6 条)
3,665 次查看
Yes, it is possible.  Under the File menu choose VI Properties.  Choose Execution as the Category, and then check Reentrant execution.  This will allow multiple instances of your subvi to be running simultaneously with different data.
2 条消息(共 6 条)
3,642 次查看
Can you post the code for read qw.vi. It may not be necessary to do anything to it.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
3 条消息(共 6 条)
3,623 次查看
Hello,
 
I want to reproduce the code line in the box in boucle_gen.vi (XX times which depends on the number of Com used). I don't want to use a for loop with a Indexation because this will run Read Dsp 9000.vi in serial.
 
How can I do this ?
 
Thanks 
0 项奖励
4 条消息(共 6 条)
3,594 次查看

I guess my problem can be described simply by this:

 

I want to send commands to several COM ports simultaneously.

Also, the number of ports might vary in time, and I would like the code to adapt to the situation.

If I put the port addresses in an array and run an indexed loop, it works well but then the ports are accessed sequentially, which slows down the thing significantly.  I could of course create a subVI with that part of the code and put 16 copies of it on my diagram, with some test to see if each of them is needed, based on the number of active ports, but I feel this is really not elegant.

Is there a way to code so that I can access whatever ports I need (this may change) simultaneouly?

I hope that is more clear.

Many thanks for any tip that might help me.

Cheers

 

0 项奖励
5 条消息(共 6 条)
3,577 次查看
I can't see any reason why you couldn't use any number of instances if the inner VI, as long as they are all talking to different serial ports - though if it were me I would think about doing it with a single template vi (*.vit) that you launch multiple instances of depending upon how many you need.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 项奖励
6 条消息(共 6 条)
3,541 次查看