emcoturn 120 / 220 tool turret hal outputs
- tommylight
- Away
- Moderator
Less
More
- Posts: 19200
- Thank you received: 6436
26 Jul 2019 19:40 #140682
by tommylight
Replied by tommylight on topic emcoturn 120 / 220 tool turret hal outputs
Loadrt hm2_eth
That should be the line for 7i76E and that line must contain num_pwm = 1.
Do not change other stuff there if you already have a working machine.
That should be the line for 7i76E and that line must contain num_pwm = 1.
Do not change other stuff there if you already have a working machine.
The following user(s) said Thank You: Erikcnc
Please Log in or Create an account to join the conversation.
26 Jul 2019 19:49 #140684
by PCW
Replied by PCW on topic emcoturn 120 / 220 tool turret hal outputs
num_pwmgens=1
Also the rest of the hal file is setup for a software PWMGen so needs to be changed for the hardware pwmgen
Also the rest of the hal file is setup for a software PWMGen so needs to be changed for the hardware pwmgen
The following user(s) said Thank You: Erikcnc
Please Log in or Create an account to join the conversation.
26 Jul 2019 20:40 - 26 Jul 2019 20:42 #140687
by Erikcnc
Yes, i got num_pwmgens=1 changded.
My apologize, i don't understand how to change it to hardware pwmgen....
i got some progress though.
Linuxcnc starts!
The encoder giving signals to the input pins!
So, hm2_7i76e.0.7i76.0.0.input-01 and 00 isnt right one for this of course.
could you show me how to wire and what to change?
Replied by Erikcnc on topic emcoturn 120 / 220 tool turret hal outputs
num_pwmgens=1
Also the rest of the hal file is setup for a software PWMGen so needs to be changed for the hardware pwmgen
Yes, i got num_pwmgens=1 changded.
My apologize, i don't understand how to change it to hardware pwmgen....
i got some progress though.
#load pwmgen for run pwm
loadrt pwmgen output_type=0
addf pwmgen.update servo-thread
#addf pwmgen.make-pulses base-thread
setp pwmgen.0.pwm-freq 500.0
setp pwmgen.0.scale 100.0
setp pwmgen.0.offset 0.0
loadrt emcochanger
addf emcochanger servo-thread
loadrt timedelay count=1
addf timedelay.0 servo-thread
# will wait 5 secs approx and turn motor off after reversing against stop
setp timedelay.0.on-delay 2
net tool-change iocontrol.0.tool-change => emcochanger.toolchange
net tool-changed iocontrol.0.tool-changed <= emcochanger.toolchanged
net tool-number iocontrol.0.tool-prep-number => emcochanger.toolnumber
net tool-oldnumber iocontrol.0.tool-number => emcochanger.currenttoolnumber
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
net sig1 emcochanger.opto1 <= hm2_7i76e.0.7i76.0.0.input-21
net sig2 emcochanger.opto2 <= hm2_7i76e.0.7i76.0.0.input-22
net sig3 emcochanger.opto3 <= hm2_7i76e.0.7i76.0.0.input-23
net sig4 emcochanger.opto4 <= hm2_7i76e.0.7i76.0.0.input-24
net sig-forward emcochanger.forward => hm2_7i76e.0.7i76.0.0.input-00
net Xen => pwmgen.0.enable
net pwmgen_value pwmgen.0.value <= emcochanger.setpwm
net pwmgen_out pwmgen.0.pwm => hm2_7i76e.0.7i76.0.0.input-01
net xhomed axis.0.homed => emcochanger.ishomedX
net zhomed axis.2.homed => emcochanger.ishomedZ
net delaystart timedelay.0.in <= emcochanger.delaystart
net delaydone timedelay.0.out => emcochanger.delaydone
Linuxcnc starts!
The encoder giving signals to the input pins!
So, hm2_7i76e.0.7i76.0.0.input-01 and 00 isnt right one for this of course.
could you show me how to wire and what to change?
Last edit: 26 Jul 2019 20:42 by Erikcnc.
Please Log in or Create an account to join the conversation.
26 Jul 2019 21:36 - 26 Jul 2019 21:37 #140689
by PCW
Replied by PCW on topic emcoturn 120 / 220 tool turret hal outputs
First delete or commnt out all lines in the hal file that have "pwm" in them
(except the num_pwmgens )
This is because those lines make sense only for software PWM
Then after you launch linuxcnc, list the available PWM pins and parameters
by typing this in a terminal:
halcmd show pin *pwm* (for pins)
and
halcmd show param *pwm*
(except the num_pwmgens )
This is because those lines make sense only for software PWM
Then after you launch linuxcnc, list the available PWM pins and parameters
by typing this in a terminal:
halcmd show pin *pwm* (for pins)
and
halcmd show param *pwm*
Last edit: 26 Jul 2019 21:37 by PCW.
The following user(s) said Thank You: Erikcnc
Please Log in or Create an account to join the conversation.
27 Jul 2019 07:28 #140721
by Erikcnc
okey. i have done that.
in the terminal i saw at pin:
emcochanger.setpwm
owner= 46
type=float
DIR=out
Value=100
at show param *pwm* Nothing
Replied by Erikcnc on topic emcoturn 120 / 220 tool turret hal outputs
First delete or commnt out all lines in the hal file that have "pwm" in them
(except the num_pwmgens )
This is because those lines make sense only for software PWM
Then after you launch linuxcnc, list the available PWM pins and parameters
by typing this in a terminal:
halcmd show pin *pwm* (for pins)
and
halcmd show param *pwm*
okey. i have done that.
in the terminal i saw at pin:
emcochanger.setpwm
owner= 46
type=float
DIR=out
Value=100
at show param *pwm* Nothing
Please Log in or Create an account to join the conversation.
27 Jul 2019 12:43 #140745
by PCW
Replied by PCW on topic emcoturn 120 / 220 tool turret hal outputs
You should have at least seen num_pwmgens=1
Is that still there in the loadrt-hm2_eth line?
Is that still there in the loadrt-hm2_eth line?
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19200
- Thank you received: 6436
27 Jul 2019 13:45 #140748
by tommylight
Replied by tommylight on topic emcoturn 120 / 220 tool turret hal outputs
Please attach the ini and hal files you are using.
Please Log in or Create an account to join the conversation.
27 Jul 2019 22:04 #140774
by Erikcnc
Replied by Erikcnc on topic emcoturn 120 / 220 tool turret hal outputs
here are the hal and ini files as requested.
if i only comment out two lines i got more parameter . but no num_pwmgen=1
i also found out that one of the four sensors are defected.
so i have to find a new IR photointerruptor.
if i only comment out two lines i got more parameter . but no num_pwmgen=1
i also found out that one of the four sensors are defected.
so i have to find a new IR photointerruptor.
Please Log in or Create an account to join the conversation.
29 Jul 2019 16:12 #140890
by Erikcnc
Replied by Erikcnc on topic emcoturn 120 / 220 tool turret hal outputs
encoder is working again.
so, what am i doing wrong in the hal file?
so, what am i doing wrong in the hal file?
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19200
- Thank you received: 6436
29 Jul 2019 16:27 #140892
by tommylight
Replied by tommylight on topic emcoturn 120 / 220 tool turret hal outputs
Change num_stepgens to 4.
Activate the
#addf pwmgen.make-pulses base-thread
and change it to servo-thread
That should do it.
Activate the
#addf pwmgen.make-pulses base-thread
and change it to servo-thread
That should do it.
The following user(s) said Thank You: Erikcnc
Please Log in or Create an account to join the conversation.
Time to create page: 0.082 seconds