Jump to content

Using Property Nodes in subVI


Recommended Posts

I wanted to know if it were possible to store a property node in a sub Vi to have it activate an indicator in a main VI. For example, I want to have an indicator blink when a TCP connection is found. Can I store a blinking property node in a sub-VI and have the indicator in the main VI (that is connected to the sub-VI output) then blink? I've attached the VI below. Thanks

Link to comment

QUOTE (rpscott02 @ Mar 2 2009, 01:44 PM)

I wanted to know if it were possible to store a property node in a sub Vi to have it activate an indicator in a main VI. For example, I want to have an indicator blink when a TCP connection is found. Can I store a blinking property node in a sub-VI and have the indicator in the main VI (that is connected to the sub-VI output) then blink? I've attached the VI below. Thanks

1. Right-click on the property node and choose "disconnect from control".

2. Right-click on your control and choose Create -> Reference. This reference can be wired into the disconnected property node.

3. Select the property node (but not the reference) and choose [menu] -> Edit -> Create SubVI...

4. Use the SubVI as needed.

Link to comment

QUOTE (jgcode @ Mar 2 2009, 05:26 PM)

Hi Rpscott02

I am guessing you are able to create an implicitly linked property node by right-clicking a control and selecting create>>property node?

You can use property nodes in subVIs by using explicitly linked property nodes.

To create an explicitly linked property node you need to create a control reference (by right-clicking a control and selecting create>>control reference) for the control object and wire it to the generic property node (found on the Functions>>Application Control sub-palette).

Depending on the version of LabVIEW you have, an easier way is to place a marquee around some implicitly linked property nodes (i.e. to select them with the mouse) then go to edit>>create subvi and LabVIEW will do the above for you.

Don't forget to close your references!

This tut should be good information for you.

Thanks jdunham and jgcode! Both your suggestions worked and are greatly appreciated

Link to comment

One more issue - i'm having trouble making the blinking property node activate on after an even happens (namely, a 'no error' signal from another subVI). For some reason, it blinks as soon as I begin running the program. I've tried event and case structures and neither worked. I thought simply putting the property node in the error flow would cause things to happen sequentially but no luck there either. Any suggestions?

Link to comment

QUOTE (rpscott02 @ Mar 5 2009, 10:31 PM)

One more issue - i'm having trouble making the blinking property node activate on after an even happens (namely, a 'no error' signal from another subVI). For some reason, it blinks as soon as I begin running the program. I've tried event and case structures and neither worked. I thought simply putting the property node in the error flow would cause things to happen sequentially but no luck there either. Any suggestions?

I will take a stab in the dark here without seeing your code... if you are wiring an error to a property node and the wire contains an error then the property node will not run.

Link to comment

QUOTE (jgcode @ Mar 5 2009, 08:59 AM)

I will take a stab in the dark here without seeing your code... if you are wiring an error to a property node and the wire contains an error then the property node will not run.

Ok, my excellent typing skills may have made thing a bit unclear. I meant that the blinking node is working, just that it starts as soon as the program is run and not when I want it to. I want it to activate at a certain point in the program. I have currently a case structure that checks if there is an error in the program and if NOT then the blinking property node should begin blinking. For some reason, this is not working. Hope that clears things up

Link to comment

QUOTE (rpscott02 @ Mar 5 2009, 09:25 AM)

Ok, my excellent typing skills may have made thing a bit unclear. I meant that the blinking node is working, just that it starts as soon as the program is run and not when I want it to. I want it to activate at a certain point in the program. I have currently a case structure that checks if there is an error in the program and if NOT then the blinking property node should begin blinking. For some reason, this is not working. Hope that clears things up

The blinking state probably got set before the program ended. When it starts up again it'll resume at that state. Set the state at the beginning of your program to make sure it's in a known state.

George

Link to comment

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.