Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems to import spindle values from tool table in case of PWM servo #356

Closed
Pancholina opened this issue Sep 4, 2023 · 13 comments
Closed

Comments

@Pancholina
Copy link

I have built a plotter with a spring between the servo arm and the pencil. In this way, I can use different servo positions to change the force applied to the pencil, and obtain different gray levels.
I'm trying to import a SVG or a DXF file with different colors that should be converted to different gray levels by the different spindle values in the tool table.
I was able to do it in fast test that I did few weeks ago (during the assembly tests) but now that all the assembly job is finished I cannot reproduce.
I don't know if this is because now I'm using different version of the program (now I'm using the last one) or because I'm doing something wrong now.
I have read too (#191) that spindle values from tool table are "only for real spindle commands, not RC-Servo pen-up/-down".
The questions are:
Is possible to use the spindle values from the tool table for PWM servo?
Which would be the way to do?

Thank you in anticipation.

Rafa

@svenhb
Copy link
Owner

svenhb commented Sep 4, 2023

Yes it should work, as long as you are using the correct grbl-firmware (https://grbl-plotter.de/index.php?id=quick-guide&setlang=en#pwm).
Depending on selected tool the according S-value will be sent.

BTW. I made a new option to convert the pen-width from the SVG or DXF to S-value: https://grbl-plotter.de/index.php?id=form-setup-1#path-interpretations
Unfortunatly I have no example setup....

@svenhb
Copy link
Owner

svenhb commented Sep 4, 2023

To get your tool table working, you need to

  • enable the use of the tool table
  • get spindle speed from tool table
  • Adapt the tool table itself

image

image

image

@Pancholina
Copy link
Author

Thank you for your fast response.
Yes. It works!!!
My mistake was to select "PWM" instead of "Spindle/ laser" option at "Pen up / down translation". In this way only speed was read, not spindle.
Thank you again.

@svenhb
Copy link
Owner

svenhb commented Sep 4, 2023

How does your servo react on "M05" spindle off?
In my case the servo moves to one end-position and I had change the servo mounting, to get the pen lifted on that end position.

@Pancholina
Copy link
Author

I needed to activate the "laser mode" in order to have S0 instead of M5 to rise the pencil.
I have seen that now it works but after every "PD" two small movements have been added :
G00 X8.540 Y43.542
M3 S1 (PD Z values from tool-table)
G91 G1 X0.001 F1000 ( %NM use Laser mode)
G91 G1 X-0.001 ( %NM G1 move to activate laser)
G90 ( %NM )

And now I have no delay after every "PU" or "PD".
Which is the best way to solve these?

Rafa

@svenhb
Copy link
Owner

svenhb commented Sep 4, 2023

I think I haven't thought about this case: getting S-value for PWM from tool table.
The best would be to have "from tool table" also on the PWM-tab for pen-down to keep the delays.

@Pancholina
Copy link
Author

This would be great.
Do you think that this could be added in the next revision?

Thank.

Rafa

@svenhb
Copy link
Owner

svenhb commented Sep 4, 2023

Yes, I just started to check the code, where to implement.

@Pancholina
Copy link
Author

Wonderful !!!
When are you planning to release the next revision?

Thanks a lot.

@svenhb
Copy link
Owner

svenhb commented Sep 4, 2023

This evening - test version 1.7.0.2.d.
Or if you can't wait and want to build your own release in visual studio: Up to now I just changed GCodeCreation\Graphic2GCodeRelated.cs function "GetValuesFromToolTable" line 1625 to
GcodeSpindleSpeed = GcodePwmDown = toolInfo.SpindleSpeed;
And I need to copy the Checkbox "Spindle speed - from tool table" to the PWM tab
Then this should work
image

svenhb added a commit that referenced this issue Sep 4, 2023
@svenhb
Copy link
Owner

svenhb commented Sep 4, 2023

@Pancholina
Copy link
Author

I have tested with SVG and DXF files and works perfect. I think this is a good improvement for the program and for sure very useful for my plotter.
Thank you.

@svenhb
Copy link
Owner

svenhb commented Sep 5, 2023

👍 thanks for testing

@svenhb svenhb closed this as completed Sep 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants