count works, names does not

More
27 Sep 2018 07:26 #118030 by ben_benson
Hi,

I am running into Error Messages using the "names" call of some rt modules, in my case encoder and lowpass.
It does load the realtime module, adds it to a thread, but calling it later in the hal gives me a "not found....."

loadrt encoder names = x_feedback,spindle
addf encoder.x_feedback servo-thread

net encoder.spindle.velocity .....


Anyone a clue ?

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

More
27 Sep 2018 10:00 #118035 by andypugh
To find out what functions and pin names you get, you can run the commands a the command line.

Open a terminal with linuxcnc not running, and
halrun
loadrt encoder names = x_feedback,spindle
addf encoder.x_feedback servo-thread
show funct
show pin
show param
exit

However, from what you are saying I suspect that the problem is using a pin-name in the place where "net" expects you to use a signal name.

The first thing after the "net" command is a signal name, an identifier for the HAL net, so that you can reference that net in other places or in other HAL files. You can choose any name you want for a signal.

You _can_ choose a signal name that is identical to a pin name. But that leads to confusion, and is what you seem to have done.

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

More
27 Sep 2018 11:10 #118038 by ben_benson
Hi Andy,

thanks for the hints - i got it sorted:

loadrt encoder names=one,two translates to pins:

one.phase-a ..... etc.

so far i coded:

encoder.one.phase-a

and bingo sure does not find that pin name :)

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

More
27 Sep 2018 11:44 #118039 by andypugh
You can (and maybe should, for clarity) use

names=encoder.1,encoder.2

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

Time to create page: 0.058 seconds
Powered by Kunena Forum