7i47s Analog out
12 Feb 2020 16:58 #157193
by dremeier
Replied by dremeier on topic 7i47s Analog out
|"Depending on firmware, DIR will be controlled by the sign of the PWM rather than a GPIO bit"
even if the spindle is turning fwd or rev the DIR pin does not change, also I don´t have this pin in halshow. ( pwmgen.00.output-type 1)
|"What is reversed about the Optocoupler outputs?"
because of that?: setp hm2_5i24.0.gpio.016.invert_output 1
even if the spindle is turning fwd or rev the DIR pin does not change, also I don´t have this pin in halshow. ( pwmgen.00.output-type 1)
|"What is reversed about the Optocoupler outputs?"
because of that?: setp hm2_5i24.0.gpio.016.invert_output 1
Please Log in or Create an account to join the conversation.
12 Feb 2020 17:18 #157197
by PCW
Replied by PCW on topic 7i47s Analog out
OK they are not reversed but rather active low at the FPGA interface
(almost all mesa FPGA cards use active low since the outputs default to high at startup)
The DIR pin will only change if you set a negative PWM value
(This is probably not happening with your current setup)
(almost all mesa FPGA cards use active low since the outputs default to high at startup)
The DIR pin will only change if you set a negative PWM value
(This is probably not happening with your current setup)
The following user(s) said Thank You: dremeier
Please Log in or Create an account to join the conversation.
12 Feb 2020 23:40 - 12 Feb 2020 23:43 #157232
by dremeier
Replied by dremeier on topic 7i47s Analog out
Allright, now I´ve changed the pwmgen value to minus for rev. So I got the DIR pin awake.
Here my final hal for all who find it use full:
my whole linuxcnc setup can be found here: Linuxcnc config on github
Here my final hal for all who find it use full:
#*******************
# SPINDLE 0
#*******************
setp hm2_5i24.0.pwmgen.pwm_frequency [SPINDLE_0]PWM_FREQ
setp hm2_5i24.0.pwmgen.00.scale [SPINDLE_0]OUTPUT_SCALE
setp hm2_5i24.0.pwmgen.00.output-type 1
setp hm2_5i24.0.pwmgen.00.out0.invert_output true # rising value -> rising voltage
setp hm2_5i24.0.pwmgen.00.out1.invert_output true # gpio 017 DIR M4 - high if pwmgen.00.value will be minus
setp hm2_5i24.0.gpio.016.is_output true # gpio 016 Aux M3 - set as output
setp hm2_5i24.0.gpio.016.invert_output true
net spindle-speed-cmd spindle.0.speed-out => hm2_5i24.0.pwmgen.00.value # rpm for PWM
net spindle-on spindle.0.on => hm2_5i24.0.pwmgen.00.enable # FU and PWM enable
net spindle-fwd spindle.0.forward => hm2_5i24.0.gpio.016.out # gpio 016 / Aux (M3)
my whole linuxcnc setup can be found here: Linuxcnc config on github
Last edit: 12 Feb 2020 23:43 by dremeier.
Please Log in or Create an account to join the conversation.
13 Feb 2020 01:32 #157240
by PCW
Replied by PCW on topic 7i47s Analog out
Probably what should happen is that the firmware is changed so the the DIR pin is just GPIO so its more flexible (easier to implement FWD/REV for example). I've done this on newer firmware but have not updated all the firmware files
Please Log in or Create an account to join the conversation.
Time to create page: 0.066 seconds