2-state toggle only working one way

i have two 2-state toggles both bi-directional. for some odd reason I can toggle them “on” but not “off”. in the ladder i’m toggling the manual on/off for the valve and pump. its like it latches somehow but my code only uses that instruction in one spot idk why it has trouble with it.




tag1
tag2

I would play around with this component just using a memory tag. What you will probably find is you don’t have the correct bindings. Typically you will bind both control and indicator values to the same tag. If you only bind the control value I don’t think it will work correctly.

Hard to tell what you have with those screenshots.

Hmm I thought they were capable of being individually bound but I can try them the same.

For example control is bound to button and indicator is bound to output.

Very weird

The indicator is not bidirectional but I don’t think that would make a difference

It makes me sad that you’re using PLC addresses for your tag names in Ignition, especially considering they’re old-style address-based instead of symbolic names :frowning: This would it impossible to create your projects in a nice way. Especially with address-based PLC tags, it’s super important to create your Ignition tags with structured logical names e.g. grouped by area, sub-areas, devices, etc. with English/other human language names to make the graphics creation and future expansion and maintenance efficient

2 Likes

Unfortunately I’ve tried and management won’t approve my time to set up everything properly.

I also noticed that there is a duplicate device connection for this plc. But I have to verify everywhere before I start breaking paths for stuff lol

I say good luck then to the next person who comes along to support it :confused: It’s their own foot they’re shooting, and yours

I would be more concerned with how the manual controls are being used. If someone leaves the toggle on then the next time they switch to manual it will come on immediately.

2 Likes

I was assuming/hoping that there is a hidden unlatch.

1 Like

Absolutely unfortunately I’m still basically titled a mechanic there and that is main priority. This isn’t some they even a lot a specific amount of time for me to work on. But I’ve already been cleaning it up with what little time I have.

@jlandwerlen thats fine for this use case.

@lrose nope unlatch or latch in it. Regardless of the bad practices in the system. I don’t see why the indicator can’t have a different binding than the control
Value

It can, I tested with using a different binding, my point was to test with the same binding to rule out your PLC program.

It is how the 2 state toggle is designed and I have been through this with support before.
What you CAN do, is not use the binding to write and just script the value write.
Set the control value to not bidirectional, then in the action performed script just write the NOT of the control value to the tag.

value = not event.source.controlValue
system.tag.writeBlocking(['[default]PathToBoolTag'], [value])

I tested three ways:

  1. Control and indicator bound the same
  2. Control and indicator bound differently, control to a memory bool, indicator to a derived tag (sourced to the tag bound for the control)
  3. Control and indicator bound differently, control to a memory bool, indicator to an alarm for this tag with 1 second on/off delay

All worked fine. Remove your PLC program from the equation for now and test with memory tags, once you get that working move on to OPC tags.