Advanced Modbus Driver - Usefulness of the Value Error

I see this error in the designer when I try to write a masked BIT to a holding register. Tag is Boolean datatype.

Might interest…@pturmel @Andres_Rossi

1 Like

It means the device doesn't support the masked write function code, so cannot write to holding register bits.

1 Like

Hi Phil,
is there a workaround to write the bits of a HR register more directly?
Drivers like Kepserver solve this by first reading the register, then modifying the value according to the bit to be written, and finally writing the new value to the HR register. And it does this transparently, meaning without needing to write any scripts or anything.

Regards, Andrés

No. Neither my driver nor IA's driver will do this for you. This is a source of terrible bugs when the PLC also does any writes to the same register. I will not implement any such thing.

If you feel you must, you should make derived tags to get/set booleans, and use the optimistic writes tag group setting to consolidate writes when applicable.

(Or switch to a hardware brand that properly supports this function code. Schneider is the the biggest culprit, but not the only one.)

1 Like