LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get image invoke method gives blank image when I try to capture waveform graph picture

Hello

I am facing problem when try to capture waveform graph picture using invoke method Get image and write JPEG function, some times it gives blank images.I am using these functions inside nested loops.

Observations:(With reference to attached VI)

(1) Sometimes  I found it captures images correctly when i run labview program first time but after that it starts writing blank images.

(2) Whenever i use flat sequence structure for waveform graph and get image node it always gives blank picture which indicates that execution of waveform graph and Get image should not be sequential.

(3) Whenever it gives blank image i checked the image data which is not valid data so it indicates problem is with Get image method or labview program flow(may be race condition between waveform graph and Get image method).

       I have attached vi ,please change path name and folder name in which images are being saved.I'm using labview 8.5.1 .

 

0 Kudos
Message 1 of 26
(4,384 Views)

It's a dataflow problem. You did not attach your VI - only the project file. You should know that the project file is separate from the VIs that is described in there.

0 Kudos
Message 2 of 26
(4,369 Views)

Yes , you are correct.It's data flow problem . but i don't know how it can be avoided .  I have tried a lot. I have attached vi.Please change path name & folder name in vi.

0 Kudos
Message 3 of 26
(4,351 Views)

Simple fix is to add a sequence structure. You said you had tried it but your code does not show this.

 

 

0 Kudos
Message 4 of 26
(4,342 Views)

Hi,

I have tried sequence structure.But sometimes it also gives blank images. I have attached new vi which is using flat sequence. Run this vi 7-8 times then you will observe blank images. I don't know why?Any help will be greatly appreciated.

0 Kudos
Message 5 of 26
(4,334 Views)

There is no flat sequence in your VI.

 

I tried to modify your VI as suggested and I didnt get any blank images.

 

Dataflowexample.png

 

You should also clean up your code. You have enabled indexing but provide iteration number.

0 Kudos
Message 6 of 26
(4,330 Views)

Have you tried something like this?

 

Image_Graph.PNG

 

Good luck

-----

The best solution is the one you find it by yourself
0 Kudos
Message 7 of 26
(4,326 Views)

Hi,

I have tried same thing . but still get blank images. Try to run this code 8-10 times  and check images every time then definately you will observe blank images.There is no regular pattern for blank images. That inidcates that problem is with Get image method not with data flow.Because data flow problem shoul be removed after using flat sequence.I am using labview 8.5.

      Waiting for your reply.

0 Kudos
Message 8 of 26
(4,315 Views)

Post an example of such blank image.

 

Edit. : OK you allready did 🙂

 

I tried what u suggested and got 0 blank ones.

Post the code you are actually using.

 

I used it in LabView 2011 and 2010sp1 and no probs. Except it polutes my disk with images 🙂

0 Kudos
Message 9 of 26
(4,313 Views)

Add 100ms delay in the structure where you have kept the graph and check whether it works or not may be the graph may take in ms to update the value in it but your execution is happening in ticks so try this I believe this should solve your issue.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 10 of 26
(4,307 Views)