Query: modbus_set_slave
OS: debian
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
MODBUS_SET_SLAVE(3) Libmodbus Manual MODBUS_SET_SLAVE(3)NAMEmodbus_set_slave - set slave number in the contextSYNOPSISint modbus_set_slave(modbus_t *ctx, int slave);DESCRIPTIONThe modbus_set_slave() function shall set the slave number in the libmodbus context. The behavior depends of network and the role of the device: RTU Define the slave ID of the remote device to talk in master mode or set the internal slave ID in slave mode. According to the protocol, a Modbus device must only accept message holing its slave number or the special broadcast number. TCP The slave number is only required in TCP if the message must reach a device on a serial network. The special value MODBUS_TCP_SLAVE (0xFF) can be used in TCP mode to restore the default value. The broadcast address is MODBUS_BROADCAST_ADDRESS. This special value must be use when you want all Modbus devices of the network receive the request.RETURN VALUEThe modbus_set_slave() function shall return 0 if successful. Otherwise it shall return -1 and set errno to one of the values defined below.ERRORSEINVAL The slave number is invalid.AUTHORSThe libmodbus documentation was written by Stephane Raimbault <stephane.raimbault@gmail.com[1]>NOTES1. stephane.raimbault@gmail.com mailto:stephane.raimbault@gmail.com libmodbus 3.0.3 05/26/2012 MODBUS_SET_SLAVE(3)
Related Man Pages |
---|
modbus_new_tcp(3) - debian |
modbus_reply_exception(3) - debian |
modbus_rtu_get_serial_mode(3) - debian |
modbus_report_slave_id(3) - debian |
modbus_set_error_recovery(3) - debian |
Similar Topics in the Unix Linux Community |
---|
Installing os on slave |
slave bind name resolution inquiry |
P520 AIX com port (tty0) settings |
ModbusPal: New release WIP-1.3 |
TCP Same Ack Sequencing for Two Packets |