04-29-2012 02:58 AM
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 .
04-29-2012 08:52 AM
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.
04-30-2012 03:13 AM
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.
04-30-2012 10:03 AM
Simple fix is to add a sequence structure. You said you had tried it but your code does not show this.
05-01-2012 04:50 AM
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.
05-01-2012 06:02 AM - edited 05-01-2012 06:08 AM
There is no flat sequence in your VI.
I tried to modify your VI as suggested and I didnt get any blank images.
You should also clean up your code. You have enabled indexing but provide iteration number.
05-01-2012 06:11 AM
Have you tried something like this?
Good luck
05-01-2012 07:42 AM
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.
05-01-2012 07:45 AM - edited 05-01-2012 07:51 AM
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 🙂
05-01-2012 07:48 AM - edited 05-01-2012 07:50 AM
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.