Setting bits in WORDarray for Modbus library

While working with the Modbus TCP 5 library, I encounter a problem.

The goal is to send 4 single bits (coils) from the client side with FC15 over the Modbus and reading the bits at the server side.
As I understand now, in this case the data should be set in the Word array udtMB_TCP_FC15.arrOutputsValue (client side FC15) and read in the Word array: udtServer.arrModbusData (server side). Is there a function or function block available to set or reset certain bits in the WORD array? It seems like there is not such a function available in the programming environment of PLCnext Engineer (2019.6). Using one of the IEC safety functions like BITS_TO_WORD is not an option, because the AXC F 2152 does not support them. Is there another block available, or code to solve this? Thank you in advance for your response.

Hello,

Is there a function or function block available to set or reset certain bits in the WORD array?

If you have a WORD array named “MyModbusData”, then you can set or reset a single bit using the following format: MyModbusData[1].X2 The above example accesses the third bit (.X2) in the second WORD ([1]) of the “MyModbusData” array. You can set or reset this bit by assigning the value TRUE or FALSE to this variable. - Martin.