Technical FAQs

Ask a Question

Does WRITE_VAR function block of M340 supports Modbus Function CODE FC06.

The Modbus Function Code 06 is used to preset single register value. In M340 PLC range the WRITE_VAR instruction
only support Function Code 16 (Write Multiple register) irrespective of the number of register is being written. If there is
only one register to write though it uses FC16. So using WRITE_VAR instruction it is not possible to write parameter in
the slave device which only support FC 06 to write any register value.  There is one way you can write to the device parameters
using FC06 and that is by using Function Block DATA_EXCH. You can design your own modbus query that can be transmitted
over Modbus network using this block. You can find more in details on how to use this FB in online help of Unity Pro.
Was this helpful?
What can we do to improve the information ?