Laser PWM und entsprechend.hal verändern

More
25 Jan 2022 19:58 #233099 by tracer
Hallo zusammen ich habe eine Mesa 7i76e mit entsprechend dem geflashten bitfile. Pinkonfiguration von mesaflash im Anhang.

Ich habe dann versucht die .hal anzupassen aber so richtig funtkioniert es noch nicht.

Ich wollte von TB3 Pin2 Step- Stepper 4 benutzen um per PWM den Laser anzusteuern. Irgendwie ist mit noch nicht klar wie der M67 Befehl verknüft sein soll in der .hal.
Ich glaube mit der Pin zuordnung habe ich noch einen Fehlergemacht.
Alle zusätzlichen PWM Komponenten sind mit #PWM gekennzeichnet

Wäre toll wenn mir jemand auf die Sprünge hilft.

Beste Grüße
Attachments:

Please Log in or Create an account to join the conversation.

More
25 Jan 2022 20:56 #233104 by PCW
Sie richten eine Software PWMgen ein, die ist unnötig. Ihre aktuelle
Firmware hat eine Hardware PWMgen auf STEP4.

Dies sind die verfügbaren PWM-Pins, die angeschlossen
werden müssen (über Netzbefehle) in hal:

hm2_7i76e.0.pwmgen.00.enable
hm2_7i76e.0.pwmgen.00.value

Und dies sind die verfügbaren PWM-Parameter, die (über setp-Befehle in Ihrer hal-Datei)
initialisiert werden müssen, um Ihrer Anwendung zu entsprechen:

hm2_7i76e.0.pwmgen.00.output-type
hm2_7i76e.0.pwmgen.00.scale
hm2_7i76e.0.pwmgen.pwm_frequency

Please Log in or Create an account to join the conversation.

More
26 Jan 2022 08:29 - 26 Jan 2022 08:29 #233155 by tracer
Hallo PCW,

ich dachte um die Software PWM zu nutzen benötige ich erstmal die HArdware PWM. Daher habe ich ich auf die Mesa die Hardware PWM geflasht um diese in der Auswertung mesaflash zu sehen.

Wie würde Linux CNC nun verstehen, dass die PWM Paramerter aus der .hal mit dem Befehl M67 verknüpft sind?

Sorry wenn ich so blöd fragen muss, aber ich versuche es nur zu verstehen. Linuxcnc ist sehr komplex für mich.
Last edit: 26 Jan 2022 08:29 by tracer.

Please Log in or Create an account to join the conversation.

More
04 Feb 2022 17:40 #233985 by tracer
Gibt es irgendwo eine Anleitung wo man direkt den Unterschied sieht zwischen Hardware PWM und Software PWM und wie man diese konfiguriert und entsprechend mit Pin verknüpft?
Bzw hat vielleicht jemand eine .hal wo man sich fertig konfigurierte Hardware PWM mal ansehen kann?

Please Log in or Create an account to join the conversation.

More
04 Feb 2022 18:09 #233986 by PCW
Grundsätzlich (entweder in Hardware- oder Software-PWM-Fällen) Sie würden den analogen Ausgangspin in hal mit dem PWM-Wert-Pin verknüpfen
so etwas wie:

net laser_pwm motion.analog-out-00 hm2_7i76e.0.pwmgen.00.value

Sie müssten auch die PWMgen einrichten:

setp hm2_7i76e.0.pwmgen.pwm_frequency 10000
setp hm2_7i76e.0.pwmgen.00.scale 100 # for 0 to 100%

Das pwmgen enable Signal muss auch irgendwie gesteuert werden

Please Log in or Create an account to join the conversation.

More
05 Feb 2022 13:26 #234022 by tracer
Pwm Enable soll über M67 gesteuert werden.
Muss dafür M67 verknüpft werden mit PWMgen?

Please Log in or Create an account to join the conversation.

More
07 Feb 2022 21:44 #234295 by tracer
Ah ok also soweit ich es verstanden habe, wenn man G Code M67 nehmen will, muss ich motion.analog-out-00 nehmen und verbinden.

Please Log in or Create an account to join the conversation.

More
14 Feb 2022 18:05 #234844 by tracer
Hallo PCW
wäre die Hal so richtig angepasst?

Beste Grüße
 
Attachments:

Please Log in or Create an account to join the conversation.

More
14 Feb 2022 18:52 #234849 by PCW
It's close if you delete the following lines:

#PWM Laser addf
addf pwmgen.update servo-thread
addf pwmgen.make-pulses servo-thread

setp hm2_7i76e.0.stepgen.03.motion.analog-out-00
net laser_pwm motion.analog-out-00 => hm2_7i76e.0.pwmgen.00.enable # M67 Befehl mit PWMgen verknüpfen

Please Log in or Create an account to join the conversation.

More
15 Feb 2022 14:21 - 15 Feb 2022 15:29 #234927 by tracer
Hello PCW

but if i delete the lines with "motion.analog-out-00" i cant use the M67 GCode, because its not connected somewhere ?!
How should linuxcnc know that i want to use M67 ?

Is it nessessary to use a Dummy Axis "W" to activate the pwm.enable and pwm.value with motion.analog-out-00?
And how to connect the pwm singnal to the PWM Pin on  PWM0 DIR and Step on Mesa 7i76e?
Attachments:
Last edit: 15 Feb 2022 15:29 by tracer.

Please Log in or Create an account to join the conversation.

Time to create page: 0.073 seconds
Powered by Kunena Forum