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