- Posts: 9
- Thank you received: 0
Run GladeVCP from halrun
14 years 2 months ago #23352
by wd5jwy
Yes, I thought of trying that late last night - will try it later today.
I can't find "spool-step" anywhere in the docs. Is this information documented anywhere? The Hal manual doesn't address the "parport" in any detail. The naming convention is there, but no examples. I'll go look in the Integrator Manual and see what I can find.
Replied by wd5jwy on topic Re:Run GladeVCP from halrun
If you look in the first Glade/Python tutorial at the destroy part and add the hal unload that should take care of that part.
Yes, I thought of trying that late last night - will try it later today.
net spool-step parport.0.pin-02-out <= stepgen.0.step
I can't find "spool-step" anywhere in the docs. Is this information documented anywhere? The Hal manual doesn't address the "parport" in any detail. The naming convention is there, but no examples. I'll go look in the Integrator Manual and see what I can find.
Please Log in to join the conversation.
14 years 2 months ago #23357
by BigJohnT
Replied by BigJohnT on topic Re:Run GladeVCP from halrun
The Integrator manual has the
parallel port driver
in it. A signal name can be almost anything you like... see
this chapter
from the Hal Manual.
John
John
Please Log in to join the conversation.
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?
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 to join the conversation.
14 years 2 months ago #23362
by andypugh
Replied by andypugh on topic Re:Run GladeVCP from halrun
Directions are all optional. I have actually stopped using them in my own hand-crafted HAL.
Please Log in to join the conversation.
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 to join the conversation.
14 years 2 months ago #23366
by BigJohnT
Replied by BigJohnT on topic Re:Run GladeVCP from halrun
Where did you find that confusing description? Oh Never Mind, I found that...
John
John
Please Log in to join the conversation.
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.
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 to join the conversation.
14 years 2 months ago #23369
by BigJohnT
Replied by BigJohnT on topic Re:Run GladeVCP from halrun
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
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 to join the conversation.
14 years 2 months ago #23383
by BigJohnT
Replied by BigJohnT on topic Re:Run GladeVCP from halrun
wd5jwy,
Just for fun I created a component to work with the spooler that makes the stepper run to the max then reverse direction and run back to the min setting at the velocity set by the spin box. The green bar shows the current step count from the stepgen. So with this you don't need a mechanical reversing mechanism like a deep sea reel, just a guide on a screw...
John
Just for fun I created a component to work with the spooler that makes the stepper run to the max then reverse direction and run back to the min setting at the velocity set by the spin box. The green bar shows the current step count from the stepgen. So with this you don't need a mechanical reversing mechanism like a deep sea reel, just a guide on a screw...
Attachment wd.zip not found
John
Please Log in to join the conversation.
14 years 2 months ago #23384
by BigJohnT
Replied by BigJohnT on topic Re:Run GladeVCP from halrun
This is an update to spooler.comp
This will update the velocity all the time so if you change it the effect will be immediate.
Thanks to bpuk on the IRC for the update.
John
Code:
component spooler;
pin in signed min_limit;
pin in signed max_limit;
pin in float vel_in;
pin in signed step_counts;
pin out float vel_out;
variable int direction;
function _;
license "GPLv2 or later";
;;
FUNCTION(_)
{
if(step_counts <= min_limit){direction = 0;}
if(step_counts >= max_limit){direction = 1;}
if(direction) {vel_out = -vel_in;}
else {vel_out = vel_in;}
}
This will update the velocity all the time so if you change it the effect will be immediate.
Thanks to bpuk on the IRC for the update.
John
Please Log in to join the conversation.
Time to create page: 0.067 seconds
