LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

subvi running normal when alone but not inside main vi

Solved!
Go to solution

JeffOverton wrote:  Are your two devices connected through a USB hub?  If one is polling the port on your computer that connects to the hub, the other may not be able to get through, and will error out.
No Jeff. The two devices are directly connected to the system to 2 ports. No seperate hubs.
Message 11 of 29
(1,799 Views)
Here they are.....
Download All
Message 12 of 29
(1,797 Views)
Start by placing a TRUE boolean at Wait until Completion?
 
Other comment:  Don't make your VI's so tightly fit together.  And there is no need for a sequence structure.
 
R


Message Edited by JoeLabView on 07-23-2008 09:21 AM
Message 13 of 29
(1,792 Views)
Wow, good spot Ray.
 
Yeah, mathan, that's probably what's happening.  While your program is disabling the first USB port your second subvi is executing.
Message 14 of 29
(1,780 Views)

Thanks JLV and Jeff for the comments,


JoeLabView wrote:
Start by placing a TRUE boolean at Wait until Completion?

I did it. But still same thing occurs.

JoeLabView wrote:
And there is no need for a sequence structure.
Off course yes. I removed it.

0 Kudos
Message 15 of 29
(1,762 Views)
Dear all,
 
One thing i noted while running the program. If i keep the subvi open, then running the main program will give the expected outputs in subvi. Any comments?
 
Thanks,
Mathan
0 Kudos
Message 16 of 29
(1,755 Views)
That almost makes it sound like a race.  As a subvi, its front panel probably isn't being called, but when you keep it open, it has to call its front panel, which would result in a thread switch, which would slow it down a little.  I don't see how this could matter, but it's the only thing I can think of.
Message 17 of 29
(1,752 Views)

JeffOverton wrote:
As a subvi, its front panel probably isn't being called, but when you keep it open, it has to call its front panel, which would result in a thread switch, which would slow it down a little. 
Dear Jeff,
 
Am sorry. I can't get your words. Could you please teach me bit more detail.
 
Thanks,
Mathan
0 Kudos
Message 18 of 29
(1,744 Views)

When your subvi is called as only a subvi, it has no need for its front panel, so the compiler doesn't bother calling it.  With the subvi opened up, the front panel is necessarily in memory, and so there are thread switches to the UI thread, which will slightly slow down the execution of your subvi.

Like I said, I don't think that's your problem, but it's the only thing I can see off the bat.



Message Edited by JeffOverton on 07-23-2008 10:38 AM
Message 19 of 29
(1,742 Views)

Oh i c.

How can i proceed further then?

Thanks for ur patience,

Mathan

0 Kudos
Message 20 of 29
(1,736 Views)