Mitsubishi TCP Booleans won't write from Ignition

I configured the Mitsubishi TCP driver for an IQR PLC. I can read and write to float and Int tags, and I can read a Boolean tag, but when I try to write to the same boolean tag in the tag browser I get the following error

Error writing to TestMitsuBIN.value: Bad("Bad_NotSupported: The requested operation is not supported.")

I have set up the tag address as both D6001.0 and as D6001.0 in the device connections address table and neither way works. Any help would be much appreciated. thanks

Hmm, the driver implementation seems to think this area (Device in Mitsubishi terms) isn't a supported target for bit write commands... but I'm not sure if that's correct or not.

I need to talk to someone else and look into this further. You're not doing anything wrong here configuration-wise.

Okay, went back to confirm this...

This area (Device) ((D / data registers)) is natively 16-bit words, and the bit-level write commands do not work on them.

Like with Modbus when a device doesn't support Mask Write Register, you will have to read the value, flip the bits you want, then write a new value. It is prone to race conditions because the value in the PLC could change while you do this. We choose not to hide this racey behavior by doing this read/modify/write in the driver.

Thanks Kevin. To make sure I understand correctly, when you say "you will have to read the value, flip the bits you want, then write a new value," you mean I will have to write to the entire word from Ignition, correct?

Do you know if there are any registers in the IQR PLC that the ignition driver can directly write to at the bit level? Or are all the registers on this device going to behave the same way?

Yes

Anything listed as a Bit type here: Mitsubishi TCP Driver - Ignition User Manual 8.1 - Ignition Documentation

I have personally been using the M Bit Registers so far for Bool Read/Writes

2 Likes

I would do exactly the same - it does not seem like Ignition is good with drilling down into D devices to bit level.

It will happily read the bits because it can be done safely. It just won't pretend writing to them isn't a race condition.

2 Likes

I just tried using the M bits for writes as well. Looks like that should work for my purposes.