#emc-devel | Logs for 2008-04-20

[00:35:34] <LawrenceG> jmkasunich, ping
[00:35:44] <jmkasunich> pong
[00:36:44] <LawrenceG> hey... I have a quick question on triacs.... need to build an oven controller and looking at triacs.... is a 600v triac marginal on 240vrms... it seems so
[00:36:56] <jmkasunich> yes
[00:37:08] <jmkasunich> well, I suppose it depends
[00:37:32] <jmkasunich> for example, if you have a 600V triac in your junkbox and a higher voltage one is expensive, you might try it and see
[00:37:44] <LawrenceG> I guess thats why they have 700 and 800v versions
[00:38:02] <jmkasunich> FWIW, we use 1600V SCRs and diodes for AC drive rectifiers, with 480V input
[00:38:18] <jmkasunich> so simple scaling would recommend 800V for 240
[00:38:44] <jmkasunich> if you haven't bought anything yet, you'll probably find little price difference between 600 and 800
[00:38:56] <LawrenceG> I have a $2000 kitchen stove that caught fire... thinking of rebuilding with triacs as the original control was crap
[00:39:03] <jmkasunich> ouch
[00:39:22] <jmkasunich> so this isn't a short term hobby project - if it works you'll be using it for years
[00:39:30] <jmkasunich> and you don't want to shave pennies
[00:39:52] <jmkasunich> resistive load though, thats is kind of nice
[00:39:59] <LawrenceG> hate to dumpster it..... all the mechanical and electrical is fine... the electronics sucked
[00:40:25] <jmkasunich> I know the feeling
[00:40:38] <LawrenceG> 14-30 ohm elements.... couldnt ask for a nicer load
[00:40:42] <jmkasunich> you are thinking phase control? or zero crossing switching?
[00:40:55] <jmkasunich> I guess for a stove zero crossing is fine, and kinder to the power lines
[00:41:16] <LawrenceG> probably zero crossing..... ie turn it on for 1 to 10 out of 10 cycles
[00:41:23] <jmkasunich> yep
[00:41:32] <LawrenceG> less emi
[00:41:41] <jmkasunich> ideally you'd use a pdm type pattern, not pwm
[00:41:57] <jmkasunich> for 33%, you'd do 1 on 2 off, not 3 on 6 off
[00:42:32] <jmkasunich> don't forget to do _full_ cycles, not half cycles
[00:42:38] <LawrenceG> thermal log on an oven or stove element is very long... original controll was bang bang with relays
[00:42:52] <jmkasunich> I'm not thinking of the thermal lag
[00:42:56] <jmkasunich> I'm thinking of the line again
[00:43:32] <jmkasunich> if you were to do for example 30 cycles on and 30 off for 50%, you might notice a 1hz flicker on incandesent lamps
[00:43:43] <jmkasunich> but 1 cycle on and one off, never notice
[00:43:44] <LawrenceG> I was playing with classic ladder .... doing entire oven control in ladder!
[00:43:52] <jmkasunich> heh
[00:44:08] <jmkasunich> port to a microcontroller once you have it the way you like it?
[00:44:11] <LawrenceG> not sure if the runtime will fit in a PIC
[00:44:18] <jmkasunich> or the worlds only PC controlled oven?
[00:44:54] <LawrenceG> The embedded compile version was about 50k of i386 code + libraries... could be trimmed a lot I bet
[00:45:13] <jmkasunich> you have to do a temperature control loop, right? set thermostat for 350, control oven based on a feedback device to get 350
[00:45:44] <LawrenceG> yes.. this oven has an RTD sensor 1000ohm to 2000ohm over temp range
[00:45:57] <jmkasunich> nice
[00:46:27] <jmkasunich> just remember to do whole cycles
[00:46:35] <LawrenceG> It was my sisters stove.... so I can work on it as required..... we still have a working one
[00:46:55] <jmkasunich> the utility won't appreciate you drawing stove sized amounts of net DC - the transformers out on the pole will be unhappy
[00:47:13] <LawrenceG> http://cgi.ebay.com/BTA40-700-TRIAC_W0QQitemZ160221460056QQihZ006QQcategoryZ7287QQcmdZViewItemQQ_trksidZp1713.m153.l1262
[00:47:35] <LawrenceG> These are a little hard to drive .... 100ma gate current
[00:48:05] <jmkasunich> thats a notably useless webpage
[00:48:07] <jmkasunich> no specs at all
[00:48:18] <jmkasunich> 100mA gate current isn't much
[00:48:36] <jmkasunich> it only needs to be a pulse
[00:48:38] <LawrenceG> nice to mount ... have about 9 elements to control
[00:48:53] <jmkasunich> do you have a URL for a datasheet or anything?
[00:49:27] <LawrenceG> justa minute
[00:50:48] <jmkasunich> 240/14 = 17A RMS
[00:51:10] <LawrenceG> http://www.tranzistoare.ro/datasheets/70/364343_DS.pdf
[00:51:11] <jmkasunich> gonna want at least a 25A part - maybe more - often the specs assume an ice cube for a heatsink
[00:51:49] <LawrenceG> yes... was looking at 40a modules in rd91 case
[00:51:56] <jmkasunich> the insulated case is nice
[00:52:04] <LawrenceG> should be pretty sturdy
[00:52:52] <LawrenceG> a big chunk of heatsink with 9 or so of these mounted with moc opto triac drivers
[00:53:19] <LawrenceG> MOC3021
[00:53:30] <jmkasunich> sounds reasonable - I've no real experiance with triacs, we use SCRs for that kind of thing
[00:53:43] <jmkasunich> and we drive them with pulse transformers
[00:54:13] <LawrenceG> me either... old flashing light organ units for the stereo about 30 years ago!
[00:54:24] <jmkasunich> are you gonna be able to put the sink someplace where it will get cool air? stoves tend to heat up the surroundings
[00:54:54] <LawrenceG> lots of room low in stove... even a small fan is possible
[00:55:00] <jmkasunich> nice
[00:55:16] <jmkasunich> note "Critical rate of rise of on-state current" in the datasheet
[00:55:40] <jmkasunich> with a resistive load and relatively low inductance dI/dT will be kind of hich
[00:55:41] <jmkasunich> high
[00:55:43] <LawrenceG> self clean cycle will be fun to debug.... 900F if I read the stove schematic correctly
[00:56:30] <jmkasunich> note that the 50A/uS rate is for 200mA of trigger current
[00:56:44] <jmkasunich> exceeding the dI/dT rating will result in shorted triacs
[00:57:25] <jmkasunich> if you are carefull to turn them on right after the voltage crosses zero you should be OK
[00:57:31] <jmkasunich> another reason not to phase control
[00:58:05] <LawrenceG> already had experience with shorted on oven controls..... very bad result on chicken pot pies
[00:58:33] <jmkasunich> heh
[00:59:23] <jmkasunich> a robust circuit would put a snubber across each triac as well
[00:59:34] <jmkasunich> something like 0.1uF and 10ohms
[00:59:42] <jmkasunich> (in series)
[01:00:30] <jmkasunich> the resistor should be a couple of watts - we use 10W for 480V, so 2.5W for 240
[01:01:33] <LawrenceG> still deciding on whether to trash the stove or rebuild it..... If I do the controls, it will certainly make any future service guys wonder what is going on
[01:01:46] <jmkasunich> yeah, there is always that aspect of it
[01:01:58] <jmkasunich> basically, you are signing up to maintain the stove forever
[01:02:34] <LawrenceG> hey... If I sell the house, it could be my future employment project
[01:02:44] <jmkasunich> that ebay dude is selling the 600V version, right?
[01:03:01] <LawrenceG> yea... I havent seen 800v units on ebay yet
[01:03:30] <jmkasunich> odd, his part number says -700, but the datasheet says it only comes in 600 and 800
[01:03:47] <jmkasunich> to be honest, if you put a snubber on it you'll be fine
[01:04:00] <LawrenceG> still looking for ideas..... there are solid state relays for a good price once and a while
[01:04:08] <jmkasunich> triacs (and SCRs) respond to overvoltage by turning on
[01:04:33] <jmkasunich> in your application, an overvoltage (say from a lightning surge) will turn the heater on for one half cycle
[01:04:34] <LawrenceG> they tend to be random phase unless listed as zero crossing versions
[01:04:42] <jmkasunich> no harm done to triac or oven
[01:05:18] <jmkasunich> I suspect that rolling your own would be cheaper
[01:05:46] <jmkasunich> unless you find quite a deal on SSRs
[01:05:50] <LawrenceG> yea... wondering about a contactor for the main power... would be interesting to take a surge and have every device fuse on
[01:06:10] <jmkasunich> it would take a hell of a strike to make them _stay_ on
[01:06:15] <LawrenceG> wake up with the oven/stove all lit up
[01:06:39] <LawrenceG> I will try not to make it a Jymm project :}
[01:06:59] <jmkasunich> overvoltage will trigger them, but when that happens they will immediately clamp the voltage across themselves and drop the rest of the surge across the elements
[01:08:08] <LawrenceG> a ladder version of oven/stove control would be interesting
[01:08:43] <LawrenceG> but could probably be a lot smaller in dedicated C
[01:09:00] <LawrenceG> the debug feature of ladder is nice
[01:09:12] <jmkasunich> ladder would only work for the high level control
[01:09:48] <jmkasunich> for the actual triac firing, you want to be as close to the zero cross as you can get - a few hundred microseconds or so
[01:11:02] <LawrenceG> true... with a pic, would probably use intr of zero crossing clocking... also, a/d inputs in classic ladder would be nice
[01:11:49] <LawrenceG> emc2 stove control.... need a RR and LF axis
[01:12:33] <LawrenceG> encoder on rotisserie?
[01:15:04] <LawrenceG> thanks for your input.... will look for some 800v devices or some SSR at a good price
[01:15:29] <jmkasunich> you're welcome
[01:51:19] <skunkworks> jmkasunich: nice to see you on cnczone. :)
[02:36:05] <CIA-31> EMC: 03seb 07TRUNK * 10emc2/src/hal/utils/ (epp.c epp.h): Minor EPP cleanup.
[02:38:18] <CIA-31> EMC: 03seb 07TRUNK * 10emc2/docs/man/man1/bfload.1: minor improvements to command-line parsing and the manpage
[02:38:20] <CIA-31> EMC: 03seb 07TRUNK * 10emc2/src/hal/utils/bfload.c: minor improvements to command-line parsing and the manpage
[04:16:48] <SWPadnos_> SWPadnos_ is now known as SWPadnos
[14:13:35] <alex_joni> cradek: do you happen to remember why you put emcCommandWaitDone() at the end of sendMdiCmd() in halui?
[14:15:22] <alex_joni> I think it was because you wanted to switch back to manual mode after the command completed.. right?
[14:36:52] <cradek> yes
[14:37:38] <cradek> if you don't wait, the mdi gets aborted
[14:37:41] <alex_joni> I'm thinking how to "fix" this
[14:37:52] <alex_joni> yeah, if you switch back to manual, then it gets aborted
[14:38:07] <alex_joni> I'm thinking about staying in mdi
[14:38:20] <alex_joni> and only changing back to manual after the command completed
[14:38:45] <alex_joni> actually changing back to the mode it was previously in
[14:39:18] <cradek> I don't really care for the whole scheme
[14:39:31] <alex_joni> yeah, me neither.. but it needs to be fixed
[14:39:47] <alex_joni> having abort & estop & co disabled during the MDI is a problem imo
[14:39:55] <cradek> maybe every halui control, when invoked, should check and set the mode so it works
[14:40:23] <alex_joni> so if you press jog during a MDI command, it should abort and switch to manual?
[14:40:41] <cradek> I don't know
[14:41:01] <rayh> Hi guys
[14:41:04] <alex_joni> hi ray
[14:41:05] <cradek> maybe you should do the fix you said
[14:41:14] <rayh> This is the 8.04 box
[14:41:19] <alex_joni> cool :)
[14:41:22] <alex_joni> rayh: installed?
[14:41:27] <alex_joni> or still live?
[14:41:42] <rayh> The package update was about 200 meg
[14:41:54] <rayh> and it failed a time or two
[14:42:01] <alex_joni> you'll get that a couple more times before release
[14:42:10] <rayh> But it's going and looking pretty good.
[14:42:40] <rayh> What are the issues around MDI mode?
[14:42:43] <cradek> that's good news
[14:42:45] <cradek> bbl
[14:42:46] <alex_joni> cradek: I think a proper fix would involve the runlevels JMK mentioned
[14:42:54] <alex_joni> rayh: there's a small problem in halui
[14:43:16] <alex_joni> if you define MDI commands in the ini (to be triggered by a button), they block other stuff while they execute
[14:43:45] <rayh> Shouldn't they?
[14:44:05] <alex_joni> well.. if you want to push abort or estop.. I'd say they should get through
[14:44:37] <rayh> Does the NML still have the three levels of wait?
[14:44:58] <alex_joni> I think so
[14:45:24] <alex_joni> it's not a philosophical issue, just a coding problem imo
[14:45:33] <alex_joni> (e.g. bug in halui)
[14:45:51] <rayh> I remember having to twiddle these to get it to see stuff during a move.
[14:46:43] <alex_joni> as it is now halui simply waits for the mdi command to finish
[14:47:01] <alex_joni> which means it doesn't update it's hal pins in that time.. which makes it immune to any triggering from the outside
[14:47:18] <rayh> I know "wait done" hangs everything until the end of a command.
[14:47:27] <alex_joni> yeah, and that's not good
[14:47:44] <alex_joni> I'll change it to "wait sent" and switch back to mode-manual lateron
[14:48:16] <rayh> I'd rather see that than it dropping out of mdi the instant something else happens.
[14:48:44] <alex_joni> something else = user pushing some button
[14:49:01] <alex_joni> but I think this needs to be something for the integrator to decide
[14:49:04] <rayh> Yes
[14:49:36] <rayh> This is a case where sets of integrator parameters would be useful.
[14:50:16] <rayh> I don't know how we'd do that in the code.
[14:50:54] <rayh> Does halui expose any parameters now?
[14:51:12] <rayh> spose I could look!
[14:52:40] <rayh> Doesn't look like it does.
[14:52:50] <alex_joni> I think I made them all pins
[14:53:02] <rayh> Right.
[14:53:04] <alex_joni> I don't see a point in having parameters
[14:53:39] <rayh> This kinda edges back into the old Task planner stuff.
[14:53:46] <alex_joni> yeah
[14:54:20] <rayh> It would be nice if we could set these sorts of parameters system wide and have the guis all honor the same set.
[14:59:29] <rayh> Latency-test did not want to run on 8.04.
[15:00:09] <alex_joni> that's because pyvcp doesn't run
[15:00:23] <alex_joni> they changed some python-xml stuff, 2.2.5 will have a workaround
[15:00:38] <rayh> Ah. That's it.
[15:00:55] <alex_joni> you can run the rtai native one
[15:01:02] <rayh> okay.
[15:01:04] <alex_joni> cd /usr/realtime-*/testsuite/kern/latency
[15:01:06] <alex_joni> sudo ./run
[15:01:18] <rayh> thanks
[15:02:35] <rayh> I
[15:03:03] <rayh> I'm seeing some jerky motion soon after I start running the first part.
[15:03:23] <rayh> I don't see it in halscope, the stepper pulses are in there. Just the axis display.
[15:03:39] <alex_joni> hmm.. display issue?
[15:03:42] <alex_joni> what driver?
[15:03:46] <rayh> Might be the python thing again.
[15:04:06] <rayh> I think it's vesa
[15:08:45] <rayh> yep.
[15:08:56] <alex_joni> hmm.. strange
[15:11:14] <rayh> It does not seem to do it with the mini interface. Let me go back and test with axis again.
[15:13:19] <rayh> Still there. I'm using cds.ngc and when it starts it jerks several times during the first few moves then seems to settle down.
[15:13:30] <alex_joni> jerks how?
[15:14:31] <cradek> at the beginning of the program, AXIS is fighting with task for userland cpu time. at the start of a run, task is busy queueing up segments as fast as it can
[15:15:24] <cradek> vesa video might make it a little more apparent than usual
[15:15:34] <rayh> It looks like it's doing it during line moves. It seems to go into the line just a bit and then stops and waits until the motion has gotten to the end of the line. Then the tool jumps to the end, rounds the corner or whatever and pauses until the next corner. It is good on arc moves.
[15:15:59] <cradek> alex_joni: were you able to disable desktop effects by default? I hear they really messed with the operation of real opengl programs
[15:16:00] <rayh> It does not do it all the time.
[15:16:18] <rayh> Effects are off here.
[15:16:26] <alex_joni> cradek: they don't get turned on for the most cards
[15:16:27] <cradek> I should probably get a machine set up with 8.04...
[15:16:41] <alex_joni> nvidia & ati only get it with the properietary driver, which isn't installed
[15:16:48] <cradek> oh, good
[15:16:56] <alex_joni> and the only one which has the desktop effects enabled is i8xx
[15:17:32] <rayh> The position display does the same thing.
[15:17:59] <rayh> Waits while the tool is stuck. But the motion is continuous.
[15:19:37] <cradek> rayh: maybe watch top while it's happening. I bet task is taking all the cpu
[15:20:01] <rayh> You think.
[15:20:26] <rayh> This is a stock stepper and a rather fast box.
[15:21:17] <cradek> I saw a lot of arguments in #ubuntu-kernel about what scheduler options should be turned on for this kernel. I hope whatever choice they settled on doesn't work badly for us compared to dapper
[15:21:34] <cradek> (I didn't follow/understand the arguments)
[15:21:55] <rayh> xorg, axis, milltask in that order
[15:22:13] <cradek> hm, xorg first (opengl rendering)
[15:22:27] <rayh> milltask takes about .7
[15:23:08] <rayh> axis and xorg are running about 15
[15:24:10] <alex_joni> cradek: we can always change the scheduler option for our kernel
[15:24:27] <cradek> it would be interesting to run the same thing, also with vesa video driver, with dapper booted. should be able to do it booted live.
[15:24:40] <rayh> I was wondering about nice priority
[15:25:06] <alex_joni> whee.. this seems to work how I would expect it to..
[15:25:09] <rayh> let me look at the other box.
[15:25:17] <alex_joni> anyone wants to test? (halui change I mean)
[15:26:18] <rayh> My 6.06 is vesa and I've not seen it there.
[15:26:29] <rayh> But will run a test right now.
[15:28:13] <rayh> I do see the refresh as very short jumps but there is none of the big stops and jumps.
[15:28:29] <rayh> That is on a slow box 1.2 via chip.
[15:28:54] <rayh> MiniITX mobo
[15:29:50] <cradek> rayh: I was hoping you could try it on the same hardware, to compare the two releases/kernels
[15:30:43] <rayh> I had 6.06 on this box. It was there since you built the 6.06 cd. I'd think that I'd have seen it.
[15:31:03] <cradek> ok, hmm.
[15:31:30] <rayh> I don't use axis much but I did experiment with it and the jerking would have jumped out at me.
[15:31:43] <alex_joni> hmm.. wtf.. when I open cds.ngc, the display doesn't change
[15:31:54] <rayh> I do have an exact same box next to it. I'll see if I can find a 6.06 cd and try running there.
[15:32:44] <alex_joni> RuntimeError: interp_error > 0 but no Python exception set
[15:33:10] <rayh> I've got 2.2.1. I'll try it on this box and report back.
[15:34:40] <cradek> rayh: in some previous version I did mess with the nice level of AXIS. But if you are running the same version on both that can't be it.
[15:34:59] <alex_joni> cradek, jepler: any idea about this? http://pastebin.ca/990902
[15:36:25] <cradek> not me
[15:37:02] <alex_joni> sounds like AXIS' interpreter is failing on that file
[15:37:14] <cradek> I agree
[15:37:28] <cradek> try loading other files? other files with errors in them?
[15:38:57] <alex_joni> other files seem fine (from nc_files)
[15:39:08] <cradek> try files with errors
[15:39:41] <alex_joni> jas, trying to commit the fix on halui
[15:39:44] <rayh> Works like it should on 6.06. Just floats along.
[15:40:15] <cradek> rayh: is it the same emc2 version? also vesa driver?
[15:40:38] <cradek> same configuration (especially base period)?
[15:40:41] <rayh> looking
[15:42:08] <CIA-31> EMC: 03alex_joni 07TRUNK * 10emc2/src/emc/usr_intf/halui.cc: fix #1929461 - halui stops reading inputs during a MDI, also add uvw position info
[15:42:43] <cradek> yay
[15:42:52] <alex_joni> cradek: I get an AXIS popup on loading the file with an error
[15:43:06] <alex_joni> G-Code error in 3D_Chips.ngs: Near line 11 of ...
[15:44:39] <rayh> fascinating. it's emc 2.2.1 and it says it's using an sis driver.
[15:44:42] <alex_joni> cradek: well.. it obviously needs testing..
[15:45:08] <rayh> I don't see any error when I load it.
[15:45:18] <alex_joni> I'm on TRUNK
[15:45:24] <rayh> okay.
[15:46:03] <rayh> Let me go back to 8.08 and change to the sis display driver and see if that fixes my problem.
[15:52:50] <alex_joni> cradek: I think it's failing on n0080 G43 H1 g20
[15:54:15] <rayh> That messed up more than a few things.
[15:54:45] <rayh> axis does not pause as often but it still jumps quite a bit more than I've seen with other systems.
[15:58:28] <alex_joni> cradek: it's something that's related to G43 H1, TLO
[16:08:20] <rayh> Now that I've got the whole thing working with the sis driver, I think it seems to be working fine.
[16:08:41] <alex_joni> so it probably was a performance issue
[16:09:08] <alex_joni> rayh: I didn't like the bird either, when I first installed hardy
[16:10:42] <rayh> My granddaughter thought it was awesome.
[16:10:52] <alex_joni> hehe
[16:11:06] <rayh> Funny 7.10 identifies the same driver as via.
[16:13:20] <rayh> must be a pretty generic display chip to let so many different drivers run it.
[16:14:21] <alex_joni> heh :)
[16:14:30] <alex_joni> maybe no-one knows what it really is :D
[16:14:54] <alex_joni> anyone else think Intrepid Ibex is an odd name?
[16:16:30] <rayh> Sounds like they may not be taking there medication.
[16:16:41] <rayh> their/there
[16:17:41] <rayh> Top tells me the same order xorg, axis, milltask but xorg is running about 30, axis about 20, and milltask about the same.
[16:18:11] <rayh> cradek thanks for the nudge about drivers.
[21:18:18] <rayh_> rayh_ is now known as rayh