DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Code works in Debug/Continue mode but not in Run Script

I have a pretty intensive algorithm that works just fine when I press the blue button but does not calculate properly when I use the green button.

This appears to be the offending section:

        

Call DataBlClpCopy("[" & groupcount & "]/VP",intPstart,intPend-intPstart+1)

chnalloc(dicRoutes("Name" & intRoutes) & "~SegVelocity")

call DataBlClpPaste(dicRoutes("Name" & intRoutes) & "~SegVelocity",1)

chnname(globusedchn)=dicRoutes("Name" & intRoutes) & "~SegVelocity"

minSpeed=chnvalmin(globusedchn)

 

When in debug, minSpeed is the expected value, when in Run Mode it has NoValue. Any ideas or work arounds?

0 Kudos
Message 1 of 2
(3,596 Views)

Hi punkmonkey,

 

I have a couple of questions and suggestions. When you are debugging are you using the Watch Window? If you are then in Debug mode there should be information there but in run mode there will not be any information there. Another possibility is that you may be incurring a race condition that is averted when the code is running slower in Debug mode verses run mode. One way to check what that variable's value is during run mode is to use a message box and show the value. I hope that this helps.

 

Regards,

 

Perry S. 

Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(3,577 Views)