relay function with pokeys57u
-
Richard Cullin
- Site Admin
- Posts: 152
- Joined: Sat Jun 02, 2012 4:45 pm
relay function with pokeys57u
i have started to build a second auggie laser , this time with a 57u.
the laser power on my 57cnc uses
Pokeys1.SetRelay(2,1); to control laser power on/off
i can't quite see how that translates to a 57u , would/will it set a particular pin ?
i can't see any mention of what pin is used for the relays on the cnc57 in the pokeys docs
i don't really want to end up with different scripts for each machine
the laser power on my 57cnc uses
Pokeys1.SetRelay(2,1); to control laser power on/off
i can't quite see how that translates to a 57u , would/will it set a particular pin ?
i can't see any mention of what pin is used for the relays on the cnc57 in the pokeys docs
i don't really want to end up with different scripts for each machine
-
ArtF
- Global Moderator

- Posts: 4557
- Joined: Sun Sep 05, 2010 5:14 pm
- Contact:
Re: relay function with pokeys57u
Hi Richard:
As far as I know, the relays 1 & 2 are part of the cnc57's external engine circuitry..
though I could be wrong. The documentation for the 57cnc shows the mcu controlling
the relays rather than one of the dedicated IO pins. The same for the solid state relays.
I dont think you can access them with a pin code when using a 57. At my end its setting
a command for the relay status which I suspect is a software function only for the
57 and 57db.
The 57U will work for the most part in Auggie,in terms of motion and pwm power
settings but I dont think anything other than the 57cnc will allow pixel by pixel pwm control
that auggie uses for photoengraving or 3d laser engraving in multipass.
Art
As far as I know, the relays 1 & 2 are part of the cnc57's external engine circuitry..
though I could be wrong. The documentation for the 57cnc shows the mcu controlling
the relays rather than one of the dedicated IO pins. The same for the solid state relays.
I dont think you can access them with a pin code when using a 57. At my end its setting
a command for the relay status which I suspect is a software function only for the
57 and 57db.
The 57U will work for the most part in Auggie,in terms of motion and pwm power
settings but I dont think anything other than the 57cnc will allow pixel by pixel pwm control
that auggie uses for photoengraving or 3d laser engraving in multipass.
Art
-
ArtF
- Global Moderator

- Posts: 4557
- Joined: Sun Sep 05, 2010 5:14 pm
- Contact:
Re: relay function with pokeys57u
Richard:
Ill make a note to release a new version of Auggie soon as I have fixed up a few bugs in
there over the last while to deal with some engraving issues.
Art
Ill make a note to release a new version of Auggie soon as I have fixed up a few bugs in
there over the last while to deal with some engraving issues.
Art
-
Richard Cullin
- Site Admin
- Posts: 152
- Joined: Sat Jun 02, 2012 4:45 pm
Re: relay function with pokeys57u
thanks for looking art , i thought that maybe the case for the relay
worse still it seems the pwm ch to pin mapping is different
any thoughts on getting pwm running ?
worse still it seems the pwm ch to pin mapping is different
any thoughts on getting pwm running ?
You do not have the required permissions to view the files attached to this post.
-
Richard Cullin
- Site Admin
- Posts: 152
- Joined: Sat Jun 02, 2012 4:45 pm
Re: relay function with pokeys57u
not really sure , i have made several new profiles
scripts set to ch2 , planner set to ch2 , pin20 is set to pwm
spindle engaged ,............... nothing no pwm
scripts set to ch2 , planner set to ch2 , pin20 is set to pwm
spindle engaged ,............... nothing no pwm
-
ArtF
- Global Moderator

- Posts: 4557
- Joined: Sun Sep 05, 2010 5:14 pm
- Contact:
Re: relay function with pokeys57u
Richard:
If you set the PWM to a pin and set the frequency to 5Khz,
then send to the pokeys and save the profile, can you measure
a PWM on that pin before running Auggie?
I guess what Im asking is if the Pokeys is working and tested
with that pin before running Auggie?
If so, Ill take a deep dive into the code to see if the PWM code
is the problem or if my scripts and hardcoding are assuming
a 57cnc's interface. It may be we need a new scriptcall to
set the traditional pwm channels rather than the 1ms
protocol on it.
Art
If you set the PWM to a pin and set the frequency to 5Khz,
then send to the pokeys and save the profile, can you measure
a PWM on that pin before running Auggie?
I guess what Im asking is if the Pokeys is working and tested
with that pin before running Auggie?
If so, Ill take a deep dive into the code to see if the PWM code
is the problem or if my scripts and hardcoding are assuming
a 57cnc's interface. It may be we need a new scriptcall to
set the traditional pwm channels rather than the 1ms
protocol on it.
Art
-
Richard Cullin
- Site Admin
- Posts: 152
- Joined: Sat Jun 02, 2012 4:45 pm
Re: relay function with pokeys57u
yes that works , as soon as auggie starts pwm stops
-
ArtF
- Global Moderator

- Posts: 4557
- Joined: Sun Sep 05, 2010 5:14 pm
- Contact:
Re: relay function with pokeys57u
Hi Richard:
Are you using the script function SetPWMRealTime(state,period,axis,channel) or SetPWM( id, duty);
I think in the case of a 57U, the call SetPWMDuty( channel( 0-5), duty( 0 -100))
should work, but SetPWMRealTime will not. The Call GetPWMOut( id ( 0-5)) should send back the duty
cycle of that channel. Youd have to then set the spindleon/off scripts to call the SetPWMDuty between
tickle and required power.
Art
Are you using the script function SetPWMRealTime(state,period,axis,channel) or SetPWM( id, duty);
I think in the case of a 57U, the call SetPWMDuty( channel( 0-5), duty( 0 -100))
should work, but SetPWMRealTime will not. The Call GetPWMOut( id ( 0-5)) should send back the duty
cycle of that channel. Youd have to then set the spindleon/off scripts to call the SetPWMDuty between
tickle and required power.
Art
-
Richard Cullin
- Site Admin
- Posts: 152
- Joined: Sat Jun 02, 2012 4:45 pm
Re: relay function with pokeys57u
script keeps getting killed , even if i leave SpindleControl.SetRealTimePWM in (set to another ch)
global SpindleOn = function()
{
//turn on pwm realtime mode
//called by engine , so no need to tell system
//SpindleControl.SetRealTimePWM( true,
// LaserPWMPeriod,
// LaserAxis,
// LaserPWMChannel );
SetPWMDuty( 2, 6);
print("Laser Spindle RT engaged");
};
error
0:21:147 Setting Spindle with 1
40:21:147 Error in script run. Check log.!
40:21:148 Program Stopped!
40:21:148 Script killed or triggered exception,check log.
poscope don't really spell out the difference performance /ability wise between these modules , i thought i was just getting less fancy plugs and fittings
their comparison cross reference give no hint of this sort of issue , feeling a bit ripped off
global SpindleOn = function()
{
//turn on pwm realtime mode
//called by engine , so no need to tell system
//SpindleControl.SetRealTimePWM( true,
// LaserPWMPeriod,
// LaserAxis,
// LaserPWMChannel );
SetPWMDuty( 2, 6);
print("Laser Spindle RT engaged");
};
error
0:21:147 Setting Spindle with 1
40:21:147 Error in script run. Check log.!
40:21:148 Program Stopped!
40:21:148 Script killed or triggered exception,check log.
poscope don't really spell out the difference performance /ability wise between these modules , i thought i was just getting less fancy plugs and fittings
their comparison cross reference give no hint of this sort of issue , feeling a bit ripped off
-
Richard Cullin
- Site Admin
- Posts: 152
- Joined: Sat Jun 02, 2012 4:45 pm
Re: relay function with pokeys57u
what i saw
You do not have the required permissions to view the files attached to this post.