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.

 

---------------------------------------------
Former Certified LabVIEW Developer (CLD)
Message 1 of 29
(4,334 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
(4,313 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)

 

---------------------------------------------
Former Certified LabVIEW Developer (CLD)
0 Kudos
Message 3 of 29
(4,307 Views)

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

0 Kudos
Message 4 of 29
(4,296 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
(4,285 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.

---------------------------------------------
Former Certified LabVIEW Developer (CLD)
0 Kudos
Message 6 of 29
(4,277 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
0 Kudos
Message 7 of 29
(4,270 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
(4,215 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
0 Kudos
Message 9 of 29
(4,191 Views)

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

image.png

---------------------------------------------
Former Certified LabVIEW Developer (CLD)
0 Kudos
Message 10 of 29
(4,184 Views)