HAL signals ~~net ~~i'm puzzled

More
13 Feb 2015 19:39 #55943 by socrassi


As showed in the image which is cutted from the file of 5axis_sim.hal..
" net J0pos <= axis.0.motor-pos-cmd"
"net J0pos => axis.0.motor-pos-fb"
is the two "net"sentence above equal with this sentence directly:"axis.0.motor-pos-cmd => axis.0.motor-pos-fb"???
if equal, how we should understand it by the data from "axis.0.motor-pos-cmd" to "axis.0.motor-pos-fb"?
if not equal, where's the difference??
Attachments:

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

More
13 Feb 2015 20:25 #55945 by ArcEye
Hi

net connects one or more pins to a signal

The signal name is the first argument, the pin name(s) are the subsequent arguments

The => <= are irrelevant and are just there to aid humans reading the line to see which way data flows

is the two "net"sentence above equal with this sentence directly:"axis.0.motor-pos-cmd => axis.0.motor-pos-fb"???


No it is equivilent to
net J0pos axis.0.motor-pos-cmd => axis.0.motor-pos-fb

see
www.linuxcnc.org/docs/devel/html/hal/tutorial.html

regards
The following user(s) said Thank You: socrassi

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

More
13 Feb 2015 21:18 #55947 by socrassi
thank you.

but the point i cannot understand is that why the pin of "axis.0.motor-pos-fb" accept data from "axis.0.motor-pos-cmd "

isn't the data of "axis.0.motor-pos-fb" from the encoder which is attached with the motor?

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

More
13 Feb 2015 21:46 - 13 Feb 2015 23:20 #55949 by ArcEye

but the point i cannot understand is that why the pin of "axis.0.motor-pos-fb" accept data from "axis.0.motor-pos-cmd "

isn't the data of "axis.0.motor-pos-fb" from the encoder which is attached with the motor?


It was your example not mine.

For a stepper set up it would normally be
net xpos-cmd axis.0.motor-pos-cmd  stepgen.0.position-cmd
net xpos-fb stepgen.0.position-fb  axis.0.motor-pos-fb

regards
Last edit: 13 Feb 2015 23:20 by ArcEye.
The following user(s) said Thank You: socrassi

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

More
13 Feb 2015 23:09 - 13 Feb 2015 23:10 #55952 by Todd Zuercher
axis.0.motor-pos-cmd is a float out and axis.0.motor-pos-fb is a float in, they don't care where their numbers are sent to or received from. The float out can be connected to any float in, and vice versa.
Now just because it can be done, doesn't necessarily mean that it is right to do so, what you listed essentially short circuits the feed back eliminating it.
Last edit: 13 Feb 2015 23:10 by Todd Zuercher.
The following user(s) said Thank You: socrassi

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

More
14 Feb 2015 00:56 #55960 by andypugh

but the point i cannot understand is that why the pin of "axis.0.motor-pos-fb" accept data from "axis.0.motor-pos-cmd "


This is because you have chosen a "simulator" configuration that will run without any hardware.
The feedback is short-circuited so that the simulated machine does not have an immediate folowing error.

isn't the data of "axis.0.motor-pos-fb" from the encoder which is attached with the motor?


Yes, absolutely. But if there is no motor and no encoder then it can't. :-)
The following user(s) said Thank You: socrassi

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

More
14 Feb 2015 08:15 #55966 by socrassi
thank you.

"net xpos-cmd axis.0.motor-pos-cmd stepgen.0.position-cmd
net xpos-fb stepgen.0.position-fb axis.0.motor-pos-fb"


Your example above use a space instead of the symbol "<="or "=>"
what's the direction of the data flowing?

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

More
14 Feb 2015 08:33 #55967 by andypugh

Your example above use a space instead of the symbol "<="or "=>"
what's the direction of the data flowing?


Data always flows from output to input pins. The arrows don't actually do anything except make the files easier for humans to read.
The following user(s) said Thank You: socrassi

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

Time to create page: 0.160 seconds
Powered by Kunena Forum