Run GladeVCP from halrun

More
14 years 2 months ago #23361 by wd5jwy
Replied by wd5jwy on topic Re:Run GladeVCP from halrun
Ok, so following the "net" command syntax in the Hal manual:

net <direction>* <signal-name> <direction>* <pin-name> (<pin-name>|<direction>)*

net both-home-y <= parport.0.pin-11-in


This is where I'm getting confused - in the above example:

"net" = hal command
"both-home-y" = direction and signal name? Or just signal name?

Or are they saying that <direction>* is just an option at that point in the command sequence?

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

More
14 years 2 months ago #23362 by andypugh
Directions are all optional. I have actually stopped using them in my own hand-crafted HAL.

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

More
14 years 2 months ago #23363 by wd5jwy
Replied by wd5jwy on topic Re:Run GladeVCP from halrun
Ah, ok, that's interesting - thanks for the info. I wish I could play with this right now, but the day job is getting in the way.

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

More
14 years 2 months ago - 14 years 2 months ago #23366 by BigJohnT
Where did you find that confusing description? Oh Never Mind, I found that...

John
Last edit: 14 years 2 months ago by BigJohnT.

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

More
14 years 2 months ago #23367 by wd5jwy
Replied by wd5jwy on topic Re:Run GladeVCP from halrun
So, I think I have it cleared up now. In the example:

net <direction>* <signal-name> <direction>* <pin-name> (<pin-name>|<direction>)*

net both-home-y <= parport.0.pin-11-in


<direction> would always be one of these "<=" or "=>". So, in the above example, "both-home-y" is the signal-name that receives an input from parport pin 11.

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

More
14 years 2 months ago #23369 by BigJohnT
Yep you have broken the confusing code in that bad example, I've already fixed that example and it should be online in an hour with a much better example and explication.

The signal name can only have one pin that changes it's state or value, but can have as many pins as you need that read that value.

For example
net start-button stepgen.0.enable <= parport.pin-11-in
net start-button stepgen.1.enable

The net start-button can be used more than once but only once with a Direction OUT pin like the parallel port physical in pin.

The same thing can be written as
net start-button stepgen.0.enable stepgen.1.enable parport.pin-11-in

and the direction indicators <=, =>, and <=> mean nothing to HAL and are only there for your visual pleasure.

John

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

Moderators: HansU
Time to create page: 0.205 seconds
Powered by Kunena Forum