LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Low-Level Snap VI Datflow enforcing by using Sequence Structure

Once the image renders to the front panel it stays on the front panel even after the IMAQ dispose executes.

0 Kudos
Message 11 of 25
(1,441 Views)

Once the image renders to the front panel it stays on the front panel even after the IMAQ dispose executes

Vision.png

 

Please Check with the VI Attached and Correct me whether my understanding iswrong or LabVIEW is not working as expected.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 12 of 25
(1,435 Views)

Palanivel:If i understand correctly, other's interpretation you might need to pass error wire through the sequence structure.

 

Edit: Or the image wire has to come after the sequence structure to dispose.

Thanks
uday
0 Kudos
Message 13 of 25
(1,433 Views)

@udka wrote:

Palanivel:If i understand correctly, other's interpretation you might need to pass error wire through the sequence structure.

 

Edit: Or the image wire has to come after the sequence structure to dispose.


Thanks uday,

But Even then the image will disappear once dispose VI is called/Executed.

 

Vision.png

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 14 of 25
(1,426 Views)

I am sorry whether i understood your question. Let me rephrase it

-When you use dispose the image reference will be deleted.

-If you still want to display image in your indicator you can use snapshot mode in indicator which will make copy of image.

Edit:The error wire has to pass from left to right through sequence structure.Same for Image wire.

Thanks
uday
0 Kudos
Message 15 of 25
(1,422 Views)

drdjpowell is incorrect, the sequence structure is NOT necessary. The error wire data processes the data flow. The picture in the indicator persist if the picture (or its reference) is destroyed. Looking at the picture wire is is copied to the picture and 1 copy to destroy.

 

Sequence structures are a good tool when you want the software to stop everything and do this 1 sequence step then the next etc etc till sequence is finished then go back to multitasking, multithread....

 

Rich J

0 Kudos
Message 16 of 25
(1,402 Views)

Unfortunately I beg to differ drjdpowell

Thanks
uday
0 Kudos
Message 17 of 25
(1,383 Views)

I am not supprised, some of the WORST LabVIEW I have seen was in shipping examples that came with equipment.

 

My guess is LabVIEW is not even on the minds of manufacturers until soms askes sales if it has LabVIEW support.

 

Then they have one of their programmers (who is probably great with embedded C) throw together some LabVIEW.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 18 of 25
(1,377 Views)

OK, I'm going to join this discussion and say that The Good Doctor is correct, without the Sequence Structure you have a Race Condition, and with the Sequence, you impose an "order" and prevent Race Conditions.  Unfortunately, the particular example using Images is a bit quirky because a lot of other things "get in the way" (like the amount of time to draw the Image, and whether or not it persists when the Image (buffer) is Disposed, but that's (mainly) irrelevant.

Sequences and Race.png

I've redraw the key elements, using a little "artistic license" to arrange the wires to make the point.  On the left, where ordering of operations is governed by the Sequence, the Image output tunnel will not be populated until all of the functionality inside the Sequence is satisfied (Data Flow 101), in particular, until the data has been "saved" in Image (the ephemeral nature of drawing Images, as I noted above, makes this a difficult example to see things clearly, but there you have it).  The version on the right, without the Sequence structure (and redrawn for emphasis) is the classic Data Flow Indeterminacy Problem -- you have no way of knowing which will be done first, the drawing of Image2 or the disposal of the Image.

 

Bob Schor

0 Kudos
Message 19 of 25
(1,356 Views)
Udka,
Turn on the highlight, click run, now watch what happens with the sample code. Does the image persist? Report the results. Highlight will show you how the code would run with no optimization.

Rich J
0 Kudos
Message 20 of 25
(1,339 Views)