Digital output cannot be done with the Python sample program


Q. Even if multiple bits are digital output with function code [FC15], only bit 0 reacts.

 

A. For example, with the combination of CPSN-MCB271-S1-041 and CPSN-DO-08BRL,
    even if the sample program is executed with function code [FC15] in order to "turn all digital output bits ON",
    only output bit 0 reacts, other bits do not react.

 

   [Example 1]

   Input Number: 0 (Init)

   Input IP Address: 10.1.1.101
   Input TCP Port Number: 502

   Input Number: 7 ([FC15] WriteMultipleCoils )

   Start Address: 0
   Data Length: 8
   Write Data (bin): 11111111
   Send OK !

   -----
   In the above case, for the source code of the same sample program,it is necessary to specify the state of each bit individually.
   Write Data (bin): 11111111
   ⇒
   Write Data (bin): 1 1 1 1 1 1 1 1

   

   [Example 2]

   Write Data (bin): 10101010
   ⇒
   Write Data (bin): 1 0 1 0 1 0 1 0

   

   [Example 3]

   Write Data (bin): 01010101
   ⇒
   Write Data (bin): 0 1 0 1 0 1 0 1