Skip to content

EbbeFuglsang/Modbus_URCap

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

Modbus_URCap

A tool modbus RTU URCap.

The URCap runs on port: 40408 on a daemon. Following script functions is added by this URCap:

  • init_tool_modbus(address) where port is string and address is an int.
  • tool_modbus_write(register_address, data) both parameter is an int.
  • tool_modbus_read(register_address) parameter is an int.

The RS485 settings is controlled with the built in function:

set_tool_communication(enabled,baud_rate,parity,stop_bits,rx_idle_chars,tx_idle_chars)

And tool supply voltage is controlled with:

set_tool_voltage(voltage)

An example script program (with OnRobot VGP20):

set_tool_voltage(24)
set_tool_communication(True, 1000000, 2, 1, 1.5, 3.5)

init_tool_modbus(65)

while True:
               tool_modbus_write(0,60)
               sleep(1)
               tool_modbus_write(0,0)
               sleep(1)
end

About

A tool modbus RTU URCap

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 97.0%
  • Java 3.0%