- #MASTEROPC UNIVERSAL MODBUS SERVER HOW TO#
- #MASTEROPC UNIVERSAL MODBUS SERVER SOFTWARE#
- #MASTEROPC UNIVERSAL MODBUS SERVER CODE#
User-defined URScript functions allow a user to perform the above multi-step process easily with a single function call. User defined URScript functions to simplify the process Calling write_port_register(128, modified_int) will set the value 733 in register address 128.
![masteropc universal modbus server masteropc universal modbus server](https://dic.academic.ru/pictures/wiki/files/77/MasterOPC_design.jpg)
The converted value can be written to the Modbus TCP server register using the command write_port_register(, ). Modified_int = binary_list_to_integer(sample_list) = 733 This can be done using the URScript command binary_list_to_integer().Īfter modifying sample_list as above, converting it to an integer returns the value 733. Before the register can be updated with the modified value, the list must be converted back to an integer value.
#MASTEROPC UNIVERSAL MODBUS SERVER CODE#
This integer value can be modified directly by adding or subtracting other integers but this method is prone to mistakes and code written this way is difficult to read. This command will return an integer value between 0 – 65535. Modbus TCP server registers can be read from a program using the URScript command read_port_register(). Reading values from the Modbus TCP server registers.
![masteropc universal modbus server masteropc universal modbus server](https://accutroninstruments.com/wp-content/uploads/2018/02/Commtrax-a4.png)
A complete description of these commands and user-defined functions can be found in the URScript Manual.
![masteropc universal modbus server masteropc universal modbus server](https://buy.csimn.com/assets/images/bb2-2010.jpg)
This guide also introduces sample user-defined URScript functions to facilitate the use of the above commands. This process allows you to treat each bit as an individual on/off signal.
#MASTEROPC UNIVERSAL MODBUS SERVER HOW TO#
This guide explains how to use the following URScript commands to 1) read an integer from a server register, 2) convert it to an easily modifiable list, 3) converted the modified value back to an integer, and 4) write the modified value to a server register. The following method is a recommended approach for accessing each bit individually and maintaining a readable program. Up to 16 on/off or other binary signals can be consolidated in a single register instead of using a different address for each. Universal Robots’ Modbus TCP server provides 128 general purpose 16-bit registers (addresses 128-255).
#MASTEROPC UNIVERSAL MODBUS SERVER SOFTWARE#
Note that older or newer software versions may behave differently.īinary signals using the Modbus TCP server