81
value has a range from -32768 to 32767.
Return Value:
none
Example:
modbus_write_r(“mbus1”, 255);
modbus_set_frequency(string : signal_name, int : frequence);
Function Description:
This command can change the refresh frequency of the modbus node.
The default frequency is 10Hz.
Parameters Description:
signal_name : It represents the name of the modbus node.
frequence : It represents the value of the refresh frequency of the
modbus node. Its value has a range from 1Hz to 100Hz.
Return Value:
none
Example:
modbus_set_frequency (“mbus1”, 20);
modbus_add_signal(string : IP, int : slave_number, int : signal_address, int :
signal_type, string : signal_name);
Function Description:
This command can add a modbus node. User can also manually add
modbus nodes in the system settings.
Parameters Description:
IP : It represents the IP address of the modbus server. Its format is a
string surrounded by “”.
slave_number : It represents the slave number.
signal_address : It represents the node’s address offset.
signal_type : 0: Read Discrete Input (1x)
1: Read Write Coils (0x)
2: Read Input Register (3x)
3: Read Write Holding Register (4x)
signal_name : It represents the name of the modbus node.
Return Value:
none
Example:
modbus_add_signal (“127.0.0.1”, 1, 3, 0, “mbus1”);
modbus_delete_signal(string : signal_name);
Function Description:
This command can delete a modbus node. User can also manually
delete the modbus node in the system settings.
Parameters Description: