Toggle PLC bit on/off with Wonderware button

Ones_Zeros

Member
Join Date
Feb 2014
Location
at work
Posts
367
Hey Guys,
I have a normally closed contact in a PLC
I'm needing to create a button in
Wonderware to toggle this bit on & off

I have a button created but it
Just toggles the bit. I'm needing
It to changed the state of the bit
& hold it in that state until I push
The button again.

So for example:
Hit button#1 = auto (change bit to 0)
Hit button#1 again = manual ( change bit to 1)

I appreciate the help
 
The bit toggle function assigned to your InTouch pushbutton will do just that -- unless the bit's status is also being changed by the PLC.

I suspect that you have attempted to reference an IO input or output, rather than an internal bit. Either that or there is logic in the PLC program that establishes the bit's status.

A bit from the IO image table will be overwritten with it's actual status as determined by the IO module to which it is assigned, whereas a non-IO memory bit would retain the last status written to it by your InTouch IO Server program.
 
The bit I'm trying to change is the
PID.MO bit to put the PID in auto or manual.

How's the best way to create a button
In Wonderware to change this bit on/off?

Thanks
 
i've tried different types of buttons but I cant seem to get wonderware to keep the bit set to 1 or 0

im trying to write to the PID.MO bit from wonderware.

Im using "direct" action on the buttons

I can toggle the bit in the PLC & see it change in wonderware
but I cant change the bit status from within wonderware.

This is in systemplatform. Do i have an issue with my tagname?
something within wonderware systemplatform is not allowing me to write to the PID.MO bit in the PLC

I can even toggle the bit in object viewer in system platform & see the bit change in the PLC.

Im stumped....i appreciate the help
 
You do not want to use a "Direct" PB. It only sends 1 when button is down. When you release it goes to 0.
"Toggle" will send 1 when pushed and 0 when pushed again.
If you want to use an "On" PB and an "Off" PB.... then use "Set" for "On" PB and "Reset" for "Off" PB.


From Intouch "Help" on Touch Pushbutton animation link:


Right-click the object and then select Animation Links. The Animation Links dialog box appears.

In the Touch Pushbutton area, click Discrete Value. The Pushbutton -> Discrete Value dialog box appears.
In the Tagname box, type a discrete type tagname.
Click Key to assign a key equivalent to the link.
In the Action area, click one of the following types:
Click Direct to set the value equal to 1 as long as the push button is pressed and held down. The value automatically resets to 0 when the button is released.
Click Reverse to set the value equal to 0 when the push button is pressed and held down. The value automatically resets to 1 when the button is released.
Click Toggle to reverse the state of the discrete tag.
Click Reset to set the value equal to 0.
Click Set to set the value equal to 1.

Click OK.


....Intouch "Help" is your friend....

When using a toggle PB...to monitor state of PB...I usuallly put a small light in upper right corner of PB to show Green for "On" and Red for "Off".
The light is an "Ellipse" shape that you can configure "Fill color" - "Discrete". Start with "Yellow" fill color and then configure Green for On and Red for Off.
 
Last edited:
The bit I'm trying to change is the
PID.MO bit to put the PID in auto or manual.

How's the best way to create a button
In Wonderware to change this bit on/off?

Thanks


There are numerous ways to accomplish this, assuming that the PLC is allowing the bit to be controlled by the HMI. A simple test would be to create two buttons, one that sets the bit and one that clears the bit. If you operate these two buttons and the bit doesn't change states in the PLC, then you have a problem that isn't associated with your HMI pushbuttons. I don't know exactly how you are addressing this bit from your HMI, but there could be a problem there. I don't know if your PID Manual/Auto bit can be manipulated via the HMI. You might have to toggle a different bit in the PLC and write a line of code to toggle Manual/Auto in your PLC program logic.
 
Thanks so much guys for your
time & assistance with my issue.

Here is what I've done so far..

I have re-created this tag in standalone
Wonderware InTouch & got it to work
By creating a button & set the action to
"Toggle" I hit the button & it changes status
On my test InTouch screen & in PLC.

So I must not be configuring the correct tag
In the system platform application server.
Also, if I toggle the tag I'm using in the
"Object viewer" it works fine, but when I
Put this in a tag, I see it change state but
Then it changes back instantly.
I have the button configured to read this tag
& configured as "toggle"

Do you have any idea What I should try?
Also,what exactly is the correct syntax
When reading a tag from a galaxy application
Server?

Thanks again
 
Is the object in a security group?
If it is & you're not logged in with correct privilidge, what you are seeing will happen.
Since it is working in object viewer, the syntax must be correct.

Logger will show security errors
 
Thanks a lot for all of everyone's time & help with this issue!

Thats what it was. The object was in a security group
once i logged in with correct credentials it worked fine


Thanks again
this is a great forum with great people!
 

Similar Topics

Hey all, I'm an absolute beginer in PLC stuff. All i want is the PLC-5 to produce an output change evry second, i.e., every second the output...
Replies
8
Views
7,997
Hi, I'm just looking for a simple way to make a button in excel (via VBA I presume) to toggle a bit in RSLogix 5000. I just got FactoyTalkLinx...
Replies
9
Views
545
Hello good people! Attached is a very simplified version of a Zelio program containing what I am trying to do but it carries the same problem as...
Replies
8
Views
1,266
EDIT: I suppose i should mention, RSLogix 500 V8.40, SLC 5/04 (1747-L542C) Is there is a way to use the FFL instruction in a way that doesn't...
Replies
4
Views
864
I am trying to achieve a set/reset or toggle function withthe same input. Example: Push a button once, the motor or pump starts, push the same...
Replies
33
Views
8,158
Back
Top Bottom