LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

conditional gif

Hello

 

first of all I apollogize if I'm posting in an incorrect place but I'm new.

 

I am making  a very simple VI for calibration of an instrument. I wolud like LV to display a GIF while calibration is operating (eg. CAUTION signal), and once it finishes, change to another GIF (eg. Operate normally signal). Both GI's in the front panel obviously

 

Any help will be very useful

 

Cheers

0 Kudos
Message 1 of 9
(3,301 Views)
You can either copy a picture and then paste it on the front panel of a VI and then save the VI, or you can use a picture indicator to programmatically display a picture. The latter is somewhat limited in that there are graphics functions for reading JPG, PNG, and BMP files, but there isn't one for GIFs, so you would need to save your GIF as one of the aforementioned formats. To use these all you need to do is this:
Message 2 of 9
(3,294 Views)
  1. Use a picture ring indicator with two states.
  2. Use a customized boolean button containing a different image in each state.
Message Edited by altenbach on 01-06-2009 08:36 AM
Message 3 of 9
(3,283 Views)

altenbach wrote:
Use a picture ring indicator with two states.

See? Yet another way. Smiley Wink So many choices, so little time...

 

EDIT: And then altenbach presents yet another way while I'm posting my reply. 

Message Edited by smercurio_fc on 01-06-2009 10:39 AM
Message 4 of 9
(3,278 Views)

Yes, since we only have two states, I would go with the customized button. All you'll have on the diagram is a boolean T/F. Couldn't be simpler! 🙂

 

 The picture ring is more useful if you have more than two states. 😉

Message 5 of 9
(3,270 Views)
Addendum: Note though, that I don't like to use picture rings or Booleans in these cases since the picture itself is saved with the VI, like the method of pasting the picture on the front panel, and this makes the VI size large. Plus, if you need to change the picture this would require a code modification. But in the end it's up to you to decide which method is best for you.
Message 6 of 9
(3,268 Views)

Of course I am not exactly sure what the OP had in mind, but I was thinking of relatively small images so VI size should not be an issue.

 

It can even be saved as a control or type definition so you can globally change it later. If this is used in many places, it can be added to the user palette.

 

Here's an example of a 50kb control of reasonable area, we would just make it an indicator instead and use different graphics.

 

 

Message 7 of 9
(3,249 Views)

... and if you want to maintain the animation built into the gif

 

 

 

...you could put each gif (ctrl-drag from file explorer to FP) on a seprate tab of a tab control and control which tab page is visable. Hidding the tabs and/or paint the tab control transparent to reduce the image to just the gifs.

 

Ben

 

Example is LV 8.6

Message Edited by Ben on 01-06-2009 01:00 PM
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Download All
Message 8 of 9
(3,232 Views)

Thanks to all

 

I used the ring to solve my problem

 

although I have a little "problem" with the size of the indicator because the images are different, so there is some empty space when the little one is displayed

 

however this is a detail that is not really important.

 

I will try the other methods in order to find the one that makes me more "satisfied" and also to get some experience in labview

 

Cheers
0 Kudos
Message 9 of 9
(3,210 Views)