How can you use an external button for freedrive mode

I have found a solution, that works for me. I used @Ebbe 's ScriptCommunicator URCap, specifically the proxy class. I wrote the set_standard_digital_in(port, mode) function according to the already written methods, then I could use it to set any digital input to freedrive in my URCap Contribution’s constructor, or later if a user changes the port.

Also, while I’m here, I figured out how to use an external button to do basically anything. To get a waypoint on push, I created an onPush() method, that adds an already configured waypoint to the current move node. This method is called in a Runnable class’ overwritten run() method, which is called in SwingUtilities.InvokeAndWait(runnable). I put this in a Thread and started the monitoring of the button in the constructor of the URCap, but that can be changed too.

Viktor

2 Likes