relay function with pokeys57u

Post a reply

Confirmation code
Enter the code exactly as it appears. All letters are case insensitive.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: relay function with pokeys57u

Re: relay function with pokeys57u

by ArtF » Thu Jan 10, 2019 1:48 am

Richard:

  Thx. I try not to get too obtrusive in the code base for Auggie, Ive forgotten
many of its development details and it works well enough that I dont have to
play too often in the code. Leave sleeping dogs lie is probably the
better option.. :)

Art

Re: relay function with pokeys57u

by Richard Cullin » Wed Jan 09, 2019 10:25 pm

the pobus16cnc extender is only 14 eur ,  so i guess it not a big deal  to add it to the 57u . [when you know its needed]
it may not be cost effective to develop an alternative when auggie works so well as it stands

Re: relay function with pokeys57u

by ArtF » Wed Jan 09, 2019 1:25 pm

Richard:

  Bad news. I actually added the code to do the pinout idea before I found why
I didnt do it in the first place. Auggie works on a 1ms waypoint and sends up to
.5 seconds of forward information to the pokeys. The Pokeys deals out the motions
from those 500 waypoint packets in which are encoded axis moves and power
information. DigitialIO and analogue are sent every 50-100ms in a separate call
whenever there are enough packets in the pokeys queue to allow for the time
disruption.
  This means I cannot sync the pinouts to the motion point as I dont really know
it in realtime. The power byte was added by pokeys for me when I decided to
write auggie, they were very nice to adapt their firmware to my idea and I knew
the firmware space was tight so didnt ask for further byte operations.

  In the end it means the only control byte I have is power and only the
control microprocessor in the 57cnc or extender has the code to understand it.
Seemed like a good idea, I guess I should have wondered why I didnt do it
in the first place as its an obvious solution to many ills.

  Ill continue to give thought to the problem , perhaps I may think of something..

Art

Re: relay function with pokeys57u

by ArtF » Tue Jan 08, 2019 10:05 pm

Ill let you know when the code is added.

Art

Re: relay function with pokeys57u

by Richard Cullin » Tue Jan 08, 2019 9:06 pm

thanks for that , i will get an extender.
i'm still interested in the 8 pin idea and happy to be a guinea pig if it will help

Re: relay function with pokeys57u

by ArtF » Tue Jan 08, 2019 12:40 pm

Richard:

  Ahh yes, I had forgotten that option. Its true the extender is what makes a  57 what it is,
its basically the external engine for CNC. When added you basically have a 57. If you want
everything to work the same its probably worth getting.

  As to the pinout idea, I will look at adding it over the next couple weeks just in case
the issue arises again. Making a cheap arduino read an 8 bit input and making a pwm
from it is pretty east from there if one wishes to go that way.

  Going with the extender has other benefits though, top speed goes from 25K to 115K
I believe as well. ( The 57U only has internal planner doesnt it?). Auggie will use
the internal if there is no extended planner, but its much slower..

Art

Re: relay function with pokeys57u

by Richard Cullin » Mon Jan 07, 2019 10:19 pm

posupport suggest that  PoExtBusOC16CNC  add on will allow Motion-synched PWM
what do you think ? i would rather have the full deal .
mind you a 57u version would be attractive to more users being 1/3 the cost of a 57cnc . i could easily pgm a pic chip to read the 8 pin pwm data
and provide the pwm signal.  i would be willing to provide pic code to auggie users

Re: relay function with pokeys57u

by ArtF » Mon Jan 07, 2019 12:29 pm

Richard:

    I have to apologize on this one myself, I neglected to notice the original script
was calling SpindleControl.SetRealTimePWM(..). I should have seen immediately
that the script that needed modifying was in the SpindleLibrary so the Pokeys1.
had to be the calling system locally.
  You did it properly in the end, and I suspect the 57U is as I thought incapable
of the PWM control. I used internal library names of SetPWMRealTime and SetPWM
in the code base and I got a bit confused between script library and internals as
I looked in the code. I see the problem now, and you solved it before I got there.

  The guys at Pokeys are pretty nice guys though, if you contact them and tell them
the doc's led you to believe the PWM you needed was in the 57U but in fact only the
57CNC would work, they would likely come up with a replacement or swap
for you, though I know shipping and such is a hassle as well. Tell them it was
for Auggie so the 57cnc is really needed.

  I use an arduino after my pwm output on the galvo laser now as you may have seen
in a  recent post on laser issues. The arduino takes in the pwm, and converts it to
a scale factored output for better depth resolution. (Code for that is in the thread.).

  Now if I could figure a way to send out the power for the next ms to another device,
which is basically what gets sent by Auggie during run, Id be happy to add it so any
Pokeys would have the capability with an added arduino or something...but I suspect the stream
Im sending is too time sensitive for me to get that additional IO time.

  Ask pokeys support if that 57u could be traded for a 57cnc, they may be willing
to help before we try to reinvent the wheel. I could I suppose add a 8 bit pin
coordinator to set 8 consecutive pins to a 0-100 power level in binary during run,
there wouldn't be any time loss that way in communications..(Though you'd lose
8 pins of IO.... The interface would be simple , Im thinking Id have to simply
dedicate 8 pins of IO for binary power output.. Youd have to add an arduino to read
the 8 pins and do a pwm based on them...Ill give it some thought, let me know
what the support guys say, and Ill look in the engine to see if I can dedicate
pins 1-8 for auxillary power output..


Art

 
   

Re: relay function with pokeys57u

by Richard Cullin » Mon Jan 07, 2019 11:42 am

i could have built 15 arduino clone laser controllers with the same limitation for the price of a pokeys57u delivered. its a totally pointless exercise unless it can do realtime pwm. the whole point was not to have to tediously modify gcode from vcarve /vexx etc  even for the most basic laser control .
worst christmas present ever.

global SpindleOn = function()
{
   //turn on pwm realtime mode
   //called by engine , so no need to tell system
  // SpindleControl.SetRealTimePWM( true,
  //                                LaserPWMPeriod,
  //                                LaserAxis,
 //                                 LaserPWMChannel );
  Pokeys1.SetPWMPeriod(0.000200);

  Pokeys1.SetPWM( 2, GlobalGet( "LaserMaxPower" ));
   print("Laser Spindle RT engaged");                                
};  

Re: relay function with pokeys57u

by Richard Cullin » Mon Jan 07, 2019 10:01 am

some promise here , commenting the realtimepwm calls did the trick
now have pwm at pin20 ch2 off/on

global SpindleOn = function()
{
    //turn on pwm realtime mode
    //called by engine , so no need to tell system
  // SpindleControl.SetRealTimePWM( true,
  //                                LaserPWMPeriod,
  //                                LaserAxis,
  //                                LaserPWMChannel );
  Pokeys1.SetPWMPeriod(2,.000200);

Pokeys1.SetPWM( 2, 1);
    print("Laser Spindle RT engaged");                               
}; 

/*
  This is called by the system to turn off the
  Spindle, so, we'll just tell the engine
  to turn off realtime spindle mode
*/

global SpindleOff = function()
{
    //turn on pwm realtime mode
    //SpindleControl.SetRealTimePWM( false,
    //                              LaserPWMPeriod,
  //                                LaserAxis,
  //                                LaserPWMChannel );
    print("Laser Spindle RT dis-engaged");   
    Pokeys1.SetPWM( 2, 0);
}; 

Top