Re: getting the 57cnc to work with G540
Re: getting the 57cnc to work with G540
Hi Dan:
Its seeing a syntax error for some reason..
Did the spindle turn on and off with M3.. as it stands?
Art
Its seeing a syntax error for some reason..
Did the spindle turn on and off with M3.. as it stands?
Art
Re: getting the 57cnc to work with G540
yep on and off M3 on M5 off
Re: getting the 57cnc to work with G540
Dan:
Good, so all we need worry about then is that pin 20. Ill post a library script tomorrow after I test one
to make sure it works here. We'll track it down and get your power working shortly..
Thx
Art
Good, so all we need worry about then is that pin 20. Ill post a library script tomorrow after I test one
to make sure it works here. We'll track it down and get your power working shortly..
Thx
Art
Re: getting the 57cnc to work with G540
cool thanks art I have tried using glens code
this one fails
SetPWMDuty_1(2,map(GlobalGet("SpindleSpeed"),8000,18000,0.1,100));
this one does not fail it does something I will fire the machine up and run it again
SSpeed=GlobalGet("SpindleSpeed");
if (SSpeed>= 8000){SetPWMDuty_1(2,map(SSpeed,8000,18000,0.1,100));};
and a few other combo's from examples.
this one fails
SetPWMDuty_1(2,map(GlobalGet("SpindleSpeed"),8000,18000,0.1,100));
this one does not fail it does something I will fire the machine up and run it again
SSpeed=GlobalGet("SpindleSpeed");
if (SSpeed>= 8000){SetPWMDuty_1(2,map(SSpeed,8000,18000,0.1,100));};
and a few other combo's from examples.
Re: getting the 57cnc to work with G540
what spindle speed are you giving it?
If it is less than 8000 it won't do anything.
Change the 8000 to the min your spindle will turn.
The 18000 to the the max your will turn.
So like a min of 5rpm and max of 3000rpm would be
if (SSpeed>= 5){SetPWMDuty_1(2,map(SSpeed,5,3000,0.1,100));};
Glenn
Edit:
Quick explanation of the map function.
first value SSpeed is the value that you want the spindle to turn at.
second value is the minimum rpm of the spindle
third value is the maximum value of the spindle
fourth value is the minimum percentage of PWM that your spindle works at. .1 is a PIOOMA number I put in there.
fifth and final value is the max percentage of PWM your spindle works at so should normally be 100 for 100%
If it is less than 8000 it won't do anything.
Change the 8000 to the min your spindle will turn.
The 18000 to the the max your will turn.
So like a min of 5rpm and max of 3000rpm would be
if (SSpeed>= 5){SetPWMDuty_1(2,map(SSpeed,5,3000,0.1,100));};
Glenn
Edit:
Quick explanation of the map function.
first value SSpeed is the value that you want the spindle to turn at.
second value is the minimum rpm of the spindle
third value is the maximum value of the spindle
fourth value is the minimum percentage of PWM that your spindle works at. .1 is a PIOOMA number I put in there.
fifth and final value is the max percentage of PWM your spindle works at so should normally be 100 for 100%
Last edited by Anonymous on Tue Mar 01, 2016 5:26 pm, edited 1 time in total.
Re: getting the 57cnc to work with G540
I adjust the code for my spindle 5000 to 30000 well 17000 as it is now 0 to 3.3 vdc
if (SSpeed>= 5000){SetPWMDuty_1(2,map(SSpeed,5000,17000,0.1,100));};
it just does nothing it's to do with the relay only library I think. Art wrote in the adding a spindle to Auggie that relay only has no speed control
I did something yesterday that almost got it to work.
I do have the 0 to 10 vdc pin 17 PWM 1 option still
if (SSpeed>= 5000){SetPWMDuty_1(2,map(SSpeed,5000,17000,0.1,100));};
it just does nothing it's to do with the relay only library I think. Art wrote in the adding a spindle to Auggie that relay only has no speed control
I did something yesterday that almost got it to work.
I do have the 0 to 10 vdc pin 17 PWM 1 option still
Re: getting the 57cnc to work with G540
this is the error
21:25:775 --System -- System about to run.
21:25:790 Setting Spindle with 1
21:25:790 Relay Spindle was turned on with OC#1
21:37:316 Average time of scipt calls: 0.0150
21:41:972 --System -- System about to run.
21:41:988 Error in script run. Check log.!
21:41:988 Program Stopped!
21:41:988 Script killed or triggered exception,check log.
21:25:775 --System -- System about to run.
21:25:790 Setting Spindle with 1
21:25:790 Relay Spindle was turned on with OC#1
21:37:316 Average time of scipt calls: 0.0150
21:41:972 --System -- System about to run.
21:41:988 Error in script run. Check log.!
21:41:988 Program Stopped!
21:41:988 Script killed or triggered exception,check log.
Re: getting the 57cnc to work with G540
Dan:
Ive found a bug in the PWMPeriod setting, it shouldnt have affected you though as your not setting period. The SuperPID doesnt care
about PWM period, its just a DC averaging circuit.
A new version was just uploaded to correct this error, and I added Spindle speed pn PWM(2) pin 20 as athe default for relay mode..
So install it, ignore the new screen items, the system is now capable of laser control in motion and the new
screen items relate to that.
Now try the following line in single line mdi and you should get text messages on each..
I have changed the Spindle-Relay library so it should match your system, (As I have no other relay users
I know of, no reason yours cannot be the base settings..)
m3
(should tell you spindle is now on, and period is set to 1ms )
S15000
(should tell you speed is now set to 60%)
Speed is set to a max of 25000 in the script ,
you may edit it to be anything you like as a max,
I just set it to 25000 as a simpel example.
M5
(Message you shut off spindle)...
See what happens with that... new version is now online..
Art
Ive found a bug in the PWMPeriod setting, it shouldnt have affected you though as your not setting period. The SuperPID doesnt care
about PWM period, its just a DC averaging circuit.
A new version was just uploaded to correct this error, and I added Spindle speed pn PWM(2) pin 20 as athe default for relay mode..
So install it, ignore the new screen items, the system is now capable of laser control in motion and the new
screen items relate to that.
Now try the following line in single line mdi and you should get text messages on each..
I have changed the Spindle-Relay library so it should match your system, (As I have no other relay users
I know of, no reason yours cannot be the base settings..)
m3
(should tell you spindle is now on, and period is set to 1ms )
S15000
(should tell you speed is now set to 60%)
Speed is set to a max of 25000 in the script ,
you may edit it to be anything you like as a max,
I just set it to 25000 as a simpel example.
M5
(Message you shut off spindle)...
See what happens with that... new version is now online..
Art
Re: getting the 57cnc to work with G540
I do it in a few hours got school run and collect a dead mans shoe's
Re: getting the 57cnc to work with G540
Hi art the spindle is working as it should thank you.
now bug's I tried running the roadrunner G code it fail's, spindle starts it starts to move then just stops.
I tested on the USB and Ethernet cables same problem on both.
Error log attached.
I tried the AASubroutineTest as well it fail's as well.
I will try doing a new set up in case something is off in the one I am use now and turn A axis of in pokeys and Auggie.
now the fun can start
now bug's I tried running the roadrunner G code it fail's, spindle starts it starts to move then just stops.
I tested on the USB and Ethernet cables same problem on both.
Error log attached.
I tried the AASubroutineTest as well it fail's as well.
I will try doing a new set up in case something is off in the one I am use now and turn A axis of in pokeys and Auggie.
now the fun can start
- Attachments
-
[The extension txt has been deactivated and can no longer be displayed.]
Re: getting the 57cnc to work with G540
it's alive
Last edited by DanL on Wed Mar 02, 2016 11:58 am, edited 1 time in total.
Re: getting the 57cnc to work with G540
Dan:
That Error datum seems to indicate a disconnection on your network.. if it happens alot, try setting the network delay to zero in the config..
Also, make sure the feedrate override is UP, if at zero, things will run to a g1 and seem to stop.. till you slide the override up..
Thx
Art
That Error datum seems to indicate a disconnection on your network.. if it happens alot, try setting the network delay to zero in the config..
Also, make sure the feedrate override is UP, if at zero, things will run to a g1 and seem to stop.. till you slide the override up..
Thx
Art
Re: getting the 57cnc to work with G540
yer I worked out it was the feed over ride.
set the delay to 0 from 1 it made no differences, then light bulb feed override, error gone.
it has a sometimes bug that pop's up, it come's up to many axis for this command and crashes. I have all other axis set to off now.
another one I have found is when it get's to the end of a file it stops 4 line's short of the end of the G code (roadrunner).
once I sort my camera out I will show it in a sort vid.
other than that nothing else seems wrong.
set the delay to 0 from 1 it made no differences, then light bulb feed override, error gone.
it has a sometimes bug that pop's up, it come's up to many axis for this command and crashes. I have all other axis set to off now.
another one I have found is when it get's to the end of a file it stops 4 line's short of the end of the G code (roadrunner).
once I sort my camera out I will show it in a sort vid.
other than that nothing else seems wrong.
Re: getting the 57cnc to work with G540
Thanks Dan:
A great many bugs still exist, but its getting better all the time. :)
Art
A great many bugs still exist, but its getting better all the time. :)
Art
Who is online
Users browsing this forum: No registered users and 13 guests