Modbus TCP question

  1. Communication: Modbus Tcp

  2. Looking at the attached picture, I took the modbus type as a holding register. Can I split it into bits and use it?

  3. If it can be split into bits and used, how should tag mapping be done?

  4. Can the holding register be used as a boolean?

You wouldn't use a mapping. Just use bit-level addressing in an OPC item path.

{ Mapping configuration is entirely optional, and is only necessary in IA's driver if you want expose items in the OPC browser for drag-and-drop. All functionality is available without mapping via the address syntax in the linked page. I never use mappings, and recommend against them. }

I tried it the way you told me, but I succeeded in reading it, but I couldn't write it. An error has occurred.

What should I do in this case???????

That means the device doesn't implement Modbus function code 0x16 "masked write", which is necessary to not disturb the other bits of the given holding register. This means the target device is especially lame, as that function has been part of the modbus protocol from before it became public (many, many years ago). This is a common problem with Schneider processors.

In this case, you can only write the complete register. If the PLC is writing any bits in the register, trying to perform an external read-modify-write cycle is very racy and buggy.