just us chickens
I'm trying to make a design decision
if I have N stepgens in an FPGA, should I export 5i20.0.stepgen.0.read, 5i20.0.stepgen.1.read, .2.read, etc, or just 5i20.stepgen.read
I hope it's easy - it feels pretty late
for the software stepgens I only export one
makes for nice clean hal files, at the expense of some flexibility about what thread you put things in
what situation would you want them in different threads?
for stepgens, probably never
then do the simpler one
yeah, thats what I was leaning toward
but part of me is offended by asymetry
things should be as simple as possible, but no simpler
some things have individual functs, some don't...
its not "regular" or "orthogonal"
of course, its easier and simpler, and there is much to be said for that
it's like . vs -
I just decided.... based on the following criteria:
the number of people asking "why can't I have stepgens in different threads?" will be less than the number of people asking "why does only one axis work?"
thanks for being a sounding board
aren't pointers fun? "p = &((*p)->next);"
p is a **?
I'm finding the end of a list, then adding a new item
so I need the address of the last 'next' field so I can stick the new item address in it
you're supposed to insert at the head of the list, silly
that would be easier, except for two things
1) stepgen.N.some-pin - I have to traverse the list to figure out what N is (or else store it somewhere)
2) I want them to run in order of N, not reverse
the order probably doesn't matter, but if it ever does, running them the other way is non-obvious and will cause head-scratching
regarding a single read function: it may even be easier inthe FPGA, since you can share a latching signal among all the stepgens
rather than needing to be able to latch counts individually
no latching needed
synchronous update / bus?
counts are a 32 bit number which is read in a single bus cycle
are they updated in a single bus cycle, and synchronous to the bus clock?
well ok then :)
I think I'm gonna make step-type a hal parameter
so you can change from step/dir to up/down with a "setp"
that should work for anything that uses two (output) pins
I guess that makes sense - the actual outputs aren't named HAL pins anyway (step/dir, up/down ...)
the fpga stepgen only has step types 0, 1, and 2 (step/dir, up/down, and quadrature)
I'm surprised you did quadrature
nothing uses it, and it seems like it would be hard to do
its easy to do
quadrature output should be pretty easy
if stepreq = '1' then
phasea <= phaseb xor dirout;
phaseb <= phasea xor not dirout;
it doesn't have an index, but other than that it can be used as a high speed version of the simulated encoder
(which may or may not be usefull)
that reminds me (why?) yesterday I ran across a bunch of model airplane servos
I think they take pwm in
it seems trivial to hook one to the speed control knob of my lathe
not exactly pwm
they are self homing etc
oh - what is it?
do you mean the servos that control things like flaps?
pulse length modulation
they are PWM, but not duty cycle
something like 0.5 to 1.5mS pulses for min to max output
1.0mS is center
but the rep rate can be as slow as 50Hz
right - so you would need to use a "slow" PWM, rather than the easier-to-filter DDS-type
traditionally a multi-channel system would send all the pulses one after another, and the receiver would de-mux them
hmm not so good then is it
I've been meaning to do a HAL comp for servos
I won't be able to get that out of the pluto
you actually have a servo, you're elected
on a parport it would be simple
possibly for controlling coolant pressure or somthing :)
software version would have limited resolution, but usable
[03:46:49] <jmkasunich_> http://en.wikipedia.org/wiki/RC_servo
I had the times wrong, 1.25 thru 1.75mS, 1.50 is neutral
one pulse every 20mS, although I think that can change without ill effects
how long can the stepgen step pulses be?
a sizable fraction of a second I think (for the sw stepgen)
but to change the length of the pulses you'd need to mess with the steplen parameter
right - if that were a pin, it would work
do it right
though a simple PWM should be about 3 lines in comp (after the preamble)
I don't see how it's different from pwm with a min and max
I guess its not
isn't it already done then?
don't the EMC PWMs try to output at as high a frequency as possible?
no we have fixed frequency pwm too
SWPadnos: you can set the frequency
oh, in that case it should be done ;)
so, pwm_freq = 50, max_dc = 0.04, min_dc = 0.02 (for 1mS to 2mS)
it's so simple maybe I'll put it on a separate parport
hm, I've got to get the important stuff working first, without getting sidetracked
well - good night guys
one last thing before bedtime: did anyone actually call the hotel to check on the reservations (we couldn't find on the web)?
me either. maybe I'll do that tomorrow
or next week ...
ah well. night
pwm servo can control a galvo add a pen laser, and emc can draw like this http://elm-chan.org/works/vlp/frasamp.avi
i think that was only 16kpps, details at http://elm-chan.org/works/vlp/report_e.html
hmm, I didn't realize I had a _
jmkasunich_ is now known as jmkasunich
tab works :)
* alex_joni is replacing linkpp with net in all configs
guess it's ok with you?
ok, here goes
(hope I have no spelling errors.. can't run all configs)