LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Main vi stops when subvi appears

Hello,
 
In my main vi I have a lot of thing happening in it, one of them is giving signals to a USB relay device which I connected with DAQ Assistent.
This relay is currently working on time pulses of 3 and 6 seconds. 3 off, and 6 on.
 
It works fine when I use buttons or other things in my vi, but when I press a button to show graphs in a subvi the relay device stops working.
The subvi with the graphs are now on my screen and only until I close that subvi, the relay starts working again.
 
I changed the properties of the subvi:
Window appearance - Dialog (instead of custom)
 
Is there a way to make sure the relay keeps working, it's quite important...
0 Kudos
Message 1 of 6
(2,638 Views)
Without seeing your code i dare to accuse your architecture. You have to split up acquisition and display.
You should take a look into the template browser for "Master/Slave" or something similar.

hope this helps,
Norbert B.
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 6
(2,633 Views)
i have include my vi in a lib. The example vi is how it should work. you can delete the DAQ assistent and just look at the LED.
As you can also see, there is a one time only data sending to the graph when you open the graph. When it's closed or opened it will not receive data. It looks like I should find another way to make my graphs appear with changing graph data + working DAQ

Message Edited by HmanH on 09-17-2007 11:45 AM

0 Kudos
Message 3 of 6
(2,629 Views)
After looking into your code, i do not understand why you didnt split up the code initially into two loops. I marked the piece of code you can easily export. You just have to take care about passing the time-intervall between the loops. But this is easy.


Easiest: If the delay does not change, just get it infront of both loops and pass it to them
Simple: Use a locale variable. Just take care that ONLY ONE loops writes on this variable.
Ellegant: Use a functional global variable (also known as LV-2-style variable).

hope this helps,
Norbert

Message Edited by Norbert B on 09-17-2007 04:53 AM

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 6
(2,622 Views)
I could put the random numbers in the graph vi, wasn't really the purpose. But, yeah, that works fine. the only other problem is the DAQ that doesn't follow. I can't have that, it has to keep on running when opening the graph vi.

Message Edited by HmanH on 09-17-2007 01:28 PM

0 Kudos
Message 5 of 6
(2,602 Views)
Maybe you should take a look into Master/Slave or Producer/Consumer (Data) framework in the template browser. You can find the template browser by selecting "New" (not "New VI"!) under File in the menu.

hope this helps,
Norbert
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 6
(2,570 Views)