7i96s Flash for additional PWM and Wiring for laser

More
1 year 3 months ago #332140 by roland100
Hello PCW,
I flashed my 7i96s with 7i96s_2pwmd.bin and put this line to my custom.hal:

# invert pwm output
setp hm2_7i96s.0.pwmgen.01.out0.invert_output true.

When I start linuxcnc i get the error message
"parameter hm2_7i96s.0.pwmgen.01.out0.invert_output not found"

The hmid-output looks correct:
TB2 2,3 25 IOPort PWM 1 PWM (Out)
TB2 4.5 26 IOPort None

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

More
1 year 3 months ago #332142 by PCW
Did you enable 2 PWMGens in the hal file?

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

More
1 year 3 months ago #332144 by roland100
Hello PCW,
I managed to get rid of the error messages by changing these values in the hal file:
num-pwmgens = 2 (from 1) and
num-stepgens = 4 (from 5)

Now I also can see pwmgen.01 in the halcmd show all *pwmgen*:

roland@linuxCNC:~$ halcmd show all *pwmgen*
Loaded HAL Components:
ID Type Name PID State

Component Pins:
Owner Type Dir Value Name
36 bit IN FALSE hm2_7i96s.0.pwmgen.00.enable <== spindle-enable
36 float IN 0 hm2_7i96s.0.pwmgen.00.value <== spindle-vel-cmd-rpm
36 bit IN FALSE hm2_7i96s.0.pwmgen.01.enable
36 float IN 0 hm2_7i96s.0.pwmgen.01.value

Pin Aliases:
Alias Original Name

Signals:
Type Value Name (linked to)

Parameters:
Owner Type Dir Value Name
36 bit RW FALSE hm2_7i96s.0.pwmgen.00.offset-mode
36 s32 RW 1 hm2_7i96s.0.pwmgen.00.output-type
36 float RW 18000 hm2_7i96s.0.pwmgen.00.scale
36 bit RW FALSE hm2_7i96s.0.pwmgen.01.offset-mode
36 bit RW TRUE hm2_7i96s.0.pwmgen.01.out0.invert_output
36 bit RW FALSE hm2_7i96s.0.pwmgen.01.out0.is_opendrain
36 s32 RW 1 hm2_7i96s.0.pwmgen.01.output-type
36 float RW 5000 hm2_7i96s.0.pwmgen.01.scale
36 u32 RW 0x005B8D80 hm2_7i96s.0.pwmgen.pdm_frequency
36 u32 RW 0x00004E20 hm2_7i96s.0.pwmgen.pwm_frequency

Parameter Aliases:
Alias Original Name
hm2_7i96s.0.pwmgen.01.out0.invert_output hm2_7i96s.0.gpio.025.invert_output
hm2_7i96s.0.pwmgen.01.out0.is_opendrain hm2_7i96s.0.gpio.025.is_opendrain


is this correct ?
Tahnks a lot and good night

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

More
1 year 3 months ago #332145 by PCW
Looks OK

You can also simply delete the num_xxxx=n stanzas in the hal file
and all hardware in a particular configuration will be enabled.

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

Moderators: PCW, jmelson
Time to create page: 0.103 seconds
Powered by Kunena Forum