HAL signals ~~net ~~i'm puzzled
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??
Please Log in or Create an account to join the conversation.
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
Please Log in or Create an account to join the conversation.
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.
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
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Away
- Platinum Member
-
- Posts: 4978
- Thank you received: 1376
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.
Please Log in or Create an account to join the conversation.
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.
![:-) :-)](/media/kunena/emoticons/smile.png)
Please Log in or Create an account to join the conversation.
"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.
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.
Please Log in or Create an account to join the conversation.