Modbus OPC Coil tag "Bad_ReadOnly" error message

Hi everyone,

I am migrating from WW to Ignition. I am trying to implement a button that resets my system.

When testing, I am getting this error message "Error writing “1” to tag B-Rst.value Bad_ReadOnly"

The tag is tied to a coil in the plc (the address is C17 for reference). I have tried scripting using the actionPerformed and writing a 1 or 0 to the tag’s value and I also tried binding the tag.value to the control and indicator properties on the button. I made sure to check bidirectional when binding the tag.value to those properties.

Some other things I have checked:

  • Checked bidirectional is selected

  • Tag Editor “read Only” is set to False and Write permissions set to Public

  • I am able to read data from the PLC into Ignition but I cannot write back to the PLC.

Any idea why I am unable to write to that bit in the PLC?

Thanks
-Roumaldo

Are there any errors in the logs on the Ignition Gateway?

Are you testing this in the Designer but haven’t turned the comm mode to Read/Write?

Thanks for the response.

There are no errors in the Gateway log.

I have tested this button in Designer with comm mode set to Read/Write as well as in the Vision client. I can force the PLC bit ON and see the value change inside Designer.

It’s hard to tell where this error is coming from right now.

Can you try doing a system.opc.writeValues call from scripting to write to it?

You can also search for “WriteSingleCoilRequest” and “WriteMultipleCoilsRequest” in the log levels area and set it to TRACE. If the write is getting that far we’ll see a request and response for it.

https://docs.inductiveautomation.com/display/DOC81/Diagnostics+-+Logs#DiagnosticsLogs-ChangingLoggingLevels

Here is the script for the button along with the previous methods I have attempted. And the console log within designer when testing.


Searching for “WriteSingleCoilRequest” and “WriteMultipleCoilRequest” did not return anything.


I did filter for “Write” and got this piece of info in the LogFile

The modbus loggers would be in the gateway log only.

Thank you I was able to filter for the Modbus loggers in the gateway. Still don’t see any write log back to the PLC.

I should have clarified in the beginning, I am using an Automation Direct Productivity 2000 PLC and the tag I am trying to control is at modbus address 000017.

Thank you for the help. I was able to get in contact with the engineer who setup our Ignition gateway and found that the OPC UA Server was set to read only. Disabled “read Only” and now I can write to the PLC.

1 Like