Third party software and hardware support forums. > PoKeys

Pokeys57CNC PWM outputs in Mach4

(1/2) > >>

tinkeringtechie:
I'm interested in using a DRO to control a PWM output in Mach4, but it seems to have limited functionality compared to Mach3.

Here's what it looks like in Mach3:



But in Mach4 I just have enable/disable and no options:



 Are these options hidden somewhere else, or are they not there anymore? Is there any other way to control a pwm output from gcode in Mach4? I'd like to be able to control pin 18 from gcode so that I can change the intensity of my laser, so sharing the spindle output is less desirable. Thanks

tinkeringtechie:
I got a response from PoLabs support that controlling those outputs needs to be done with custom code. I'm going to try it with a custom M-code that adjusts the registers. I'll post back here if it's successful.

tinkeringtechie:
I was able to control it with a custom macro, BUT... it's slow... too slow to be switched during a program and not coordinated with the machine's movement. I went in a totally different direction and now I'm controlling the On/Off of the laser using the B axis DIR pin with the intensity controlled by my custom macro. It would be sweet if there was some way to synchronize the PWM signal with the machine movement, but it doesn't seem possible with PoKeys. If anyone has an alternative approach I'd love to hear it.

joeaverage:
Hi,
have you given any thought to a Frequency-to-Voltage converter, there are such ICs, and tend to be used in instrumentation and communication applications.
They work on the idea that if you present a square wave signal of 1kHz say it might produce 1V whereas if you present it with a 2kHz signal it will output 2V.

The reason I make the suggestion is that the signal (excluding the acceleration ramp up and de-acceleration ramp down) are variable frequency signals.
Thus if your B axis has a tuning of 1000 steps per unit then and a max velocity of 60 units per minute:

G1 B1000 F60 would for the duration of the move (excluding ramp up/ramp down) of 60 X 1000 =60,000 pulses per minute or 1Khz.
G1 B1000 F30 would cause a pulse rate of 500Hz.

If you had a V-to-F converter IC on your B axis output you would have a variable voltage set by the axis feedrate.

Note that this strategy doesn't require any special support from your controller....it just outputs what it believes are a simple pulse stream indentical to
that required to drive a stepper for instance.

If memory serves I believe it might be the C25 or maybe the C62 BoBs which use this idea to generate an analogue voltage for a VFD rather than the more traditional
PWM.

Craig

tinkeringtechie:
Very interesting... I had not thought of that, but it seems like a good option. The laser expects a PWM signal instead of analog, but I'm sure there's a way to output that with a similar approach. Now you've got me wanting to try the step signal as a crude PWM output. I'm guessing that would limit me to 50% duty cycle, but at the moment the laser is a bit too powerful so that might work.

Navigation

[0] Message Index

[#] Next page

Go to full version