- Posts: 153
- Thank you received: 0
emcoturn 120 / 220 tool turret hal outputs
PCW wrote: Did you look at the pin and parameter list from my previous post?
That has the correct names
(its much easier to list the actual names and copy/paste them into the hal file rather than attempt to type them in correctly)
yep, it was a typo. a _ instead of a -
so i was getting the error that hm2_7i76e.0.pwmgen.00.enable al; ready was linked to Xen
i thought tis was the right one and it works. can you confirm?
to
now its time to connect the L298n to the dir + and Step + right?
finger crossed for no magic smoke
Please Log in to join the conversation.
that the idle states of the pins (before LinuxCNC starts)
and PWM polarity are correct.
And even then, power the LM298 from a low voltage current limited supply
Please Log in to join the conversation.
PCW wrote: Umm I would not connect _ANYTHING_ until you verify
that the idle states of the pins (before LinuxCNC starts)
and PWM polarity are correct.
And even then, power the LM298 from a low voltage current limited supply
hmm okay...i already wirred it though..nothing weird happend yet. board runs from 24v and its active.
so, what is your advice to messure this?
i can try to run the L298n from 12v first
Please Log in to join the conversation.
2. You can measure the idle state of the output pins with a voltmeter
3. You can measure the PWM % with a voltmeter also (the step/dir pins should be at 2.5V at 50%PWM)
4. If I assume the LM298 inputs are active high you will want to use the negative step/dir pins and invert those pins in hal
Please Log in to join the conversation.
PCW wrote: 1. What is the active polarity of the LM298 inputs? (the idle state must be the inactive state)
2. You can measure the idle state of the output pins with a voltmeter
3. You can measure the PWM % with a voltmeter also (the step/dir pins should be at 2.5V at 50%PWM)
4. If I assume the LM298 inputs are active high you will want to use the negative step/dir pins and invert those pins in hal
allright, the story continues
i messured the step and dir outputs before linuxcnc started/
i am reading 5v from them.
for the L298n, dont know where to start.
Please Log in to join the conversation.
The - pins should be in a low state before LinuxCNC starts
Please Log in to join the conversation.
PCW wrote: Note: there are 2 outputs per signal (STEP+ and STEP-, DIR+ and DIR-)
The - pins should be in a low state before LinuxCNC starts
measured between ground and step- / dir- and reading 0v
about the connection.
in the video on youtube, he has connect IN1 and IN2 to step+ and Dir+
I dont know where the pwm (ENA) goes. Not to the mesa board though. i could set it to 5v with a jumper.
Please Log in to join the conversation.
also this one doesn't give 5v if the voltage is above 12v.
so i will use the V5 power from the mesa to enable the ENA pin on the motor driver board.
Please Log in to join the conversation.
PCW wrote: 1. What is the active polarity of the LM298 inputs? (the idle state must be the inactive state)
So, i dont understand this correctly (English is not my main language).
What i know, from the schematics, is that if both IN1 and IN2 are low or high, the motor is standing still.
If one of those pins are high, the motor will rotate CW or CCW.
The ENA pin controlles the speed of the motor. In this case i will set 5v (max rpm) to this pin. It is not controlled in this case.
PCW wrote: 2. You can measure the idle state of the output pins with a voltmeter
I think i have done this right.....
PCW wrote: 3. You can measure the PWM % with a voltmeter also (the step/dir pins should be at 2.5V at 50%PWM)
How do i know its at 50%?
PCW wrote: 4. If I assume the LM298 inputs are active high you will want to use the negative step/dir pins and invert those pins in hal
And i invert the pins by change the output-type in hal?
Thanks for all the afford and support. I really appreciate it.
Please Log in to join the conversation.
Set the PWM output type to 1
connect IN1 to DIR+
connect IN2 to DIR-
connect ENA to STEP-
invert the step pin (now PWMgen out0)
How you invert the PWMGen depends on the LinuxCNC version
What version are you running?
Please Log in to join the conversation.
