oh, Dave E or Tom P maybe
hmmm. maybe not
you're right, this was when i was working on real estate stuff, contributing to our economic growth!
well, it's food then bed for me. They've been working me like a mule here & we've shipped 2 5i20 systems, 1 lathe & 1 mill, but I've been working late every day & it's caught up with me
Terminology question: Is an SPI frame the whole transaction including both master and slave communication. Or is there a Master initiated frame followed by the slave response?
geo01005, I think in general an SPI frame is one CS cycle, with however many bits get transferred between asserting and de-asserting CS
geo01005: SPI frame includes both send and receive data (they happen at same time)
Simplest SPI device slave is just a Shift Register (SR) with a enable input (CS or Frame)
when Frame is asserted, every clock shifts in bit from master to SR and shifts out a bit
from SR to master.
Has any one gotten gnome's "AdvancedEditingPlugin" at http://live.gnome.org/Gedit/AdvancedEditingPlugin
to work with gedit? I tried to install the plugin in the originally recommended folder .gnome2/gedit/plugin and again in the user-recommended folder usr/lib/gedit-2 and I don't seem to have it. I wanted the plugin for CR/LF issues and thought it might be easier than dos2unix and unix2dos, but maybe II'll end up there anyway?
How about another related question? I need to prepare offline a g-code program for an older CNC machine, and then transfer it by RS-232 serial in the old school manner. In Windows, I used to prefer Procomm for this purpose, if that helps. What apps would you recommend with Ubuntu 8.04emc or 8.10 for the serial transfer?
minicom? or stty & cat?
seb_kuzminsky: Thanks, looks like minicom might work.
hey guys, halrun is asking for files in "insmod: can't read '/usr/realtime-2.6.24-23-generic" instead of realtime-2.X.X-X-rtapi" what file do I need to edit to get it to point to the rtapi folder?
you need to reboot and select the RTAI kernel instead of the generic kernel
and/or edit /boot/grub/menu.lst so that the RTAI kernel is the default
I did that
apparently it didn't work ;)
It is in rtai from what I can tell.
'/usr/realtime-2.6.24-23-generic' doesn't say "magma" or "rtai", it says "generic"
that's from uname -r
which tells the name of the currently running kernel
you are right again..
it was bound to happen
lol I put the default as 22 instead of 2
durned bouncy keyboards
Im sshed into my cnclinux box with a laptop and well. i suppose thats my excuse
I shall reboot and then be back :)
ok back to playing with hal.
I happened to overwrite my rtai by upgrading the kernel and had to figure out how to get my old kernel back which for me was trouble enough, then I make a simple mistake puttin double deuces in grub and becoming totally lost
thanks tho, now I know what uname -r is good for.
uname -a gives you a bit more information (all)
im sure that will be required before my days are done.
jst_home: hey man hows it goin?
UncleGemc: pretty good here, how's your servos?
UncleGemc: did you continue working on your project to get those analog servo amps to work for you?
I am setting my machine up for a job out of michigan currently.
UncleGemc: did you find a reasonably affordable way to get them going?
I need to amp the dignal from my parport up to atleast 3v to get a response tho
yeah, actually there is a local company they sells machinery and they really dont real with CNC controls so they just take them off and basically give them away wehn parting out a machine.
ah, yeah, I hear there's two types of parallel ports, ones that have a really low voltage, and 5V ones
not sure what's up with that really
UncleGemc: heh, that sounds like a great place! :)
next week the company is getting two index machines both with cncs but the one they are parting out they said they would sell me the cnc system off of it.
you lucked on on that one!
or.... I could buy this cnc router with a complete system and 4 servos for $1500
that sounds like a lot more money :)
but it contains all proprietary controls and I would like to .avoid that
yeah, you've got emc for that part anyways :)
would you happen to have a suggestion on amping up my signal from my parport without shorting out my parport
you know something quick n easy.
hmm, not sure how quick and easy that would be... there's quite a few pins there to deal with
i just need to amp up one wire
well that makes it easier
a 5V DC power source (regulated), a PNP transistor and two resistors ought to do it
but what do you have available?
you could do all that on a breadboard unless you want to start soldering...
or there's signal level converter ICs you could play with if you can source one easily around there
digikey.com can have it on your dorstep in a few days if there's no other options
how about the output from a spare computer power supply and ...for one, what is a PNP transister also where can I the required transisters?
where can I find*
spare computer power supply would do, yeah
radio shack could probably sell you a PNP transistor, it's a little black thing (usually) with 3 legs (wires)
please excuse my typos and such i have been up for about 22 hours
oh, man, you should get some sleep :)
If it is what I think it is, I should have about 100 of those attached to various scrap boards in my room.
I think I know the ones you speak of.
so, (total guess) middle wire is signal in from parpart outside two are my dc 5v current?
UncleGemc: that's likely, you'll just need to find the part number on them and make sure they're PNP transistors
actually you'll need two, unless inverting the signal is ok
I can google that
I would think so, Im shooting to test the pwm out signal of hal to the pwm in signal on my board.
any result would result in me smiling.
UncleGemc: yeah, once you find the part number you can usually find the spec sheet
UncleGemc: it totally depends on the part which pin is which
I can handle that
ok, and the resisters?
UncleGemc: a transistor has a base, a collector, and an emmitter
UncleGemc: since inverting the singnal is ok, an NPN transistor would be easier to deal with, and probably easier to find on a spare board
you'll want to connect the parallell port through a say, 1k ohm resistor to the base
and ground the emitter
and connect 5V through another 1k ohm resistor to the collector
then you'll have a 5V inverted signal on the collector pin on the transistor
the resistors are important, you'll fry stuff if you don't have them
Understood. I shall search my salvage of parts.
yeah, you can think of it that way
use a tester to make sure you have something close to 1k ohm
got 1 :)
5k would probably work too, but don't go too much higher than 5k or lower than 1k
I will collect parts and I'll be back, thx for the heads up on this (greatly appreciated) otherwise I would be out buying things I dont need tomorrow.
a 1k resistor will have a brown colored ring in one end, followed by a black, then a red
UncleGemc: and the grounds from the paralell port and the PC power supply must be connected together
UncleGemc: but use a tester, that's the best way to know for sure
UncleGemc: and test after you've removed it from whatever it's attached to, if you're taking parts from existing boards
UncleGemc: something like a 2N3904 transistor would work, but there's thousands of different ones...
jst_home: are you there?
UncleGemc: I sent you (in email) a little schematic you may find useful
I just got the transister and the datasheet for it looks like what I need.
UncleGemc: what's the part number, out of curiosity?
I gathered 5 resisters however, I am uncertain of what the readings should be
what does your tester say?
well, it seems I have 1 option on the ohmeter
ok, then you'd want a reading close to 1
sometimes those scales are a bit hard to read
well they all max out the reader except two.
ok, the ones that max it out are probably lower resistance than you want
what do the two others read?
or what are the color rings on the resistors?
[05:06:58] <UncleGemc> http://ecx.images-amazon.com/images/I/51IaB%2BxRzrL._SL500_AA280_.jpg
ah, I see
could be 15k ohm, sounds a bit high, but could be worth a try
what about the color rings?
R R O G
R = 2
O = 3
meaning 2, 2, followed by 3 zeroes
gold means the tolerance
which we don't care about
if you can't easily find other ones give those a shot if you can w/o too much effort
I'd give it a shot
I should take a peek at your schematic
depending on the current needs for what you're driving with this the 22k between +5V and the collector might be too high
the easiest way to know is to try it out probably :)
should I use a higher voltage?
or does that even change anything?
if anything it'll be more likely to produce smoke :)
UncleGemc: that transistor should be fine btw, assuming it's not fried
did you get the schematic?
should be good, pulled it from an old fax machine, that worked fine
yea lookin at it now,
ok, im going to go solder this up and I will be back when rdy to test.
UncleGemc: ok, I'll be around for a bit, but I need to get over to my shop for a bit later on
I think I have everything i need to know thx to you, if we miss eachother next time I come around then thx again for all the help
UncleGemc: no problem
The only way I ever remember the color code... Bad Boys Rape Our Young Girls But Violet Gives Willingly == Blk, Brn Red, Org, Yel, Grn, Blu, Vio, Gry, Wht == 0 to 9
rob is now known as Guest84261
erm, hrm. What was that interface that was suggested to make 'free flowing' raster code again?
Just this once .. here's the log: http://www.linuxcnc.org/irc/irc.freenode.net:6667/emc/2009-02-19.txt
has anyone looked into plc-emu? http://sourceforge.net/projects/plcemu
I don't get it
isn't PLC generally just regular code controlling some pins?
Just this once .. here's the log: http://www.linuxcnc.org/irc/irc.freenode.net:6667/emc/2009-02-19.txt
Good morning Matt.
* mshaver exclaims with greater exuberance than justified by his state of mind at this early hour...
* skunkworks_ wonders why matt is up early 2 days in a row..
I'm actually up at this time every day when I'm out in MI, just never remember to log onto irc
alex_joni: how is the install coming?
skunkworks_: what install
oh - I thought you where installing a robot this week
ah, that one ;)
started yesterday, today I had a colleague of mine there
skunkworks_: funny how these things go
I installed 2 identical system at this very customer ~7-8 years ago
that was very exciting stuff back then, those were amongst the first systems we installed
now it's like a really minor thing ;)
matt - with (I think) stock stepper config - I get .0005 following error at 72ipm
is the .0005 lag consistent despite number of axis, or say a small helix after a long fast single axis motion?
btw .0005 at 72ipm is excellent
oops i have no idea what following error is on a stepper system ( thats open loop in my mind as there is no feedback to judge actual - desired [aka following error] )
tomp: it's the stepgen lagging behind commanded position
in an ideal world it would be 0
that was just a single axis
* archivist just read the nasty bang on the head email off the list.....that must have hurt
skunkworks_: thx, i been thinking about alex's reply. interesting. maybe you can remove the .0005 with lower maxvel or longer accel times ( same as lower accel rate ) this could reduces the 'load' on the stepgen and make miniscule difference to your real performance
but then... if it aint busted... ;)
yeh - that is well within my tollerence ;)
that was the point, its not a measure of your machine's position, its a measure of the stepgen's ability to keep up with the requested rates.
I think I'm going to hook up EMC to my tailstock of my manual lathe :)
have a lot of peck drilling to do?
deep drilling from time to time
I drilled a bunch of 5/8 in steel the other day. what a pain that would have been otherwise.
I'm drilling a bunch of 5/16" x 1.75" deep :(
I ground a flat and put the 5/8 drill in a 5/8 boring bar holder.
yick, deep and small
heh, that's cheating
it worked great - you should have seen it.
sometimes it's nice to have a large(ish) machine
you didn't take any videos?
my manual lathe is 15" x 48" but I normally use a 10" 4 jaw chuck with a collet holder in it...
I figure if I get a computer with EMC on it for something I'll finish the job some day :)
Then I can have a Linux computer here in the machine shop...
[15:49:35] <BJT-Work> http://www.youtube.com/watch?v=MKKUTW65PK4
afternoon all, would someone be able to give me some pointers on connecting a quadrature encoder knob to the spindle speed over-ride component? I have the encoder part working and can see the count with halscope, just cant get it to link to the spindle speed override in axis
so far i have: net tweekwheel-b encoder.2.phase-A pyvcp.2 <= parport.2.pin-02-in-not
net tweekwheel-a encoder.2.phase-B pyvcp.3 <= parport.2.pin-03-in-not
net jog-counts encoder.2.counts halui.spindle-override.counts
you need to run halui and hook the encoder's counts to that
i read in the docs that i needed to make halui.spindle-override.count-enable true too, but it complains about an unknown pin when i link that to a hardware button
I think the enable pins may only be in later versions.
you can use halscope/halmeter to see what pins exist and their exact names.
ah yes good point. some 'signal' is getting to the halui.spindle-override because when i turn the encoder knob, the spindle override is reset to 100%
you hooked the encoder counts to halui.spindle-override.counts, right? what is halui.spindle-override.scale?
it will change by 'scale' for each 'count'
ahh the scale is probably what i'm missing! I knew it would be something obvious, one sec i'll add a line and test - thanks
if scale is 1 it will jump between 0% and 100% I bet
try .05 or .02 or something like that
good morning Chris
I have been plying with a linear stage that had an 18ohm stepper motor.... what a POS on a 40v supply!
I found another stepper with 1/2ohm coils... much better
steppers - gotta love 'em
they play nice tunes
and make good hand warmers this time of year
wasnt there an mp3-to-gcode program somewhere?
ha, I hope not
[16:49:17] <seb_kuzminsky> http://www.youtube.com/watch?v=X4SCSGRVAQE
if you have four axes you can play a nice rendition of daisy though.
heh, that's cool
seb.. ouch... stepper abuse
I should record mine doing daisy
I asked youtube for emc2 + daisy, but no.
I though there was a utube one with a gantry router
heh, there is a 1541 playing daisy on youtube - that's the first unusual computer music I remember.
cradek, would u be able to give me just a little more assistance with the spindle over ride please?
still not working?
i have checked with the hal meter and the halui.spindle-override.scale = 0.05 the halui.spindle-override.counts value in/decs with the control knob
the spindle override slider does the right job and makes the spindle go faster/ slower etc
[17:03:58] <skunkworks_> http://www.youtube.com/watch?v=R26yo7P9mwA&eurl=http://www.cnczone.com/forums/showthread.php?t=51348&highlight=cnc+music
I have to say that daisy with harmony is far superior to everyone else's monochromatic tunes.
although it would be nice if someone would post a video of the full thing (four axes)
I think in a couple places the 7th is missing - sounds a bit empty
(maybe I could make a better 3 axis version)
yeah the G->G7 and G->Em (lines 89, 103) are missing without 'A'. those are what make it interesting!
umm, nobody cares about this but me
maybe a 9 axis stepper playing classical gas :)
Smoke on the Water
Rusty Warren grinding... well never mind
actually, a misconfigured stepper system would sound pretty close to the opening guitar in Smoke on the Water
pjmcnc: can you explain what problem you still have? I don't understand.
cradek, okey dokey, so i have the encoder running, its connected to halui.spindle-override.counts - i can see the value in/decrementing with the encoder knob
so if i run say m0 s1000 i can adjust the speed up/down with the spindle override slider in axis
just not my encoder knob
isn't there an enable line as well?
i checked the values with the hal meter and they look about right
what does it do when you turn the encoder knob?
SWPadnos: depends on the version. what version are you running pjmcnc?
the speed doesnt move, but if you move the slider with the mouse, turn the knob, it will reset to the centre, i.e. 100%
version 2.2.8 here
is anything hooked to halui.spindle-override.increase or .decrease?
one sec i will check
no nothing is hooked up to those
i've set a value of 0.05 for the scale with setp halui.spindle-override.scale 0.05
and that shows as correct with the hal meter
does halui.spindle-override.value change properly when you move the on-screen slider?
it does yes, that works fine and the motor varies as expected
to be sure: halmeter shows that the halui.spindle-override.value changes properly?
only with the slider yeah
i will just modify the config to make the encoder move the feed rate override and see what happens there
the code in halui is identical...
[17:29:11] <cradek> http://cvs.linuxcnc.org/cgi-bin/cvsweb.cgi/emc2/src/emc/usr_intf/halui.cc?rev=220.127.116.11;only_with_tag=RELEASE_2_2_8
now that is interesting... the feed override works a treat with the encoder knob
oh hey, that is definitely interesting
I'm seeing if I can reproduce it here in 2.2.8
bah i should have checked this myself!
hmm it doesn't seem to matter how long you turn or how hard you press a left hand tap will not start if you go CW
but now as i turn the encoder knob, the slider moves etc
I bet you need to set [DISPLAY]MIN_SPINDLE_OVERRIDE and MAX_SPINDLE_OVERRIDE
they both default to 1.0
(for some stupid reason)
ah yes good point, let me redo
pjmcnc: fixed in 2.3, thanks for pointing out this bug.
thanks for that, appreciated ;-)
ok i will make a short writeup for the wiki on this for v2.2.8
thanks, that's a good idea, since it's probably not in the docs (and it's too late to add it, unless we make another 2.2 release.)
ok this is far better now, just running it on a part with the override - possible to easily get rid of resonances with a quick tweek of the spindle speed
that means i can move to the next item on the list which is a bar-graph spindle motor torque monitor in axis
perhaps i need to upgrade to the current devel build of emc
you can easily do that in vcp (if you can get that information into hal)
yeah i have the bargraph component, just waiting for some voltage to freq converter IC's to come, should be here tommorow
my vfd gives an analogue metering output of a few parms including load / torque
i need to move away from parports though, getting bored of their limitations
good evening.Yesterday i see the question about the frequenzy clock the encoder count on the m5i20.what is the limit for clock the velocity count?
motioncontrol: are you asking for the maximum frequency of encoder edges going in to the 5i20?
that depends on which firmware/driver you're using. hal_m5i20 or hostmot2/hm2_pci?
i use the hm2_pci driver
the default is 2 MHz
you can change it to 10 MHz if you have a really fast encoder, by setting encoder.filter to false in HAL
ok i thing is good value , the sinumerik 840d have 300khz
yeah, 2 MHz should be plenty for just about everyone ;-)
i'll add a note to the hostmot2 manpage about this
the question is because in another maschine i have the b axis circular with encoder at 18000cout/rev
[18:35:24] <BJT-Work> http://www.linuxcnc.org/docview/devel/html//drivers_hostmot2.html#r1_8
very thanks for link.
seb you see the labview gui interface for config emc?
who you thing?
i didnt really understand your picture
is it for creating an emc configuration?
yes the gui read ad write the ini and hal file parameter, for configuration the emc whith grafical program
ok is it only experiment for create one gui for emc config, for my semplicity in emc configuration.
howdy, i've just added http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Spindleoverride
talking about my setup with encoder > spindle speed override
but you didn't put any pictures...
looks good pjmcnc
ok i will find one to add, perhaps of the encoder knob ?
how about a picture of you tweeking on the knob while smoke and chips fly :)
it could be an animated gif i spose
there you go
* BJT-Work wanders off to tap left hand holes :/
rob is now known as Guest15571
Guest15571 is now known as robh_
hi all, iv just posed up some info on a conversion im currently doing, its over on CNCzone forum. http://cnczone.com/forums/showthread.php?t=73943
looks like you're about to drill the old controller full of holes ;-)
its a good paper weight right now
got heaps to still do on it but its coming along, hope to get motors moving again soon
looks very nice robh_
if you have not taken the resolvers off yet, you could still use them with the pico resolver->quadrature product
might be cheaper and less trouble than encoders, but not by much
yea we throught about using convertors but throught by time we fitted encoders etc prob better off
ballscrews we had to take out anyway, so only 5min job to bore and fit in some shafts to couple to, then just 3 encoders :)
seb_kuzminsky can i pick your brain briefly about the 7i43 card we briefly discussed last night?
when this is done, we have a nice big hardinge superslant begging to be converted, as its fanuc 6t is getting little trublesome now and exspenive on repares
my brain's feeling pretty well picked over already but go ahead ;-)
ok thanks, just been having a read of the hm2_7i43 docs etc regarding frequency generation schemes, I see the usual pwmgen etc, but nothing for a pulse train. I presume then that I could use the stepgen to generate the variable frequency pulse train for spindle speed?
i dont think that would be very convenient for you
stepgen operates in position mode, not velocity mode
i basically need to get a) a better pulse train generation method, and b) a decant high-speed encoder input
high-speed encoder input is well handled by the 7i43
by pulse train you mean a square wave at a controlled frequency?
so 1KHz for example would scale to 1K rpm
at the moment i have it set so like 100Hz is 1K rpm
what kind of spindle control wants that?
its a yakasawa v707 VFD
i think thats the right part #
pwmgen can't really do that... that really sounds like vel-mode stepgen...
does it also have a regular 0-10 analog in?
no its VS606- V7
seb_kuzminsky yeah i'm running at the moment with velocity mode step gen out of the parport
it would probably be easy to add vel-mode stepgen to hm2
cradek yea it has a DC speed input too, i thought the pulse train might be the nicer way to go though
because otherwise i have to convert PWM to DC first
no big deal, but at the moment its digital from the parport to the controller
you won't already have a dac board for the servos?
ah its a stepper only machine
on a lathe there's extras leftover on the 4-dac card
as its a home made thing
servo's will come one day!
I'll stop trying to help then
well all input is valuable, i need to learn!
i saw that a lot of people use the PWM > DC method, perhaps I should give that a go
pjm_: the 7i33 does that
I had a different kind of machine in mind and thought you were going about it oddly - my mistake
ahh ok... so just looking at the manual for the vfd, there is 0-10V, current loop, 'pulse line reference', modbus/memobus, etc
so a few choices
i can knock up a pwm > dc board tommorow and give that a test with the parport, might be the answer for use with the 7i43 though since that has the pwmgen in it
[21:35:25] <pjm_> http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Pjm
- my machine plus a bit about the config, its only a small mill
someone has a nice tig welder.. or access to one..
except it now has a better motor, 3 phase and a vfd on it, plus a timing belt for motor>spindle drive
afew UK guys apearing i see :)
pjm_: looks nice :-)
thanks, it was built from stuff hoarded out of skips / dumpsters
the only bit i bought was the milling head
from little machine shop
looks like an x2 head with the steele belt drive
i'm kind of snowed under right now, but i'll add a todo-item to add vel-mode to the hm2 stepgens
probably not before 2.3 though
seb_kuzminsky yeah it was the bog standard mini-mill head, with the belt drive upgrade
but now it has a nice vfd
hey. long time no see
i will update that page with some newer foto's, one sec
OT! italian bloggers under attack! mr. berlusconi got the power.. please help us to defende our freedom: http://www.youtube.com/watch?v=QgMOSB5yg_4&feature=related
please just let US and EU people Know about that
updated with VFD foto's etc)
so btw the PWM output for spindle, i guess that is what most folks use for spindle speed control, once converted to DC?
it seems pretty common
some VFDs will take PWM stright in i belive, i will be needing 0 - 10V on my mill
using frequency or pulse width directly is a bit less desirable when using software to generate the signals
since timing is pretty important in those cases
for PWM (or PDM), it's the average that matters, and it may be averaged over a relatively long time (like a significant fraction of a second)
tht is true
yeah thats a good point re the averaging, at higher speeds i noticed it was a little wobbly when generating 5 to 6KHz out of the parport for example
but the PWM should average that as you say
i'll have a go at that tommorow and see how it performs
just a little cap and resistor is all you need
SWPadnos yeah i'll have to measure the load the VFD places on the 0-10V input and work out what i need
i'd assume its an op-amp input in the vfd but dont have a schematic for it to check
ah its 0.5mA load, nothing in other words
could M98 and M99 sub calls be added? they would work just like a go M98 goes to program number, M99 returns
did you know you can not use double brackets in a comment, like (comment (2nd comment) )
) closes a comment, I guess it's not nestable
what are you saying for M98/M99?
just we use it alot on our fanucs, seems a faunc code tbh, as every one else uses something different, but we use it to call a program number, so in your program you could have
it's called "O" in emc
O100 sub blah blah
M98 P0002 and it would go to program O0002
then later O100 call
we don't have stored programs, so M98/M99 wouldn't be useful in that way
it is possible to have named subroutines though, stored on disk, that you can call from any program
that would look in your nc_files dir (I think) for a file called mysub.ngc, if mysub isn't defined in the currently loaded file
right i see, CAM spits it all out into 1 file anyway
I don't know the exact syntax, but those subroutines can also have parameters
so you could have something like a bolt circle call that takes the number of holes and radius/diameter in addition to the peck cyle parameters, and then goes around the circle doing peck cycles
rember seeing abit in manual about that i belive
ill have play with program i got here and change sub calls etc
lots of flexibility there, especially with the 10 levels of nesting (I believe)
oh, I think you can also use a parameter as the subroutine number (for numbered ones)
something like O#10 call
very rare have more than 1 level subs, as normaly call sub on one vice, go to next call it again etc
that should call the subroutine whose number is stored in variable 10
I just got to thinking about bolt holes :)
is it valid to have program number at start of program/file? O###
you may want a pre-drill, through drill, shoulder bore for each hole
hmm wunder what its complaing about then
that code doesn't get executed unless there's an O### call somewhere
wasn't the problem you mentioned about (comments (inside comments)) ?
no i got rid of that
oh, then what's the latest complaint? :)
unknown control word in O
control command sorry
can you paste the line that gives that error?
O0001 (X BLOCK 8OFF PROGRAM)
(10 MM 2 FLUTE CARB)
G91 G28 X0 Y0 Z0
it says Near line 3
you have no SUB
O0001 SUB (blah blah)
then O0001 ENDSUB at the end
and then optionally O0001 CALL somewhere
(I don't think you need all the leading zeroes BTW)
right just that is start of main program if like
no just cam spits out all zeros
ill have to make a new camworks post processor i think for EMC machine
excellent. stick it on the wiki once it's done :)
Do you suppose this might work for SPI in HM2: http://geo01005-ideas.blogspot.com/2009/02/possilbe-hm2-spi-hierarchy.html
aah no G52?
is the idea that the number of elements (in addition to the number of frames and channels) is specified at load time?
robh_, what is G52 supposed to be?
work datum shift
is that more or less a coordinate offset?
G52 Local coordinate system setting
maybe G92 then?
SWP: Sets how many SPI frames you need, how many channels, perhaps howmany elements in a frame.
takes value, and adds it to current G54 etc
I believe G92 sets the current location, taking into account any existing offsets. take a look at the manual to see how it works (I can't really help you there :) )
geo01005, yes, OK. I was just noticing that there is no explicit "number of elements" element in that tree
No program SWPadnos ill take a look
is the idea that all pins in red, under Element_#, get exported, or are you thinking that there would be a setting to tell what data type is expected back?
SWP:0-n number of elements per frame, some could be NULL
All would get exported, some could be hidden and shown, I'm not sure how that changes the functionality.
well, it would be pretty ugly trying to specify that you have 16 bits of digital input
if you need 16 elements - one for each bit
and you get extra pins that are unusable for all 16, namely 16 floats, ints, and unsigneds
it's also hard to tell what pins are "real" with halcmd, if you always see all of them
Yes, that is correct.
note that the hostmot2 driver doesn't export the stepgen pins at all if you tell it you don't wnat any stepgens
The same could be done here, but there is more than one level to turn on or off.
heh - I think that's what I'm getting at
Does it look flexible enough to handle most devices though?
Your ADC application for example.
(not the thoughput, but the function)
I think it may be able to handle everything, but I don't know that it's ideal
I don't know how to specify all that config data at load time, and I think that's the really hard problem
So what are the disadvantages of exporting all the pins, is a memory thing, or just that it makes a mess.
mostly it's a mess
the idea of HAL is that once you have loaded a system, it's discoverable
you can get lists of available pins and functions, and you can do things with them
They could be hidden in the HAL file?
if you have a list that includes 100 things that aren't useful/usable, then it's confusing
I'm talking about how it's not meant to be hidden
once running, you can inspect the state of the machine
What kind of data can the driver access? Can it read and parse a file?
not at the moment
and if you're thinking of parsing XML files in the kernel, stop now :)
no, just text, or whatever would be easiest
Not that it sounds like anything is easy.
yeah, it's not trivial
actually, it may not be too hard to get a description string into the driver, but it wouldn't be very easy for a human to write the string
[22:59:50] <alex_joni> http://www.theregister.co.uk/2009/02/17/galaxy_zoo/
So you could generate the string with a script/gui,maybe with some device libraries, and paste that into HAL?
paste that into the loadrt line, yes
I'm thinking of something that looks relatively ugly, just so you know ;)
look at the ax5214h parameter
"IIOOio" or similar, to configure some 8255 pins as input or output, for byte or nibble ports
er, maybe "IOio"
8 bits in, 8 bits out, 4 more ins and 4 more outs
I imagine parsing that string in the driver could be a pain.
no, that's easy
just don't be forgiving at all
get an unexpected character, and the driver errors out
the number of words per channel and the number of channels are easy to specify
you can use an array parameter for that
that would turn on SPI channels 0,2,3 (1 turned off), with 3, 4, and 15 words of transfer respectively
you then have strings that define the makeup of each word in the packet
Hmm, I don't understand the array parameter. Never used one.
something like this (not taking output and input into account yet)
Oh I get it now...
it's a kernel module facility
we don't have to write the parser, and the kernel takes care of making sure we don't overrun the array, etc
I think I might make the CS selection, CPOL, CPHA, and other timing hal parameters
but as far as data types, you can do something like this: D.0.15
D.0.15 means "digital data, from bits 0 to 15"
I.0.11 means "integer data, from bits 0 to 11" (like a 12-bit bipolar A/D)
U.0.11 would be a 12-bit unsigned quantity
F.0.15 = floating point, 16 bits (dunno how to specify sign bit yet, if it's not contiguous or not two-s complement)
the nice thing there is that only the necessary pins/parameters get exported to HAL
and it's also cmopact, 16 (contiguous) digital inputs is one "statement"
oh, and you could also do a chain, without needing to specify starting numbers
So would you still specify frames?
you then need an "unused" type
I thikn frames could be specified with HAL parameters (though they're unlikely to change once you start the system, so maybe that isn't a good idea)
Perhaps one intial frame to initialize some of the devices that need it.
oh, well that's another issue entirely
and one that won't be solved with a generic driver and load-time parameters
the DAC chips I mentioned before have several configurable registers per channel, in addition to chip-wide config
there are at least 16 registers that you should set before doing anything else
(or a few global ones to turn off all the cool features, if you don't want to use them)
I was thinking just a different set of "frames" could be used to intilize the devices.
I guess it depends on what you're talking about when you say "frame"
to me, that is one transfer, or in this case maybe one set of transfers (since it's buffered)
there's also the issue of devices that need both read and write access, like the ADC I mentioned - it also has several setup commands that you write, but is usually only read - you have to make sure to put in no-ops if there's anything else on that channel
I have been assuming that a frame is one chip select cycle. The BSPI buffer is 16 deep, I belive just in frames with that definition.
are you still thinking of the data as static?
you wouldn't (always) need to write anything to a chip to read back data (like from an ADC or digital input chip)
Umm, I not sure that I'm on the same page, but I think that the SPI frame length would take care of that, It dosn't care if there is anything buffer to send to the device.
if you have transmit enabled, it *will* send whatever is in the buffer every time
so if you need to send initialization commands, then send nothing, then the configuration of the transmitter needs to change at some point
and that means that it would be difficult to specify the changes on the command line when loading the component
as I said before though, if you can get something that works for your application, then someone else can look at it and make it work for theirs
later on, we can get to some generic driver that could work for most things, btu that may be biting off a bit too much for now
By the configuration of the transmitter do you simply mean the Channel descriptor bits, or did I miss something?
how much and what data to transfer
yeah, so what I was trying to say is that when loading the components you send two configurations. One that would be run once and thrown away, and one that would run for the remainder of the time.
it's hard enough to specify one, let alone two, on the command line :)
hello everybody, please can anybody tell me if i can use an m66 function at the beggining of the program and keep waiting for the input all along the program ?
thanks in advance :)
good question :)
well, it's a question for me, since I don't know the answer
it looks like you must have a timeout, except for the immediate mode
hahah, well i hope that it's possible
you could probably use something like Q50000000 to wait for a very long time
but i need the input waiting.. but with the rest of the program working
then I don't understand what you're trying to do
my definition, M66 pauses the g-code program while waiting for the input
err, by definition ...
well what i need is a fuction that waits for the input signal.. but with the program running
are you talking about the G-code program, or the GUI rpogram?
the g code
so you want the machine moving, what is it that should be waiting for an input to change?
because i need to do a loop
for a cilindrical grinder
but the idea is to use the machine to do not only cilinders, also we want to do lobes
and we need to make a loop with the shape of the lobe
and when the lobe is finished the machine rectracts, and i need to send a signal to do that
i mean, this is because i'm using a measurement system
i don't know if i was clear
not to me :)
hahah well i was thinking to make a user defined m code
if you want something that uses a measurement to decide when to stop, then you can use a loop, read the input with no wait specified, and use a comparison to decide whether to exit the loop
but in the example it only shows how to set a parport pin ... can i read the state of a parport pin?
so i have to use a halcmd like showpin
I should stop answering you, because I don't know what you're asking :)
and I'm likely to make us both more confused :)
no, you were helpful with the m66 thing
what is cancel canned cycle G80?
so you say that i can use a m66 with no wait.. that is a m66 p0 right ?
isn't that "cancel movement mode">
yeah, "cancel modal motion"
what confusing me, as ISO code it is cancel canned cycle, but EMC seems to have in manual as like u say
it basically requires you to specify a movement mode (G0/1/2/3) before specifying any axis words, or you'll get an error
g00 will cancel it like it should but cant see why there no cancel canned code like normal
g0 sets rapid traverse mode
but should also at end of drill cycle for exaple, cancel the cycle mode also
the cycle would be "canceled" anyway, or you wuoldn't be on the next line :)
hey SWPadnos, you told me that i can read and compare an m user defined with a parport pin right? (the last thing i swear)
i got it, EMC needs the G00, like G80 G00 Z50