Jump to content

Resetting Boolean Values


Paul

Recommended Posts

I have a program that executes a case structure several times. The case structure contains several indicators that need to be reset at the end of each run. In other words, set back to the off value. I tried creating another frame that re-sent false values back to them, but that appeared to do nothing.

Does anyone have any ideas?

Thanks

Paul

Link to comment

It could be possible if he's using locals or property nodes, that he's resetting the values before his processes have completed execution, so they're reset while they're being written to, but not at the end.

I would say to check your execution, ensure that you're resetting the values AFTER your processes have completed.

Like I said, it would probably be easy to figure out if we could see the code itself.

Link to comment

My labview programming is not that extensive but I believe that the commands are global. In the last frame I wire a false signal back to the boolean values that joins together with the signal sent in the beginning to activate them. For some reason that does nothing at all. I merge the two signals and nothing. I do realize that the signal is traveling back to the orginal frame that is sending info out and at the same time sending info in. I guess what I am looking for is somehting equivalent to a text command that I can call in certain places. Like a Visual Basic equivalent of

visible.value = true

//in the frame that references it

visible.value = false

//later in the other cases.

Is something like that possible in labview? I haven't been able to find it yet.

Thank You

Paul

Link to comment

There aren't any text commands in labview for setting control properties.

If you right click on a control, and select CREATE >> PROPERTY NODE. You can use the property node to change any property of that control from visibility to value to color, etc. You'll have to "CHANGE ALL TO READ" to set property values.

If you're using the property node in the same scope as your control terminal, you don't have to feed it a refnum. If it's in a different scope (i.e. a different subVI) then you will have to pass control reference from the desired control to the subroutine that will change the property. To create a control reference simply right click on the control, and CREATE >> REFERENCE.

I've attached an image with both methods using flat sequence nodes just as an example and changing the value of the control. As I said before, there are many other control properties you can control with these methods as well.

Link to comment

Paul,

Here is a total different approach:

If your case structure is inside an event structure and one of these "indicators" is in reality the control (happened also to me) from which you're servicing the event, then your can get problems. Check the elements that they are indicators. But if on is intended to be a control then make sure to read the control (put the control itself, not a local variable from it, into the event structure) bevore you wire a local variable and property node.

Getting an event from an frontpanel-element does NOT mean reading the element.

Didier

post-10-1088754637.jpg?width=400

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.