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.
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.
11-06-2015 02:31 AM
Hello, I am trying to develop a programm for wich I want to be able to open and close valves by means of toggle switches. So I want to be able to open and close valves individually. However, it should also be possible to close all valves (and switch the toggles down) by pressing a one shot button. I insist on using toggle switches, which visualy also toggle to the close position when pressing this "close all" one shot button. My reason for insisting on this, is because I am trying to develop an exact copy of a programm which is written in Labwindows. In this original program it works like this, and I am convinced it should be possible. Having spend already 3 days, trying numerous options, like "create local variable" and "Create property node" I still didn't find out how to.
Sincere Regards, Theo de Groot
Solved! Go to Solution.
11-06-2015 03:58 AM
Please post the vi you have so far (not just a screen shot).
The we'll be able to help fix your code.
11-06-2015 04:14 AM
Hi Theo,
as you're working with boolean controls to control boolean actuators you should use boolean functions to incorporate your boolean "toggle shutoff" logic!
Either use AND or OR function (depending on the active SHUTOFF state)…
to develop an exact copy of a programm which is written in Labwindows. … Having spend already 3 days
Don't you have access to the source code to look there for a solution? Otherwise the programming language used to create that "original program" is irrelevant…
11-06-2015 06:01 AM
11-06-2015 06:35 AM
Hi,
This simple example think can help You. use Functions-->Booleans for creating Your logic.
With best Regards
Hrachya
11-06-2015 08:54 AM
Where's your terminal? If you're trying to make changes to a control, but it's outside a loop, local variable and property node changes are not going to effect your program inside the loop.
11-09-2015 04:59 AM
Dear Florian,
In the attachment you will find what I have come up to until now. In the finall program, more valves should be closed by this one button, but since this does not add anything to the discussion, I only send this piece of code.
So, I insist on using these toggle switches, which will also switch to the closed position when I press "close all".
This "create local variable" is one of the options I found on the tutorials , and does something. But as you can see, the proplem is, the switch will not be bistable anymore, and will only work momentary. So this is not the solution for me.
"My goal of this post: using several toggle switches, to open and close valves, and one "close all" reset button to close them all at once, and also the toggle switches should switch to the closed position".
Sincere Regards, Theo de Groot
11-09-2015 05:08 AM
Dear GerdW,
The original code is written in C (Labwindows), a language which I do not understand. I only have a frontpanel which we want to recreate (copy), and I know what the machine should do.
"And" and "Or"buttons are an option of course, but the core of this problem, in my opinion, is that a toggle switch is only a control (without an input to have influence to it, from a second place). In the tutorials I read, a "local variable" and/or "property node" should do the trick. But spending much time to find a program which uses this, I did not succeed to find out how exactly.
"My goal of this post: using several toggle switches, to open and close valves, and one "close all" reset button to close them all at once, and also the toggle switches should switch to the closed position".
Sincere Regards, Theo de Groot
11-09-2015 05:10 AM
Dear Hrachya,
Thanks for this input, but you are using buttons, I want to use toggle switches.
"My goal of this post: using several toggle switches, to open and close valves, and one "close all" reset button to close them all at once, and also the toggle switches should switch to the closed position".
Sincere Regards, Theo de Groot
11-09-2015 05:17 AM