Power output in gcode does not match setting

I’m working on a DIY project to convert a plotter from the 80’s into a vinyl cutter. The plotter has a coil/solenoid to activate/lower the pen. It’s pretty simple and I have connected this to the spindle output of the controller board. 25khz 24v PWM signal.

I can manually send gcode commands to set the spindle percent and it all works fine but I can’t seem to get lightburn to generate the correct values.

In the setup I have set the max S to 1000 and $30 = 1000 in GRBL, I set power to 100% and I should see a G1S1000 command in the code but it’s G1S200

I’ve tried various settings on $30, the max S setting and cut power but it never matches as it should - Why for?

A 20kHz pwm signal is not what you want to use to control a mechanical solenoid…


You need an output that becomes active for the complete time you want the pen lowered…

I’d suspect there is some kind of output from the MKS board that may drive it… I’m not up and all the variations that the mks controller can support…

:smile_cat:

For the g-code part of this can you upload the LightBurn generated g-code file? Add a .txt extension to the file before uploading.

You’d think so but not in this case. Since the solenoid is specifically designed to apply a variable force as it was a pen plotter. I intend to keep this function to be able to apply variable force to a cutter.

So, weirdly, i went to go through a bunch of test scenarios just now to show the resulting gcode (Now that I have closed the software and restarted it) and now it is generating the code exactly as expected.

I’d say it’s some sort of bug but the chances of me replicating it is probably low…

Can you explain how a solenoid is used as a linear device…?


Most are on or off. I’m sure they make some types of equipment that can apply a linear force, but I’ve never heard it referred to as a solenoid…


Can you get more information on how that works? Or specifications to operate it?

Maybe we can help you iron out the issues.

:smile_cat:

Perhaps Solenoid is not really the right terminology but it comprises of a coil and magnet (or ferrous core) and for all purposes is a solenoid.

It’s a linear device the same as say a speaker coil - The more energy you supply to the coil, the more force it is able to supply but is mechanically opposed by a light spring. I have no issues with that part, it’s all working as expected. It was the gcode from Lightburn that was not outputting correctly that was my problem. As long as I use the ‘Constant Power mode’ and treat it like a laser, its fine, providing the gcode is able to generate as expected and I can simulate pressure with 0-100% laser power.

There is another feature in FluidNC that simulates a Z axis with a more ‘digital’ signal. It’s still PWM but uses more of a ‘peak and hold’ setting. This then activates the coil once Z < 0.0 but Lightburn does not really support that function well as it’s designed for focusing a laser, not so much Z cut depth (There is no liftoff by default at the end). It also means I have to reconfigure the controller to change pressure with different materials vs changing laser power in Lightburn.

I’m new to the forum but far from new to all this. I have been running CNC machines, 3d printers and lasers for many years.

For Reference, the plotter is a Mutoh IP-500 ‘Personal Plotter’ which will barely produce any useful search results as it’s from pre-mass-internet 1988 and has not been supported by anything newer than windows '95. The factory interface is 25 pin serial and uses a special protocol for plotters that is no longer in use. Basically impossible to use with any modern technology, hence installing a modern controller board to make it useful again.

I’m hoping to eventually even be able to use the tool/pen changer but for the moment, just getting it to do the basic movements for plotting/cutting would be enough.

The particular one I acquired has been sitting in storage for 20+ years and almost appears brand new with the exception of a couple of small rubber pinch rollers that have disintegrated but easily replaced.

Very interesting… Thanks for the time to explain it to me.

Do you have any technical information of exactly the power/frequency that the pressure mechanism needs to operate?

It would be fun to find a solution…

:smile_cat:

Well it’s all working fine now. I tested the original signal to the coil and it was about 16 volts. The machine runs on 24 so I assume it was not full power (it’s adjustable but I have no way of changing it because there’s no software available). I gutted all of the original logic and replaced it with the MKS DLC32 board and a newer 24v power supply. Can run about 3m/min speed.

Test at about 60% speed, head at 20% power.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.