LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI's

Hello,
 
I am quite new on LabView programing and i am having some problems with some VI's.
So...i want to build one single VI that integrate 2 already existing NI ELVIS VI's, the Osciloscope and the function generator. The final result must be a frontpanel were i can control the oscilloscope and the function generator, in other words, a frontpanel that is the result of the merge of the oscilloscope frontpanel and the function generator frontpanel.
Can somebody help me and tell me which steps i must do to solve my problem?
 
Thanks,
Vitor
0 Kudos
Message 1 of 8
(2,835 Views)
You should only have 1 VI for the front panel. The code for what happens on the front panel can be spread across several sub-vis, but the front panel is "What you see is what you get" for a user interface. You can have two front panels, but they would be shown in seperate windows, and if they are sharing information you would have a lot of timing issues to deal with. If you need, you can send a reference to a front panel object to a sub-vi where you can edit the properties of it just like it was on the front panel of the sub-vi.
0 Kudos
Message 2 of 8
(2,819 Views)
You can also use sub-panels.
0 Kudos
Message 3 of 8
(2,816 Views)
And what about the LabView Merge tool....can this tool achieve my goal? Because i really would like to create a front panel that is the result of oscilloscope front panel + the function generator front panel together in the same window.
what do you mean with this: "If you need, you can send a reference to a front panel object to a sub-vi where you can edit the properties of it just like it was on the front panel of the sub-vi." ?

Thanks, Vitor

0 Kudos
Message 4 of 8
(2,807 Views)
I think the Merge tool you are talking about is only for comparing two versions of the same VI and getting the latest version.

I think your only real option here is to decide which VI will be the front panel and then move all the front panel objects from the other VI to that one.




The reference I was talking about allows you to have property nodes and invoke nodes to front panel objects in the calling VI.

To create a reference:

1. Go to the block diagram
2. Right click the front panel object and select "Create > Reference"

You can then pass that wire to a Sub-VI and use it for Property and Invoke nodes.

Included is an example.


Message Edited by StevenD on 05-27-2008 03:28 PM
0 Kudos
Message 5 of 8
(2,799 Views)
That would require a fair amount of recoding, and before going down that route I would re-suggest looking at sub-panels as a potential solution.
0 Kudos
Message 6 of 8
(2,793 Views)
Hello,

I already left the idea to mix the two originala VI's (oscilloscope and function generator) in just one. But now i want to take one of the as original (foe example the oscilloscope) and manually build the front panel and the block diagrams of the function generator. On the function generator window if i click with the right button and select: "Instrument I/O>Instr Drivers>NI ELVIS>FUnction generator" it will add a block that i think implement the NI ELVIS function generator. This block has some imputs(Amplitude, DC offset, Device name, error in, Frequency, Type, Stop) and some outputs (error out, Manual). So....i have created controls to all imputs but i don't know which block i should put as the Device Name imput. I already have added a control to the device name, but when i try the run mode, the VI begin and stop in few seconds with any error, and its suppose it works time i order to stop. I have no idea why the VI stop by himself. Can you please help with this issue? I will be really apreciated

thanks,

Vitor
0 Kudos
Message 7 of 8
(2,753 Views)
Some clarification. Are you building a new VI for the function generator? Or adding the code to one of the existing VI's?
 
If you are making a new VI, you need to add some timing structures like a While Loop to keep the VI from running once then stopping. You also need to control when the function generator will run (assuming you don't want it to run every Iteration of the While Loop.)
 
Here is an example with a While Loop and Event Structure.
 
 
(I don't have the Elvis Function Gen. so...)
0 Kudos
Message 8 of 8
(2,717 Views)