LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to join three independent vi programs

I have three independent vi programs running successfully. Now I would like to join them together and would like to run in sequence. How can I do that ?
Plz look at the attached files. I would like to run in the sequence of send string, voltage measurement and then again send string. Plz help. Is it possible to write the voltage output program separately very similar to the send string vi having error in and error out wires ?
0 Kudos
Message 1 of 9
(3,638 Views)
The simplest way to do this would be to add Error In and Error Out clusters to the voltage measurement vi and use the error signal to control the order of operation as you suggested. These error clusters can just be a pass through (just wire the error in to the error out).

Also, I noticed that you didn't have nodes assigned for the inputs for the voltage measurement vi. I would suggest that these either be made constants or be passed from the higher level vi.

Hope that helps.
Message 2 of 9
(3,638 Views)
All you really need to do is add an Error In control and Error Out indicator to your voltage measurment VI and wire them directly together on the block diagram. Then assign them to terminals on the connector pane.

All that is left to do is place them on the diagram of a new VI and wire the error terminal together in the order you want them to run. It should have the same functionality as your original VIs.

The attached VI shows another option that might work a bit better for you. It first configures the Analog input channel, then send the string > gets the voltage > sends the string > and closes the analog in channel.

Ed


Ed Dickens - Certified LabVIEW Architect
Lockheed Martin Space
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
Message 3 of 9
(3,638 Views)
Thanks for your mail. But unfortunately I have LabVIEW 6.1 and I am not able to open your attached files. I also tried to put error in and out clusers but Dont know how to use the connector pane to connect. Plz see the attached file and help me to correct it.
0 Kudos
Message 4 of 9
(3,638 Views)
Sorry about that, for some reason I thought you said you had LabVIEW 7, but I now I see you didn't specify.

Attached is the same thing in LabVIEW 6.1, plus I modified your last attachment to include the error clusters.

Ed


Ed Dickens - Certified LabVIEW Architect
Lockheed Martin Space
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 5 of 9
(3,638 Views)
I have attached your modifed vi in LabVIEW 6.1 with a pass through error in and error out. I also set up the connector pane with Error In and Error Out on the bottom as is generally accepted practice.

Hope that helps.
0 Kudos
Message 6 of 9
(3,638 Views)
Here's a few notes that explain how to configure the Connector Pane. I took these directly from the LabVIEW Help File.

Selecting a Connector Pane Pattern
Complete the following steps to select a connector pane pattern for a VI.

  1. Right-click the icon in the upper right corner of the front panel window and select Show Connector from the shortcut menu to display the connector pane. The connector pane replaces the icon.

  2. LabVIEW selects a default connector pane pattern for the VI with as many terminals on the left of the connector pane as controls on the front panel and as many terminals on the right of the connector pane as indicators on the front panel. If this is not possible, LabVIEW selects the closest match. If the VI does not have any controls or indicators, LabVIEW selects a connector pane with one terminal.

  3. To select a different connector pane pattern for your VI, right-click the connector pane and select Patterns from the shortcut menu. A solid border highlights the pattern currently associated with your icon. To change the pattern, select a new one.

  4. After you select a connector pane pattern, you can customize it to suit your VI by adding, removing, or rotating the terminals.

    • To add a terminal to the pattern, place the cursor where you want to add the terminal, right-click, and select Add Terminal from the shortcut menu.

    • Note: Assigning more than 16 terminals to a VI might decrease performance and reliability. Too many terminals also can reduce the readability and usability of the VI.

    • To remove an existing terminal from the pattern, right-click the terminal and select Remove Terminal from the shortcut menu.

    • To change the spatial arrangement of the connector pane patterns, right-click the connector pane and select Flip Horizontal, Flip Vertical, or Rotate 90 Degrees from the shortcut menu.


Assigning Terminals to Controls and Indicators
After you select a pattern to use for the connector pane, you must assign a front panel control or indicator to each of the connector pane terminals. When you link controls and indicators to the connector pane, place inputs on the left and outputs on the right to prevent complicated or confusing wiring patterns in your VIs.

Complete the following steps to assign terminals to controls and indicators in a connector pane.

  1. Right-click the icon in the upper right corner of the front panel window and select Show Connector from the shortcut menu to display the connector pane. The connector pane replaces the icon.

  2. Click a terminal of the connector pane. The tool automatically changes to the Wiring tool, and the terminal turns black. Although you use the Wiring tool to assign terminals on the connector pane to front panel controls and indicators, no wires are drawn between the connector pane and these controls and indicators.

  3. Click the front panel control or indicator you want to assign to the terminal. A marquee highlights the object.

  4. Click an open space of the front panel. The marquee disappears, and the terminal changes to the data type color of the control to indicate that you connected the terminal.

    • Note: If the connector pane terminal turns white, a connection was not made. Repeat steps 1 through 3 until the connector pane terminal changes to the proper data type color.

  5. Repeat steps 2 through 4 for each control and indicator you want to assign to a terminal.



Ed Dickens - Certified LabVIEW Architect
Lockheed Martin Space
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 7 of 9
(3,638 Views)
Thanks Ed and Jhon . Your suggestion are very helpful to finally made a voltage measurement program with an error in and error out cluster.

But, I have got another small problem now.
The file " Voltage measure type 1" works great. But my aim is to get the voltage output in elements and not array i.e. the voltage connecting wire should be light orange instead of dark orange. For that I made " Voltage measure type 2". But this file gives me an Error 3 in Memory.cpp line 563. I deleted dir.mnu as suggested in http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/dcbfe1188a39285b86256c440075e59c?OpenDocument. But this doesnot help either. Is there any other way of doing it ? The light orange wire (voltage) is required
to use it in the other part of my prrogram.

Thanks,
Jalan
Download All
0 Kudos
Message 8 of 9
(3,638 Views)
The easy solution to this would to use the 'Index Array' function on the array and just grab the first element in the array.

You could then use the Same VI for both acquiring an array and a single point by having indicators for both the array and the single value and assigning them to separate termianls and connecting to the one you need.

I've attached an example for you.

Ed


Ed Dickens - Certified LabVIEW Architect
Lockheed Martin Space
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 9 of 9
(3,638 Views)