Page 1 of 3

relay function with pokeys57u

Posted: Fri Jan 04, 2019 11:21 pm
by Richard Cullin
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

Re: relay function with pokeys57u

Posted: Sat Jan 05, 2019 5:35 pm
by ArtF
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

Re: relay function with pokeys57u

Posted: Sat Jan 05, 2019 5:36 pm
by ArtF
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

Re: relay function with pokeys57u

Posted: Sun Jan 06, 2019 7:37 am
by Richard Cullin
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 ?

Re: relay function with pokeys57u

Posted: Sun Jan 06, 2019 9:19 am
by Richard Cullin
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

Re: relay function with pokeys57u

Posted: Sun Jan 06, 2019 12:42 pm
by ArtF
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

Re: relay function with pokeys57u

Posted: Sun Jan 06, 2019 9:00 pm
by Richard Cullin
yes that works , as soon as auggie starts pwm stops

Re: relay function with pokeys57u

Posted: Mon Jan 07, 2019 1:56 am
by ArtF
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







Re: relay function with pokeys57u

Posted: Mon Jan 07, 2019 4:50 am
by Richard Cullin
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



Re: relay function with pokeys57u

Posted: Mon Jan 07, 2019 4:54 am
by Richard Cullin
what i saw