PathPilot Lathe with 6 place turret

More
27 Mar 2017 11:50 #90349 by brianTruck
Andy,
Here is what get when I try and compile on the PathPilot computer.

operator@tormachpcnc:~$ sudo comp --install oracchanger.comp
sudo: comp: command not found
operator@tormachpcnc:~$ comp --install oracchanger.comp
The program 'comp' can be found in the following packages:
* mailutils-mh
* nmh
Try: sudo apt-get install <selected package>
operator@tormachpcnc:~$

I also have a little bug in the home switches.I am using 2 separate proximity switches on two inputs (tormach used 2 switches on one input). I modified the code to xor the inputs, It homes just like it should but completely locks up the computer if you trip them after it's been homed.


########################## LIMIT SWITCH #################################
addf xor2.0 servo-thread
net limit-switch-in1 xor2.0.in0 <= hm2_5i25.0.7i76.0.0.input-03-not
net limit-switch-in2 xor2.0.in1 <= hm2_5i25.0.7i76.0.0.input-04-not
net limit-switch-inAll <= xor2.0.out
########################################################################
# home + limit switch

# must noise debounce inputs - otherwise coolant on/off relay can cause spurious estops/limits
net limit-switch-inAll => debounce.1.0.in
net door-switch-in => debounce.1.1.in

net all-limit-home <= debounce.1.0.out

# this truth table makes lut5.0.out false if any inputs are true
# in other words, if any axis is homing all-limit is false
# this avoids limit switch errors while homing
setp lut5.0.function 0x1000000
net all-limit-home => lut5.0.in-4
net all-limit <= lut5.0.out

net homing-x <= axis.0.homing => lut5.0.in-0
net homing-y <= axis.1.homing => lut5.0.in-1
net homing-z <= axis.2.homing => lut5.0.in-2
net limit-switch-enable => lut5.0.in-3



Any input would be greatly appreciated.

Brian

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

More
27 Mar 2017 12:05 #90353 by andypugh

sudo: comp: command not found
operator@tormachpcnc:~$ comp --install oracchanger.comp
The program 'comp' can be found in the following packages:
* mailutils-mh
* nmh
Try: sudo apt-get install <selected package>


OK, do _not_ do the suggested install, that message is actually why we changed the name of the hal-compiler from "comp" to "halcompile"

What message do you get with "halcompile"

It homes just like it should but completely locks up the computer if you trip them after it's been homed.

Locks up the PC, or turns of LinuxCNC? ?

Why two switches? Why Xor?

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

More
27 Mar 2017 12:33 - 27 Mar 2017 12:36 #90357 by brianTruck



What message do you get with "halcompile"

I get command not found.



Locks up the PC, or turns of LinuxCNC? ?

It freezes totally ,and the only way to get out is to shut off computer.



Why two switches? Why Xor?


I had two NPN proximity switches on hand ,if I would had PNP switches I could have left the code the way it was( tormach uses two switches in series). I maybe could have modified the LUT5 part of the code, but it seemed easier to just xor in two .

Thanks'
Brian
Last edit: 27 Mar 2017 12:36 by brianTruck. Reason: making quote work

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

More
27 Mar 2017 12:41 #90358 by andypugh

What message do you get with "halcompile"

I get command not found.


I have no idea if halcompile or comp are available to use with PathPilot.
However, halcompile is a Python script, it is quite likely you can just copy the file into the normal place (usr/bin?) and it will just work.

Locks up the PC, or turns of LinuxCNC? ?

It freezes totally ,and the only way to get out is to shut off computer.[/quote]
That isn't normal. even if a limit switch is pressed during operation.

Why two switches? Why Xor?

I had two NPN proximity switches on hand ,if I would had PNP switches I could have left the code the way it was( tormach uses two switches in series). I maybe could have modified the LUT5 part of the code, but it seemed easier to just xor in two .[/quote]
I was asking what the two switches do. I can understand OR and maybe AND for a pair of switches, but not XOR.

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

More
27 Mar 2017 12:54 - 27 Mar 2017 12:58 #90360 by Lcvette

I had two NPN proximity switches on hand ,if I would had PNP switches I could have left the code the way it was( tormach uses two switches in series). I maybe could have modified the LUT5 part of the code, but it seemed easier to just xor in two .


I don't want to slow you guys down on your thought flow, just curious about the switch comment... PNP and NPN is just changing the signal from +24v to 0v is it not? Does tormach use a NO or NC type switch? The reason I ask is I have both NPN-NC and PNP-NC switches on hand and had planned on using the NPN-NC as per the wiki's recommendation. Bit again seems like sticking to the PP configuration design would yield fewer obstacles.

Thanks!

Chris
Last edit: 27 Mar 2017 12:58 by Lcvette.

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

More
27 Mar 2017 14:57 #90375 by PCW
If you are using a 7I76/7I77, PNP proximity switches are the best since
they will wire directly to the field inputs

N/C switches are normally preferred because a broken wire will be detected as a fault

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

More
27 Mar 2017 21:59 - 27 Mar 2017 22:00 #90400 by brianTruck
The xor was for testing , they are back to or's now. The lockup is diffidently from the or's , if I take them out and use one input ,run homing ( using the one switch to trigger home for x and z) it never locks up, even if I randomly trigger the home switch. This would never be a problem on a tormach because they use 2 switches in series and the controller really doesn't know what switch it tripped ,It just knows that it tripped one.

I copied Halcompile to user/bin/ as root and now when I run it I get bash :/user/bin/halcompile: permission denied.


Chris,
My first choice is PNP as for the reason PCW stated. Two NPN's would work on one pin without re-coding, just not very safe.

Thanks
Last edit: 27 Mar 2017 22:00 by brianTruck.
The following user(s) said Thank You: Lcvette

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

More
27 Mar 2017 22:09 #90401 by andypugh

I copied Halcompile to user/bin/ as root and now when I run it I get bash :/user/bin/halcompile: permission denied.


You might need to give it execute permissions. And it needs to be in the same place that it was on the other machine.

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

More
28 Mar 2017 00:36 #90412 by brianTruck
Have permission now,tried again. Now I get can't find Makfile.modinc ,found that file and copied it to usr/share/linuxcnc (linuxcnc wasn't there, so I made it). still getting the same.


When it locks up, I can back the offending sensor away and it starts working normally.
.
.
Brian

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

More
28 Mar 2017 03:51 #90416 by Lcvette

The xor was for testing , they are back to or's now. The lockup is diffidently from the or's , if I take them out and use one input ,run homing ( using the one switch to trigger home for x and z) it never locks up, even if I randomly trigger the home switch. This would never be a problem on a tormach because they use 2 switches in series and the controller really doesn't know what switch it tripped ,It just knows that it tripped one.

I copied Halcompile to user/bin/ as root and now when I run it I get bash :/user/bin/halcompile: permission denied.


Chris,
My first choice is PNP as for the reason PCW stated. Two NPN's would work on one pin without re-coding, just not very safe.

Thanks


Check! Ordered a pair of SN04-P2 PNP-NC proximity sensors! Hopefully that makes it easier and safer! Thanks for the advise!

Chris

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

Moderators: cncbasher
Time to create page: 0.096 seconds
Powered by Kunena Forum