Laser setup 7i96

More
19 Jul 2020 20:14 - 19 Jul 2020 20:17 #175194 by mrmike
Laser setup 7i96 was created by mrmike
I have issues trying to set up a laser on a 7i96 board. I have an SSR turning on a relay to power the laser, and the PWM lead going to step+ lead on the step4 lead. I have the following statements in the hal file

net spindle-on spindle.0.on => hm2_7i96.0.ssr.00.out-02
net digital-out-0 motion.digital-out-00 => hm2_7i96.0.ssr.00.out-01
net spindle_speed spindle.0.speed-out hm2_7i96.0.pwmgen.00.value

setp hm2_7i96.0.pwmgen.00.output-type 1
setp hm2_7i96.0.pwmgen.00.scale [SPINDLE]MAX_RPM
setp hm2_7i96.0.pwmgen.pwm_frequency [SPINDLE]PWM_FREQUENCY
net spindle-enable hm2_7i96.0.pwmgen.00.enable
#net spindle-speed-out-rpm-abs hm2_7i96.0.pwmgen.00.value
net spindle-at-speed => spindle.0.at-speed

and with halcmd show all |grep *pwm* I get

29 bit IN FALSE hm2_7i96.0.pwmgen.00.enable <== spindle-enable
29 float IN 0 hm2_7i96.0.pwmgen.00.value <== spindle_speed
==> hm2_7i96.0.pwmgen.00.enable
==> hm2_7i96.0.pwmgen.00.value
29 bit RW FALSE hm2_7i96.0.pwmgen.00.offset-mode
29 bit RW FALSE hm2_7i96.0.pwmgen.00.out0.invert_output
29 bit RW FALSE hm2_7i96.0.pwmgen.00.out0.is_opendrain
29 bit RW FALSE hm2_7i96.0.pwmgen.00.out1.invert_output
29 bit RW FALSE hm2_7i96.0.pwmgen.00.out1.is_opendrain
29 s32 RW 1 hm2_7i96.0.pwmgen.00.output-type
29 float RW 23000 hm2_7i96.0.pwmgen.00.scale
29 u32 RW 0x00004E20 hm2_7i96.0.pwmgen.pdm_frequency
29 u32 RW 0x00002710 hm2_7i96.0.pwmgen.pwm_frequency
hm2_7i96.0.pwmgen.00.out0.invert_output hm2_7i96.0.gpio.025.invert_output
hm2_7i96.0.pwmgen.00.out0.is_opendrain hm2_7i96.0.gpio.025.is_opendrain
hm2_7i96.0.pwmgen.00.out1.invert_output hm2_7i96.0.gpio.026.invert_output
hm2_7i96.0.pwmgen.00.out1.is_opendrain hm2_7i96.0.gpio.026.is_opendrain

If I place the PWM lead on the Srep4- lead, I get a laser output, but cannot seem to set it any lower than high power. I am using s100 m3 and the run the speed up to 10000, without any change in the laser level.
I am missing something. Any help would be appreciated.

Thanks
Last edit: 19 Jul 2020 20:17 by mrmike.

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

More
19 Jul 2020 21:02 #175199 by PCW
Replied by PCW on topic Laser setup 7i96
Have you looked at the PWM pins when you have a say 1/2 way up setting?

Also you can measure the PWM duty cycle with a voltmeter since it will average
the PWM so 50% of full scale (11500 in your case) should read about 2.5V
from the STEP4+ pin to ground

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

More
19 Jul 2020 22:10 #175209 by mrmike
Replied by mrmike on topic Laser setup 7i96
hm2_7i96.pwmgen.00.value changes from 0 to one when I start the spindle hm2_7i96.pwmgen.00.enable stays at false.
I changed the net spindle-on spindle.0.on => hm2_7i96.0.ssr.00.out-02 to spindle enable to get the statement to go true. but the voltage on Step4+ stays at 5Vdc at s0.1 to s10000
I added the hal and ini files.
Attachments:

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

More
19 Jul 2020 22:33 - 19 Jul 2020 22:33 #175210 by PCW
Replied by PCW on topic Laser setup 7i96
Hmm, what firmware are you using?

Does setting the pwm.00.enable false make step4+ 0V?

mesaflash --device 7i96 --readhmid

Will read on the current pinout
Last edit: 19 Jul 2020 22:33 by PCW.

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

More
19 Jul 2020 22:48 #175211 by mrmike
Replied by mrmike on topic Laser setup 7i96
I re-flashed the firmware and now see a difference in output of the laser. Thanks for the help

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

More
19 Jul 2020 22:53 #175212 by PCW
Replied by PCW on topic Laser setup 7i96
Ahh, you must have had firmware that had 5 stepgens on the 7I96 and a pwmgen on the expansion connector.

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

Time to create page: 0.146 seconds
Powered by Kunena Forum