Near

More
8 years 7 months ago #107854 by jensor
Near was created by jensor
Where do I find detailed instructions on using the "near" component of hal. I see it used in examples but unable to find how to use it.

Please Log in to join the conversation.

More
8 years 7 months ago #107857 by PCW
Replied by PCW on topic Near
Have you read the (rather terse) manual page?

man near

Please Log in to join the conversation.

More
8 years 7 months ago #107862 by andypugh
Replied by andypugh on topic Near
Terse is the word, isn't it?
linuxcnc.org/docs/2.7/html/man/man9/near.9.html

You need to load the component
Code:
loadrt near count=1
then add it to a thread so that it gets updated every servo cycle
Code:
addf near.0 servo-thread
Then connect the inputs and outputs
Code:
net some_signal_name one.of-the.hal.pins near.0.in net another_signal_name near.0.out another.hal.pin
and set the tolerance and comparison value
Code:
setp near.0.in2 100 setp near.0.difference 1

The comparison value can be supplied by another HAL pin if required.

Please Log in to join the conversation.

More
8 years 7 months ago #107863 by jensor
Replied by jensor on topic Near
Thanks for that info. That does work however it is more convenient in my situation to be able to access it on line. Is that possible. My linux machine is on the bridgeport in my shop, while I'm sitting here in my kitchen on my laptop.
Is there a way of getting to this information online?

Please Log in to join the conversation.

More
8 years 7 months ago #107865 by dgarrett
Replied by dgarrett on topic Near
Docs (current branch): linuxcnc.org/docs/2.7/html/

Scroll down for the man pages

Example: linuxcnc.org/docs/2.7/html/man/man9/near.9.html

On a machine with LinuxCNC installed, you can always use the command line:
Code:
$ man near

Please Log in to join the conversation.

More
8 years 7 months ago #107871 by PCW
Replied by PCW on topic Near
If you are lazy and forgetful like me you can also goggle:

man linuxcnc near

Please Log in to join the conversation.

More
8 years 7 months ago #107895 by jensor
Replied by jensor on topic Near
Yes, that finds it, however

linuxcnc haui near

doesn't find it for me.
It seems like you need man in the search data.

Now I have bookmarked
linuxcnc.org/docs/2.7/html/

Please Log in to join the conversation.

More
8 years 7 months ago #107902 by Todd Zuercher
Replied by Todd Zuercher on topic Near
You don't need "man" in the google search "linuxcnc near" or 'linuxcnc near.9" are enough to bring up the man page as the first couple hits. (At least for me, but maybe Google knows me too well.)

Please Log in to join the conversation.

Time to create page: 0.089 seconds
Powered by Kunena Forum