LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dataflow Anomaly

Solved!
Go to solution

Give that "A block diagram node executes when it receives all required inputs" (from Dataflow Programming basics), help me understand why probe 2 executes before probe 1.

 

image.png

 

Note: removing the concatenate option "fixes" the dataflow so that probe 1 executes before probe 2.

I am assuming this is just a visual anomaly since dataflow is so fundamental to LabVIEW.

 

---------------------------------------------
Certified LabVIEW Developer (CLD)
There are two ways to tell somebody thanks: Kudos and Marked Solutions
Message 1 of 29
(3,318 Views)

I would even be wondering why there is a 10 ms difference between the two. 😉

What do you see with execution highlighting?

 

Just wildly guessing a "close file" is somewhat special in that it executes independent of any incoming error condition. Is it possible that the compiler inlines the close operation for some interesting side effects.

 

... or maybe it's just a bug. 😉

 

It would help if you could provide more details (e.g. LabVIEW version, etc.) and attach the sample code so we can test. Thanks!

0 Kudos
Message 2 of 29
(3,297 Views)

Sorry, forgot to include that I tried it with 2016 and 2018. I have attached the 2016 version for reference (it is easily enough reproduced)

As mentioned, replacing the "concatenate array" tunnel will "fix" the dataflow problem.

It was with execution highlighting ON that I noticed the problem (as well as stretching out the functions to see it actually happening)

 

---------------------------------------------
Certified LabVIEW Developer (CLD)
There are two ways to tell somebody thanks: Kudos and Marked Solutions
0 Kudos
Message 3 of 29
(3,291 Views)

Thanks. I see the same in LabVIEW 2019. Curious!

0 Kudos
Message 4 of 29
(3,280 Views)

What's even more interesting and concerning is that the Close executes BEFORE it even get the reference!

 

This has to be a visual and timing bug of some sort, otherwise the Close would error out due to a bad or missing reference.

 

Proce 2 executes before probe 1 or 3?Proce 2 executes before probe 1 or 3?

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 5 of 29
(3,269 Views)

Yeah... that is sorta what I was pointing out. The close function is executing before receiving any of the inputs to the function which is contrary to the dataflow principle.

---------------------------------------------
Certified LabVIEW Developer (CLD)
There are two ways to tell somebody thanks: Kudos and Marked Solutions
0 Kudos
Message 6 of 29
(3,261 Views)

You can see it clearly in Highlight Execution mode.  Looking at the Help for Close File function, it says that Error I/O operates uniquely in this function. Still doesn't make sense why it violates dataflow. 

2019-06-12_11-19-49.gif

 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 7 of 29
(3,254 Views)

Remove and replace the for loop. Then everything is back to normal. Must be some compile bug. I cannot reproduce it.

Certified LabVIEW Architect
0 Kudos
Message 8 of 29
(3,199 Views)

@thols wrote:

Remove and replace the for loop. Then everything is back to normal. Must be some compile bug. I cannot reproduce it.


This doesn't work for me.  Did you turn on the concatenation tunnel for the string array?  This seems to be the cause of the compile bug.  I replaced the for loop with a while loop and the issue still persists...until I turn off concatenation.  

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 9 of 29
(3,175 Views)

As per original post, it is the concatenation of arrays that breaks things.

image.png

---------------------------------------------
Certified LabVIEW Developer (CLD)
There are two ways to tell somebody thanks: Kudos and Marked Solutions
0 Kudos
Message 10 of 29
(3,168 Views)