MESA 7I76e + BOB - Hardware PWMgen configuration for laser control

More
15 Mar 2022 22:59 #237402 by Archidea
I need help with PWM configuration to control Sculpfun s9 laser.
I have MESA 7i76e with 5 axis breakout board and my intention was to use pin 1 on expansion header P1 to generate the signal.

I have flashed 7i76e_7i76x1_5abobD.bit file.
--readhmid shows 
Module: PWM   There are 1 of PWM in configuration
IO Connections for P1
Pin#                  I/O   Pri. func    Sec. func       Chan      Pin func        Pin Dir
 1                     17   IOPort       PWM              0        PWM             (Out)

Changes to hal file:
num_pwmgens=1         (I understand this should enable hardware PWM)
setp hm2_7i76e.0.pwmgen.00.scale 100       (100% full scale)
setp hm2_7i76e.0.pwmgen.pwm_frequency 1000   (1 Khz)

setp hm2_7i76e.0.pwmgen.00.output-type 0   (I only need PWM signal)

This started 1st problem. LinuxCNC could not accept value 0 >> hm2_7i76e.0: switching to 1 (PWM & DIR)
How I can be sure the PWM singnal in on PIN 1 (P1) and not on STEPGEN pins?

The two below lines were accepted.
net laser_pwm_on => hm2_7i76e.0.pwmgen.00.enable
net laser_pwm_value => hm2_7i76e.0.pwmgen.00.value

I tried to test if I can change the values by linking pwm_on and pwm_value to e.g. halui.program.is-running, halui.spindle.0.is-on
without success. 
Tried also 
net halui.program.is-running => hm2_7i76e.0.pwmgen.00.enable
I received error message: signal name 'halui.program.is-running' must not be the same as pin. Did you omit the signal name?

On pin gpio 17 I measured 5v. Should the below be used in this instance?
setp hm2_7i76e.0.gpio.017.invert_output true

I have attached all relevant files.  

Any advice is appreciated.

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

More
15 Mar 2022 23:11 #237405 by PCW
"net halui.program.is-running => hm2_7i76e.0.pwmgen.00.enable"

needs a signal:

net laser-on halui.program.is-running => hm2_7i76e.0.pwmgen.00.enable

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

More
16 Mar 2022 02:26 #237423 by tommylight
Why new topic with the same subject???

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

More
16 Mar 2022 08:55 #237443 by Archidea
Tommy, I think you can delete the topic. I was a bit frustrated yesterday trying to solve basic problems. I must have been to tired to see this clearly.

There are many topics regarding the laser control but all seems to be for more advanced users.

I still don't know why the value 0 is rejected.
setp hm2_7i76e.0.pwmgen.00.output-type 0

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

More
16 Mar 2022 09:03 #237445 by Archidea
Thank you Peter,
I got stuck on basic things. I should be ok now.

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

More
18 Mar 2022 01:08 #237597 by andypugh

I got stuck on basic things. I should be ok now.

None of this is "basic". Don't feel too bad about getting stuck. And feel free to ask for help. We have all been where you are, and we remember how much there is to learn, all at once. 
 

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

Moderators: snowgoer540
Time to create page: 0.070 seconds
Powered by Kunena Forum