00:16:25 * chinamill is away: fixing mill 00:17:47 quick note for the logger 00:18:34 we set up a rotary axis in HAL and EMC for chinamill and added a page to wiki 00:35:10 http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?SampleParport 00:35:21 page needs a lot of editing and additions. 00:38:01 rayh has quit 02:07:02 alex_joni has joined #emc-devel 02:25:45 rayh has joined #emc-devel 02:26:16 rayh: I didn't reply to your message but I think it's very good 02:26:47 Okay I'll send it soon. 02:26:55 thanks 02:27:10 oops, wrong channel 02:27:11 oh well 02:27:27 not a problem. 02:27:37 unless you are as old as I am. 02:32:23 probably the others have no idea what you are talking about :) 02:47:57 alex_joni is now known as alex_joni_away 03:26:52 alex_joni_away is now known as alex_joni 03:27:07 jmkasunich has joined #emc-devel 03:36:05 jmkasunich: join the board channel please ;) 03:36:48 I did dammit (the old one ;-) 03:37:09 do that every time. 03:37:51 jmk: autojoin list ;) 03:38:04 I'll ask paul today if I find him 03:38:10 jmkasunich: is that bug in stepgen's accel that you found recently possibly causing my spurious joint following errors? 03:38:22 I was trying to do something like that, either ksirc doesn't do it, or I'm too dense to figure it out 03:38:38 cradek: could be 03:38:42 easy to test 03:39:07 somewhere in your hal file (core-stepper.hal I think) is a line like: 03:39:27 wait, I'm not there, I'll be there later 03:39:29 setp stepgen.0.maxaccel [AXIS_0]MAX_ACCEL 03:39:34 change it to: 03:39:55 setp stepgen.0.maxaccel oh, ok, that's easy 03:55:46 SWPadnos has joined #emc-devel 03:57:10 SWPadnos: morning. 03:57:16 morning 03:57:48 I put one page of HAL tickle on linuxcnc.org this morning. 03:57:54 so cradek gets "Chairman", and you get "Loudmouth" ;) 03:58:02 ok - cool. I'll take a look 03:58:20 what is hal tickle? 03:58:27 it's a virus 03:58:35 slowly taking over HAL :D 03:58:45 it's what you get in your throat just before a cold ;) 03:58:49 uh, oh 03:58:54 it's some tcl code ray did to show HAL status 03:59:01 where? 03:59:02 www.linuxcnc.org/Dropbox/hal_show.tcl 03:59:08 to be able to do IOShow, or something like that.. right ray? 03:59:12 I think the idea is to make a tuning app 03:59:48 I used a very rough draft of the front page about 4 this morning to get chinamill going 03:59:54 with a rotary 4th 04:00:22 so where in my tree do I put it, and how do I invoke it? 04:01:09 in the emc2 directory and ./hal_show.tcl 04:01:24 while emc is running I assume? 04:01:29 you'll need a running hal to get much out of it. 04:01:36 Way ahead as always. 04:02:02 I'll take a look once (a) my coffee has brewed, and (b) I've booted the emc machine ;) 04:02:25 k 04:02:31 eek... (mini scares me when it pops up over the whole screen ;-) 04:02:34 SWPampy: get that coffee already ;) 04:02:45 it's brewing - you can't rush that 04:02:56 (sadly) 04:03:07 I didn't think mini was an option in the emc.ini 04:03:29 I have my sim.ini set up to run mini (don't recall why) 04:03:38 that's in CVS I think 04:03:45 I think all the UIs work - it's backplot that had some weirdness in AXIS 04:03:56 must have been me.. when I added mini to emc2 04:03:57 :( 04:04:06 ok - that could be 04:04:16 what's wrong with AXIS? 04:04:34 way back, didn't you have to fix something to get it to work with emc2? 04:04:55 we've had to catch up with emc2 changes many times 04:05:12 is 04:05:14 oops 04:05:15 maybe I misunderstood - are you saying there's something wrong with it now? 04:05:30 is "show_ HAL" the only window that works so far? 04:05:48 nope 04:05:54 nope to cradek 04:06:05 ok, forget I said anything 04:06:15 no prob 04:06:26 Right jmkasunich 04:06:59 halcmd without the typing! 04:07:21 But I was able to use it rather easily to illustrate how an axis (not the gui) pin can be followed through to signals 04:07:48 yeah, having it right there makes it much easier to talk a person thru things 04:07:49 and how to model one axis pins and params to make another. 04:08:34 are the screens live, or do you have to hit the show button to refresh (say after you've changed a param value, or added a signal) 04:09:02 the watch screen is intended to be live for the pins you select 04:09:12 ok, the show screen is a snapshot 04:09:25 Yes. World view if you will 04:09:41 * alex_joni pays a visit to the doc 04:09:43 later guys 04:09:44 although if you enter iocontrol in the search and press pins you get only those. 04:09:45 the file menu: what is that for? 04:09:47 bye alex 04:09:52 hope he can cure you 04:09:53 good luck 04:09:57 yeah.. thanks 04:09:59 alex_joni has quit 04:10:17 nice (the search) 04:10:28 I can see me using this a lot 04:10:28 I'm working there toward reading hal files and editing to match config setup. 04:10:51 I need to pass an idea to you. 04:10:51 you know about halcmd save don't you? 04:11:15 a separation between loadxx files and linkxx files 04:11:15 (although that loses any comments in the original file, and doesn't handle insmod command line params) 04:11:24 shoot 04:11:41 that's the idea I had. 04:11:54 elaborate a little please? 04:12:07 I think I know what you are talking about 04:12:07 It pretty much would hide the hal file that is run. 04:12:21 ok, I don't know what you are talking about ;-) 04:12:27 we could issue the load commands from the ini file 04:12:52 load what? a hal file? 04:12:55 then we can read, save, and run a hal file 04:13:02 from halcmd 04:13:20 no loadrt xxx 04:13:34 oh 04:14:10 not so much "no loadrt xxx" but "no loadrt xxx in the .hal files that connect everything together" 04:14:25 you could have one hal file that just loads everything, invoke that one first 04:14:25 right. 04:14:40 then invoke another(s) to do the config 04:14:53 yes and we could make a page just for it in the tickle 04:15:05 you are working toward one .hal file for the entire configuration, aren't you? 04:15:30 right now i don't know how to do otherwise. 04:15:40 (as opposed to core-servo.hal+ppmc-motion.hal+ppmc-io.hal+custom.hal) 04:15:48 within the hal_show context 04:16:00 yes. 04:16:14 right now, each individual file adds something to the config 04:16:30 but halshow can only show (and you can only save) the whole thing 04:16:53 there are pros and cons to both approaches 04:17:01 The multiple file approach is easier to understand when you work directly from a text editor. 04:17:04 SWPadnos_ has joined #emc-devel 04:17:15 the "sum of many configs" approach lets you use "standard" chunks 04:17:31 the "all in one" approach makes file management easier 04:18:02 there's another way to look at that 04:18:40 when you load a module (at least the motion-related ones, like PID and the like), there are some connections that are very likely to be made 04:18:42 hmmm, maybe we want to transition over to the all-in-one approach, but have a "new config" wizard that asks questions and loads some of the core files based on the answers....then saves the combined config for further tweaking 04:18:51 like pid.0 inputs go to axis.0 outputs 04:19:20 swp: yes, that was the intent of the core_xxx files 04:19:34 right - they can only connect "upstream" by default 04:19:49 swp and I were talking about agregating pins into a plug the other day 04:20:06 like a LabView bundle- if that helps 04:20:24 not really, I'm aware of labview, but never used it 04:20:52 what I did with chinamill this morning would have been easy if there were a "axis" plug 04:21:07 however, on the "someday" list for HAL, I was thinking of the ability to wrap a group of blocks and signals into a "megablock" 04:21:15 you can basically have a signal that consists of a struct of other signals 04:21:19 exactly. 04:21:43 rayh: which one did you "exactly" to? 04:21:52 jmk 04:22:26 I used the example of the lego blocks 04:22:34 to think about it. 04:22:48 thing is, swp's approach would be prettier 04:22:53 all of these pins fit into all of these. 04:23:11 at what level do you see the pretty? 04:23:15 code 04:23:17 user 04:23:24 hal file 04:23:38 my megablocks would still have individual pins at their border, and would still need to be conneted one-at-a-time to the next (mega)block 04:23:52 sub-sheets with ports 04:24:10 I was thinking sub-sheets, but not ports 04:24:22 the ports are the exported pins (in Protel) 04:24:31 external sheet connections 04:24:40 and worse (depending on your point of view), once loaded, in halcmd it would still be flat 04:24:43 ah -I see now 04:25:00 are ports a single signal, or multiple? 04:25:11 if you add a "subcomponent" field, you can get rid of all of them at once 04:25:20 single pin (or bus, in the schematic model) 04:25:30 ok, then with ports 04:25:37 actually, a bus is similar to the bundle idea 04:25:47 ( I thought maybe "port" was the "plug" thing you mentioned earlier) 04:25:48 just with different types 04:25:52 nope 04:25:53 bus is homogenous 04:26:40 well - you can have a bus with address and data pins, but you wouldn't usually group analog and digital llines ;) 04:26:48 both in type, and in usage (usage is up to the guy drawing the schematic, but I for one never grouped things like rd strobes and wr strobes into a bus) 04:27:14 I see busses as more like arrays than structs 04:27:18 yep 04:27:24 hence the "bundle" term 04:27:26 your "plugs" are structs 04:27:34 yes 04:28:09 connecting plugs means verifying that their structs match 04:28:24 would you require just a type match, or a name match 04:28:28 I think name 04:28:44 that is limiting tho 04:28:55 type only - there's no need to have names match now (using signals) 04:29:27 you don't automatically connect things (you meaning HAL) 04:29:28 ok, if a plug has 3 analogs and 3 bits, how do you define which analog on one side connects to which on the other 04:29:37 analog 1 connects to analog 1 04:29:42 analog 2 to analog 2 04:29:43 etc. 04:29:52 they are structs, so they should match 04:29:52 ok, so ordered by some number 04:30:07 yes - all connections are made / broken in one go 04:30:08 I thought of em as an array 04:30:10 structs is just a concept, there are no actual C structs here 04:30:17 I understand 04:30:17 matching arrays 04:30:19 so we have to define the order 04:30:22 just for discussion 04:30:34 arrays can only have one type, I 04:30:34 ray: in C, arrays means a group of identical typed items 04:30:47 you can have an array of bits, or an array of floats, but not a mixed array 04:30:55 structs allow mixing 04:31:00 arrays can only have one type, I'm thinking of something that you could connect an enable and a float output togeher with 04:31:02 so they are more appropriate here 04:31:04 I guess I'm still thinking geometry and the notion of plugs 04:31:31 antenna array not a c array. 04:31:32 sure - you take the nice MS circular connector and plug it into the correct socket 04:31:46 actually - any matching socket 04:31:53 Right and the rotation is handled by the index slide 04:32:06 rayh: there are some physical plugs where not all pins are the same 04:32:07 yep -that's the "type" in this discussion 04:32:14 like the MS connectors 04:32:26 certainly 04:32:29 skinny ones for logic, fat ones for power, maybe even coax ones for RF, all in one housing 04:32:38 that's the model I have in my head 04:32:39 exactly 04:32:49 yes - and location is significant 04:33:37 My thought this morning was something like 04:33:53 I was thinking that when you define a plug, you say: "plug pin connects to signal " 04:33:56 axis.3 ==> stepgen.3 04:34:13 where axis.3 is a plug 04:34:21 right - jmk, the idea is to be able to plug groups of things all at once 04:34:22 (and so is stepgen.3) 04:34:28 yep 04:34:30 so how to define a plug 04:34:39 beats me. 04:34:41 that's a darned good question 04:34:49 that's your job ;) 04:34:52 thats what I'm brainstorming 04:34:57 we're brainstorming 04:35:04 oh - right 04:35:05 within the plug are pins 04:35:11 well - you can take a cue from C++ 04:35:22 (plug pins, not hal pins - damn terminology) 04:36:03 the way that C++ keeps different versions of functions straight is by appending a string that tells the tpyes the function takes and returns 04:36:23 I want more than just type matching 04:36:30 (I'm thinking about how to make them internally now, not the command interface) 04:36:42 heh. command interface comes first 04:36:46 damn! 04:36:53 define what you want to do, then figure out how to do it 04:36:59 ok - fine. I need more coffee then 04:37:08 so, you wanna make a plug 04:37:21 you don't do that in halcmd, you do it in the component 04:37:26 hal_register_plug 04:37:32 nope 04:37:33 hal_register_socket 04:37:44 I've got to get some lunch fixed for the grand kids. 04:37:50 I want to be able to make these megacomponents out of stock HAL components 04:37:52 a likely story ;) 04:37:55 not have special ones 04:37:58 I know you guys have this well in hand. 04:38:12 see ya "Official Loudmouth" 04:38:16 bye ray 04:38:40 SWP: something very scary is coming into my head 04:38:53 hal with heirchary 04:38:59 damn I hate that word 04:39:00 oooohhh - I like that 04:39:02 to bad I can't stay 04:39:06 rayh has quit 04:39:06 hierarchy 04:39:20 (yes I know - damn me) 04:39:26 something like this in a hal file: 04:39:34 newblock { 04:39:40 newsig blah 04:39:45 newblockpin blah 04:39:58 linksp 04:40:17 lots of other links and sigs and such that are internal to the block 04:40:20 } 04:40:34 no, thats not right 04:40:51 because a block will probalby need more than one plug 04:40:54 well - I think it's important to show things at the same level they're created 04:41:21 so if someone loads some block hal file, then they do halcmd show, they see that there's a block, and whatever it exports to the world 04:41:28 not the underlying complex stuff 04:41:38 to do this right, we need to be able to instantiate a block (standard hal block) after the loadrt 04:41:39 you need to be able to get at that, but not by default 04:41:54 yes, and update multiple connections atomically 04:42:14 which all points to hallib 04:42:46 and a helper thread in kernel space (to instantiate blocks on demand), or an ioctl, or a syscall, or something like that 04:43:09 btw - what fifo / queue functions are available between userspace and RT? 04:43:26 there's got to be a queue - motion uses that 04:43:35 no it doesn't 04:43:41 fifo? 04:43:49 it uses a single buffer at the RT/user boundary 04:43:55 and queues inside RT 04:44:03 (stupid I know) 04:44:08 does it poll? 04:44:12 the RT side 04:44:29 the RT side is inherently periodic, so yes, it polls - it can't do anything else 04:44:35 ok 04:44:55 anyway, look at rtapi.h for info about fifos 04:45:18 will do - AC (after caffeine) 04:45:40 that documents and implements the functionaity that seemd to me to be the best common featureset between RTAI and RTLinux (as of the versions that existed at that time) 04:46:29 DC (during caffeine) 04:46:31 ok - and if you still want to support those versions, then it means that's the way it has to stay 04:46:36 ok - I can do that 04:46:45 unless we can find something I missed 04:47:15 I'm not the person to do that, unfortunately 04:47:17 did you and/or petev find anything the other night? 04:47:53 I didn't (relative to the user <-> RT sepmaphores) 04:47:59 semaphores 04:48:26 if both sides are polling, then you don't really need RTOS support for fifos 04:49:02 just allocate some shmem, set up head and tail pointers and write thread-safe put_on_fifo() and get_from_fifo() cals 04:49:08 echo "show pin" /dev/hal && cat /dev/hal 04:49:30 paul would shoot you 04:49:32 heh 04:49:35 (and I might too) 04:49:39 no parsing in kernel space 04:49:55 um - what about /proc/sys ? 04:50:00 let user space (halcmd) parse, and then issue error-checked commands to kernel space 04:50:32 drat 04:50:34 /dev/hal ioctls, /proc/hal, all are possibilities 04:50:43 must remember the leading space before / 04:50:51 heh - yep 04:51:00 but not ascii commands to /dev/hal 04:51:03 dev/hal is not a recognized command 04:51:10 that's fine 04:51:20 the problem is portability 04:51:28 I like the fifo / sem / mutex thing better anyway 04:51:40 /queue 04:51:56 /dev is endangeded by new things like udef, sysfs, etc 04:52:11 sure, but an ini file parameter takes care of that for you 04:52:17 ? 04:52:25 like specifying /dev/cdrom for k3b 04:52:38 you lost me 04:53:00 the kernel module does whatever it needs to do, and the file node gets placed wherever that kernel wants it to be 04:53:07 my understanding is that some newer systems might not have /dev at all 04:53:22 they use udev or something else 04:53:27 userspace gets told where that is with a line in emc.ini like [EMC]CONTROL_FILE = /dev/hal 04:53:39 or [EMC]CONTROL_FILE = /udev/hal 04:53:49 or CONTROL_DEVICE 04:53:55 but kernelspace needs to support all of those (I don't think they have a common interface) 04:54:19 I'll be damned if I'm gonna learn and code for three differnet interfaces just because the kernel folks keep changing stuff 04:54:20 no - I think in kernelspace, you just register the major and minor number your driver handles 04:54:27 the userspace helpers create the device nodes 04:54:36 (mknod, udev, sysfs, whatever) 04:54:45 obviously I don't know enough about these things ;-) 04:54:48 so it's distro-specific, not module-specific 04:55:03 I'm not speaking the gospel here, but I think that's how it works 04:56:45 sorry, phone, back now 04:56:57 that's not the case with /proc entries though - the kernel module does create those by name (though /proc could be /systeminfo or whatever) 04:57:05 np - I actually got that coffee refill ;) 04:57:32 if /dev/hal (or other flavors) can be done without too much nastyness I'm all in favor of that - it is more "by the book" than using a RT helper thread 04:57:49 hmmm 04:58:11 same thing with /proc, although even that is a kernel option, you can build a box without a /proc filesystem 04:58:20 actually, there can be a group of proc entries - /proc/hal/pins, /proc/hal/sigs, etc 04:58:27 just cat that, snd you get your list 04:58:39 and Paul has said that /proc is being phased out in favor of /sysfs 04:58:54 /whateverthenameisnow/hal/pins ... 04:58:59 proc entries that return more than one page (about 4K) of data are nasty to code 04:59:08 yes -I was just about to mention that 04:59:20 I'd still rather have an API, and let a user level library handle things 04:59:28 yes 04:59:50 whateverthenameisnow will need differnet code to handle it 05:00:00 I think that a polling thread in kernel isn't that bad a performance hit. the only nagging problem is the latency from command to execution 05:00:01 I have no systems with sysfs, no way to test it 05:00:22 its a fatal performance hit for something like show pins 05:00:56 only if you have to poll for each pin 05:00:59 because unless it can return an arbitrarly long list at once (which it cant), show involves a bunch of calls: get first, get next, get next, get next 05:01:46 you can have a command that asks for all pins, all pins matching a certain pattern (though regexp in kernel would likely be bad) 05:01:54 all pins with a certain owner ID 05:02:00 etc 05:02:03 but how do you return that list to user space? 05:02:17 in a big buffer 05:02:23 how big? 05:02:28 and where? shmem? 05:02:32 this big > < ;) 05:02:47 and what if two instances of halcmd are running at the same time? two buffers? 05:02:57 (right now halcmd is thread safe) 05:02:57 well - that could be an issue 05:03:15 but if two instances are running, how would they keep nextpins separate? 05:03:21 nextpin calls, that is 05:03:32 get_next(char *prev) 05:03:53 each call is atomic, it actually looks up prev, then returns the next one 05:04:15 incidentally - this is only an issue if the helper services one request per polling cycle 05:04:20 I plan to store the metadata in AVL trees instead of linear lists to speed the lookup, for exactly that reason 05:04:29 if it empties the queue, every time, then it's not so bad 05:04:43 doesn't work 05:05:15 the user prog puts get_first() in the queue... even if get_next() doesn't need the name of the previous one, how many should it queue? 05:05:15 why not (assuming that the result queue is as long as the command queue)? 05:05:45 of course if get_next needs the name of the previous, you can't queue it until the previous call returns 05:06:01 ok - one other item that can be done (possibly) - once you get a command, have a shorter wait before the next poll cycle. if nothing is found, then wait a longer time 05:06:22 a workaround, and maybe viable 05:06:28 but still a hack 05:06:55 I think I'd rather suffer thru /proc vs /sysfs, or /dev vs udev vs who knows what 05:07:35 actually - it's not that hard to add a syscall to the kernel 05:07:43 there is no nice answer, which is why I've been avoiding it 05:07:48 emc already requires a patched kernel, why not add one more? 05:07:51 do you have to recompile the kernel? 05:07:57 yes 05:08:04 not an option then 05:08:06 but only if you don't have an emc kernel already 05:08:09 I want to run on BDI-old 05:08:16 it's the same as now - you have to add the adeos patches 05:08:28 ah - the upgrade path 05:08:32 we already have hundreds of people with patched kernels 05:08:49 people who have not and will not patch themselves 05:09:09 (I don't like the patched kernel idea anyway, because I'd like to be able to run something without RT patches, for testing) 05:09:15 right 05:09:27 another reason the RT helper thread idea is less attractive 05:09:38 /proc works regardless 05:09:56 actually /dev is probably the right way to do it 05:10:16 proc is nice because you don't need to mknod 05:10:26 yep - all you need is an alias-char-major haldev xxx in modules.conf 05:10:31 but maybe ./configure could do the mknod 05:10:57 I don't know anything about modules.conf 05:11:03 (I should, but I dont) 05:11:07 or conf.modules ... 05:11:43 all it does is tell insmod what driver to load when a file request comes in on a device node with a certain major/minor number 05:11:59 (or tell what you mean by eth0, etc) 05:12:08 oh.... 05:12:26 I would keep the "realtime start" model, explicitly load the driver module and keep it loaded 05:12:31 well - it may do more, but that's the extent of my knowledge about it 05:13:33 * jmkasunich googles 05:13:51 way ahead of you ;) (googling sysfs, that is) 05:15:28 I don't think we need to worry much about sysfs 05:15:59 it looks like it's a place to put device nodes that a driver creates - like a cdrom driver making a node when there's a CD in the drive 05:16:08 (or usb / flash card, etc) 05:16:18 it's meant for plug-n-play type stuff 05:16:21 ok 05:16:33 it augments, not replaces /dev? 05:16:40 or udev ;) 05:16:58 it's a list of devices that are physically present, not all possible devices 05:17:06 same as udev, I think 05:17:45 note that there is a Linux comopnent called HAL, so there may be some namespace clashes at some point 05:17:57 enter BLOCS ;-) 05:18:01 heh 05:18:17 HAL is definitely an overloaded name 05:18:24 RTAI also has a HAL layer 05:18:25 yep 05:18:49 everyone does abstraction of the underlying hardware 05:19:00 (even microsoft does that now) 05:19:30 the linux device driver book talks about some of this stuff 05:20:14 interesting 05:20:29 on my box, with realtime loaded, 05:20:41 /dev contains an entry /dev/rtai_shm 05:20:54 yes 05:20:59 /proc/devices shows 150 rtai_fifo 05:21:08 and /proc/emc, I think 05:21:19 the fifo one doesn't appear in /dev, and the shm one doesn't appear in /proc 05:22:01 the book talks about dynamic assighment of major numbers (more portable, less risk of collision) 05:22:14 the driver allocates a chrdev region 05:22:47 yes - there are also device numbers reserved for "local use" I think 05:23:03 sorry, phone again (but short) 05:23:03 ok 05:23:10 once the driver does the alloc 05:23:24 /proc/devices contains the major number and driver name 05:23:46 then a script can read /proc/devices and do the mknod 05:24:23 the realtime script creates the device node 05:24:30 in our case, the realtime start script would do ti 05:24:33 heh 05:24:38 jmkasunich: this is interesting 05:24:45 jmkasunich: I have this troubled machine like I explained 05:24:59 jmkasunich: in emc1, at the first glitch, I do get the controller missed realtime deadline error 05:25:38 ok, so the actual glitch is machine specific, not emc2 specific, but emc2's detection is flawed (as in not there) 05:25:47 I think that's right 05:25:58 I think thats good news 05:26:05 (for me anyway ;-) 05:26:12 yeah, I'm not so sure from here 05:26:18 need to look into detection of missed deadlines 05:26:28 but yeah, it means there must be a way to do the detection 05:26:31 on your side, is the MB using shared memory for video? 05:26:42 that is notorious for messing up latency 05:26:43 no, but I am about to try a different video card anyway. 05:26:56 SCSI drivers loaded? 05:27:09 yes, there is scsi everywhere 05:27:11 (I hear that's another problem) 05:27:21 hmm 05:27:25 but should only be if you're using the devices 05:27:35 unless bus timeouts or the like are happening 05:27:37 can you file a bug report saying "emc1 reports when a realtime deadline is missed, emc2 doesn't" and set the catagory to RTAPI? 05:27:45 jmkasunich: yes 05:31:02 SWPadnos: making the main hal module work like a real driver is probably the right thing to do 05:31:07 non-trivial, but right 05:31:08 hey - /proc/$PID/exe is a pointer to the full path of the executable 05:31:31 that could make config file stuff easier if used ;) 05:31:51 I htink there is even a shortcut to the path of "this" executable 05:31:57 just trying to remember it 05:31:59 yep 05:32:32 /proc/self 05:34:46 that's helpful - there's a lot of good info there (command line, cwd, executable path, environment, mmaps, etc) 05:35:15 on my box, cat /proc/self/exe doesn't give the path, it gives the actual binary code 05:35:27 yes - it's a link to the exe 05:35:33 symlink 05:35:36 yep 05:36:37 so `readlink /proc/self/exe` gives you the path 05:36:52 nope, that gives you the path to readlink 05:36:54 heh 05:37:36 I'm looking for the right ls option ;) 05:40:21 well, I'm gonna go back to coding vcp stuff 05:40:27 * chinamill is back 05:40:45 ok - I'll look into RT and think about bundles 05:40:51 RT <-> user, that is 05:40:55 yeah 05:41:40 hah - I think -L is it 05:41:50 I think that is the key to the hal refactor, which in turn is the key to things like megablocks, and being able to do halcmd save and get everything including the loadrt, and severa other nice things 05:44:53 Hmm; why should SPINDLE_ON_INDEX be stated as analog output in emc.ini (emc2)? Have anyone had success using it with a 2:nd parport? 05:46:45 in emc2? those index things aren't used at all in emc2 05:47:08 in emc2 you can send any signal out any pin, so 2nd parport is no problem 05:47:16 the SPINDLE_ON output is in the analog section because it's the analog output number that's used to control the spindle 05:47:18 ok, time to clean up the ini file then... 05:47:18 for emc1 05:47:23 but you you HAL to do it, not those index things 05:47:54 chinamill: yes, it needs cleaned up 05:47:55 is anything in the [IO] section used in emc2? 05:48:07 other than CYCLE_TIME 05:48:10 I don't think so 05:48:24 yay, a video card change fixed it 05:48:31 kewl! 05:48:44 but wow do I need a newer video card 05:48:45 out of curiosity, what was the old one? 05:49:36 BoardName "S3 Savage4" 05:49:42 8MB 05:49:48 heh - that's a bit old 05:50:00 ha, that's new compared to my Matrox Millenuim II 05:50:08 the only PCI card I could find in the house 05:50:14 I'd take the Millennium any day (I still have one ;) ) 05:50:15 I've used Matrox cards of that vintage or older with no RT problems 05:50:23 yeah, the matrox is great 05:50:26 it's just slow for AXIS 05:50:35 all of my boxes except the current one have Matrox 05:50:54 (the current one has a 128MH Gforce (nvidia) 05:50:55 grab a G400, G450, or G550 on ebay, and you'll actually have 3D performance almost 10% as fast as today's cards ;) 05:50:58 matrox has the best vga framebuffer support 05:51:16 SWPadnos_: that's what I was using in the old machine, and it was great 05:51:19 unfortunately it's agp 05:51:24 yes - the 2D has always been the best, and the video quality 05:51:30 ah 05:51:46 cradek: your MB has no AGP slot? 05:51:52 it's too bad they (Matrox) dropped the ball on the Parhelia line 05:51:54 jmkasunich: not the "new" one 05:51:59 gawd, I thought I ran old hardware 05:52:11 it does have 64 bit PCI, which I've never seen before 05:52:23 it's old "server-class" hardware 05:52:42 like my server - dual-processor Pentium-Pro (with Overdrive CPUs @ 333 MHz) 05:53:14 though I do have the highly advanced Intel I960 I/O Processotr on board 06:02:14 jmkasunich: I did what you suggested but am still getting spurious joint following errors 06:03:13 with 5% margin? 06:03:18 yes 06:03:46 ok, try setting the stepgen limit to double the traj limit, to completely eliminate that possibility 06:04:16 if it still happens, the something somewhere else is screwing up 06:04:25 working on it... 06:05:57 Would there be any documentation on addiing a second parport? Or if any one got a hal file with 2 that I can look at? 06:06:03 still the error 06:06:12 I can get it by turning feed override to 120% 06:06:21 but not at 100%? 06:06:34 let me try 06:06:41 certainly not as often 06:06:58 chinamill: I can probably help, but one thing at a time 06:07:26 chinamill: what ini file are you using? 06:07:31 alex_joni has joined #emc-devel 06:07:38 feed override overrides the programmed feed, not the ini max, right? 06:07:45 right 06:07:46 hello guys 06:07:51 hello 06:07:53 jmkasunich: emc.ini 06:07:57 Hello 06:08:14 chinamill: heard you reported some success running emc2 06:08:27 straight out of cvs? what if anything in there did you change? 06:08:30 great isnt it! 06:09:20 jmkasunich: it's still running but so far hasn't given the error at 100% 06:09:25 jmkasunich: Some small things.. like adding a 4th axis and limits etc. 06:09:50 (sorry i'm getting confused) 06:09:58 in the HAL section, you still have core_stepper.hal and standard_pinout.hal? 06:10:09 jmkasunich: yes 06:10:14 confused by what? 06:11:11 jmkasunich: I was not sure You where adressing me... But I thougt I must ad the second parport in *.hal file 06:11:27 yes 06:11:47 currently "standard_pinout.hal" loads the parport driver and connects things to it 06:11:59 you must have edited that to hook up the second axis, right? 06:12:05 sorry, fourth axis 06:12:25 so can I ad something like loadrt hal_parport cfg="[myparpot]" 06:12:39 you can't add it, you can only load the driver once 06:13:03 but the line near the top of the file: loadrt hal_parport cfg="0x0378" 06:13:04 yes it works, but now I want to add a second parport 06:13:08 can be changed to: 06:13:18 you need to change cfg="0x378 0x278" 06:13:26 loadrt hal_parport cfg="0x0378 0x0278" 06:13:26 aha 06:13:39 or whatever the address of your second parport is 06:13:54 then I use parport.0.X ? 06:14:00 then I use parport.1.X ? 06:14:04 right 06:14:07 parport.1.xxxxx for the second port 06:14:26 Great I'll try tomorrow 06:14:32 oh, almost forgot...' 06:14:38 you also need to do addf lines 06:14:50 right below the loadrt line, there are two addf lines 06:14:59 yes... 06:15:00 addf parport.0.read base-thread 1 06:15:00 addf parport.0.write base-thread -1 06:15:05 add two more: 06:15:17 addf parport.1.read base-thread 1 06:15:27 addf parport.1.write base-thread -1 06:15:35 ok.. thanks for the direction! 06:15:53 (do you need to send step pulses out of that port, or just generic I/O like spindle and stuff?) 06:15:57 jmkasunich: got a pci-board with 2 aditional parports 06:16:11 ony IO stuff 06:16:26 if you don't need high speed output (steps) then change base-thread in the 2 new lines to servo-thread 06:16:43 ok 06:16:44 that will reduce CPU loading, it will update the port 1000 times per second instead of 20000 or more 06:16:58 good idea! 06:17:15 just remember to keep all your step pulses on the fast port 06:17:25 yep... 06:19:29 I wish all problems were so easy ;-) 06:19:43 I wonder if I can hide before cradek notices? 06:19:47 jmkasunich: it is definitely related to feed override 06:19:49 haha 06:19:50 too late 06:19:52 damn! 06:20:08 at 100% it can cut all of Chips 06:20:08 you can't escape a person ;) 06:20:36 if you go higher you get problems? 06:20:47 alex: /part works pretty well to escape 06:20:50 at 120 it errors almost right away 06:21:21 cradek: did you try to increase the max-speed of stepgen? 06:21:28 any particular axis? any particular spot in chips? 06:21:29 max-accel yes 06:21:41 good point alex 06:21:41 disclaimer: still under fever, so I might talk rubbish 06:21:52 jmkasunich: always joint 2 (lower accel and maxvel than the others) and no particular place in Chips 06:22:13 I kinda had problems with Z sometimes too (with chips.ngc that is) 06:22:21 raise max-vel the same way you raised max-accel, a few percent first, then if no effect, double it 06:22:24 without any aditional machine connected to it.. 06:22:53 stepgen.x.max-vel ? 06:22:59 something like that 06:23:09 the exact name will be in the .hal file 06:23:16 might be max-velocity 06:23:20 stepgen.[0-2].max-vel :D 06:23:28 and run through sed 06:23:40 or something to expand that 06:25:15 ok, I set the hal values to 105% of ini 06:25:22 FO at 120% 06:25:58 looks promising so far 06:26:53 pretty sure that fixed it 06:29:23 * alex_joni had a good idea it seems.. maybe this fever is good afterall 06:29:54 cradek: try changing the max-accel back down to 105% 06:30:04 I bet 105% on both is the solution 06:31:43 back to 105% on both, running at FO 120% 06:31:51 joint 2 following error immediately 06:32:04 bummer 06:32:15 try increasing it till it doesn't error 06:32:44 just the accel I assume? 06:33:22 trying maxvel 105% maxaccel 110% 06:33:53 you could just use bin/halcmd setp stepge.2.max-accel xx 06:34:06 when emc is running (hope you're not stopping, rerunning it) 06:34:07 yeah, don't need to edit and restart 06:34:14 ok, I'll try that 06:34:19 just open another shell 06:34:33 still JFE at maxaccel 110% 06:34:53 bin/halcmd setp stepgen.2.maxaccel 06:35:03 it's 20 in the ini 06:35:09 this was 22 06:35:10 I'll try 24, 120% 06:35:16 yup 06:35:42 do you have any backlash configured? 06:35:47 no 06:35:50 ok 06:36:03 (same failure mechanism, backlash just makes it worse) 06:36:31 120% may have fixed it 06:36:48 I'm surprised it needed so much 06:37:11 could this be a FO problem? 06:37:17 dunno 06:37:32 what's FO? 06:37:36 feed override 06:37:38 did you make any other changes to the .hal files (except for the max-vel and max-acc tweaks)? 06:37:39 sorry 06:37:46 let me cvsdiff 06:38:08 send me your ini, and if any other changes in the .hal files, send me those too 06:38:22 I'll put halscope on it 06:38:35 heh, chris needs to learn that ;) 06:38:40 unless you'd like to learn 06:38:48 I did not change anything of consequence in the hals other than the maxacc/maxvel 06:38:57 sure, if you have time to talk me through it 06:39:05 send the ini, and we can do it in parallel 06:39:26 btw.. regarding halscope 06:39:40 john: how do you feel about sample configs for it? 06:39:55 good, but... 06:40:12 right now, it always reads the config from .scope.cfg 06:40:26 cp should cure that 06:40:27 http://timeguy.com/cradek-files/emc/emc.ini 06:40:27 I need to add a save/restore option 06:40:59 (and I need to finish the actual code that reads the files, right now it doesn't do the triggering part yet) 06:41:32 ok.. no rush :) 06:41:39 oh cool, I have halscope built already 06:41:48 I thought I had to do something special last time 06:41:54 install gtk 06:42:03 ah 06:42:12 once you have gtk-dev, it builds ok 06:42:17 but if you have it, then it should automatically build 06:42:34 jmkasunich: did you see the url of my ini? 06:42:43 yeah, copied to local 06:42:53 I'm dogin a cvs up and make to make sure I'm current 06:42:58 doing 06:43:18 mine is maybe a week old 06:43:27 cradek - are you running the hardware, or just "simulating"? 06:43:31 running hardware 06:43:46 ooOOOOeeeEEEEEEoooOOOoooooeeeEEE 06:43:46 with steppers, it doesn;t much matter 06:43:49 but steppers, using stepgen 06:43:56 yep 06:43:58 heh 06:44:12 steppers let you easily hear problems 06:44:15 user sevos - they only hum when they're stopped ;) 06:44:16 cradek: got the cat over the keyboard? 06:44:19 I can hear misblends on parallel segments 06:44:19 although I suppose I should unplug the parport cable from the USC card ;-) 06:44:30 alex_joni: no, that's what my mill sounds like 06:44:51 * alex_joni runs it through a speechsynthesizer 06:45:19 phttbbbbbt 06:45:33 dammit, you guys gotta get axis into emc2 cvs 06:45:47 every time I do a make clean, it destroys axis 06:45:56 no how do I make axis again? 06:46:04 s/no/now 06:46:09 cd /path/to/axis 06:46:28 env EMCROOT=/path/to/emc2 python setup.py install 06:46:39 jmkasunich: you could fix make clean instead 06:46:46 nah - too easy 06:46:51 cradek: I have 11/20, is that pretty current? 06:47:00 oh hey, I got a joint following error on the last move 06:47:07 jmkasunich: let me look 06:47:23 12/03 is pretty current 06:47:33 the rest is old stuff :) 06:47:48 kidding :) 06:48:04 there are 10 patchsets since 11/20 06:48:04 but they keep advancing with the development.. 06:48:04 might as well get the latest 06:48:39 before 11/27 won't even build 06:48:45 we had a chat about server load this morning.. 06:48:59 bummer - I missed that 06:49:06 if anyone is interested here are some download stats : http://dsplabs.cs.utt.ro/~juve/emc/.logs/counts/ 06:49:27 does that show download starts, or cpmpleted downloads? 06:49:36 completed 06:49:51 starts.. 06:49:52 ok 06:49:52 so might be lower 06:49:52 ok, what do I want to download? from the download page? or the snapshot page? 06:49:52 snapshot page 06:49:53 snapshot 06:49:56 bottommost link 06:50:13 or in the first sentence 06:51:22 I just upped my axis too 06:52:53 gotta be root to make axis? 06:52:58 no 06:53:04 to install it you do 06:53:08 error: could not delete '/usr/lib/python2.3/site-packages/rs274/OpenGLTk.py': Permission denied 06:53:23 I guess you're installing 06:53:29 so yes 06:53:36 it won't work without installing, will it? 06:53:39 no 06:53:43 pah 06:53:47 sorry, I wasn't being obtuse on purpose 06:54:09 you can setup.py build, and then setup.py install, I thought you were asking about build 06:54:30 I have so many differnet checkouts on this box, I don't install anything 06:54:30 just run from the directory 06:54:39 same here 06:54:41 john: you are installing axis in the emc2 dir 06:55:01 SWP just told me to install (which I guess I needed to do anyway) and that must automatically build 06:55:08 yup 06:55:17 alex: I guessed as much (install in emc2 dir) 06:55:19 so a sudo infront is not bad habit 06:55:53 ok, built and running 06:55:58 great 06:56:13 open another shell, cd to your emc2 dir 06:56:34 bin/halscope & 06:57:00 I'm with you 06:57:10 the scope window and a dialog should appear 06:57:16 yes 06:57:26 select servo-thread 06:57:50 record length? 06:57:53 leave mult at 1, and rec len at 4047/4 chan 06:57:57 ok 06:58:13 see the row of numbered buttons (1-16) 06:58:17 click on 1 06:58:29 what axis was tripping the most, 2? 06:58:33 aka Z? 06:58:34 yes 2/Z 06:58:36 yes 06:58:57 ok, on the signals tab, select Zpos-cmd 06:59:07 ok 06:59:44 click on 2, axis.2.f-error 07:00:01 oops, parameter tab for that one 07:00:27 ok 07:00:29 3, param tab, axis.2.f-errored 07:00:49 ok 07:00:52 then bottom right corner, "source" (trigger source) 07:00:59 pick channel 3 07:01:22 then near the top, under Run Mode, click normal 07:01:54 ok, it's going 07:02:02 at this point, the scope should trigger on a following error 07:02:03 I'm not getting the FE now 07:02:10 load 3dchips, and start running 07:02:25 I went back to the original max-acc and max-vel 07:02:43 hmm, I got linear move out of range... 07:02:53 I suppose I should home first? 07:02:56 you will have to home and offset properly 07:03:04 Chips is big for my mill 07:03:10 you could open up the limits instead 07:03:19 * jmkasunich doesn't actually use EMC much ;-) 07:03:35 just open up the limits 07:03:37 well we should stay in synch, how are you doing it 07:04:04 ok type X Home Y Home Z Home 07:04:08 you should get the three home icons 07:04:21 little target things? 07:04:34 yes 07:04:38 ok, done 07:05:06 wtf 07:05:23 ? 07:05:25 wtfw? 07:05:35 I aborted Chips 07:05:41 now MDI doesn't work right 07:05:46 I say g0x0 and it goes somewhere else 07:05:46 you baby killer! 07:06:53 offset coordinates? 07:07:06 or - coordinate offsets? ;) 07:07:07 jmkasunich: jog X to +4" 07:07:19 hit shift-home 07:07:42 jog Y to -2.9" 07:07:42 hit shift-home 07:08:18 jog Z to +2.5 07:08:20 hit shift-home 07:08:22 how come no 1.000" incremental jog? 07:08:42 some day we'll make those configurable 07:08:54 ok, all done 07:08:59 now chips should run 07:09:03 whats with the big gray cone 07:09:08 that's where the tool is 07:09:26 the pointer of death... can't see thru it or anything 07:09:33 load chips 07:09:39 the cone scales to an appropriate size 07:09:45 load or reload? 07:09:47 middle-drag to spin the image 07:09:55 or hit the P icon 07:10:08 I'm in P 07:10:19 its not hiding it right now 07:10:20 do you see chips? 07:10:24 oh, ok 07:10:53 this is nuts 07:10:58 it should run now 07:11:04 what is nuts? 07:11:05 I got a ferror right away 07:11:14 when I was doing the jogs and shift-homes, the cone moved as expected, and I could see chips 07:11:43 (I was in P) after changing from P to Z to X to Y to P again 07:11:54 I have a really botched up display 07:12:07 one of the dimensions is 101.60 07:12:19 well ... that's the bug jepler is working on 07:12:22 the problem is 07:12:24 and chips (if thats him) is a tiny blur over near the other end 07:12:24 heh 07:12:29 Chips is in metric 07:12:31 the ini is in inches 07:12:36 use the scroll wheel to zoom 07:12:41 the program aborted in the middle of Chips 07:13:04 the moral of the story is axis sent mm offsets to emc, which interpreted them as inch 07:13:33 it was caused by that abort that you got when you tried to exceed limits 07:13:36 the moral of the story is units are still fucked up 07:13:48 yep 07:13:50 mshaver has joined #emc-devel 07:13:55 should I just start over? 07:14:10 hmmm - is that why I get weird scaling (like disappearing models) when I zoom out to wide views? 07:14:11 maybe so 07:14:16 hi Matt 07:14:23 don't run chips until you get offsets set right 07:14:32 halscope will remember most of its setup 07:14:37 hi! 07:14:43 hello 07:14:48 hi matt 07:15:17 ok, estop off, machine in run, time for offsets 07:15:28 home all 3 axes 07:15:41 is "shift-home" the same as hitting the offset button? 07:15:44 yes 07:15:45 * mshaver ...is talking to dave engvall on the phone... 07:15:51 what about? 07:16:12 X=4, offset 07:16:16 Y=-2.8, offset 07:16:21 Z=2.5, offset 07:16:29 g-code reading from disk 07:16:44 for really big files? 07:17:08 done, got a nice pic now in P mode 07:17:18 yay 07:17:30 the tool is out beyond Chip's right foot 07:17:35 all sizes 07:18:04 are the colored axes over top of his middle? 07:18:10 that's the relative origin 07:18:11 scope is armed (I had to select the trigger source again 07:18:17 yes 07:18:22 ok, it should run 07:18:56 it moved to the origin, the said linear move 14 out of range 07:19:04 arrrgh 07:19:06 s/the/then 07:19:06 that's right 07:19:12 someone screwed up the 3D_Chips file 07:19:18 I had to fix mine 07:19:32 comment out lines N21 N22 07:19:33 who screwed with it? 07:19:39 I don't know, but it was recent 07:20:00 if its broken, it should be fixed 07:20:04 I also commented N6921 07:20:33 I'll check it in 07:20:43 hang on first 07:20:46 guess who screwed with it? 07:20:47 it must be recent, because I can run chips just fine here (by just homing each axis) 07:20:50 ROFL 07:20:52 ray, right? 07:21:01 jmk ;) 07:21:06 ? 07:21:10 in october? 07:21:15 hmm 07:21:15 latest revision is by you (6 weeks) 07:21:23 with a log message that makes no sense whatsoever 07:21:31 heh, that was by ray I think 07:21:38 while working on the mazak 07:21:40 yeah.. probably commited along with some other stuff 07:21:47 (the checkout on that box is under my name) 07:21:50 ah 07:21:59 I bet it was a mistake 07:22:03 he added a change of coordinate systems to it 07:22:10 http://cvs.sourceforge.net/viewcvs.py/emc/emc2/nc_files/3D_Chips.ngc?r1=1.3&r2=1.4 07:22:17 for the mazak, Z = 0 is with quill fully retracted 07:22:30 for chips, z=0 is much lower 07:22:31 Lines N21, N22, N6932 07:22:43 everyone else uses G54 for work offsets 07:22:51 I think it's bad to clear them in the program! 07:23:11 r1.4 runs fine, but I don't do shift-home, just home 07:23:25 SWPadnos_: you don't use limits then 07:23:35 I don't use a machine ;) 07:23:38 ha 07:23:46 limits are nice to have with a machine 07:24:00 jmkasunich: just edit the file (or get r1.3) and hit reload in axis 07:24:03 I'm sure 07:24:14 does anybdy know where that limit is actually being hit? I suspect in the interp 07:24:44 there are limits enforced in the motion code, but the motion code never uses fscked up units 07:25:02 jmkasunich: it's not a matter of that, it's sending the MDI to set the offset 07:25:08 g10 l2 p1 x9 07:25:12 could mean 9" or 9mm 07:25:16 all its commands arrive in machine units (the units used in the ini file for vel, accel, limits, etc) 07:25:17 big difference 07:26:16 does G20/G21 affect that, or is it always in the "base" unit? 07:26:28 heh, the motion controller doesn't know beans about offsets either 07:26:47 the motion controller always uses ini file units, and always uses absolute coords 07:26:51 SWPadnos_: I haven't studied this yet, I just noticed the bug today, doing exactly what jmk did 07:26:54 it enforces soft limits 07:27:08 damned if I know why the interp is even worrying about limits 07:27:09 ok - the interp should be doing the work there 07:27:51 anyway, back at the ranch 07:27:52 cradek: a thought for an axis feature: plot the machines work envelope 07:27:59 I have two red lines and one green 07:28:03 the green one has a spike in it 07:28:14 mine never triggered 07:28:21 ok, 07:28:23 did you set FO to 120%? 07:28:28 the green one is the currently selected channel 07:28:47 no, I got that fscking damned limit error, and haven't edited the g-code yet 07:29:16 I'll do that in a sec 07:29:30 in the meantime, you can select any channel, just click on the nunbered button 07:29:41 it will go green, and the number and source will be displayed below 07:29:59 the "Vertical" controls to the right work on the selected channel 07:30:09 * jmkasunich edits 07:31:07 oooh 07:31:08 cool 07:31:24 what's cool? 07:31:27 halscope? 07:31:27 halscope 07:31:32 yeah ;) 07:31:44 I get a nice linear increase in ferror until it trips 07:32:29 I agree it would be really neat to somehow show the absolute work envelope 07:32:51 I'm not sure how to do it though... I could definitely draw a box out of lines 07:32:54 you said to comment out N21, N22, and N6921? 07:33:09 looks like the G54 is on N6932 07:33:14 I'd say 6932 07:33:23 yes 07:33:29 sure, 6932 also 07:33:48 it's harmless though, since the rel origin is in the envelope 07:33:57 did you have to comment out N50 and N60? 07:34:09 fscker... 07:34:15 move out of range again 07:34:17 nope 07:34:21 hmmm 07:34:27 jmkasunich: edit the ini and open the limits 07:34:35 jmkasunich: it won't affect this error 07:34:41 sounds like a plan 07:34:54 jmkasunich: if you can't see the table on the mill when you're setting offsets, it probably sucks 07:35:23 chips is 4" wide and my Y travel is barely more than that 07:35:31 weird - I get no motion unless those are commented out - I think I need to connect some more motion pins 07:35:51 heh, big assed machine now - I added 100 in front of your numbers 07:35:58 perfect 07:36:05 home wherever you damn well please 07:36:15 that's my solituin ;) 07:36:19 solution 07:37:05 ok, machining happily at FO = 100 07:37:28 went to 120, got an error 07:38:04 damn, nearly 0.050 error when it tripped 07:38:09 SWPadnos_: I hope Z with the tool near the table and have the limits 0-maxheight, so if the program has a bug that will drill into the table, emc stops and tells me 07:38:31 jmkasunich: yeah, I get a linear increase in ferror during a jog...? 07:38:38 I'm sure I'll do something like that when I actually connect hardware 07:38:39 I wonder if my PERIOD is too big now 07:38:50 though I'll have limit switches everywhere as well 07:39:16 SWPadnos_: even home switches would be nice here, but I make do 07:39:19 so - I managed to get a following error at FO=300%, using the PPMC 07:39:39 the commanded Z pos was changing at 3.5 divs * 0.200/div in 4 divs at 500mS/div 07:39:41 yeah - on a Bridgeport, I think the switches are a little more important :) 07:39:56 that is 0.7" in 2 secs, or 0.35 ips 07:40:24 21 ipm 07:40:54 max vel in the ini file is 0.3334 ips 07:41:04 yeah, interesting isn't it 07:41:11 I just noticed that too 07:41:14 so the TP was asking for too much 07:41:56 and nice stepgen module refused to allow it 07:42:45 8000 steps/inch, so you are talking about less than 3000 HZ here, its not a period issue 07:43:00 it's not using the axis max_vel - it's using the TRAJ value (I think) 07:43:22 I bet your right 07:43:28 axis_0 and AXIS_1 are set the same as TRAJ 07:43:58 [TRAJ]MAX_VEL should be set to the lowest axis value 07:44:09 I don't think so 07:44:11 or maybe a hair lower to avoid headroom issues 07:44:11 lowest?? 07:44:17 surely not 07:44:20 it should be the max allowed by the machine 07:44:37 yes, TRAJ limit is the speed that the TP will attempt to move the tooltip in any direction 07:44:51 even Z's 07:44:54 but if I'm moving in X, I want it to go faster than that 07:44:55 that should be limited by the axis value, if it's lower 07:45:03 right 07:45:20 otherwise there's no point to having some axes set faster 07:45:32 well that intelligence, if any, is in code that I've never worked on, so I assume it is broken ;-) 07:45:41 you can do a compound move that's faster than any axis, actually - sqrt(#axes)*max 07:46:11 that's also true 07:46:29 the axis maxvel is a projection of the move onto the axis 07:46:58 (or something like that) 07:47:00 * cradek waves his hands 07:47:06 and it was so 07:47:11 so the TP needs to do the projection(s), then figure out if any axis limit will be exceeded, and if so "refuse" to follow the commanded feedrate? 07:47:17 yes 07:47:18 yep 07:47:33 well I have no idea if the existing TP does that 07:47:43 it seems non trivial is you have kins 07:47:46 this has always worked in emc1 07:47:46 let me guess.. it doesn't ;) 07:47:56 I've always had axes set differently 07:48:01 even X and Y were different for a while 07:48:09 multiple passes thru the kins to to the projection, instead of just one with the final position 07:48:19 s/to to/to do 07:49:24 chips just sets the feed in one place, right? 07:49:44 I'm not sure 07:49:57 no - you do one pass, then scale all axes by the lowest ratio of AXIS_max:Requested_max 07:50:29 SWPadnos: TP should do adaptive control 07:50:31 3 places 07:50:44 twice to 225, once to 450 07:50:47 as you go, when one of them is too fast, it needs to slow down 07:50:53 yes 07:50:55 see emccanon.cc ~ line 264 07:51:12 I want to increase the Fs in the file by 120%, then set feedrate override to 1.0 and see if the same thing happens 07:51:28 the TP may correctly limits feeds, but not overrides 07:51:39 that could sure be 07:51:46 alex_joni: on a per-segment basis, look at the requested velocities, then scale to the lowest common denominator 07:52:00 ahh.. ok ;) 07:52:06 thought a whole program 07:52:18 nope ;) 07:53:19 ok, running again, with F270 and F540 instead of F225 and F450 07:53:42 got past the spot that tripped it before 07:54:17 I bet the TP is oblivious to "scale" aka feedrate override 07:54:55 starving ... must ... go ... eat 07:55:24 I'll be back later 07:55:31 jmkasunich: I think you've figured it out 07:55:47 jmkasunich: I'll try to help you find the fix... 07:56:17 heh, 450mm/min = 0.295 ips * 1.2 = 0.354 ips 07:56:35 which is where we were tripping 07:57:03 I winder if all those empty {ENABLE_,DISABLE_)(FEED,SPEED}_OVERRIDE functions have something to do with it? ;) 07:57:06 wonder 07:57:09 but when the g-code says 540mm/min (which is also 0.354 ips) we don't trip, the TP must slow it down 07:57:29 SWP: I'm almost certain they don't 07:57:38 probably the feedoverride gets applied after the speed check 07:57:39 somewhere near line 1014 of emccanon.cc 07:57:55 they refer to disabling the buttons so an operator can't crank feedrate beyond what the g-code programmer wanted 07:58:04 ah - ok 07:58:20 feedrate override gets applied down in the RT motion control 07:58:37 there is a variable called "scale", normally 1.0, that gets changed by override 07:58:48 it is applied to the TP, but I don't know where or how 07:59:23 chips is half done, using the stock .hal file that sets stepgen limits exactly the same as ini limits 07:59:33 this is strictly related to feed override 08:00:06 cradek had just the right limits 08:00:20 high enough to run it at the standard speed 08:00:28 low enought to fail at override speed 08:00:59 this stuff should be in emc/motion/control.c, right? 08:01:09 indirectly 08:01:13 heh 08:01:16 control.c calls the actual TP code 08:01:24 tp.c, tc.c, and maybe others 08:01:54 I basically rewrote control.c from scratch, but the others are virtually untouched 08:02:20 I'm gonna try another test 08:02:21 emcmotStatus->qVscale = emcmotCommand->scale; 08:02:21 tpSetVscale(&emcmotDebug->queue, emcmotCommand->scale); 08:02:29 set Z radicaly slower than X and Y 08:02:39 set the g-code F command real high 08:02:51 and watch to see if the TP slows down the vertical moves 08:04:05 set the max override to 3x or something - make it easy on yourself 08:05:36 ok, max FO = 2, X, Y max v = 0.5, Z maxv = 0.05, F10000 in the program 08:05:36 jmk: can you try something first? 08:05:45 although probably it won't matter much.. 08:05:55 try setting the feed override while paused 08:06:30 started with override = 100% 08:06:49 and it is respecting the axis limits, horizontal moves are much faster than vertical 08:07:28 I think the problem is in tc.c 08:07:39 I'm inclined to agree with you 08:07:41 if (newVel > (tc->vMax - tc->preVMax) * tc->vScale) { 08:07:42 newVel = (tc->vMax - tc->preVMax) * tc->vScale; 08:07:42 isScaleDecel = 1; 08:07:42 } 08:07:42 /* clamp scaled velocity against absolute limit */ 08:07:42 if (newVel > tc->vLimit) { 08:07:43 newVel = tc->vLimit; 08:07:45 } 08:07:49 the later if is the problem 08:08:02 it only checks (clamps) on absolute limit 08:09:20 heh, its fun to watch with the axis limits so asymmetric 08:09:22 I think that limit was supposed to be the min of all axis limits (set in the *ini.cc files) 08:09:42 it just zooms thru the horizontal (or nearly so) parts, then crawls up and down the more vertical ones 08:10:11 so it is applying individual axis limits 08:10:46 actually - it's the earlier if that's the problwm 08:10:48 case EMCMOT_SET_VEL_LIMIT: 08:10:49 rtapi_print_msg(RTAPI_MSG_DBG, "SET_VEL_LIMIT"); 08:10:49 emcmot_config_change(); 08:10:49 /* set the absolute max velocity for all subsequent moves */ 08:10:49 /* can do it at any time */ 08:10:49 emcmotConfig->limitVel = emcmotCommand->vel; 08:10:50 tpSetVlimit(&emcmotDebug->queue, emcmotConfig->limitVel); 08:10:57 if vel > max * scale, then make it max * scale 08:11:02 that's the Vlimit we were talking about 08:11:17 ok 08:11:31 looking now what is gets set to 08:12:12 trajInifile->find("MAX_VELOCITY", "TRAJ") 08:12:15 I rest my case ;) 08:12:22 jmkasunich: what happens on coordinated moves? (really slow axis + fast axis) 08:12:37 seems to be limited to match the slow axis 08:12:41 it goes as slow as to allow the slow axis to be able to move 08:12:44 well - it's *supposed* to be the min for all aexs ;) 08:12:48 a horizontal move is fast 08:12:53 vertical is slow 08:13:04 angled is inbetween, depending on the steepness of the angle 08:13:17 you know, this really needs a test program instead of chipps 08:13:39 * alex_joni goes to bed 08:13:43 night alex 08:13:45 nice stuff though 08:13:49 night 08:13:51 too bad I can't stay ;) 08:14:04 cool - you should be able to MDI a move like G1X100Z1, and have it go full rate (assuming that the ratio is <100:1) 08:14:07 night all.. I'll read the logs tomorrow 08:14:26 alex_joni has quit 08:16:02 hmm, a circle in the xz plane should demonstrate it too 08:16:09 yep 08:16:17 I wonder if accel is also being multiplied 08:16:31 I got an error using 3X FO, using USC hardware 08:16:34 I suspect so, 08:16:52 the USC is quite capable of keeping up with ahything I throw at it 08:17:03 with usc hardware the PID tuning comes into the picture 08:17:06 (max_vel set to 180 IPM@40Ksteps/inch) 08:17:07 muddies things up 08:17:10 true 08:17:42 I thought there was a test .ngc program with circles in all three planes 08:17:42 I could increase PGain from 100 to 500 or so, and see what happens 08:17:56 that way lies madness 08:18:03 circletest.ngc? 08:18:10 you want to isolate issues, not combine them 08:18:17 yes 08:18:19 I don't see that one 08:18:31 check one of your other checkouts ;) 08:19:05 3dtest, part of emc1 08:19:15 should probably copy that over to 2 and commit 08:19:16 later 08:19:47 right - circletest is what I named Ken Lerman's test circle file, that uses his looping stuff 08:20:22 something looks screwy in 3dtest 08:20:39 the XY circle and the text labeling it are at differnt Z levels 08:20:57 the circle is a couple inches below where it should be 08:21:09 (below the origin) 08:21:30 it doesn't look that way to me 08:21:41 the text is on the XY plane where it belongs, the circle a couple inches lower 08:22:16 click the X view button 08:22:38 it's flat for me 08:22:42 its still there 08:22:48 is it red or white? 08:23:08 red now, cause its been macined 08:23:14 machined 08:23:25 the tool is following the white path, both are wrong 08:23:26 ok - did you click the broom icon after loading? 08:23:32 yes 08:23:33 ok 08:23:40 (just doing stupid checks ;) ) 08:24:02 we must have different versions of the file - it looks perfect here 08:24:05 I did abort out of chips before loading this one 08:24:57 relativ offsets still around"? 08:25:11 it looked like it did the entire XZ circle at the same rate 08:25:22 this time I will carefully check as it does the YZ one 08:25:30 interesting - I just got a joint 2 following error at 60% feed rate (F30 commanded) 08:26:44 confirmed, circles in YZ are done at a constant rate, it doesn't speed up on the near horiz parts and slow down on the near vert ones 08:27:08 but when it draws the Z, the top and bottom bars are MUCH faster than the angled one 08:27:15 right - it would computer the max Z vel for the entire circle, and slow down appropriately 08:27:28 compute 08:27:40 it looks like it does it on a move by move basis 08:27:44 yes 08:27:57 hmmm - there may be something else going on here 08:28:02 all this is at FO = 100% 08:28:17 I just ran the file once perfectly, and the second time, I got a joint 2 following error 08:28:23 at FO= 60% 08:28:37 too many variables 08:29:03 you don't know whether the motion module is giving the PID an unfollowable path, or the PID is failing to follow a legal path 08:29:21 until you can answer that question with certainty, you don;t know anything 08:29:29 the PID keeps up fine with 3d_chips at high speeds, or MDI moves (high speed being 180 IPM) 08:29:50 actually - this file uses G0 moves for the text portions - are those overridden by FO? 08:29:56 I'd be tempted to test with sim.ini 08:30:01 suposed to be 08:30:13 sim.ini has no PID, it feeds command right back 08:30:18 so it will never ferror out 08:30:20 are you sure - G0 is "max rate, uncoordinated" 08:30:36 or at least, not required to be coordinated 08:30:44 according to ray, FO changes everything 08:30:50 ok 08:30:58 anyway, back to sim.ini 08:31:05 "changes" or "is supposed to change" ? :) 08:31:30 the sim hal file puts (I think) a pair of differentiators on each output signal, so you get velocity and accel signals 08:31:45 scope em, trigger on one or the other exceeding limit 08:31:58 ok 08:32:11 I'm pretty sure it is now "changes" 08:32:20 IIRC I had to change the jogging code to handle that 08:32:41 ok. weird - shouldn't jogs be at a programmed rate, not G0? 08:33:29 confirmed, just held down the left arrow to jog X, and dragged the FO slider, the speed changed 08:33:54 ok 08:33:56 yes, on tkemc they use a rate set by a slider near the left of the screen 08:34:11 I don't see a similar slider for axis 08:34:21 right 08:35:01 ok,did more jogging 08:35:13 for FO from 0 to 100, the speed changed 08:35:17 for 100 to 200, no change 08:35:28 I suspect its already at the axis limit 08:36:00 ok 08:36:50 anyway, be aware: jogging in emc2 is handled by completely differnt code 08:36:55 doesn't use the old TP at all 08:37:08 phone 08:37:12 (also, I wrote that code, so if there are problems with jogging, I need to fix them) 08:37:21 ok 08:37:59 chinamill has left #emc-devel 08:40:11 ok, jogging vel limit is handled at control.c, line 1434 08:40:29 /* velocity limit = planner limit * global scale factor */ 08:40:30 /* the global factor is used for feedrate override */ 08:40:30 vel_lim = joint->free_vel_lim * emcmotStatus->qVscale; 08:40:30 /* must not be greater than the joint physical limit */ 08:40:30 if (vel_lim > joint->vel_limit) { 08:40:31 vel_lim = joint->vel_limit; 08:40:33 } 08:41:07 the second part ensures that high FO factors won't overspeed the axis 08:44:20 there should be one place where all the vel / accel limits are applied 08:44:42 or is that the one? 08:44:44 there is - stepgen ;-) 08:44:52 no, that is for free mode only 08:44:57 ok - where all the request limits are applied ;) 08:45:03 ? 08:45:36 well - ferror accumulates whtn the TP asks for a vel that stepgen can't provide 08:45:40 when 08:45:52 the TP shouldn't be asking for anything faster than the machine limits, ever 08:45:54 the coord mode TP can generate commands, the free mode TP can generate commands, we haven't even talked about teleop mode 08:46:24 exactly "the TP shouldn't be asking for anything faster than the machine limits, ever" 08:46:36 but it does, hence its broken 08:46:40 right 08:46:56 I can (just did) show you the code that keeps my free mode TP from doing that 08:47:08 I have no idea what code prevents it on the other TP 08:47:18 ok 08:47:30 and then of course, there is backlash comp, which is added to the output of either TP and can make it exceed limits :-( 08:48:01 that's where the stepgen / other driver comes in - it should do its own slew rate limiting 08:48:16 I'm pretty sure that's what the steppermod did in emc1 08:48:19 and it does, resulting in a following error 08:48:39 not necessarily, if you have some headroom 08:48:53 without backlash, stepgen needs only 1-2% headroom 08:48:54 and some PID 08:49:01 with backlash it will need more 08:49:06 yep 08:49:22 if you go from stopped to max vel at max accel in the TP 08:49:30 and the backlash comp added its own to that 08:49:36 you can never catch up 08:49:47 (with zero headroom) 08:50:00 with some headroom, you catch up at a rate depending on the headroom 08:50:23 you can with headroom - remember that the actual accel limit is higher when you're just compensating for backlash 08:50:30 right 08:50:31 I'm much better now 08:50:44 properly fooded 08:51:23 you know - the ppmc / USC cards have a logical design error 08:51:32 only 1? 08:51:38 another one ;) 08:51:56 you don't necessarily want the brake output to shut off when the enable out is off 08:52:12 what brake? 08:52:25 DOUT3 is brake, by default 08:52:28 axis, or spindle? 08:52:33 spindle I think 08:52:39 ah - right 08:52:45 you keep changing the subject ;-) 08:52:56 but nonetheless, you can't have any axis brake controlled by the ppmc/ usc either 08:53:15 sorry - I just noticed the light going on an d off when I toggled estop in axis 08:53:29 any axis brake should be controlled (directly or indirectly) by axis.[0-2].enable 08:53:42 indirectly means you might use some CL or something 08:54:18 yes - but it can't go through the ppmc card outputs, since those will be turned off if master enable goes away (or SSR8 is turned off) 08:54:36 for instance, on the mazak, ray inserted a delay, he didn't disable the Z amp until a fraction of a second after the enable turned off, to allow time for the brake to grab 08:54:46 otherwise the axis would drop a bit 08:54:56 yep 08:55:13 any sane brake arrangment applies the brake when power goes away 08:55:27 true -they should be negative logic 08:55:52 the spindle brake on a bport isn't like that 08:56:03 and the polarity is set up for that 08:56:42 set up for bport I mean 08:56:43 ok (I don't have a brake, and I haven't checked the polarity of the VFD brake input) 08:56:52 if ther eis one 08:57:05 probalby just command zero speed 08:57:37 yep - it wouldn't be a physical brake, just a momentum dump 08:58:01 now that cradek is back, do we want to dive into this TP thing? 08:58:27 sure (though I'll probably be leaving for food in around 1.5-2.5 hours ;) ) 08:58:30 * jmkasunich really doesn't want to look at the TP code, it gives me heartburn 08:58:36 same here 08:58:48 but we can give it an hour or two 08:58:54 yep 08:59:22 gentlemen, start your editors 08:59:27 ha 08:59:28 lets start with where it is called 08:59:41 control.c line 1542 and following 08:59:44 the feed override ends up in tc->vScale 09:00:30 tpRunCycle gets called whenever the interplator runs out of data and needs a new point 09:00:33 the bug is tc.c line 417 09:00:42 damn he's good 09:00:47 * jmkasunich opens tp.c 09:00:50 tc.c 09:00:51 um -eyah 09:01:04 this assumes all the axis limits are the same 09:01:16 so I think it clamps to the TRAJ limit 09:01:27 yes, it does 09:02:12 so it's a simple matter of ... putting the right code here and taking out the wrong code 09:02:49 cradek: I ran some experiments that say it does respect inidividual axis limits 09:03:00 really? during FO? 09:03:03 at least when scale = 1.0 (FO = 100%) 09:03:05 oh 09:03:09 I know that works :-) 09:03:20 I set Z limit to 0.05, X and Y to 0.5 09:03:23 it would be very obvious on my mill - Z would stall 09:03:36 I'm glad you verified it 09:03:39 made it even more obvious 09:03:58 you tried coordinated moves too, right? 09:04:09 but that means the limit I was seeing can't possibly be line 417 09:04:10 yes 09:04:24 angled lines limit properly 09:04:33 good 09:04:44 I didn't write a test program, probalby should to verify for sure 09:04:59 for instance a line with 1/10 slope, and 1/1 slope, 09:05:07 the first should go fast 09:05:10 the second slow 09:05:30 2/10 slope should be inbetween 09:05:53 hell, I can just do mdi 09:05:55 stand by 09:07:08 you should be able to copy/paste whatever you enter in axis - it keeps a log of mdi commands 09:07:23 history, sorry 09:09:47 yeah, it works 09:09:52 good 09:10:08 the canon is right 09:10:18 with FO = 100, it limits such that no axis exceeds limit, but goes as fast as possible 09:10:31 so if X has a high limit and Z a low one, X only moves go fast 09:10:43 that's thanks to getStraightVelocity in emccanon.cc 09:10:45 combined XZ moves limit based on the amount of Z 09:11:17 there is per-axis vScale stuff commented out all over the place 09:11:25 what file? 09:11:33 motion/usrmotintf.cc for one 09:11:50 task/taskintf.cc 09:11:54 look for axVscale 09:11:57 gimme a line number 09:12:18 taskintf.cc:774 09:12:26 :q 09:12:27 oops 09:12:39 heh, I thought you said usrmotintf 09:12:48 usrmotintf is just a status print function 09:12:54 the comment that is 09:12:55 yeah 09:13:00 maybe this was never used 09:13:08 maybe someone just started putting it in 09:13:09 thats why I wanted to see lines, I thought they were irrelevent 09:13:51 I probably commented that out 09:14:13 I have no idea what the per-axis scales are about 09:14:20 completely undocumented 09:14:38 avVscale occurs 3 times in the emc2 tree 09:14:55 motion.h (commented out - in a struct) 09:15:33 taskintf.cc - in the status update func (since the vars aren't in the struct any more) 09:15:47 and usrmotintf.cc - status print 09:15:50 motion.h is a good file - it defines the interface between userspace and the motion controller 09:16:10 I'm about to look for occurrences in emc1, and see where they're missing ;) 09:16:24 notably - tp and tc don't have even commented out references to them 09:17:42 I see them being set to 1.0, and to the global scale value 09:17:52 yep - then never used 09:18:39 hmm - perhaps those are "outputs" for status only, not the controlling variables 09:19:42 I think they were to allow for never-implemented per-axis overrides 09:19:54 ok - could be 09:19:54 a red herring related to this problem 09:20:44 its gotta be in tp.c or tc.c 09:20:53 they are the files that compute new positions 09:21:00 I can't even figure out how the scale is applied 09:21:31 if I didn't know it works, I would say it's not in here 09:23:03 command.c line 876 09:23:09 that executes a FO command 09:23:26 sets qVscale which is used by the free mode TP (jogs) which works 09:23:38 and calls tpSetVscale for the coord mode TP 09:23:41 and tpSetVscale which sets tp->vScale 09:24:18 which is used all over tp.c and tc.c 09:24:39 all over = 7 occurrences 09:24:54 thank you SWPadnos_ aka wc 09:25:03 heh - that's me (simple tasks) 09:25:29 my grep had 10 hits in tp and 15 in tc 09:25:48 it has to be applied in tc.c but it's not 09:25:49 oops, my grep wasn't specific enough (just did vScale) 09:26:18 kate has a goof recursive grep tool (the find in files tab) 09:26:22 good, not goof 09:27:06 where is that tool? 09:28:17 the find in files tab is on the bottom of my kate window 09:28:21 next to terminal 09:28:28 hmm, joint (axis) velocity limits come down as EMCMOT_SET_JOINT_VEL_LIMIT commands 09:28:36 duh,I was looking at the top 09:28:59 cool, I learned something new today 09:29:13 heh - did you ever use the terminal? 09:29:23 anyway, those commands are processed at command.c 818 09:29:37 no, I just keep a couple of shells open 09:30:02 kate on about half the screen, shells and IRC window on the other half 09:30:04 yep - the kate term is convenient because it opens in the file directory (so make or testing is easy) 09:30:40 command.c doesn't send joint limits to the tp at all 09:30:54 so how the heck is the limiting happening? 09:31:31 you mean without FO? 09:31:39 I understand that part 09:31:57 yeah, with FO=100%, how does it know to run horizontal lines fast and vertical ones slow 09:32:11 if it never sees the axis limits 09:32:20 the canon vel msg is sent in 09:32:36 in to where from where 09:32:43 I can't read your mind 09:32:50 from emccanon.cc line 457 09:32:54 motion doesn't know anything about canon 09:32:59 ok, let me open that 09:33:22 a EMC_TRAJ_SET_VELOCITY message is sent 09:33:44 when needed, before every segment or arc 09:33:55 I think you can even see those in the debug output 09:33:56 huh? emccannon.cc line 457 is part of a probe command 09:34:10 oops 09:34:12 go up a page 09:34:21 line 404 09:34:22 same code 09:34:26 ok, same thing for lines... 09:34:49 so this has nothing at all to do with the tp 09:34:54 the math is above in getStraightVelocity 09:34:57 *right* 09:35:24 so the speed that it sets is the target speed, assuming FO = 100% 09:35:31 yes 09:35:39 and this all works right 09:35:46 then for any FO > 100%, you are fucked 09:35:50 but FO is another story because the TP has to do it 09:35:53 and then that gets multiplied by FO 09:36:09 fucked only if your axes are different maxvels I think 09:36:20 I bet not 09:36:53 this code sets a velocity that is the lesser of the Fword velocity, or any axis (taking into account the direction of the line) 09:36:57 right? 09:37:00 actually, it limits to the max used axis vel, not the vector sum (along the requested path) of the used axes 09:37:12 jmkasunich: yes 09:37:23 yes 09:37:38 so if it the Fword value, there might be headroom to allow for FO > 100% 09:37:54 yes 09:38:06 but if it is an axis (whether they are the same or not), then multiplying it by FO>100% is gonna exceed the limit 09:38:17 in that case, it must not speed up 09:38:35 but how is the TP to know which case it was 09:38:58 and even if it was the Fword limit, for all the TP knows, the axis limit is only 2% higher 09:39:09 it has to assume requested (F word) *= FO and then do the same calculation 09:39:41 "the same calculation" meaning do in RT the same thing that emccannon.cc just did in user space 09:39:44 yes 09:39:57 if you are gonna do that, then why do it in userspace at all? 09:40:01 if you're scaling up 09:40:47 wherever the FO is multiplied in, that's where the check has to go. 09:40:56 SWPadnos_: I can't find it... 09:41:02 and FO must be multiplied in in RT 09:41:13 yes 09:41:15 yeah - it may have been the line in tp.c 09:41:17 yep 09:41:20 because that's how we pause for instance 09:41:46 yep, and because FO can't wait for a queued move to finish, it takes place even in the middle of a move 09:42:06 right 09:42:26 so what emcmot command corresponds to sendVelMsg 09:42:37 to do it the "right" way, the RT code would need to know how to combine axes to get a resulting tool speed (ie, kins) 09:43:03 * cradek quietly sets his max override to 1.0 and slinks off 09:43:08 actually, kins derivatives 09:43:16 heh, this user space code has no clue about kins, and would break terribly with non-trivial kins 09:43:23 yes 09:43:27 I noticed that ;) 09:44:30 oh jeez... that sendVelMsg is still several layers removed from the RT code 09:44:45 interp_list.append(velMsg) 09:45:09 yeah 09:45:14 I did trace it into tc->vScale 09:45:19 err 09:45:22 no, wrong thing 09:45:36 * cradek reads the screen 09:45:38 heh, first you gotta trace it to usermotintf 09:45:48 from there it goes to command.c 09:46:15 but it must map to one of the commands in the enum at motion.h line 101 09:46:22 that is all the motion controller understands 09:46:43 I'm gonna guess its EMCMOT_SET_VEL 09:46:54 EMC_TRAJ_SET_VELOCITY 09:47:01 that's what it looked like to me 09:47:11 that isn't an emcmot command 09:47:23 (it may be the intermediate link) 09:47:34 it's the message type 09:47:47 NML message, not emcmot command 09:47:50 two different things 09:47:55 yes indeed 09:47:57 usermotintf is tha translator 09:48:38 are you looking at emc1 or emc2? 09:48:59 ok, emcTrajSetVelocity() in taskintf.cc issues EMCMOT_SET_VEL 09:49:05 emc2 of course 09:49:23 ok 09:49:40 * jmkasunich doesn't give a flying fuck about emc1 ;-) 09:49:49 only used for reference, of course ;) 09:49:58 well yes, there is that 09:50:01 ;-) 09:51:22 man, a day in the life of a velocity command is quite a swirl 09:51:34 man - there's some terrible C++ code 09:51:46 you noticed... 09:51:52 it is in fact EMCMOT_SET_VEL 09:51:53 looking the actual interp::append command 09:51:56 think how I feel, I don't know C++ 09:52:12 Itaskintf.cc:891 09:52:19 taskintf.cc:891 09:52:21 even worse (hint: look for ::func_name to find class member functions) 09:52:42 cradek: yep... 09:52:59 you followed it down from emccanon.c, and I followed it up from RT 09:53:04 we met here ;-) 09:53:10 and I want back the way I came 09:53:14 went 09:53:22 either, I suppose ;) 09:53:36 command.c 801 handles that command 09:53:57 calls tsSetVmax() with the velocity 09:54:18 but that is a scalar 09:54:50 all info about whether a particular axis is causing the limit (or which one, or by how much you are avoiding the limit) is lost 09:55:21 so when the TP gets an override and scales, it doesn't know how much room it has 09:55:43 ignoring the kins issue for the moment.... 09:55:44 by definition, it would have no room, since the limiting axis would be at its limit 09:55:58 SWPadnos_: in the case where you could scale up, the F word is the limit 09:56:16 IF the user code limited the velocity, maybe the F word asked for 0.1 ipm, and no axis is even near a limit 09:56:29 yes -Ok 09:56:41 seems the user code should send the desired (Fword) vel, and the max vel, separately 09:56:55 and the TP should apply the scale to the desired, then apply the limit 09:57:21 SET_VEL could be sent with the requested feed (100%) and the max allowed multiplier 09:57:30 I think those are the only two numbers the tp needs to get this right 09:57:31 thats another apporach 09:57:39 same point, two numbers instead of one 09:57:40 then all the math is non-rt 09:57:46 yes 09:57:58 the third (and correct, but harder to do) approach is to have the TP calculate the limit 09:58:13 yeah, SET_VEL would pretty much be the F word 09:58:20 then user space only sends one number, the desired velocity 09:58:35 then the TP has to know all this about the machine... 09:58:46 and the TP at least has a small chance of being able to take kins into account when calculating the limit 09:58:55 user space doesn't even know about kins 09:59:01 ouch. 09:59:34 at least I don't think so... 09:59:40 no clue here 10:00:06 we start by looking for a simple bug, and look where we end up 10:00:45 there are very few simply bugs left in emc 10:00:50 I think the limiting code could be pretty simple 10:01:16 I'm sure I could do the simple but wrong fix (only trivkins) 10:01:16 it would definitely take longer though 10:01:25 it wouldn't actually be any more broken than it is now 10:01:41 cradek: which approach would you take> 10:01:42 ? 10:01:46 send in the two numbers 10:02:05 max and desired (IMHO) 10:02:16 phone 10:02:19 or desired and max override 10:02:29 any combination of those 10:03:08 pros: we could do it today (lotta files to touch tho) 10:03:20 pros: fixes the problem for trivkins 10:03:31 cons: doesn't fix for non-trivkins 10:03:49 cons: the 2 numbers thing actually make the proper fix messier 10:04:10 (or we would just revert it if and when we get a proper fix) 10:04:37 the proper fix would actually touch fewer files 10:04:45 remove limiting in emccannon.cc 10:05:02 no changes to the nml message, no changes to any of the user-RT comms stuff 10:05:08 change the TP 10:05:11 I still don't see where the tp does the actual scaling 10:05:23 that last line - change the tp ;) 10:05:29 lemme find it 10:05:41 does tp even have access to all the ini's axis specifics? 10:06:39 tp is in realtime 10:06:48 it doesn't get anything that doesn't pass thru command.c 10:07:08 and command.c doesn't process any command that isn't in that enum in motion.c:line 101 10:08:04 the actual application of scale is at tc.c line 410 I think 10:08:27 maybe not 10:08:37 that's just a clamp 10:09:17 I guess it's possible that assignment always triggers 10:09:48 I didn't consider that 10:10:02 I don't understand what discr does right above, and I think that's the key 10:10:25 seems screwy that it would always trigger 10:10:31 yeah. 10:10:44 but that's the only use of vScale that I can see 10:11:22 that discr thing could sure use a comment or two 10:11:34 it's years too late for that, isn't it 10:12:19 ok, 0.5 vel cycletime = the distance we would travel if we stopped in one cycle 10:12:32 toGo is how far we have to go in this move 10:12:43 obviously 10:13:01 discr tells whether the current move is long enough to allow for decel to 0 10:13:17 or to accel (decel) to the new velocity 10:13:22 if you guys are sure, please add those comments 10:13:58 not sure 10:14:23 heh - me either. I'm going through the accel formulas and this particular implementation in my head 10:14:24 just thinking out loud, trying to figure out what they are doing 10:15:11 what throws me is that normally the calc for "can we stop in time" needs to consider the accel limit, and not the cycle time 10:15:39 this seems to assume that we can stop in one cycle, and calcs how far we will travel if we do 10:15:45 the first if is checking whether there is enough time to decel to 0 in this cycle 10:16:03 rayh has joined #emc-devel 10:16:06 are you sure? 10:16:07 it's 0.5 * (distance at this vel during a cycle) 10:16:21 cycle time * velocity is distance 10:16:39 yea, and half that because they assume you will be stopped at the end of the cycle 10:16:47 and if that's more than the remaining distance, it triggers the zero speed case 10:16:50 average velocity = half of current 10:17:01 no - because d = 1/2 At^2 10:17:12 A isn't used there anywhere 10:17:19 that's what I was just saying 10:17:29 true enough 10:17:57 however, look at the second discr calc (in the else) 10:18:17 there is a T^2 in there 10:18:23 and an Amax 10:18:37 yep 10:19:12 discr is a singularly poor variable name, I haven't a clue what they are doing 10:19:33 they're discriminating between two possible functions 10:19:38 it is a stupid name 10:19:48 or - two possible cases 10:20:01 scuse me, gotta pee my ears off 10:20:09 heh - just did ;) 10:21:21 damn - I've got to run. I'll be back in a few hours 10:21:26 SWPadnos_ is now known as SWP_Away 10:23:30 I sure miss sim 10:23:38 it's impossible to debug anything on the rt side 10:23:58 what happened to sim? 10:24:05 emc2 has never had it 10:24:58 ah the sim I saw is only a HAL thing. 10:28:29 cradek: you mean you want to run on a box without RTOS? 10:28:48 that too, but right now I want to be able to attach to everything with the debugger 10:29:09 * jmkasunich doesn't believe in debuggers 10:29:17 ha 10:32:22 heh, it doesn't help that discr is a length after the first calc, and time^2 after the second 10:33:47 ok, the next one takes sqrt(discr), so that is a time 10:40:40 face it, tcRunCycle is just some nasty code 10:40:56 I think that assignment does always happen 10:41:20 well, not always, but often 10:41:20 talking about line 411? 10:41:29 newVel = (tc->vMax - tc->preVMax) * tc->vScale; 10:41:37 (I switched to emc1 so my line numbers are wrong) 10:41:57 I don't buy that 10:42:03 look at the next line 10:42:14 isScaleDecel is not gonna be on all the time 10:42:50 the debugger says it's on all the time while running... 10:43:06 how are you checking it? 10:43:16 I'm just printing it 10:43:23 1000 times a second? 10:43:39 something like that, probably 10:45:23 I'm going to change that line to *1.0 and see if FO stops working 10:45:32 I bet it will 10:45:36 I think I'm gonna instrument this and look at it with halscope 10:45:39 jmkasunich: I'm working on the "watch" page. What all do you want to be able to watch? 10:45:44 sounds like a good test 10:45:54 * cradek shoots into the darkness 10:45:55 ray: buried in the guts of the TP right now 10:46:05 k 10:48:14 cradek: just to let you know about a hook that is in there... 10:48:31 control.c line 1898 10:48:32 jmkasunich: that does in fact break FO and pause 10:48:41 and abort 10:48:50 and abort? wow 10:49:31 ok, that's where vScale is applied 10:50:37 so for the two number hack, we could add one line of code here (after adding the second number to the tc struct) 10:50:47 something is still very wrong 10:51:04 the whole tp borders on very wrong 10:51:16 if that line is always being applied, then the entire complex calcualtion of newVel up above is being wasted 10:51:29 it's not always 10:51:38 I think when stopping I saw isScaleDecel=0 10:52:00 hard to tell, they go by so fast 10:52:20 I'm making newVal before that if available on a hal param 10:52:27 and newVal after it on another 10:52:33 so I can scope em both 10:52:34 cool 10:53:45 are you running a program, or just MDI? 10:54:13 a program 10:56:00 I need to go do something else for a while... be back later 10:56:08 ok 11:07:01 hmm, paul is on #emc (as himself)... first time in a while 11:07:05 * jmkasunich lurks 11:07:38 cool 11:08:39 * cradek is bad at lurking 11:08:50 heh 11:08:57 are you really back? 11:09:06 or still doing something else 11:09:09 no, I never left 11:09:27 found some stuff with the scope, dunno what it means yet 11:09:39 you going away, or staying? 11:10:03 staying I guess 11:10:09 ok 11:10:10 tell me what you found! 11:10:24 the value of newVel before the if, is usually extremely high 11:10:44 I'm not sure, but it might be the velocity need to reach the endpoint in one cycle time 11:10:47 or something like that 11:11:03 as you approach the endpoint, it decreases 11:11:17 the shape is like a parabola lying on its side, open end to the left 11:11:17 ok... 11:11:38 that makes sense 11:11:51 and until the last tiny bit of the move, the value is well above the clamp, so the clamp dominates 11:12:02 so when it gets low enough, FO is irrelevant 11:12:05 oop 11:12:14 no, that is waht I meant 11:12:26 yeah 11:12:46 that would explain why I saw it usually 1 except when stopping 11:12:50 could be that is the part when you are decelling to zero, so FO is irrelevant, you just want to decel as fast as possible 11:16:46 I just thought of a better guess at what the unclamped newVel is 11:17:17 it is "if you want to stop at the proper spot, you can be going this fast but not faster" 11:17:47 and as such it is a function of the max accel (decel actually) and the distance left to go 11:18:50 agreed about that debug - I put that in ages ago and should have removed it.... thanks 11:18:55 np 11:19:08 please put your best guesses in comments in that file 11:19:13 I think that would be great 11:19:57 paul is stirring the pot 11:20:06 I'm not biting 11:21:02 hit him with a bit of a snub 11:21:10 (like a club, but quieter) 11:21:21 I'm not biting 11:21:45 sorry 11:21:55 lol 11:21:56 (I think xml is silly) 11:22:00 took me a moment to get it 11:22:35 this vcp thing I'm working on involves a bit of heirarchy, and would be more of a candidate for XML than hal 11:22:43 but I'm just using { and } 11:22:47 widget { 11:22:58 attribute_name = value 11:23:00 attribute_name = value 11:23:08 child_widget { 11:23:16 etc 11:23:20 } 11:23:22 { 11:23:24 oops 11:23:25 } 11:23:45 yeah that sounds like a candidate 11:23:52 I think xml is ok for machine-generated stuff 11:23:55 easier to read imo 11:24:02 but if you expect a human to write or edit the file, it's terrible 11:24:10 exactly - not intended to be read or written by humans 11:24:28 and since I'm not fond of wizard and such, I want human friendly formats 11:24:59 yeah. 11:26:24 you know, I'd much rather be working on that right now... :-( 11:28:14 ok, now I'm off 11:28:33 heh, I think I am too... get some food, then code some vcp 11:28:42 we learned some things today 11:28:53 just wish I knew what they were 12:09:29 rayh has quit 13:56:18 SWP_Away is now known as SWPadnos_ 13:56:43 hi guys - anyone still around? 13:57:10 (with names, so you get interrupted: jmkasunich cradek) 14:26:31 petev has joined #emc-devel 18:12:03 petev has quit 19:36:52 jmkasunich has quit 22:16:13 logger_devel has joined #emc-devel 22:16:13 topic is: "Welcome to the Enhanced Machine Control development place. | Regular Developers' meetings 24/7 !" 22:16:13 Users on #emc-devel: logger_devel mshaver SWPadnos_ SWPadnos @ChanServ @cradek 22:17:33 chinamill has joined #emc-devel 22:33:49 * chinamill is away: Will be running between the computer and the mill 22:49:35 alex_joni has joined #emc-devel 23:08:49 * chinamill is away: eating