Need to connect pin problem
29 May 2012 16:31 #20483
by cwebs
Need to connect pin problem was created by cwebs
I am trying to connect pin 16 of my parport 0 to a SSR relay to turn on the driver board when I turn on the power putton so the driver board is not running all the time. I am not sure I can do it the way I am trying so I need help. This should be easy for you guys. What I have tried is
[ net machine.is-on => parport.0.pin-16-out ]
in the .hal file. Hal meter shows is false with power button on and off. Hal configuration shows , halui.machine.is-on, true and false when clicking the power button on and off. Thanks for any help. Carl
[ net machine.is-on => parport.0.pin-16-out ]
in the .hal file. Hal meter shows is false with power button on and off. Hal configuration shows , halui.machine.is-on, true and false when clicking the power button on and off. Thanks for any help. Carl
Please Log in or Create an account to join the conversation.
29 May 2012 19:27 #20491
by BigJohnT
Replied by BigJohnT on topic Re:Need to connect pin problem
What you have done is created a signal named "machine.is-on" and connected it to your parallel port pin. That will not do any thing by it self.
Read about the net command here.
The simple way is to add the pin "halui.machine.is-on" to your net.
John
Read about the net command here.
The simple way is to add the pin "halui.machine.is-on" to your net.
John
Please Log in or Create an account to join the conversation.
29 May 2012 22:30 #20497
by cwebs
Replied by cwebs on topic Re:Need to connect pin problem
Sorry John but I don't understand your answer.
Reading the Basic HAL Tutorial gives me the empression that I can't assign a pin because I have a joypad using that signal.
"An OUT pin can be connected only if there are no other OUT or IO pins on the signal."
I have a button on the USB joypad used to turn the power button on.
Still lost , Carl
Reading the Basic HAL Tutorial gives me the empression that I can't assign a pin because I have a joypad using that signal.
"An OUT pin can be connected only if there are no other OUT or IO pins on the signal."
I have a button on the USB joypad used to turn the power button on.
Still lost , Carl
Please Log in or Create an account to join the conversation.
29 May 2012 23:54 #20499
by BigJohnT
Replied by BigJohnT on topic Re:Need to connect pin problem
A "signal" can be used on more than one line and you can have as many readers as you want but only one speaker so to speak.
If you have two things toggling an input like coolant you need to look at this example . There are a few more examples like that in that section.
So you have your joypad button turning on the power using halui.machine.on? The pin halui.machine.is-on is a different pin... so no conflict there.
Attach your .hal file(s) so we can look at them.
John
net signal-name out-pin in-pin in2-pin
net signal-name in3-pin
If you have two things toggling an input like coolant you need to look at this example . There are a few more examples like that in that section.
So you have your joypad button turning on the power using halui.machine.on? The pin halui.machine.is-on is a different pin... so no conflict there.
Attach your .hal file(s) so we can look at them.
John
Please Log in or Create an account to join the conversation.
30 May 2012 20:30 - 30 May 2012 20:32 #20515
by cwebs
Replied by cwebs on topic Re:Need to connect pin problem
Here is my .hal file. I only have the one entry that I tried last.
Last edit: 30 May 2012 20:32 by cwebs.
Please Log in or Create an account to join the conversation.
31 May 2012 06:28 #20523
by ArcEye
Replied by ArcEye on topic Re:Need to connect pin problem
Hi
halui.machine.is-on is an exported PIN from the halui module
Your entry
As John said earlier the syntax needs to be
net SIGNAL PIN [PIN....]
so net powered-up halui.machine.is-on => parport.0.pin-16-out
will create a signal called powered-up which other pins can link to if required and links parport.0.pin-16-out to the boolean halui.machine.is-on value.
I think of signals as pieces of bare wire that physically wrap between pins and connect them.
Another pin cannot connect to the same pins but it can connect to the bare wire and share the same signal.
Hope this analogy helps, once you have it straight in your head the whole thing falls into place.
regards
halui.machine.is-on is an exported PIN from the halui module
Your entry
is treating it as a SIGNAL, which is why it doesn't work#This is the only line I left in after trying a few.
net halui.machine.is-on => parport.0.pin-16-out
As John said earlier the syntax needs to be
net SIGNAL PIN [PIN....]
so net powered-up halui.machine.is-on => parport.0.pin-16-out
will create a signal called powered-up which other pins can link to if required and links parport.0.pin-16-out to the boolean halui.machine.is-on value.
I think of signals as pieces of bare wire that physically wrap between pins and connect them.
Another pin cannot connect to the same pins but it can connect to the bare wire and share the same signal.
Hope this analogy helps, once you have it straight in your head the whole thing falls into place.
regards
Please Log in or Create an account to join the conversation.
31 May 2012 17:57 #20533
by cwebs
Replied by cwebs on topic Re:Need to connect pin problem
Working on understanding the code but I only have to do something like this about twice a year and know nothen about the code. I used the spindle connection I did last year as an example. That worked for me then. Will have to see if I can find other examples to copy and change for my use. Then I get a better understanding of the code. Thanks, Carl
Please Log in or Create an account to join the conversation.
31 May 2012 20:29 #20536
by BigJohnT
Replied by BigJohnT on topic Re:Need to connect pin problem
So the following didn't work for you?
net machine.is-on halui.machine.is-on => parport.0.pin-16-out
John
net machine.is-on halui.machine.is-on => parport.0.pin-16-out
John
Please Log in or Create an account to join the conversation.
01 Jun 2012 00:08 #20544
by cwebs
Replied by cwebs on topic Re:Need to connect pin problem
Sorry, I was working on other stuff so I'll try it again tomorow. Carl
Please Log in or Create an account to join the conversation.
01 Jun 2012 12:47 #20561
by cwebs
Replied by cwebs on topic Re:Need to connect pin problem
Still not able to get it to work. When I start the program Linuxcnc the relay does click on and off during the program startup so I know the relay is wired correctly This is what I tried.
net halui.machine.is-on => parport.0.pin-16-out
net machine.is-on halui.machine.is-on => parport.0.pin-16-out
#net powered-up halui.machine.is-on => parport.0.pin-16-out
I also tried # out net halui.machine.is-on => parport.0.pin-16-out
Using either John's or Arceye's didn't work for me. Carl
net halui.machine.is-on => parport.0.pin-16-out
net machine.is-on halui.machine.is-on => parport.0.pin-16-out
#net powered-up halui.machine.is-on => parport.0.pin-16-out
I also tried # out net halui.machine.is-on => parport.0.pin-16-out
Using either John's or Arceye's didn't work for me. Carl
Please Log in or Create an account to join the conversation.
Time to create page: 0.103 seconds