I'm having a bit of trouble with HAL module timedelay. Help??
sorry ray, I'm sure I have no idea
No problem. We all have our own efforts.
I believe I've got it figured out.
oh - hi - what's the trouble?
trouble is rayh getting his head around delays.
Have you got a lyx running there SWP_Away
I have a nothing running here - this is a Windows machine ;)
Darn. (there is a ms compatable version of lyx but I know nothing of it)
I might be able to get something going in Cygwin
let me send you a text version of the hal_introuction section for timedelay.
I wonder if OpenOffice can open lyx files?
be a few minutes before i can dcc.
ok - gives me time to get more coffee, and boot up a real computer
ok Ray, send it to me here when you're ready
ok - back in a bit
I think I sent it.
oops - I missed it - can you do it again?
should be available there now, SWPadnos
rayh is now known as rayh_away
heh - oops, got a phone call ;)
rayh_away is now known as rayh
woohoo -finally noticed one in time ;)
one thing - the delays are specified in seconds (I may have screwed that up in the comments in the code)
Ah. I noticed the second thing but never thought to check the description.
will fix that.
I presume that 0.01 is a hundredth of a second?
I could change the comment to "default delay is 1/2 second, or 0.5 seconds"
Okay. I can do that as well.
I'm not sure that "epoch" is a good word to use :)
You don't think my choice of 50000000 is not a epoch.
a better word would be ???
epoch is probably meaningless for most people, and it's inappropriate for those who know what it is ;)
"since the start of the delay"?
Time since the start of delay. it is
my problem is that I've not seen a timer quite like this.
on delay, off delay, interval, one shot
It works great for the brake.
isn't there already a one-shot in blocks (or somewhere)?
don't know about that.
I could add the other modes to this component, but I'd like to keep it as simple as possible
it would end up like blocks, with num_xxx=1,num_yyy=6 ...
You bet. Let's see if it handles the job and then see if changed need to be made.
ok by me (especially at tax time ;) )
corporate tax time, that is
Yes it is. Isn't it.
There is something logically wrong about using a timer at this level for spindle and spindle brake.
when spindle is turned on, brake is released and after dt spindle turns on.
right - the brake should lead the spindle at turn-off
when spindle turns off brake is engaged after dt.
sorry - other way around
run them both through delays - one with 0 delay at turn-on, some delay at turn-off (for the brake)
the other with an on delay, and 0 off delay
and yet there is none of this in tkio
right - you're combining the two separate things into a single entity (a spindle with brake)
but ni tkio, you have separate controls
What I'm thinking though was that EMC had to do that someplace.
Our HAL someplace is equvalent to tkio.
yep - it was some hard-coded machine logic ;)
and we did not have to do it there.
hence the question "why do we have to do it here?"
do what? the delay?
this component is just there to make it possible for someone to use a spindle/brake without havin gto load CL
if you need special functions, then you'll have to use CL
I understand why we added it to HAL. I don't understand why we had to.
the logic that ran it properly for tkio
should also run it properly in HAL
or in iocontrol.
well - if you don't, then you're hard-coding machine logic into the program
* alex_joni waits
give me a minute.
ok (I'm sure I don't understand ;) )
It the delay existed AHEAD of tkio
why does it NOT exist AHEAD of HAL?
what is tkio? (I was assuming that it's a tk based I/O GUI)
In other words. When we lopped off tkio, How did we lop off the time delay that was not in tkio.
tkio, bridgeportio were functionally equivalent programs for handling this kind of io
thta must have been lopped off the io controller
right - OK
but if it did not exist in tkio, the io controller, why did it go away?
durned good question
rayh: can you fill me in?
I know I'm a bit late in the discussion..
what went away?
are you sure that it wasn't in tkio, or that tkio still had brake delays?
the delay was in bridgeportio
back in emc we had a delay between spindle brake off and spindle on.
and between spindle off and spindle brake on.
delays were read from the ini
and applied, I thought in task,
But the delays do not exist in the hal pins
the delay was in *io in emc1
they aren't handled in emc2 yet
emc2/src/emc/iotask/ioControl.cc has none of that
it was hardcoded in bridgeport & minimill io
we can do that in CL if needed
we were discussing why the delay has to be in HAL (either CL or the timedelay component)
the short answer is "because it was taken out of iocontrol"
it can be inserted in iocontrol
as to why, that would be a jmk question, I think
and it was not 'taken out of iocontrol'
iocontrol was rewritten
and I must say it's pretty dumb
"th efunctionality was not implemented in the code which replaced iocontrol"
emcioStatus.spindle.speed = 0.0;
emcioStatus.spindle.direction = 0;
emcioStatus.spindle.brake = 1;
it's pretty basic now
Okay. I understand now.
Someone made a decision to leave these delays out of emc2.
that was 80 lines of nightmare (mostly badly-formatted curly braces) in emc1
Well I care for the ability rather than the mechanics of how it was implemented.
IMO we have a raging case of reverse feature creep.
reverse feature creep?
I guess I've got three pins, spindle on, spindle forward, spindle reverse that need to be delayed.
and then when they turn off I need to delay brake on.
always the same delay?
alex_joni: We seen to be removing abilities that EMC had.
we are starting from scratch
on most areas
and adding feature that are needed
otherwise there would really be no reason to have emc2
there are hundreds of features in emc1 which 99% of the users don't use, but they are such a cruft that the whole thing is messed up
Okay. So no more comparisons between emc and emc2.
I am OK with comparisons
and I am very much OK with you saying we had that in emc1 and we need it in emc2 too
I have absolutely nothing against that
Rihgt but if I'm a part of the 01%. Then I's screwed?
we had only simio in emc2, and I changed that to io (iocontrol.cc), adding HAL pins to the best of my limited knowledge
you're not screwed, if you come with a decent feature request it will be added
* alex_joni is talking generally now
if you come with something that already existed in emc1 and is needed, then it should have a slightly bigger priority
rayh: can you explain the exact functionality?
alex_joni: have a look at emc1's bridgeporttool.cc
EMC_TOOL_MODULE::SPINDLE_OFF for instance
it does EMC_SPINDLE_STOP, then a delay, then EMC_SPINDLE_BRAKE_ENGAGE
likewise EMC_TOOL_MODULE::SPINDLE_ON does EMC_SPINDLE_BRAKE_RELEASE, then delay for SPINDLE_ON_WAIT, then EMC_SPINDLE_FORWARD/REVERSE
fwiw I'm not sure where I think this kind of thing should be implemented
so how do you use that in a program?
you set the spindle on early enough so that it has started when you reach the cut?
you just program M3
it's not related to that
I use a M3/G4 combination
but this is a delay that M3 itself causes
so you program M3, you get brake off, delay, spindle on, then the program continues
if you want another delay after spindle on, that's your responsibilty (g4)
or at least it was in emc1
I half think that should be built in too
I have no opinion towards that..
I maybe don't understand (or believe in) the whole hal vision, but it seems odd to do sequential logic at that level.
seems like hal should be about hardware abstraction (connecting pins) only
rayh: I think this is what you're puzzling about too?
cradek: I think we need another component doing machine logic
alex_joni: I don't seem to have a vision of what's right to do here
well, what I'm thinking of is not related to spindle on/off and delays
it's more conceptual
yeah, that's what I mean
seems like these messages like TOOL::SPINDLE_ON might mean one thing to your machine and another to mine
mine wouldn't have it at all
ok, then ray's and mine :-)
for mine, I want "turn on a pin on the parport then delay"
and fwiw, emc1 can't do that
I see.. well here that would snap in