Clearing Errors using Virtual Ports in C


I am trying to write a simple C program the controls a linear actutator. I am having a little trouble with getting the motor controller to start correctly. Right now, to get the program to move the actuators i either need to start the motor controller with the JRK utility, or turn the power on for the motor cotrollers AND THEN plug in the USB. If the i have the USB plugged in to my laptop before i turn on the power, it will not work. Is there some way I can clear the errors at the start of my program so it will work if i have my USB’s plugged in before my power is turned on?



It sounds like you are getting the “No power” error and that it is set to “Enabled and latched”. If you want to clear the errors using serial communication, you could send the “Get Error Flags Halting” command, which is described in the “Error Reporting Commands” section of the jrk controller’s user’s guide.

Alternatively, if you do not need the “No power” error to latch, you can change the setting for this error in the “Errors” tab of the Jrk Configuration Utility to “Enabled”. This should automatically clear the error once you apply power.