Error writing to 'tag'. value bad

Hello everyone, I'm trying to write a tag from the designer, and I'm encountering this error. The connection to the PLC is good, and there don't seem to be any issues with that. Any suggestions for a fix? Thanks.

  1. What makes you think there are no issues with the PLC connection?
  2. What type of tag? OPC?
  3. Can you read the tag in Tag Browser?
  4. What is the tag's Quality value?
  5. Can you write to the tag in Designer's Tag Browser? (You need Full read/write gateway communication allowed" on the Designer toolbar.)
  6. When you got the error was it as a result of trying to write to the tag in the Tag Browser or was it generated by a script?

Tip: screengrabs are usually better than screen photos. Crop them properly!

OPC Tag
i can read the tag in tag browser
the quality is good
im in read/write mode
it is result of trying to write to the tag from tag browser
thanks!!

  1. Is the tag's CanWrite property enabled?
  2. What type of PLC.
  3. What is the datatype in the PLC?
  4. What is the OPC tag datatype?
  5. What value are you trying to write?
  6. Does the PLC have a configuration to enable/disable tag writes?
2 Likes
  1. Is enabled
  2. AllenBradley ControlLogix L72
  3. Boolean
  4. Ignition OPC-UA Server
  5. True
    In previous days, this error didnt appear; the error persists
  1. Show the OPC Item Path in Ignition.

  2. Show that location in the PLC's Controller Tags, expanding the tree as needed, and showing the External Access column.

Damn I'm having the same issue but how did this one end!

hey Phil, you mean on the PLC software right? there's no external access on the Ignition side?

Yes, plc side.

  1. What makes you think there are no issues with the PLC connection? - All tags from this have good read quality, we can even write to a different tag but not the two we are targetting.
  2. What type of tag? OPC? - UDT, then tested with simple OPC
  3. Can you read the tag in Tag Browser? - Yes
  4. What is the tag's Quality value? - Good
  5. Can you write to the tag in Designer's Tag Browser? (You need Full read/write gateway communication allowed" on the Designer toolbar.) - No
  6. When you got the error was it as a result of trying to write to the tag in the Tag Browser or was it generated by a script? - Bad from tag browser, script and perspective control
  7. Is the tag's CanWrite property enabled? - ReadOnly is false
  8. What type of PLC - CompactLogix 1769-L35E
  9. What is the datatype in the PLC? - INT - 16 bits - tried writing to the bits, same result
  10. What is the OPC tag datatype? - Float4
  11. What value are you trying to write? - 2
  12. Does the PLC have a configuration to enable/disable tag writes? - Unknown, but Wonderware legacy system writes to these values and Ignition can write to other values on the same PLC
  13. Show the OPC Item Path in Ignition. - ns=1;s=[main_ip2a]Global.InfPumpAlt.Lead
  14. Show that location in the PLC's Controller Tags, expanding the tree as needed, and showing the External Access column. - External access is Read/Write

You will likely need a Wireshark capture of the failing write.

Also, consider testing with my alternate driver.

What happens if you change the OPC tag to a datatype of Integer?

IIRC Floats on Compact Logix are 32bit, so it might be complaining that its receiving a command to put a 32 bit float into a 16 bit int. I guess its partly up to how the driver handles that.

I'll double check but I played with the OPC tag type to Int, short, long and then boolean when I was trying to write to the bit.

Also the working (non-target tag) works with Float4 and appears the same on the PLC side.

Confirmed, no difference with different data types

@pturmel - Seen, I'll try those options.

I'm a firm believer in closing out these issues.
So after reading these points I went to the Edge (where our PLC connection is to install wireshark) and took a look at the logs.

We got back status code 15 and I passed that along to the client.
End result was a different set of registers to write to

1 Like