Enabling driver enable (disabling confusion).

More
13 Feb 2024 19:56 #293253 by null
I think I'm pretty close to my first open source chips. I'm trying to use the enable function of my drivers. I assume that when the drivers are not-enabled the motors receive no power (free to turn by hand)?

I was able to get an x-axis motor moving by copying  /usr/share/linuxcnc/hallib/axis_manualtoolchange.hal into the directory pncconf installed my_LinuxCNC_machine.hal.  The x-axis motor jogs and appears to follow a LinuxCNC g-code program as expected.

I wired Mesa 7i96s TB3 pin 13 SSR  OUT- to ENA+ (5V) driver enable.
I wired Mesa 7i96s TB3 pin 14 SSR OUT+ to power supply +5V (via fast 2A fuse).
I wired ENA- (ENA) driver enable to power supply GND.

In the pncconf created my_LinuxCNC_machine.hal file I modified the 'net machine-is-enabled' line to:
net machine-is-enabled hm2_7i96s.0.ssr.00.invert-00 <= motion.motion-enabled
In this state the motor won't jog or follow a program. The motor is only free to turn by hand when E-stop=OFF & Machine-power=ON, otherwise the motor holds position.

I tried: net machine-is-enabled hm2_7i96s.0.ssr.00.out-00 <= motion.motion-enabled
In this state the motor won't jog or follow a program. When E-stop=OFF & Machine-power=ON the motor is free to turn by hand, otherwise the motor holds position.

I tried: net machine-is-enabled hm2_7i96s.0.ssr.00.out-00 hm2_7i96s.0.ssr.00.invert-00 <= motion.motion-enabled
In this state the motor jogs and follows a program but there is no motor disabled state.

Any thoughts...(or is it back to the manuals)?

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

More
14 Feb 2024 03:45 - 14 Feb 2024 03:57 #293293 by PCW
if you wanted inverted outputs(off to enable the drive)  you would:

setp hm2_7i96s.0.ssr.00.invert-00 true
net machine-is-enabled hm2_7i96s.0.ssr.00.out-00

If its possible to setup your drives to be enabled when the enable input is driven
that's better since it will be disabled when LinuxCNC is not running or faults.
 
Last edit: 14 Feb 2024 03:57 by PCW.
The following user(s) said Thank You: null

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

More
15 Feb 2024 14:30 #293398 by null
PCW, thanks for your successful suggestion. I included the <optional(?) second pin-name> motion.motion-enabled:

setp hm2_7i96s.0.ssr.00.invert-00 = true
net machine-is enabled hm2_7i96s.0.ssr.00.out-00 <= motion.motion-enabled

I will read up on HAL but for the moment I think I have the basis of a working machine.

I take your point 'setup drives to be enabled when the enable input is driven'. The only relevant advice my driver data sheet has about 'enabling' is "Input 5V on pins ENA+ & ENA- switches power off to the motor".

1) I haven't flashed my Mesa 7i96s, I wonder if it's possible to set the ssr to a default power-on zero resistance state by flashing.
2) I'll see if it's practicable to hold the ssr LOW with a pull down resistor?
3) Are there alternatives?

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

More
15 Feb 2024 15:01 - 15 Feb 2024 15:02 #293403 by PCW
There is no way to have SSR 0..3s in the on state at power on.
The low current outputs could do this by replacing
the SSR module with a form B (NC) version but really
requiring an input voltage to disable motion is not a
great idea.

I think the DISABLE input mode is commonly done so that
the drives work  if the enables are not connected, allowing
them to be ignored (which is likely the most common use case)

Many drives allow you do invert the enable action so normal outputs
can work.

If your drive cannot do this, there's still a trick you could do:

5V --> 50 Ohm 1W resistor -> all enable + pins
GND -> all enable- pins

Then connect SSR0+ to all enable+ pins and SSR0- to GND

This way, all enables are powered (drives disabled) at power
up and will only be enabled when SSR0 is turned on and shorts
out all the enable+ and enable- pins.
(wasting 1/2W in the 50 Ohm resistor)
 
Last edit: 15 Feb 2024 15:02 by PCW.
The following user(s) said Thank You: null

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

More
18 Feb 2024 14:11 #293685 by null
PCW - thanks again, your interface circuit suggestion works well. 1/2Watt is a bargain :)
The following user(s) said Thank You: tommylight

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

Time to create page: 0.091 seconds
Powered by Kunena Forum