Jump to content
Gary Armstrong

Industrial Graphics

Recommended Posts

I am implementing a LabVIEW controller for an industrial application (HVAC). My client wants graphics of pumps, tanks, and solenoid valves. I have done fairly well with decorations but now he wants them to change color based on status (145116587_FP2019-08-08160454.png.4644d25afd4c2e328fc3a8e44bbfd57b.pngon/off). Does anyone supply a graphics library to handle this?

Share this post


Link to post
Share on other sites

The DSC module has a few of them, but alas, you can easily create better custom boolean controls yourself

Here is an example of mine. The pipes, the pump PP1 and and all the valves come from DSC, almost all the rest are customized controls.

http://www.weizmann.ac.il/physics/Segre/sites/physics.Segre/files/uploads/snap_2.png

Edited by ensegre

Share this post


Link to post
Share on other sites

You can easily customise a standard boolean by swapping out the on/off elements for whatever decoration you want.  Then you can colour on and off states differently.  Alternately you can use PNG images (already coloured) for the on/off states.

Share this post


Link to post
Share on other sites

You can programmatically colour decorations. 

The tricky bit is getting a reference to them, as you cannot just look them up by name. What you can do though is figure out their UID and then operate on them by using this number. 

Whatever you do, don't be tempted to access them via their index position in the Decorations array, the order frequently changes and will cause very subtle coloring bugs in your code! 

Edited by Neil Pate

Share this post


Link to post
Share on other sites
3 hours ago, Neil Pate said:

Whatever you do, don't be tempted to access them via their index position in the Decorations array, the order frequently changes and will cause very subtle coloring bugs in your code! 

Oh yes, I did burn my fingers with that one, I believe you get then sorted on their last modification date or something alike.

 

Edit :

oh, and by the way : https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Add-Explicit-Decoration-References-to-LabVIEW/idi-p/975701

Edited by Antoine Chalons

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.