Sekel Posted December 9, 2016 Report Share Posted December 9, 2016 Hello, I would like to implement "pump running" feedback from the pump to a customized pump control so it will have following 4 states: OFF , OFF RUNNING , ON , ON RUNNING Is it possible in LabVIEW 2011? Quote Link to comment
austinman Posted December 9, 2016 Report Share Posted December 9, 2016 A Picture Ring control (configured as an indicator) sounds like a good candidate, and available in 2011. Quote Link to comment
hooovahh Posted December 9, 2016 Report Share Posted December 9, 2016 Yup, or if you only have 4 states you could have 4 booleans that are shown and hidden. Quote Link to comment
Sekel Posted December 9, 2016 Author Report Share Posted December 9, 2016 (edited) Thanks for fast replies. I found advice about pict_ring control while googling few days ago, but somehow Im unable to implement it. I created type def of pict_ring and added few pictures, but they do not show in. See snap photo below. Another problem is, that LabVIEW does not accept gifs in form I have posted here. You can try it by yourself if you are willing to, but message about error appears to me everytime Im trying to load one of the attached gifs as a picture (to standard OK button). And last problem of all, Its clickable control so far. One click makes it OFF (red), another makes it ON. How to solve this, If I use indicator instead of control? Edited December 9, 2016 by Sekel Quote Link to comment
hooovahh Posted December 9, 2016 Report Share Posted December 9, 2016 That changes things a bit but I think the easiest solution (assuming there is always 4 states) is a tab control with an image in each. Then a transparent button on top of all of them. Attached is an example in 2015. Demo 4 Button Gifs.vi Edit: Back saved into 2011 hope it turns out. Demo 4 Button Gifs 2011.vi Quote Link to comment
Sekel Posted December 12, 2016 Author Report Share Posted December 12, 2016 Thanx a lot hooovahh, your solution works for me! Could you please teach me, how to do it? - I dont know, how to make transparent "transition states" of button control. For ON and OFF states its possible to set it in properties. For button transition states, I am lost. - How did you add "shadowing" for transparent button. - Could this work also with picture ring indicator? 4 state picture ring indicator should be more logic for control (I could convert 2 bit boolean array to numer giving value to picture ring). Do you have any idea why is it not working with my pictures / gifs? Once again, thanx a lot for your help! Quote Link to comment
hooovahh Posted December 12, 2016 Report Share Posted December 12, 2016 5 hours ago, Sekel said: - I dont know, how to make transparent "transition states" of button control. For ON and OFF states its possible to set it in properties. For button transition states, I am lost. I selected the Classic Square Button to start, and then using the painting tool colored the True, and the False values transparent. This button has 4 states (not 6 like system buttons) and painting the two values made all 4 states transparent. But you can just copy the button for yourself. 5 hours ago, Sekel said: - How did you add "shadowing" for transparent button. I didn't. If you run the VI you see this shoadowing go away. This is because this shadowing is not part of the UI and is only there to show that an object is on top of another object. You get the same effect if you move any control over top of a tab (not by dragging that places it in the tab) 5 hours ago, Sekel said: - Could this work also with picture ring indicator? 4 state picture ring indicator should be more logic for control (I could convert 2 bit boolean array to numer giving value to picture ring). Do you have any idea why is it not working with my pictures / gifs? Picture rings, and 2D picture controls in general don't support gif, or alpha layer transparencies. This is why I went with images on the front panel, it is the simplest solution. Otherwise when you have a gif you need to have code running in a loop that will update the static images at regular intervals. With this image that isn't too hard to do because there is a 400ms wait between changing the image but it still adds more logic, and if you only have these 4 states the code is quite simple. Quote Link to comment
Sekel Posted December 12, 2016 Author Report Share Posted December 12, 2016 I considered "static images" pict_ring as well. As you say - with 3 frame gif changing at 0,4s it is not a big deal. The truth is, I was unable to get rid of that nasty frame around. And frameless button/indicator is a must for my application. I finally found out, how to make "complete transparent" picture and checked the shadowing as you described it. Now I wonder how transparent tabs are made. I do not see any color property in the menu. Quote Link to comment
hooovahh Posted December 12, 2016 Report Share Posted December 12, 2016 1 hour ago, Sekel said: I do not see any color property in the menu. I just painted the tab with the color brush transparent, starting with the classic tab. Having a picture ring that you need to change the values of isn't a big deal, but it is more code that my solution didn't need. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.