NEWS
LinuxCNC 2.5.4 Release
LinuxCNC 2.5.4 Update Released (changelog).
 
LinuxCNC 2.5.3 Release
LinuxCNC 2.5.3 Update Released (changelog).
 
LinuxCNC 2.5.2 Release
LinuxCNC 2.5.2 Update Released (changelog).
 
Home Forum Configuring LinuxCNC Basic Configuration Need to connect pin problem

Welcome, Guest
Username: Password: Remember me

TOPIC: Need to connect pin problem

Re:Need to connect pin problem 31 May 2012 10:57 #20533

  • cwebs
  • cwebs's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 123
  • Karma: 5
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
The administrator has disabled public write access.

Re:Need to connect pin problem 31 May 2012 13:29 #20536

  • BigJohnT
  • BigJohnT's Avatar
  • OFFLINE
  • Administrator
  • Posts: 5804
  • Thank you received: 232
  • Karma: 155
So the following didn't work for you?

net machine.is-on halui.machine.is-on => parport.0.pin-16-out

John
The administrator has disabled public write access.

Re:Need to connect pin problem 31 May 2012 17:08 #20544

  • cwebs
  • cwebs's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 123
  • Karma: 5
Sorry, I was working on other stuff so I'll try it again tomorow. Carl
The administrator has disabled public write access.

Re:Need to connect pin problem 01 Jun 2012 05:47 #20561

  • cwebs
  • cwebs's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 123
  • Karma: 5
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
The administrator has disabled public write access.

Re:Need to connect pin problem 01 Jun 2012 06:44 #20564

  • PCW
  • PCW's Avatar
  • OFFLINE
  • Moderator
  • Posts: 2525
  • Thank you received: 243
  • Karma: 136
Note that the "#" in the first column means that the line becomes a comment (so its disabled)

Is the output polarity correct? if not you might try this pair of lines:

setp parport.0.pin-16-out-invert 1
net halui.machine.is-on => parport.0.pin-16-out
The administrator has disabled public write access.

Re:Need to connect pin problem 01 Jun 2012 08:22 #20569

  • cwebs
  • cwebs's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 123
  • Karma: 5
I used the "#" to comment out one line at a time to try different the differant lines that John and ArcEye gave me because they are differant. If the polarity was backwards wouldn't the relay still work? The relay is only spst and NO when no signel NC when 5 volts are applied to the signel in. The pin 16 is still low/not connected. Tested pin 16 with volt meter also with no HIGH. I will try the invert and see what happens. Thanks. Carl
The administrator has disabled public write access.

Re:Need to connect pin problem 01 Jun 2012 08:57 #20571

  • PCW
  • PCW's Avatar
  • OFFLINE
  • Moderator
  • Posts: 2525
  • Thank you received: 243
  • Karma: 136
well if you can't control the pin the first thing I would do is
unlink parport.0.pin-16-out from whatever drives it and see if you can
toggle pin 16 by hand (via the machine show HAL configuration menu in Axis)
that is, type:
setp parport.0.pin-16-out true and
setp parport.0.pin-16-out false
in the HAL command window
The administrator has disabled public write access.

Re:Need to connect pin problem 01 Jun 2012 09:46 #20573

  • BigJohnT
  • BigJohnT's Avatar
  • OFFLINE
  • Administrator
  • Posts: 5804
  • Thank you received: 232
  • Karma: 155
The following will never work and should throw an error as you didn't have a signal name after the word net.

net halui.machine.is-on => parport.0.pin-16-out

Can I suggest again that you read the section on the net command that I linked to you before. Understanding the simple syntax of a net command is paramount to being able to add one to your hal file.

Once you verify that parlallel port 16 actually works as you expect then put the following line in your hal file

net machine.is-on halui.machine.is-on => parport.0.pin-16-out

Back in the machine > show hal configuration window select the watch window and add the two pins from above and the signal from above. Toggle machine power and watch the status of the three things.

John
The administrator has disabled public write access.

Re:Need to connect pin problem Edited 01 Jun 2012 11:17 #20578

  • cwebs
  • cwebs's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 123
  • Karma: 5
Ok you guys. The fish in my picture has more hair left the me.

I did as you told me to do John. Those three lines in hal configuration worked. True, turned the relay on... False, turned the relay off. Then, net machine.is-on halui.machine.is-on => parport.0.pin-16-out , turned it on and off uning the power button in Axis! So what do I need in the .hal file?

Edit. Will I still have to "unlinkp" now we know the pin will work?
After testing with halconf I tried " net machine.is-on halui.machine.is-on => parport.0.pin-16-out " in the .hal file. Did not work. I also tried the "setp parport.0.pin-16-out TRUE and false lines. no help.

Another thing I don't understand is when to use ... and ---. ( dots and dashes), looking more like morse code to me.

PS, The driver power switch in only three steps away and it's begining to look like I might lose weight going back and forth to it.
Last Edit: 01 Jun 2012 12:21 by cwebs.
The administrator has disabled public write access.

Re:Need to connect pin problem Edited 01 Jun 2012 17:52 #20585

  • BigJohnT
  • BigJohnT's Avatar
  • OFFLINE
  • Administrator
  • Posts: 5804
  • Thank you received: 232
  • Karma: 155
cwebs wrote:
Ok you guys. The fish in my picture has more hair left the me.

I did as you told me to do John. Those three lines in hal configuration worked. True, turned the relay on... False, turned the relay off. Then, net machine.is-on halui.machine.is-on => parport.0.pin-16-out , turned it on and off uning the power button in Axis! So what do I need in the .hal file?

Edit. Will I still have to "unlinkp" now we know the pin will work?
After testing with halconf I tried " net machine.is-on halui.machine.is-on => parport.0.pin-16-out " in the .hal file. Did not work. I also tried the "setp parport.0.pin-16-out TRUE and false lines. no help.

Another thing I don't understand is when to use ... and ---. ( dots and dashes), looking more like morse code to me.

PS, The driver power switch in only three steps away and it's begining to look like I might lose weight going back and forth to it.

The only line you should need in your hal file is:

net machine.is-on halui.machine.is-on => parport.0.pin-16-out

unlinkp is a way to unlink a pin usually for testing.

If it worked in show hal configuration it should work in your hal file.
Do you have more than one hal file?
Which file did you add net machine.is-on halui.machine.is-on => parport.0.pin-16-out to?

What does "Did not work." mean? you got an error? nothing changed states?

Help us understand what your seeing...

What is the dots and dashes about?

John
The administrator has disabled public write access.
Moderators: Rick G
Time to create page: 0.783 seconds
Powered by Kunena Forum
© 2014 LinuxCNC.org
Joomla! is Free Software released under the GNU General Public License.