LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timed Sequence Within A Reentrant SubVI

I seem to be having a problem with a timed sequence (using the LabVIEW Timed Flat Sequence Structure) when it is in a subVI that is executing as a reentratn SubVI.  I've included the a photo to show the basic structure of the top level VI I am using.
 
Basically I have a VI that calls a subVI several times in parallel.  I want them to act independently so I have them being called as a reentrant VI.  Within this reentrant vi is a timed sequence that executes multiple times (think to operate a relay on for a certain time, off for a certain time and then repeat a certain number of times).  When I only have one copy of this reentrant subVI in my top level VI it executes fine (ie it goes through say 10 iterations of cycling on and off for 1 second each state).  However when I put a second copy of the subVI in my toplevel the VI executes one loop of the timed sequence fine, and then seems to loose the timing information and goes a quickly as possible for the remaining loops (ie it turns the relay on and off for 1 second each state and then turns it on and off as fast as possible for the remaining 9 loops). 
 
I've created some test VIs independent of hardware to try to isloate the problem (the picture shown).  In these VIs it is simply turning an indicator on or off and I've observed (by opening the reentrant VI during execution, and through timing the execution) this phenomenon of losing the timing for the loops after the initial loop.  The ReEnt Loop Test subVI is set to run reentrantly and take 20 seconds to complete using the timed flat sequence structure (10 loops of 1 sec on 1 sec off for indicator).  When only one is present it takes 20 seconds to complete, however when 2 are present it takes a little over 2 seconds (1 full 2 sec cycle and then as fast as possible for the remaining 9)
 
Any ideas?
 
 
 
 
J Bowen
US Marine; A Brunswick Family Boat Company
Product Integrity, Component Testing, and Validation
LabVIEW 8.2
CompactDAQ
DaqPad 6015
SCC-2345
0 Kudos
Message 1 of 11
(3,633 Views)

On the block diagram of your main VI right click on each of the sub VIs select Call Setup... choose the selection Reload for Each call.

 

Message Edited by AndrewAlford on 03-29-2007 07:51 AM

Andrew Alford
Production Test Engineering Technologist
Sustainable Energy Technologies
www.sustainableenergy.com
Download All
Message 2 of 11
(3,610 Views)

I still seem to be having issues.  By doing that (chaging the call setup to reload each time) I am getting the correct execution time (everything seemed fine on the test VI, only looking at the timing) but when I did the same thing to my relay control VI I still had the same problem.  The only thing that changed is that one of the instances of the subVI had the correct timing but the other 3, still executed as fast as possible.  I've included that actual VI's I'm using as well. 

Thanks for any help

J Bowen
US Marine; A Brunswick Family Boat Company
Product Integrity, Component Testing, and Validation
LabVIEW 8.2
CompactDAQ
DaqPad 6015
SCC-2345
0 Kudos
Message 3 of 11
(3,596 Views)
Hi J,

Would you kindly attach Relay Control.vi so that we can see what the subVI is doing?

Thanks,
-Sam F, DAQ Marketing Manager
0 Kudos
Message 4 of 11
(3,572 Views)
Sorry bout that,  thought I got them all.
 
 
J Bowen
US Marine; A Brunswick Family Boat Company
Product Integrity, Component Testing, and Validation
LabVIEW 8.2
CompactDAQ
DaqPad 6015
SCC-2345
0 Kudos
Message 5 of 11
(3,559 Views)
Hi J,

This should be the last time I pester you - but I'm still missing NI 9481 UI Setup.VI and the Relay Setup Control.ctl type def

One thought - have you probed some of the wires to ensure that State1 and State2 have values that you expect?
-Sam F, DAQ Marketing Manager
0 Kudos
Message 6 of 11
(3,547 Views)

Here are the missing subVIs.

And I believe this is an actual bug with the loop and there has been a submission to R&D with the CAR # 488945ZQ

J Bowen
US Marine; A Brunswick Family Boat Company
Product Integrity, Component Testing, and Validation
LabVIEW 8.2
CompactDAQ
DaqPad 6015
SCC-2345
Download All
0 Kudos
Message 7 of 11
(3,487 Views)
In your message, you state you are having problems with a timed sequence.  But so far I have only seen where you are using the ordinary flat sequences.  The timed sequences are the ones that have a blue box around them.
 
??
0 Kudos
Message 8 of 11
(3,479 Views)
Yes the issue is if a timed sequence is used instead of the flat sequence structure.  The Relay Control.VI currently has a flat sequence structure because that is the fix I found.  If you replace it with a timed sequence structure you can see the problem.
 
 
J Bowen
US Marine; A Brunswick Family Boat Company
Product Integrity, Component Testing, and Validation
LabVIEW 8.2
CompactDAQ
DaqPad 6015
SCC-2345
0 Kudos
Message 9 of 11
(3,463 Views)

 After converting the flat sequence to a timed sequence, I see the behavior you are talking about.  It took 20.093 seconds to run as a flat sequence, but only .06-.1 seconds as a timed sequence.  But if I have one one reentrant sub-VI, it took only .03 seconds to run.

I remember reading about some bugs with timed sequences.  I did a search on "timed sequence bug" and came up with 2 interesting links.

http://forums.ni.com/ni/board/message?board.id=170&message.id=212951&query.id=190869#M212951

http://forums.ni.com/ni/board/message?board.id=170&message.id=222334&query.id=190878#M222334

I don't know if these help.  I am also running 8.2, and the one link mentions a bug in 8.0 that was fixed in 8.2. 

Maybe the timed sequences are "stepping on each other" in Labview memory?  I don't think I can help anymore with this one.  Perhaps the NI experts can investigate it more.

0 Kudos
Message 10 of 11
(3,455 Views)