emcoturn 120 / 220 tool turret hal outputs

More
7 years 3 months ago #140682 by tommylight
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.

Please Log in to join the conversation.

More
7 years 3 months ago #140684 by PCW
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

Please Log in to join the conversation.

More
7 years 3 months ago #140687 by Erikcnc

PCW wrote: 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.


Code:
#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! :cheer:

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?

Please Log in to join the conversation.

More
7 years 3 months ago #140689 by PCW
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*

Please Log in to join the conversation.

More
7 years 3 months ago #140721 by Erikcnc

PCW wrote: 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 to join the conversation.

More
7 years 3 months ago #140745 by PCW
You should have at least seen num_pwmgens=1
Is that still there in the loadrt-hm2_eth line?

Please Log in to join the conversation.

More
7 years 3 months ago #140748 by tommylight
Please attach the ini and hal files you are using.

Please Log in to join the conversation.

More
7 years 3 months ago #140774 by Erikcnc
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. :dry:

Please Log in to join the conversation.

More
7 years 3 months ago #140890 by Erikcnc
encoder is working again.

so, what am i doing wrong in the hal file?

Please Log in to join the conversation.

More
7 years 3 months ago #140892 by tommylight
Change num_stepgens to 4.
Activate the
#addf pwmgen.make-pulses base-thread
and change it to servo-thread
That should do it.

Please Log in to join the conversation.

Time to create page: 0.081 seconds
Powered by Kunena Forum