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

Unknown command on Sidewinder X1 #3376

Closed
n3roGit opened this issue Sep 27, 2020 · 14 comments
Closed

Unknown command on Sidewinder X1 #3376

n3roGit opened this issue Sep 27, 2020 · 14 comments

Comments

@n3roGit
Copy link

n3roGit commented Sep 27, 2020

I just installed Klipper using this tutorial and the linked config:

https://3dprintbeginner.com/install-klipper-on-sidewinder-x1/

Unfortunately I always get the following error message:

Unknown command:"M42"
Unknown command:"M42"
Unknown command:"M42"
Unknown command:"M117"

I guess I have to insert some code snippets to recognize the commands.

https://raw.githubusercontent.com/KevinOConnor/klipper/master/config/example-extras.cfg

Do you have a tip for me what I can do here and how?

If it works the complete config can also be included in your repo =)

@klipper-gitissuebot
Copy link

Hi @n3roGit,

It did not look like there was a Klipper log file attached to this ticket. The log file has been engineered to answer common questions the Klipper developers have about the software and its environment (software version, hardware type, configuration, event timing, and hundreds of other questions).

Unfortunately, too many people have opened tickets without providing the log. That consumes developer time; time that would be better spent enhancing the software. If this ticket references an event that has occurred while running the software then the Klipper log must be attached to this ticket. Otherwise, this ticket will be automatically closed in a few days.

For information on obtaining the Klipper log file see: https://github.com/KevinOConnor/klipper/blob/master/docs/Contact.md

The log can still be attached to this ticket - just add a comment and attach the log to that comment.

Best regards,
~ Your friendly GitIssueBot

PS: I'm just an automated script, not a human being.

@legendaryleo7
Copy link

@n3roGit, what slicer are you using? Can you attach your slicer start gcode, your printer.cfg and your logfile?

Also, I have an artillery sidewinder x1 as well and found the tutorial you linked to not be super thorough. You will most likely need additional tweaking, although the issue you describe sounds like it's coming from your slicer. While klipper accepts many marlin commands, it is not marlin, and your slicer needs to be configured properly still, which was not adequately covered in the tutorial.

@n3roGit
Copy link
Author

n3roGit commented Sep 29, 2020

Many thanks for the answer.

Currently I am using Cura 4.7 and Octoprint with the plugin OctoKlipper.

Which article should I ideally follow for the installation/setup?

GCodes:
image

Klipper cfg:
https://pastebin.com/raw/cntpKSPH

Here is the Klipper log:
https://pastebin.com/raw/wM1t8QxB

@Hywelmartin
Copy link
Contributor

M42 is For custom hardware not officially supported in Marlin, you can often just connect up an unused pin and use M42 to control it.
Klipper don't have that Gcode a similar function is THIS

M117 error is due to that You don't have any screen configured...

You also have gcode scripts in the slicer...

@n3roGit
Copy link
Author

n3roGit commented Sep 30, 2020

Okay. I'm trying to figure this out.
currently i have entered the following into the config. but without success...

[output_pin my_pin]
pin: 7
value: 1.0

What to do to get out of

M42 P4 S0 ; turn off the light
M42 P5 S0 ; turn off the light
M42 P6 S0 ; turn off the light

To make a klipper command?

@n3roGit
Copy link
Author

n3roGit commented Sep 30, 2020

or like this is also wrong
[output_pin LED]
pin: 7
pwm: false
value: 0
shutdown_value: 0
#cycle_time: 0.001
#scale: 1000

[gcode_macro M42]
default_parameter_S: 1000
default_parameter_P: 100
gcode:
SET_PIN PIN=LED VALUE=200

@legendaryleo7
Copy link

legendaryleo7 commented Oct 1, 2020

or like this is also wrong
[output_pin LED]
pin: 7
pwm: false
value: 0
shutdown_value: 0
#cycle_time: 0.001
#scale: 1000

[gcode_macro M42]
default_parameter_S: 1000
default_parameter_P: 100
gcode:
SET_PIN PIN=LED VALUE=200

  1. I think pin should be ar7, since your config file is using arduino style mapping.
  2. VALUE should be 0 or 1. If you have pwm enabled, you can use a floating number between 0 and 1 as well. The 0-255 scale is not supported.

@n3roGit
Copy link
Author

n3roGit commented Oct 2, 2020

Now i have a working config:
`[output_pin LED_Green]
pin: ar4
pwm: false
value: 0
shutdown_value: 0

[output_pin LED_Red]
pin: ar5
pwm: false
value: 0
shutdown_value: 0

[output_pin LED_Blue]
pin: ar6
pwm: false
value: 0
shutdown_value: 0

[gcode_macro M42]
gcode:
SET_PIN PIN=LED_Green VALUE=1.0
SET_PIN PIN=LED_Blue VALUE=1.0
SET_PIN PIN=LED_Red VALUE=1.0
[gcode_macro M43]
gcode:
SET_PIN PIN=LED_Green VALUE=0.0
SET_PIN PIN=LED_Blue VALUE=0.0
SET_PIN PIN=LED_Red VALUE=0.0`

It is not as beautiful as I would like it to be but it does what it should.
I would like to have M42 for a scaling between 0-255

@Hywelmartin
Copy link
Contributor

Hywelmartin commented Oct 2, 2020

[output_pin LED_Green]
pin: ar4
pwm: true
value: 0
shutdown_value: 0
[gcode_macro M42]
default_parameter_S: 255
gcode:
            SET_PIN PIN=LED_Green VALUE={  params.S|float  / 255 }

format like M42 S=180

might work

but why call them M42 and not green, blue, red, joe

@n3roGit
Copy link
Author

n3roGit commented Oct 2, 2020

Thank you I will try this.

It's only M42 because of the stock firmware name.
You naming in better thanks

@n3roGit
Copy link
Author

n3roGit commented Oct 2, 2020

This works but the led is blinking when its not 255. no dimming only different blink times

@Hywelmartin
Copy link
Contributor

Alter the PWM frequency

@klipper-gitissuebot
Copy link

It appears the Klipper log file was not provided.
I'm closing this now, sorry. Feel free to attach the log to this ticket sometime in the future, or create a new issue once you can provide the log file.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants