Resurrecting an old project
Moderators: TomKerekes, dynomotion
-
- Posts: 9
- Joined: Wed Jan 08, 2020 11:43 pm
Resurrecting an old project
Hi Tom
I have decided to complete a part built router I started nearly 10 years ago using kflop & Kanalogue running Parker drives and servo's on kflop v4.22.
Will there be any problems upgrading to the latest firmware?
Arthur
I have decided to complete a part built router I started nearly 10 years ago using kflop & Kanalogue running Parker drives and servo's on kflop v4.22.
Will there be any problems upgrading to the latest firmware?
Arthur
- TomKerekes
- Posts: 2677
- Joined: Mon Dec 04, 2017 1:49 am
-
- Posts: 9
- Joined: Wed Jan 08, 2020 11:43 pm
Re: Resurrecting an old project
Hi Tom
Is there any way in finding my old forum posts from September October 2010 so that I can figure out my old settings?
Regards
Art
Is there any way in finding my old forum posts from September October 2010 so that I can figure out my old settings?
Regards
Art
- TomKerekes
- Posts: 2677
- Joined: Mon Dec 04, 2017 1:49 am
Re: Resurrecting an old project
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
-
- Posts: 9
- Joined: Wed Jan 08, 2020 11:43 pm
Re: Resurrecting an old project
Hi Tom,
I was unable to find the original posts in the forum so this has turned out to be a new setup using windows 10 as the old PC would not come back to life.
The machine is a simplec 3 axis router using parker servo's and drive's. Spindle will just be a relay switching router on and off.
I have managed to get servo's connected, tuned and have generated the C prog. Installed & configured the mach plugin but not sure what to do in Mach ports and pins settings.
I was going to set the router up in mach3 as my lathe and mill are running mach3 but now beginning to wonder if it is worth it.
I use Bobcad to generate my code files. I can't find a Bobcad post processor for Kmotion do you know of one?
Best regards
Arthur
I was unable to find the original posts in the forum so this has turned out to be a new setup using windows 10 as the old PC would not come back to life.
The machine is a simplec 3 axis router using parker servo's and drive's. Spindle will just be a relay switching router on and off.
I have managed to get servo's connected, tuned and have generated the C prog. Installed & configured the mach plugin but not sure what to do in Mach ports and pins settings.
I was going to set the router up in mach3 as my lathe and mill are running mach3 but now beginning to wonder if it is worth it.
I use Bobcad to generate my code files. I can't find a Bobcad post processor for Kmotion do you know of one?
Best regards
Arthur
- TomKerekes
- Posts: 2677
- Joined: Mon Dec 04, 2017 1:49 am
Re: Resurrecting an old project
Hi Art,
Since the Plugin and KFLOP generates the motion the Ports and Pins are mostly not used and are set to a dummy Port 0. See Step 6 here.I have managed to get servo's connected, tuned and have generated the C prog. Installed & configured the mach plugin but not sure what to do in Mach ports and pins settings.
No I'm not aware of one. Usually the one for Mach3 should be very similar. If you find one please add it to our wiki here.I was going to set the router up in mach3 as my lathe and mill are running mach3 but now beginning to wonder if it is worth it.
I use Bobcad to generate my code files. I can't find a Bobcad post processor for Kmotion do you know of one?
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
-
- Posts: 9
- Joined: Wed Jan 08, 2020 11:43 pm
Re: Resurrecting an old project
Hi Tom,
I have all 3 axis working and calibrated in Mach3 but having problems with homing.
Homing is disabled in mach3 and I am using a home c prog found on the forum as a starting point.
When I ref all I get a compilation error. I am only trying to home Z at the moment.
I am using pnp hall effect switches for homing connected to jp15 on kanalogue.
I have attached the home program I am trying to use but I get complication error.
I have not done a lot of programming but I think this is where I shelved this project 10 years ago.
Regards
Art
#include "KMotionDef.h"
//Plugin calls for Mach3 Home (actually Purge) Commands
main()
{
int flags = persist.UserData[5]; // Mach3 flags bit0=X, bit1=Y, Bit2=Z, etc...
printf("Mach3 Home Call, flags = %d\n",flags);
if (flags==1)
{
// do x homing here
}
if (flags==2)
{
// do y homing here
}
if (flags==4)
{
// do z homing here
}
int SaveZLimits; //place to save limit switch settings
DisableAxis(2) //Disable Z axis
SaveZlimits = ch2->LimitSwitchOptions; // save how limit is Set THIS IS WHERE ERROR STARTS
ch2->LimitSwitchOptions = 0 // disable the limit
EnableAxis(2) //enable Z axis and begin servoing where we are
//jog z-axis until it sees the limit
Jog(2,100); // jog slowly positive
while (!ReadBit(10)) ; // loop until IO bit goes high
Jog(2,0); // Stop
while (!CheckDone(2)); // loop until motion completes
DisableAxis(2); // Disable the axis
Zero(2); // zero the position
EnableAxis(2)); // renable the ServoTick
Move(2-1000.0); // move some amount inside limit
While (!CheckDone(2)); // loop until motion completes
ch2->LimitSwitchOptions = SaveZLimits; //restore limit settings
}
printf("Done\n");
}
I have all 3 axis working and calibrated in Mach3 but having problems with homing.
Homing is disabled in mach3 and I am using a home c prog found on the forum as a starting point.
When I ref all I get a compilation error. I am only trying to home Z at the moment.
I am using pnp hall effect switches for homing connected to jp15 on kanalogue.
I have attached the home program I am trying to use but I get complication error.
I have not done a lot of programming but I think this is where I shelved this project 10 years ago.
Regards
Art
#include "KMotionDef.h"
//Plugin calls for Mach3 Home (actually Purge) Commands
main()
{
int flags = persist.UserData[5]; // Mach3 flags bit0=X, bit1=Y, Bit2=Z, etc...
printf("Mach3 Home Call, flags = %d\n",flags);
if (flags==1)
{
// do x homing here
}
if (flags==2)
{
// do y homing here
}
if (flags==4)
{
// do z homing here
}
int SaveZLimits; //place to save limit switch settings
DisableAxis(2) //Disable Z axis
SaveZlimits = ch2->LimitSwitchOptions; // save how limit is Set THIS IS WHERE ERROR STARTS
ch2->LimitSwitchOptions = 0 // disable the limit
EnableAxis(2) //enable Z axis and begin servoing where we are
//jog z-axis until it sees the limit
Jog(2,100); // jog slowly positive
while (!ReadBit(10)) ; // loop until IO bit goes high
Jog(2,0); // Stop
while (!CheckDone(2)); // loop until motion completes
DisableAxis(2); // Disable the axis
Zero(2); // zero the position
EnableAxis(2)); // renable the ServoTick
Move(2-1000.0); // move some amount inside limit
While (!CheckDone(2)); // loop until motion completes
ch2->LimitSwitchOptions = SaveZLimits; //restore limit settings
}
printf("Done\n");
}
- Attachments
-
- HomeParkerMach3.c
- Home C prog
- (1.21 KiB) Downloaded 166 times
- TomKerekes
- Posts: 2677
- Joined: Mon Dec 04, 2017 1:49 am
Re: Resurrecting an old project
Hi Art,
If you compile/test your program in KMotion.exe first it should indicate which line has a problem and what the error is.
#1 - some statements don't have a semicolon at the end
#2 - a Move function needs 2 parameters separated by a comma
#3 - the code to do the z homing should be inside the 'if' statement not after it. You might read this.
HTH
If you compile/test your program in KMotion.exe first it should indicate which line has a problem and what the error is.
#1 - some statements don't have a semicolon at the end
#2 - a Move function needs 2 parameters separated by a comma
#3 - the code to do the z homing should be inside the 'if' statement not after it. You might read this.
HTH
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
-
- Posts: 9
- Joined: Wed Jan 08, 2020 11:43 pm
Re: Resurrecting an old project
Thanks Tom
That's it working on the x axis. Just need to add the other axis's again.
I had edited program to home only the x axis and noticed the missing semicolon and comma.
Regards
Art.
That's it working on the x axis. Just need to add the other axis's again.
I had edited program to home only the x axis and noticed the missing semicolon and comma.
Regards
Art.
-
- Posts: 9
- Joined: Wed Jan 08, 2020 11:43 pm
Re: Resurrecting an old project
Hi Tom
All axis are working well and the router has been running g code both in kmotioncnc and mach3. This was with the 24v to enable the servo amps hard wired.
The only problem was that on power up the servo's started moving until kmotion or mach was initialsed.
I then fitted a relay to switch the 24v to the drives using the fet o/p SWE when mach3 initialsed.
When mach3 was inialised the relay triggered activating the drives without any movement. But after a couple of seconds the error KMOTIONDLL Read fail auto disconnect message appeared and the servo's started to creep. This did not happen when the 24v to the drives was hard wired.
I have checked all grounds, there are no earth loops and I am using a good quality USB with ferrites on both ends. This is a V1 Kanalogue board.
Any ideas what could be causing this?
Regards
Art
All axis are working well and the router has been running g code both in kmotioncnc and mach3. This was with the 24v to enable the servo amps hard wired.
The only problem was that on power up the servo's started moving until kmotion or mach was initialsed.
I then fitted a relay to switch the 24v to the drives using the fet o/p SWE when mach3 initialsed.
When mach3 was inialised the relay triggered activating the drives without any movement. But after a couple of seconds the error KMOTIONDLL Read fail auto disconnect message appeared and the servo's started to creep. This did not happen when the 24v to the drives was hard wired.
I have checked all grounds, there are no earth loops and I am using a good quality USB with ferrites on both ends. This is a V1 Kanalogue board.
Any ideas what could be causing this?
Regards
Art