Mesa 5i20 - 7i37TA - 7i48

More
05 Apr 2012 17:35 #18997 by Will Gilmore
I'm totally new to LinuxCNC. I'm working on a retrofit of a Tree Journeyman 320 vertical mill with Mesa boards and AMC drives.

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:
File Attachment:


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.

More
05 Apr 2012 17:40 #18998 by PCW
Replied by PCW on topic Re:Mesa 5i20 - 7i37TA - 7i48
7I37TA inputs and outputs are inverted so for the outputs you would need for example:
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.

More
05 Apr 2012 19:05 #18999 by Will Gilmore
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

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.

More
05 Apr 2012 19:25 #19000 by BigJohnT
Unless your home-x signal is connected to axis.0.home-sw-in somewhere else in your hal file you will need that in your net line.

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.

More
05 Apr 2012 19:33 #19001 by Will Gilmore
ok i get the inputs. why isnt this working for me:

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.

More
05 Apr 2012 19:52 #19002 by BigJohnT
Do you have something hooked to the machine-is-enabled signal somewhere else in your hal file to actually turn the output on?

John

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

More
05 Apr 2012 19:53 #19003 by BigJohnT
And have you read this basic hal info ?

John

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

More
06 Apr 2012 16:19 #19013 by PCW
Replied by PCW on topic Re:Mesa 5i20 - 7i37TA - 7i48
"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

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

More
06 Apr 2012 16:49 #19014 by Will Gilmore
BigJohnT wrote:

And have you read this basic hal info ?

John

Yes., but I need to read it several times and actually do it to understand it.

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.

More
08 Apr 2012 20:46 #19030 by cmorley
Obviously you figured out how to do this by hand but for others info:

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.

Moderators: cmorley
Time to create page: 0.175 seconds
Powered by Kunena Forum