From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to make any picture visible and invisible with Boolean logic

Solved!
Go to solution

Dear Friends

i am working to make front panel to monitor the Siemens PLC I/Os.  i want to make visible any picture with shared variable which may be high or low logic.

how to do that. i need help

 

Thanks,

Asif

0 Kudos
Message 1 of 10
(5,743 Views)

Use property node, set "Visible?" for the control (or indicator), holding picture.

0 Kudos
Message 2 of 10
(5,725 Views)
Message 3 of 10
(5,724 Views)

What sort of picture?

if it's a PICTURE indicator, then it has a property called VISIBLE.  Set that property to TRUE or FALSE, as you need.

 

If it's a DECORATION pic, you have to get a REFERENCE to it (use a property node on the diagram, Link to the PANE, set property to DECORATIONS.  That gives you an array of references to decorations. Use an ARRAY INDEX to get a ref to the one you want * .  Use another property node with that reference, and set the VISIBLE property T/F as you need).

 

* this is the tricky part - which one is the one you want?  If you only have one decoration, it's easy.  If you have more than one, they appear in the array in REVERSE order that you place them on the panel.

 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

Message 4 of 10
(5,720 Views)

thanks for your response. i want as a decoration picture to appear on any logic or PLC or disappear when logic changes.

 

0 Kudos
Message 5 of 10
(5,707 Views)

@Asif138 wrote:

thanks for your response. i want as a decoration picture to appear on any logic or PLC or disappear when logic changes.

 


Use the VIs from the graphics palette to read the image from file and put it a picture control and then do what you were told above.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 10
(5,704 Views)

If it's a picture indicator, you can just color the background and border transparent.  Wire a constant of the picture, or an empty picture constant to the indicator depending on the condition.  If you ever needed more than 1 picture to show, it would be easy to modify.

0 Kudos
Message 7 of 10
(5,695 Views)
Solution
Accepted by topic author Asif138

Another way is to customize the picture items of a boolean control, as shown here. It can be configured so that the desired picture is shown only if the value is true or false, as desired. This way, the picture status can be changed directly from a shared variable without the need for additional code.

 

Marc Dubois
0 Kudos
Message 8 of 10
(5,652 Views)

You could also use a PICT RING, as shown here:

Trash.PNG

 

i use this as a "trash-can" - Normally, the ring has a value of 0, showing the closed can.

If the user drags an item that is delete-able over the picture, I change the value to 1, showing the open can.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 9 of 10
(5,636 Views)

You can use any picture in your VI and place an empty string indicator on top of that. If you match the string indicator's color to your background color it will disappear in your VI but also hiding the picture. To make the picture visible, just use the property node of that string indicator and set the visible to False.

0 Kudos
Message 10 of 10
(4,153 Views)