rayh, alex_joni you guys still around?
Good to see you.
saw your discussion about halui
(debate whether it should be in [IO] or [HAL]
What do you think?
got a question, then I'll tell you what I think
EMC1 supported multiple GUIs at the same time, right (multiple operator stations)?
Yes it does.
how do you specify that in the ini?
I've mixed AXIS with others and they almost play nice.
Oh. You just start emc with one and then add the other by terminal.
NML has the ability to find it's soul mates
IMO, running halui is just like running a second GUI
you got your graphucal UI, and you got your pushbotton UI
so I don't think it halui should be in the hal section or the io section....
it should be in the display section (which should support the general concept of multiple UIs, not just TkEMC+halui, but also TkEMC + mini, or any other combination
Okay. We've got a three way flip.
Somewhere in the graphical section reader we'd have to expand to allow multiple.
But that shouldn't be all that bad.
smop, as cradek would say (simple matter of programming)
IF we agree that's the right approach
No doubt somebody can do it.
One thought though. As I was playing with halui i found it maddeningly like tickle.
Not that that is bad but suppose you want to toggle machine on.
You would have to connect the variables through classic ladder.
halui is very much a work in progress
No different in nature from emcsh.
one that has no real spec for what its supposed to do
so there are real similarities.
well, emcsh is basically tcl<->NML
halui is hal<->NML
I guess I assumed IO because it has estop similar to iocontrol
and it makes pins that can be connected to real world.
no, it has estop that is like the button on tkemc/mini/axis
estop was probably not the best choice as the first thing to implement
I guess I was afraid that if it was in HAL, I'd have trouble explaining it to integrators.
It's already in there.
like I said, halui is evolving
if it was up to me, the first function I would have implemented would probably have been jog
cycle start for me. emc_run.
ok, that works
only because I have one of those buttons on the mazak.
But like alex said, most all of the NML connector is already in there.
I haven't looked at halui at all
is it based on emcsh?
(that would have been my approach)
You can start it if you add [HAL] HALUI = halui
I don't want to start it
I want to understand it
and update the run script.
Oh. That's the way that I prefer to discover what stuff looks like.
ie. "can I add cycle start to it in less than two hours" ?
I need to see the source to know if I can change it
I understand our different approaches.
alex did base it on emcsh
let me see what would be involved in adding cycle start
Yes I think he had planned the same sets of commands.
cycle start is _not_ the F2 machine on, right?
its more like "run g-code program"?
No it only works in auto mode and is emc_run
ok. looks like alex was going to call that hal pin halui.program.run
Some machine tools use it for some manual operations as well.
I really can't say that I like the names with the dotted last elements.
is "sendProgramRun" the NML message?
I don't know.
what does tkemc send to emcsh when you want to start a cycle?
yes and the line number to start on.
it assumes 0
ok, theres the first design issue
a cycle start button can't generate a line
This panel you gave me has cycle start and cycle stop.
rayh: do you know if I need an optoisolator or something between that speed control and whatever I rig up on my parallel port?
going for variable speed spindle?
yeah I want to work on constant surface speed
thats non-trivial ;-)
You'll need to replace the pot with that interface card.
you mean the hardware or software?
rayh: that's already done
Then you will need some way to integrate pwm from the parport into 0-7 volt.
making a hal variable control the motor speed is a smoh
jmkasunich: afaict, spindle speed ~ r ~ x
but r = x + c
where c is a tool offset, and is unknown
and in fact varies depending on tool shape and feed direction
so i could call it absolute 0, or use an offset, or something
2D tool offsetting is the other major issue for lathe
Is there a number or model name on that extra spindle drive card, cradek?
once that works, CSS itself is almost trivial
I'll go downstairs, back soon
jmkasunich: yeah I'm on the "almost trivial" bandwagon, just like threading was
KBSI-240D or SI-5 Barrier Terminal board are the ones listed for that speed control.
cradek: just attach a small stepper to the pot
I've done that.
ripped the knob right off.
your stepper was too big
I had it geared down for resolution.
such that you can command 1 full turn ccw to "home" it
haha what a simple/smart/dumb idea
was trying for a 20 turn pot.
you mean the actual pot you had was 20 turns?
seems like plenty of resolution there
not I had a 20 to 1 ratio between the pot and the stepper.
SI-5 KBIC\KBLC [sic]
rummaging for a little stepper...
simple unipolar drive, nema17 stepper from an old floppy drive (or tincan stepper from a printer, or....)
I have two more drivers here, and some old keyboard cables, so that's a reasonable thing to do
Okay. There is a pdf on that board on the kb web site. About a meg. I started a download but it borked.
let me look.
not a very friendly web site.
seems there are a lot of those around.
so briefly, how are tool shape offsets supposed to work? in a mill you have r and length offsets. in a lathe do you just have x and z offsets, or does it know about the entire tool shape?
[01:51:56] <rayh> http://www.kbelectronics.com/manuals/si5_si6.pdf
ideally it knows the whole shape
suppose you have a square insert, turned at 45 degrees
if you are facing, it cuts on the left corner
if you are turning, it cuts on the nose
if you are turning a taper, it cuts on one or the other depending on the taper angle
I have a tool like that, but it uses a triangle
of course it's not a triangle/square, because of the rounded corners
that just makes it more compilcated
rayh: thanks, got it
100%[====================================>] 1,043,431 551.16K/s
Gotta get out of here guys. See you tomorrow.
* rayh waves a finger at cradek
unless you have a QC toolpost or toolchanger, you'll never be able to program the part shape and let EMC do the rest
not saying which one though.]
someday I'll have a fast line.
jmkasunich: we need to come up with a simpler goal then.
rayh: maybe soon I hear
cradek: do you actually have one of those isolator boards?
that simplifies things a lot
freqgen mode 1 + resistors + cap + isolator board = done
I was hoping for that
you can set a jumper to make it accept 0-5V
I have +5 available from the mightydrive (already running the encoder)
if you have a proper driver on the parport (none of this 3.3v laptop crap) you can just rc filter it
it's a laptop
ok, then you can buffer the 3.3v laptop crap with a gate powered from the +5V
HCT or something like that
then what? can you draw it for me?
I thought you did electronics?
cool, they actually include a schematic of the board
wow, not exactly a precision circuit
sure, I do, but I'm nervous because it's my laptop
you think the rc on the output or input of the hct?
oh duh, output
cool, you can see from this it is isolated
running an optocoupler in linear mode, with no feedback around it
look there's rc on the input already
accuracy +/- 20% on a good day
yeah it's not going to be perfect
oh, its not running the opto linear
IC1 is a comparator not an opamp
they're pwming the opto
if you say so
oh! up a page is the values
I wondered where you found the rc
come on, you should be able to figure out that ckt
that time constant seems a little low, do you think it'll be ok?
do you have a scope?
heh how many do I need?
I'm 99.9% sure that circuit is a simple integrator/comparator oscillator
not sure whether it is more-or-less constant frequency with duty cycle that changes with input voltage
or variable frequency
I could try to noodle it out
or you could scope it
(without the laptop, just use a pot
and scope only on the input side of the opto
but it doesn't matter as long as the tc is (much) longer than my base period right?
there will be some ripple though
I'm a little concerned about the ripple beating with the free-running oscillator frequency
you might get some instability at certain settings
oh I see what you mean
I could just solder another cap over the one that's there
make a 200-400ms tc
not finding hct... tons of 74xx and 74ls
you'll need a couple uF
7406 by any chance?
IIRC that is an open collector part
put a pullup on it and it will swing to +5
00 05 07 08
but normal TTL or LS doesn't go all the way to the + rail, so you won't get full output
05 is oc
there you go
I don't need full 5v, I'll never go at full speed
talk about vintage parts most of this ttl junk here is pre-ls
the simplest thing would be to connect com to PC ground and SIG to a parport pin and call it done
R6 is 240K, theres no way enough energy can backflow thru that to hurt your parport
the load on the parport is pure passive resistance
you think that's enough? a buffer is not much more trouble
Zin = R2+R5+R4
the reliable 5v might be nice, since I could move to another parport without recalibrating
Zin is 20K
you don't need a buffer
I mean 3v vs 5v
and farting around with +5 probably _increases_ the chance of backfeeding the parport with something it won't like
well that's true
you just told me you don't want to go full speed
you missed a line I typed:
the reliable 5v might be nice, since I could move to another parport without recalibrating
if I move to a non-laptop, it would be nice if my speeds didn't all increase 40%
that "max" trimpot has quite a bit of range, you probably could get full speed anyway
I didn't miss it
what are the odds of moving to another box?
if you do, adjust R5 and you are all set
just don't accidentlly hoop the parport to the +12V terminal ;-)
its funny, my current work project is a high end version of this isolator
high end = several KHz bandwidth, and better than 1% accuracy (goal is as close to 0.1% as I can get cheaply)
and no trim pots!
analog in, analog out, 2500V isolation between
working voltage is only 800 or so, but needs to pass UL
I'm doing something pretty similar to this
comparator on the input, self oscillating at about 300KHz and generating PWM
send that thru the isolator, filter it to make output
2 tricks for accuracy
1) using analog devices new non-opto isolators
something like 3nS skew between rising and falling edge prop delays
2) sending the pwm signal back across the isolation barrier and filtering it on the input side too
and closing a feedback loop with that signal
cancels out most errors, and much of the filter lag
I just finished laying out a proof-of-principle test board
3" x 0.8"
gonna order glass tomorrow
why so narrow?
just happens to be the way it laid out
you need cnc to mill your prototypes
I like plated thru holes
work is paying, I can get several pieces for $100
with silkscreen, plated holes, soldermask, and solder coated pads
ah, much nicer than milled
actually its a bit of a bummer
that price gets three boards up to 60in^2 each
I have 3in^2 each
so add on another project?
if I had time
I'd design an H bridge
spend a couple hours the other day talking to fenn about H bridges, mosfet drivers, etc
he's too cheap to use IR2110 type drivers at about $5 for a half-bridge
seems so many of us here are impossibly cheap (me included)
I think I have a driver design that uses two $0.16 NPNs, a $0.30 small MOSFET, and can drive two $<1 20mOhm mosfets
(also needs three $0.07 diodes, 4-5 resistors, and a couple caps)
sounds cheap enough for any budget
I was tempted to send bo-dick some chips ;)
heh, until you build it on a $30 PC board
the IR2110 is simple enough to build on perfboard
skunkworks: I admit I had the same thought
he'd just burn them up
with him, something other than cheap is at work (I know cheap) but I don't know what it is
cheap and clueless?
his attempt to spice the thing (and the fact that he has no idea why it didn't work) tells me he doesn't know electronics 101
yeah, you're probably right
fenn had some misconceptions about driving mosfets, but when I started explaining, I could tell that he "got it"
theres a certain base level of electronics know-how that you simply must get from books and/or hands on work, over a significant period of time
"doesn't know how something works" and "without any clue" are very different
I have some house work to finish but I hope to have 1 board done some time this week.
only then can you begin to learn more from talking to others
I know my electronics is rusty.
rusty, but there
rust scrapes off
my calculus is rusty but that doesn't mean I can't figure out calculus problems
ha "scrapes off"
I'll have to remember that one
hmm, I just heard something strange
the disk in my computer started to spin down, then after a couple seconds spun back up
I don't have power management enabled
that's when you start scrambling for backup tapes
and I didn't think linux ever turned off the disks
a few disks powersave by themselves, but I doubt you have one if it's modern
actually, I don't know which one it is
there are two drives, one is a new (~1 year old) 80G
the other is 10G or so
I really need to come up with a backup plan
I must have a hardrive go bad every few months.
[02:41:48] <jmkasunich> http://www.mikerubel.org/computers/rsync_snapshots/
I was reading that page the other day
and thinking about setting up a backup server
ok hardware's done
this will be slick if it works
you are doing some sort of pwm-filter - dc to run in place of a pot?
so can I run freqgen type=1 and disregard capture_position()?
just vary the frequency between 0 and max-freq for output from zero to max
in hal-intro, the freqgen functions have _ in them, but I think they're really -
yeah, everything should be - now, only the docs are out of date
did you change iocontrol.0.spindle-speed-out to be rps or is it still rpm?
halmeter is your friend
if I had changed it I would probably remember
but I have this vague fuzzy memory of changing something
I think it was when I changed the sim-encoder to use rps instead of rpm
what has to be equal to velocity to get a 100% duty cycle?
I'm not getting anywhere near 100
I think I don't quite understand freqgen
hang on a sec, lemme load it
something about maxfreq?
maxfreq is the maximum frequency in Hz (at which point the output is on all the time)
ok I don't get that
frequency of what?
type 1 is _not_ true PWM, its pseudo-PWM
there are two outputs, up and down
if you command zero, both are low all the time
if you command +10% of max-freq, then UP will go true for 1 base-period every 10
command -33% of max-freq, and DOWN will go true for 1 base periods every three
I have maxfreq 5000, and command 5000 but don't get 100%
you changed maxfreq?
can't do dat
(not if you're doing pseudo-pwm)
what you told it is "never go TRUE more than 5000 times per second"
but since base-period is lots faster than that, you never reach 100%
set max-freq to zero, or bignum, and it should reset to the actual limit
how do I set what commanded vel gives 100%?
which is basically 1/base-period
if I'm slow, say so and I'll go read it again
I'm rusty myself, so I'm testing it
ok, here's how it works
velocity is in arbitrary units (you get to pick them)
ok it's rpm then
pin velocity is multiplied by param velocity-scale to get the number of pulses per second
that result is visible at parameter frequency (in Hz)
the duty cycle is frequency / max-freq
(assuming max-freq is the original, 1/base-period value)
I'd start by setting maxfreq to bignum, then read its value
set velocity-scale to that value
now 0.0 = 0% duty cycle, and 1.0 = 100% duty cycle
so this all goes off when I change my base period
remember, it was never designed to be a pwm generator
(maybe I should make a PWM module)
what is? maxfreq?
what's your base-period?
I have 50uS here, and my maxfreq is 1.98863+e4
ok, thats more like it
so set velocity scale to that number (or close, 50000 would be fine)
now you can vary velocity from 0.0 to 1.0 and should see it go from 0% to 100%
once you know what speed you get at 100%, you can divide velocity-scale by that
say 100% gives you 2000RPM, so then velocity-scale should be 50000/2000 = 25.0
then velocity can be in RPM
here goes nothing
I have to command 50% before I get anything
oh the 5v jumper
looks like I'll really need some kind of interpolation table
oh I thought the instructions said min/max don't work with the dac input, but they do
hmm, abort doesn't unsync, bug!
wow, this is slick
what is slick? working S words in g-code?
I've never seen that work before
little things make you happy eh?
you call that little?
you'll like the Mazak
I have some hal blocks and ladder logic
you command a speed in RPM
and if neccessary, it will slow down, shift gears, and speed back up again
that kicks ass
I just wish I had documented what I did
that kind of stuff just screams for a schematic/block-diagram style drawing
IIRC, the incoming command goes to a comparator that decides which gear range is needed
and to two scale blocks, one for hi gear and one for low
the two output are the values that would be sent to the drive for each gear setting
they go to 2 inputs of a 4 input mux
the other two inputs are fixed at a low speed
the mux select pins are controlled by the ladder
mux output goes to a limit2 block (ramps output to match input)
and another comparator compares the output and input to say "ramp is done"
the comparator outputs go to the ladder
if desired speed range != current speed range, set mux to fixed low speed
wait for ramp complete
shift into neutral
then shift into desired gear
set mux to proper scaled signal
wait for ramp complete
there are sensors on the gearbox to tell you when the shifter has moved
how much IO does this all take?
you must have tons of switches
2 solenoid valves for "shift to high" and "shift to low" (I'm pretty sure a spring returns it to neutral)
three prox sensors to indicate "in high", "in low", and "in neutral"
DAC sending 0-10V to the spindle drive
the rest is all internal
you're right, I can't wait to see this
(comparators, muxes, ladder, etc)
hmm, I better get to bed
goodnight, and thanks for the help with the spindle
I should to
I didn't get as much Lyxing done as I intended
er..guess it's too late