Re: getting the 57cnc to work with G540
Re: getting the 57cnc to work with G540
ta still no go
Re: getting the 57cnc to work with G540
If that is a paste from your code I also missed that you had pinDia instead of pinDig
:)
Glenn
:)
Glenn
Re: getting the 57cnc to work with G540
I will have to double check, it compiles.
another question where should I put the code.
another question where should I put the code.
Re: getting the 57cnc to work with G540
this is what I have for spindle on off is this correct I have it in main Screen.
global SpindleOn = function()
{
SpindleDevice.SetPinDig( 45, 1); //turn on spindle
//you want pin 45 to be digital on or off, sounds like 0 is on, so..
print("Spindle was turned on with pin 45 = 0");
};
global SpindleOff = function()
{
SpindleDevice.SetPinDig( 45, 1); //turn on spindle
print("Spindle was turned off");
print("using pin45 ");
};
the other thing I can think of doing is changing the laser box to a spindle box would this work or just be a waste of time. I am going to have a break for a few hours it giving me a headache
global SpindleOn = function()
{
SpindleDevice.SetPinDig( 45, 1); //turn on spindle
//you want pin 45 to be digital on or off, sounds like 0 is on, so..
print("Spindle was turned on with pin 45 = 0");
};
global SpindleOff = function()
{
SpindleDevice.SetPinDig( 45, 1); //turn on spindle
print("Spindle was turned off");
print("using pin45 ");
};
the other thing I can think of doing is changing the laser box to a spindle box would this work or just be a waste of time. I am going to have a break for a few hours it giving me a headache
Re: getting the 57cnc to work with G540
it should go in the scripts library under Gcode then SpindleLib-RelayOnly it should be checked and the Gcode should be checked.
I think the 45,1 in the SpindleOn function should be 45,0 from the notes.
Glenn
I think the 45,1 in the SpindleOn function should be 45,0 from the notes.
Glenn
Re: getting the 57cnc to work with G540
thanks glen it's probable that is what is wrong going by art's not the code should be correct I just put it in the wrong place
thank you
thank you
Re: getting the 57cnc to work with G540
Art I have run into a problem, with glens help and me not reading what you said as do in that library,my bad I have done another library for the superpid just using the code out of the spindle relay only, and putting the changes what you said to do in it, I compile it comes up with no issues then I run it no problem's then when I go to check it back in it comes up with, no cntr Selected to update.
here is what I did
here is what I did
Code: Select all
// Library SpindleLib-RelayOnly
// Created Friday, January 22, 2016
// Author Art
// number of the OC "Open Collector output"
//on the pokeys that will trip a relay
//for spindle ON/OFF
global MySpindleOutput = 1;
global SpindleDevice = Motion();
//this is a relay spindle control,
//it will use only the OC output #1
//to control a relay to turn a simple
//on/off spindle, on or off.
global SpindleOn = function()
{
SpindleDevice.SetPinDig( 45, 1);
//SpindleDevice.SetOC( MySpindleOutput, 1); //turn on spindle
print("Relay Spindle was turned on with OC#" + MySpindleOutput);
};
//this is a relay spindle control,
//it will use only the OC output #1
//to control a relay to turn a simple
//on/off spindle, on or off.
global SpindleOff = function()
{
SpindleDevice.SetPinDig( 45, 0);
//SpindleDevice.SetOC( MySpindleOutput, 0); //turn on spindle
print("Relay Spindle was turned off");
print("using OC #" + MySpindleOutput);
};
//this is a relay spindle control,
//it has no speed control but this dummy
//routine will stop any error, and maybe
//test for zero speed.
global SpindleSpeed = function( speed )
{
//if an S000 is set, then turn the thing off
if( speed == 0 )
{
SpindleDevice.SetPinDig( 45, 1);
//SpindleDevice.SetOC( MySpindleOutput, 0); //turn on spindle
print("Relay Spindle was turned off");
};
};
Re: getting the 57cnc to work with G540
Did you use the "Lib" dialog box to check the script back in with. If you check it out with the Lib, you need to check in back in with the "Lib" dialog. Same with the the debugger checkout.
Maynard
Maynard
Re: getting the 57cnc to work with G540
Dan:
You can check in a library only if its a complete library file, it must have the name header and such in it. So
create a new library first, then check it out. Modify it with your code, and then check it in .
I cant find a message "no cntr Selected to update" in the program, can you check and see exactly what the message
is and Ill tell you why it occurs. It sounds as if your very close but are missing some syntax or routine, let
me know what youre getting and we'll trace it. Ill be away this morning, but this afternoon Ill write a description
of what may be happening..
Thx
Art
You can check in a library only if its a complete library file, it must have the name header and such in it. So
create a new library first, then check it out. Modify it with your code, and then check it in .
I cant find a message "no cntr Selected to update" in the program, can you check and see exactly what the message
is and Ill tell you why it occurs. It sounds as if your very close but are missing some syntax or routine, let
me know what youre getting and we'll trace it. Ill be away this morning, but this afternoon Ill write a description
of what may be happening..
Thx
Art
Re: getting the 57cnc to work with G540
It's what you get if you open a library in the scriptor, and try to check it back in via the check box on the scripting toolbar. :)
Re: getting the 57cnc to work with G540
Yes I had noticed that too if I used one of the three buttons.
But the place to check them back in is under the Library button, same dialog screen you checked them out with.
But the place to check them back in is under the Library button, same dialog screen you checked them out with.
Re: getting the 57cnc to work with G540
Ahh yes, I see.
There are 2 classes of scripts. Screen Scripts, and Library scripts. You check in the library scripts by using the LIB
button only. Ill explain that better in a future video. :)
Art
There are 2 classes of scripts. Screen Scripts, and Library scripts. You check in the library scripts by using the LIB
button only. Ill explain that better in a future video. :)
Art
Re: getting the 57cnc to work with G540
that was the problem thank you gents, now to see if it works.
Re: getting the 57cnc to work with G540
it's still not working it does not come up with any error.
Code: Select all
// Library SpindleLib-SuperPid
// Created Saturday, February 27, 2016
// Author Daniel -- Do not edit above this line
// Enter Global vars below this line.
// the librarian no matter where they are, but its easier
// to find and edit them in one spot.
//The 6 lines previous to a function will appear as
//comments to help users to understand the parameters
//required for use by each function, so try to
//always add as clear a set of instructions in these
//lines as an aid to fellow travellers.
//
// ex: global mylibfunc = function(x,y,z);
//for spindle ON/OFF
global MySpindleOutput = 45;
global SpindleDevice = Motion();
//this is a spindle control,
//it will use only pin 45 output
//To turn A spindle on/off
global SpindleOn = function()
{
SpindleDevice.SetPinDig(45,0);//turn on spindle
print("Spindle was turned on" + MySpindleOutput);
};
//this is a spindle control,
//it will use only the output #45
//to control a on/off spindle.
global SpindleOff = function()
{
SpindleDevice.SetPinDig( 45, 1); //turn on spindle
print("Spindle was turned off");
print("using pin 45" + MySpindleOutput);
};
//this is a spindle control,
//it has no speed control but this dummy
//routine will stop any error, and maybe
//test for zero speed.
//global SpindleSpeed = function( speed )
//{
//if an S000 is set, then turn the thing off
// if( speed == 0 )
// {
// SpindleDevice.SetPinDig( 45, 1);
//SpindleDevice.SetOC( MySpindleOutput, 0); //turn on spindle
// print("Spindle was turned off");
// };
//};
Re: getting the 57cnc to work with G540
Dan:
Does it say in the log and on the toolpath screen
"Spindle was Turned on"
and
"Spindle was turned off" ??
Lets go from there...
Art
Does it say in the log and on the toolpath screen
"Spindle was Turned on"
and
"Spindle was turned off" ??
Lets go from there...
Art
Who is online
Users browsing this forum: No registered users and 1 guest