Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for z not retracting before moving home #339

Merged
merged 1 commit into from
Dec 11, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions cnc_ctrl_v1/CNC_Functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ bool zAxisAuto = false;
#define MILLIMETERS 1
#define INCHES 25.4
#define MAXFEED 1000 //The maximum allowable feedrate in mm/min
#define MAXZROTMIN 12.60 // the maximum z rotations per minute
#define LOOPINTERVAL 10000 // What is the frequency of the PID loop in microseconds
#define MAXZROTMIN 12.60 // the maximum z rotations per minute
#define LOOPINTERVAL 10000 // What is the frequency of the PID loop in microseconds

int ENCODER1A;
int ENCODER1B;
Expand Down Expand Up @@ -373,6 +373,14 @@ bool checkForStopCommand(){
}

void holdPosition(){
/*

This function is called every time the main loop runs. When the machine is executing a move it is not called, but when the machine is
not executing a line it is called regularly and causes the motors to hold their positions.

*/
checkForStopCommand();

leftAxis.hold();
rightAxis.hold();
zAxis.hold();
Expand Down