LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timed Loop difference with "reset at structure start" clock, runs away!

I'm trying to do a simple acquisition loop using the software timed loop structure.  However, I am seeing something that doesn't seem right.  When I leave the clock source at "1 kHz Clock" it works great as expected, but by simply changing the clock source to "1 kHz <reset at structure start>" strange things begin to happen: 1) the front panel stalls heavily as if the processor were bogged way down and 2) the sample rates run away as fast as it can go, clearly not timed by the loop, about 10-20 samples per millisecond.  Let me repeat, all I have to do between these two conditions is to change the clock to reset at structure start.  I'm using a 6036E card and LV 8.2 on Windows XP.  Below is the acquisition loop:
 
Any idea what's going on?
 
Thanks.
0 Kudos
Message 1 of 6
(2,923 Views)

Hi cjgpr,

Could you please merge the error terminal from the timed loop to make sure that LabVIEW isn't trying to tell us something?  I would open the task manager to see if the CPU is running 100%.

Also if you are lagging so bad, I would start to take out chunks of code to isolate down where the lag comes from.

The LabVIEW help files say "1 kHz Clock <reset at structure start>—A timing source similar to the 1 kHz clock that resets to 0 after every iteration of a timed structure."  I would assume that resettting the clock is causing a problem.  Try changing the timeout for the device to -1 (no timeout).

Is there a reason why you need to use 1 kHz Clock <reset at structure start>?

Brian K.
0 Kudos
Message 2 of 6
(2,898 Views)
Brian, thanks for the input.
 
I added in error handlers to both the inside loop and outside loop terminals and they reported nothing.  The process is sucking 100% of my processor and it is certainly isolated down to this loop (when in the <reset> mode).  And finally, changing the DAQmx module timeouts to -1 did not change it either.
 
I execute the loop multiple times and want the plots and data files from each execution to all start on the same clock count (zero), that's why I'm using the <reset> clock, which I've done successfully before.  Totally confused as to why it is acting so wacky with this program.
 
Even if it was resetting the clock every time, why am I getting samples FASTER than the 1kHz limit?  The actual start time increments through the execution, but as I mentioned, I can get up to around 20 samples every millisecond.
0 Kudos
Message 3 of 6
(2,889 Views)
Hi cjgpr,

Please note that this was reported to R&D (# 4681DHVR) for further investigation. R&D is currently investigating this issue. The current workaround for this is to avoid using the "reset at structure start" setting in LabVIEW 8.20.

We appreciate your feedback!

Best regards,

Steven

Applications Engineer
National Instruments
0 Kudos
Message 4 of 6
(2,857 Views)

Does your response indicate that you were able to duplicate the problem?

Jesse

0 Kudos
Message 5 of 6
(2,857 Views)
Hi cjgpr,

This is simply to confirm that we have duplicated this incorrect behavior when using the reset at structure start setting on our side.

Best regards,

Steven
0 Kudos
Message 6 of 6
(2,841 Views)