7i76e use outputs to toggle motor enable
iocontrol.0.user-request-enable sends a pulse when the estop is cleared. You would need an optocoupler or fast signalling relay to switch 5v to the drive. Maybe it could be made to work.I own JMC ihvs57 servos, in the documentation I find:
"Enabling signal: This input signal is used to enable or prohibit; In addition, it can be used to clear the drive alarm. When ENA + is connected to +5 V, ENA-is connected to low power, the drive will cut off the current of each phase of the motor so that the motor is in a free state, where the pulse is not responded and the alarm can be cleared; When this function is not required, the energy signal end is suspended."
So the ENA+ only needs a short pulse to clear the drive, I can't connect the output signal from the 7i76e directly to the ENA+, because it is always on, apart from that the servo accepts only 5 Volts.
In the discussion above the signal is always high on the enable-amp output as far as I understood, any ideas how to connect the ENA+ input in my case?
I could just put a physical push-button inbetween a 5 Volt line, but I would prefer clearing the servos directly from Linuxcnc, something like a button in pyvcp. (Does a push button exist)?
Please Log in or Create an account to join the conversation.
- strahlensauger
-
- Offline
- Elite Member
-
- Posts: 195
- Thank you received: 65
Thank you.
Please Log in or Create an account to join the conversation.
I own JMC ihvs57 servos, [...]
In the discussion above the signal is always high on the enable-amp output as far as I understood, any ideas how to connect the ENA+ input in my case?
I could just put a physical push-button inbetween a 5 Volt line, but I would prefer clearing the servos directly from Linuxcnc, something like a button in pyvcp. (Does a push button exist)?
I'm using the same type of motors, so I would expect the solution works for you too.
In my case, the pin (DIR4- on the mesa board, output 008 in pncConf) that is connected to the ENA+ of my motors, is high when the MachineIsEnabled is true and low when it is false. My multimeter confirmed that the pin changes between 0V and 5V when toggling that enable icon next to the e-stop icon in the top left corner in linuxCNC.
The alarm outputs of the motors are connected to the joint faults in LinuxCNC, which take away the MachineIsEnabled bit (via the custom_postgui.hal file). The pin connected to the ENA+ of my motor follows this to 0V. Someone needs to press the enable button to enable the machine again. That sets MachineIsEnabled to high, which in turn sets the pin to 5V. That way the errors are cleared using built in/standard LinuxCNC logic and buttons, without the need for extra/physical buttons.
The only bug I have, is that the pin follows to 0V a little slowly because the laptop can't communicate faster. Therefore the alarm is cleared as soon as it has triggered the joint fault, so the alarm is cleared a little sooner than I would expect. However, since the joint error is triggered, I don't really mind.
I'm curious if you get the same behaviour...
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
- Posts: 18563
- Thank you received: 6220
The more important part is what caused the fault, and for that the drives have to remain enabled to be able to troubleshoot, so omiting the joint.n.fault in hal will work, does require disabling and enabling LinuxCNC to reset the drives.
Please Log in or Create an account to join the conversation.
The custom hal code:
This nets the halui.joint.N.unhome pins to the alarm signals just fine, according to hal show, but when I send my x joint into error, it remains homed. During my test, I was still in joint mode and had not homed any of the other joints yet.# Include your custom_postgui HAL commands here
# This file will not be overwritten when you run PNCconf again
#*************
# Motor alarms
#*************
# X - Joint 0
net x-alarm <= hm2_7i76e.0.7i76.0.0.input-11-not
net x-alarm => joint.0.amp-fault-in halui.joint.0.unhome
# Y - Joint 1
net y-alarm <= hm2_7i76e.0.7i76.0.0.input-27-not
net y-alarm => joint.1.amp-fault-in halui.joint.1.unhome
# Y2 - Joint 2
net y2-alarm <= hm2_7i76e.0.7i76.0.0.input-31-not
net y2-alarm => joint.2.amp-fault-in halui.joint.2.unhome
# Z - Joint 3
net z-alarm <= hm2_7i76e.0.7i76.0.0.input-15-not
net z-alarm => joint.3.amp-fault-in halui.joint.3.unhome
Is this supposed to work, or am I overlooking something?
Please Log in or Create an account to join the conversation.
- strahlensauger
-
- Offline
- Elite Member
-
- Posts: 195
- Thank you received: 65
The alarm fault pins work well.
@pcnc: When one of the alarm bits is true, I can not toggle the machine-is- enabled by pressing the orange button, I first have to clear the alarm and put a 5v impulse to the ena+
So connecting the ena+ to the dir- signal I don't understand. Still unclear is what signal you are mapping to pin 008 and why. .And without a button, your machine resets itself immediately after the alarm?
Sorry for being that stupid, but could you show me the mapping of pin 008 in the half file, I can not use pncconfig, because it would destroy my hal file.
I would prefer a solution without relay but still I have not connected the enable button and resetting the machine is more or less of academical interest, I still can turn the power off
![;) ;)](/media/kunena/emoticons/wink.png)
Thanks for your patience...
Please Log in or Create an account to join the conversation.
On the mesa 7i76 there is room for 5 step generators, and if I tell it I’m using 4 stepgens, it gives me 2 additional IO pins. On TB3 DIR4+ and - become 008 and the STEP+ and - become 009.
From the documentation, I’m not sure if the 7i85 can do exactly the same, but I’ll post my hal file tonight for reference.
A trick I use to try out stuff like this without messing up my hal file, is to use another configuration (e.g testConfig) to run pncConfig on to check my options and how they manifest in the HAL file.
Please Log in or Create an account to join the conversation.
- strahlensauger
-
- Offline
- Elite Member
-
- Posts: 195
- Thank you received: 65
Sorry it took that long to reach my brain...
I also have a 7i76e but on P1 is a 7i85 connected. I'm planning to use linear scales.
I used to use pncconfig to create test configurations,
but ultimatively the creation of the 7i76 TB5 and TB6 is not working. Didn't have time to check out why that happened so I'm getting used to use vim on my Hal files...
(Just searched the forum: that was a language problem:
LANG=C pncconf in a terminal solved the missing TABs problem)
Please Log in or Create an account to join the conversation.
![:) :)](/media/kunena/emoticons/smile.png)
I'm not entirely sure what you mean with "clear voltage", but the Dir- pin will take the value opposite to the Dir+ pin. If you don't map anything to it, it the dir+ keeps giving 5V and the dir- 0V, no matter what happens.
Here are the HAL and INI files I'm currently developing with:
(Also, don't forget to connect the Field Power on TB1 when you start using TB5 and 6, otherwise LinuxCNC won't start forum.linuxcnc.org/39-pncconf/44668-linu...pncconf-for-mesa7i76)
Attachments:
Please Log in or Create an account to join the conversation.
- strahlensauger
-
- Offline
- Elite Member
-
- Posts: 195
- Thank you received: 65
so often, I get the voltage with two needles connected to the voltmeter and a flashlight underneath the mill... and a lot of cabling making it difficult
to get to the contacts... I got the glass scale really cheap, so it is just fiddling with electronics, almost more fun to me than milling. Just a hobby.
Thanks for the files, if I find some spare time in the next days I'll connect the Alarmreset cables.
Please Log in or Create an account to join the conversation.