write many bits
res = modbus_writeBits(mbc, addr, data) [res, ierr] = modbus_writeBits(mbc, addr, data)
The Modbus connection created with modbus_newTcp or modbus_newRtu.
The address on device where bits should be write from.
A boolean or double matrix to write. Non-zero values are considered as TRUE.
The number of written bits. -1 if an error occured
Erreur number.
This function writes the status of bits (coils) from data
at the address
addr
of the remote device
The function uses the Modbus function code 0x0F (force multiple coils).
When called with one output argument, a Scilab error will occur when the writing fails. When called with two output arguments, no Scilab error will occur but ierr
will contain the internal modbus error number.