This is a Robots plugin and URScript question
Using the Robots plugin for grasshopper we are able to generate movement commands easily. However, we have a custom extruder that uses Modbus register. First we need a code similar to this at the initialization.
modbus_add_signal("127.0.0.1", 255, 0, 16, "output2", False, 10)
list_var:=[10,9,8,7,6,5,4,3,2,1]
This part can be added easily using the Init commands
input to the Create Program
component.
Then at every movement we would need to set the extruder speed and orientation (our extruder orientation changes) using a custom code like this:
modbus_set_output_register("extruder_speed", 1500 , false)
modbus_set_output_register("extruder_orientation", 45 , false)
Is there a way from inside the robot plugin to add our custom extruder code to every line movement? This of course has to run in parallel to the movement and not cause interruptions in the movement of the robot.
Any help will be appreciated!
Note: the program below is incorrect because modbus_set_output_register
only runs once during initialization