User Tools

Site Tools


mycnc:servo_on_off

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
mycnc:servo_on_off [2019/10/21 14:54]
ivan
mycnc:servo_on_off [2019/10/21 15:14] (current)
ivan
Line 27: Line 27:
 {{:​mycnc:​software-plc-002-handler-init.png}} {{:​mycnc:​software-plc-002-handler-init.png}}
  
-As can be seen, writing 1 to the register 60000 will turn the PIDs on, while writing 1 to register 60001 will turn the servo PIDs off. This will also be used in manual servo control, where button can be utilized to quickly switch the motor on and off. +As can be seen, writing 1 to the register 60000 will turn the PIDs on, while writing 1 to register 60001 will turn the servo PIDs off. This will also be used in manual servo control, where an on-screen ​button can be utilized to quickly switch the motor on and off.
  
-In order to do so, it is necessary to have the %%__HANDLER_SERVO_ON%% and %%__HANDLER_SERVO_OFF%% commands in the Software PLC section. These can be extremely similar to the INIT and EXIT commands shown above, as they effectively perform the same task (differences begin to crop up only when additional actions are required on servo startup, or on program start, etc). By default, the following code is required for each respective PLC command: ​ +In order to do so, it is necessary to have the %%__HANDLER_SERVO_ON%% and %%__HANDLER_SERVO_OFF%% commands in the Software PLC section. These can be extremely similar to the INIT and EXIT commands shown above, as they effectively perform the same task (differences begin to crop up only when additional actions are required on servo startup, or on program start, etc). By default, the following code is required for each respective PLC command:
  
 <code c __HANDLER_SERVO_ON.PLC>​ <code c __HANDLER_SERVO_ON.PLC>​
mycnc/servo_on_off.txt ยท Last modified: 2019/10/21 15:14 by ivan