Proximity Switches N/O On 7i77 with 5i25

More
13 Mar 2019 04:49 #128486 by skyfab
Hello I'm retrofitting a Hurco with Linuxcnc im using a mesa 5i25 with one 7i77 and there is some proximity switches part number 101xk5-1 NPN N/O and because there 5V and throw a ground when contacted I decided on using the extra encoders on 7i77 board so signal from switch goes to A + encoder pin however im new to configuring Hal file manually and was not sure how to label encoder pin under correct limit area im using pin 17 QA5 would I do it like this?
net min-home-x <= hm2_5i25.0.7i77.0.0.encoder-17

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

More
13 Mar 2019 12:14 #128507 by andypugh
PNP proximity switches work better with the 7i77 (which appears to be something that you have already realised)

You might be able to use the encoder inputs, but bear in mind that these are multiplexed (2 sets of ABZ pins for each 3 gpio pins on the 5i25) so it might not be as simple as it appears.

I believe that the normal advice for 7i77 and PNP proximity sensors is to pull the input pin up to the field power rail with a resistor (2k should be fine, so there is only 10mA flowing through the prox. Lower would give better noise immunity, depending on the current rating of the sensor) and then let the sensor pull that down to signal a change in state.

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

More
13 Mar 2019 13:03 - 13 Mar 2019 13:04 #128512 by PCW
The A,B, Index encoder pins are available so the multiplexing is not an issue

The pins (for encoder 4 for example) would be:

hm2_5i25.0.encoder.04.input-a
hm2_5i25.0.encoder.04.input-b
hm2_5i25.0.encoder.04.input-index
Last edit: 13 Mar 2019 13:04 by PCW.

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

More
14 Mar 2019 04:31 #128556 by skyfab
Well its actually more embarrassing than anything i know what pins
hm2_5i25.0.encoder.05.input-a

however where do I comment that in the hal file?? a example hal limit

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

More
14 Mar 2019 10:08 - 14 Mar 2019 10:10 #128567 by andypugh

however where do I comment that in the hal file?? a example hal limit


The HAL depends on which limit each sensor is. It is possible to wire many prox switches in parallel to share input pins, but your machine probably doesn't do that.

There are three HAL pins from the motion component per axis/joint.

axis.N.home−sw−in
axis.N.neg−lim−sw−in
axis.N.pos−lim−sw−in

These can be connected separately, all together or in combination.

For example
net all-X-limits-and-homes hm2_5i25.0.encoder.04.input-a axis.N.home−sw−in axis.0.neg−lim−sw−in axis.0.pos−lim−sw−in

Or, equivalently, and in any order, anywhere in the HAL file
net all-X-limits-and-homes hm2_5i25.0.encoder.04.input-a
net all-X-limits-and-homes  axis.0.home−sw−in 
net all-X-limits-and-homes axis.0.neg−lim−sw−in 
net all-X-limits-and-homes axis.0.pos−lim−sw−in

You seemed to hint that home and min-X were the same sensor, so you might have
net home-min-X <= hm2_5i25.0.encoder.04.input-a
net max-X <= hm2_5i25.0.encoder.04.input-b
net home-min-X => axis.0.home−sw−in  axis.0.neg−lim−sw−in 
net max-X =>  axis.0.pos−lim−sw−in

the format of a net command is:
net signal-name pin-name (pin-name)
ie there has to be a signal name, then it is followed by on or more pin names. Only one pin name can be a writer-to-HAL
The signal names are something you choose yourself (they have no special meaning) but the pin names have to exist
each pin name can only exist in one net statement. To use a signal in more than one place re-use the signal name, not any pin names.
You can add => <= and <=> symbols to aid human readability, but they are ignored by the HAL parser.
Last edit: 14 Mar 2019 10:10 by andypugh.
The following user(s) said Thank You: skyfab

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

More
14 Mar 2019 21:44 #128612 by skyfab
Thank you for helping a newbie that works great Very helpful..

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

More
13 Apr 2019 07:33 #130759 by pl7i92
this sounds great
can you give us a Backfeed
WHAT sensors you use
and the Configuration you finaly put on the mashine
Like Sensor A Xhome xmin
...
that woudt help some people facing same issue

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

More
14 Apr 2019 04:17 #130820 by skyfab
the proximity switches I used are part number 101xk5-1 NPN N/O (not ideal because they cant handle current and npn no)

I used unused encoder pins in open ended mode (jumpers next to encoders) had correct built in circuit with pull up resistor

as for homing hal file example on my 7i77 Mesa which are awesome cards....

#
X LIMITS

net home-x <= hm2_5i25.0.encoder.05.input-a
net max-x <= hm2_5i25.0.encoder.05.input-b

#
Y LIMITS

net home-y <= hm2_5i25.0.encoder.04.input-a
net max-y <= hm2_5i25.0.encoder.04.input-b

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

Time to create page: 0.077 seconds
Powered by Kunena Forum