Mesa 5i20 - 7i37TA - 7i48
- Will Gilmore
- Offline
- Junior Member
- Posts: 21
- Thank you received: 0
I've done a bunch of wiring and I finally turned the computer on yesterday. I'm working on getting the relay outputs straightened out before I jump into getting the drives going. Here is my wiring diagram:
I generated my hal file with PnCConf. Wire 231 is connected to OUT7+ and wire 500 is connected to OUT7- on the 7i37. Here is part of the hal file.
# --- MACHINE-IS-ENABLED ---
setp hm2_5i20.0.gpio.047.is_output true
net machine-is-enabled hm2_5i20.0.gpio.047.out
I'm getting logic opposite to what I want. I open LinuxCNC. When OFF is displayed in lower left I can push the start button and the relay will energize. When ON is displayed I push start and nothing happens. I looked in HAL CONFIG and the machine-is-enabled signal is doing what I expect (TRUE when ON and FALSE when OFF).
Thanks.
Please Log in or Create an account to join the conversation.
setp hm2_5i20.0.gpio.047.invert_output true
for inputs you use the in_not pins
Please Log in or Create an account to join the conversation.
- Will Gilmore
- Offline
- Junior Member
- Posts: 21
- Thank you received: 0
MACHINE-IS-ENABLED ---
setp hm2_5i20.0.gpio.047.invert_output true
net machine-is-enabled hm2_5i20.0.gpio.047.out
Now I can't get relay to energize in ON or OFF.
Also for inputs would I use something like this:
# --- HOME-X ---
net home-x <= hm2_5i20.0.gpio.025.in_not
Thanks.
Please Log in or Create an account to join the conversation.
net home-x axis.N.home-sw-in <= hm2_5i20.0.gpio.025.in_not
John
Please Log in or Create an account to join the conversation.
- Will Gilmore
- Offline
- Junior Member
- Posts: 21
- Thank you received: 0
MACHINE-IS-ENABLED ---
setp hm2_5i20.0.gpio.047.invert_output true
net machine-is-enabled hm2_5i20.0.gpio.047.out
Please Log in or Create an account to join the conversation.
John
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
MACHINE-IS-ENABLED ---
setp hm2_5i20.0.gpio.047.invert_output true
net machine-is-enabled hm2_5i20.0.gpio.047.out"
Note that you need both:
setp hm2_5i20.0.gpio.047.is_output true
setp hm2_5i20.0.gpio.047.invert_output true
in case that was not clear
Please Log in or Create an account to join the conversation.
- Will Gilmore
- Offline
- Junior Member
- Posts: 21
- Thank you received: 0
Yes., but I need to read it several times and actually do it to understand it.And have you read this basic hal info ?
John
PCW wrote:
"I opened the hal file. Changed to this:
MACHINE-IS-ENABLED ---
setp hm2_5i20.0.gpio.047.invert_output true
net machine-is-enabled hm2_5i20.0.gpio.047.out"
Note that you need both:
setp hm2_5i20.0.gpio.047.is_output true
setp hm2_5i20.0.gpio.047.invert_output true
in case that was not clear
Ah ha!
Please Log in or Create an account to join the conversation.
In PNCconf there is a check button beside the signal pin type combo box, it is an invert checkbox.
Checking it will add the proper HAL code to invert the signal.
Please Log in or Create an account to join the conversation.