From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tracking down delay

Solved!
Go to solution

Hi,

 

I am trying to track down a time delay on a huge project I didn't build. I added time outputs to a log on what I thought was adjacent executions. They are 4-5 seconds apart. I hypothesize that this may be due to some parallel process, but I can't actually find what it would be. 


Are there any good troubleshooting techniques? I will attach a screenshot in case it's useful.

 

Thank you 

Katie

 

Edit: screenshots.The first is a log. The second and last are most relevant. The second has the log with the time delay, and the final has the block diagram for the vi which corresponds to the outputs. The two I pointed out with arrows are the adjacent ones.

 

2.jpg1.jpg3.jpg

0 Kudos
Message 1 of 5
(1,389 Views)

Hi Katie,

 


@KatieFM wrote:

Are there any good troubleshooting techniques? I will attach a screenshot in case it's useful.


Yes. Yes, please.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 5
(1,388 Views)

Just attached them, thank you.

0 Kudos
Message 3 of 5
(1,351 Views)

Hello Katie,

 

put the evaluation of the current time-stamp inside your logging VI and not parallel to you other running code in your main VI.

 

THINK dataflow, currently you can not tell when all of your "Get Date/Time in seconds" are really evaluated.

 

Regards, Jens

Kudos are welcome...
Message 4 of 5
(1,341 Views)
Solution
Accepted by topic author KatieFM

Your timestamp queries are unconstrained by dataflow, so they're free to do their time queries *immediately*.  Then those "start time" values may not be written into your log file for a while because the logging functions generally *are* constrained by dataflow along the error wire.

 

Apparently it takes several actual seconds to run through your series of functions (mostly) sequentially.

"EventStructEnd" is indeed logged after the case structure finishes execution, but the timestamp it's tagged with was probably grabbed before the case structure started execution. 

 

Dunno what you used to create the first timestamp in your log file, but that one *seems* like it might be telling the truth about when the logging itself happened.  At least it shows time moving forward whereas your 2nd timestamp (with the dataflow issues I've explained) seems to indicate that you've invented time travel.

 

Since it seems you're always feeding that same timestamp string into the logging function, you could fix things pretty easily by doing the timestamp query *inside* that function each time it's called.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 5 of 5
(1,326 Views)