LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Producer consumer architecture - how to make it a Sub VI

Can we make a producer consumer method to be a sub vi. 

 

If thats the case, then each time the Sub VI is called, wont it pop up the front panel and ask for some event to take place like example click start or run ??

Abhilash S Nair

Research Assistant @ Photonic Devices and Systems lab

[ LabView professional Development System - Version 11.0 - 32-bit ]

LabView Gear:
1. NI PXI-7951R & NI 5761
2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021

OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
MEMORY - [ 16.0 GB RAM ]
GPU - [ NVIDIA GeForce GT 530 ]
0 Kudos
Message 1 of 4
(2,586 Views)

You can do that. However, it probably would be more effective to get the program you have been working on to function cleanly.  Then if you need a more complicated architecture, you could consider what would work best.

 

Lynn

0 Kudos
Message 2 of 4
(2,575 Views)

Ok. You are right.

 

Even if I want to make a producer/Consumer VI to sub VI , how could I do that. Especially when I have clusters inside a state machine architecture, how can I form terminals to it ... and also avoid the problem of event handling like I mentioned earlier.

Abhilash S Nair

Research Assistant @ Photonic Devices and Systems lab

[ LabView professional Development System - Version 11.0 - 32-bit ]

LabView Gear:
1. NI PXI-7951R & NI 5761
2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021

OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
MEMORY - [ 16.0 GB RAM ]
GPU - [ NVIDIA GeForce GT 530 ]
0 Kudos
Message 3 of 4
(2,555 Views)

Terminals are the block diagram connection to front panel controls and indicators. You can pop-up on the cluster wire (or constant) on the block diagram and select Create >> Control (or Indicator) from the pop-up menu. From the front panel connect those controls and indicators to the connector pane - the same as with any other subVI.

 

You will also need to go to VI properties. Under Window Appearance press the Customize.. button. In the window which pops up check "Show front panel when called" and "Close afterward if originally closed."  This will open the subVI panel when it is needed.

 

Lynn

0 Kudos
Message 4 of 4
(2,551 Views)