#emc | Logs for 2009-05-13

Back
[00:48:00] <maddash> what's the easiest way to obtain a surface-mounted microcontroller presoldered onto a breakout board?
[00:56:53] <cradek> maddash: not sure - seems like you'd need to have someone do it for you. you have a particular uc in mind that doesn't come as DIP?
[01:01:32] <cradek> digikey has some breakout boards if you can do the soldering yourself: http://parts.digikey.com/1/parts/11749-proto-board-14-16-soic-16pin-sip-9164.html
[01:03:32] <shrdlu-> gawd. a good few months since I've been in here. I was traumatised by my upgrade attempts last time
[01:03:56] <shrdlu-> ended up paying $300 to replace the old plotter board
[01:04:06] <maddash> cradek: it's an arm chip
[01:04:42] <maddash> cradek: DIP is the kind with really chunky pins, right? like an 18-pin avr?
[01:04:42] <shrdlu-> I don't suppose anyone has magically added a feature where you can fire a laser while the axis are in motion?
[01:04:57] <shrdlu-> fire it on and off, I mean
[01:05:08] <cradek> maddash: yeah DIP is the kind that has pins sticking out on .1" centers
[01:05:35] <shrdlu-> would anyone be interested in getting paid to do that?
[01:06:41] <maddash> cradek: i was looking at http://www.mouser.com/Search/ProductDetail.aspx?qs=sGAEpiMZZMtmW1oUCKTs6kkwEt0tR0qo
[01:07:50] <cradek> ick, CTBGA
[01:07:58] <cradek> impossible to hand solder
[01:08:22] <maddash> :(
[01:09:00] <shrdlu-> buy a cheap solder stencil
[01:09:02] <maddash> so, impossible for me to use that chip?
[01:09:06] <shrdlu-> ..from me
[01:09:24] <jepler> that's when you buy a reference design or starter kit -- I see there are both for the at32ap7000 from atmel -- the atstk1000 in this case
[01:09:25] <cradek> see if it comes in another package
[01:09:48] <shrdlu-> I got my first order from north america, yesterday
[01:10:05] <jepler> ouch, $500 from digikey
[01:11:20] <cradek> mouser $89
[01:11:51] <jepler> the atstk1000, I mean
[01:12:22] <cradek> this looks like a lot of stuff for $89 http://www.mouser.com/Search/Refine.aspx?Keyword=556-ATNGW100
[01:12:43] <jepler> http://www.mouser.com/Search/ProductDetail.aspx?qs=sGAEpiMZZMtmW1oUCKTs6kkwEt0tR0qo
[01:12:45] <jepler> oops
[01:14:13] <jepler> another board based on it: http://shop.embedded-projects.net/product_info.php/language/en/amp;ref/2/info/p12
[01:15:29] <maddash> jepler: how'd you google that up?
[01:16:07] <skunkworks> http://www.electronicsam.com/images/house/halfroof.JPG
[01:17:55] <jepler> maddash: http://lmgtfy.com/?q=avr32ap7000+board (tongue in cheek, do not get angry)
[01:19:13] <skunkworks> hey - that is neat
[01:19:22] <maddash> ah, you tacked on "board"
[01:19:34] <maddash> i r angry nao
[01:20:17] <eric_unterhausen> I love lmgtfy.com, never been able to use it
[01:21:43] <eric_unterhausen> uploading pictures brings firefox to a halt for some reason
[01:25:44] <eric_unterhausen> jepler: the mouser listing for that part number goes to a page that doesn't have the devel kit on it
[02:59:56] <tomp> tomp is now known as tomp3
[03:03:24] <JymmmEMC> eric_unterhausen: Feel grateful that you haven't had to.
[03:03:41] <tomp3>  when i click on a pane in the pager, the pane goes grey, and doesnt switch desktop. whats happened? ( ctrl alt rt arrow is ok )
[03:04:03] <tomp3> ( i aske din #ubuntu but they seem busy )
[03:08:05] <JymmmEMC> jepler: Do you have an AVSTK1000?
[03:08:29] <SWPadnos> ATSTK1000 I think it is
[03:08:37] <SWPadnos> or just STK1000
[03:08:54] <JymmmEMC> All I have is STK300 =)
[03:08:58] <SWPadnos> heh
[03:09:08] <SWPadnos> I'm not sure I still have one of those
[03:09:16] <SWPadnos> are those the yellow ones?
[03:09:20] <JymmmEMC> yeah
[03:09:29] <SWPadnos> ok, I probably have one or two somewhere
[03:10:34] <JymmmEMC> Good to know <evil laugh goes here>
[03:11:05] <jepler> JymmmEMC: no, it's just something on the google
[03:11:18] <JymmmEMC> jepler: ah ok
[03:11:30] <SWPadnos> it's a nice board
[03:13:22] <JymmmEMC> for $500 it better be
[03:17:23] <JymmmEMC> SWPadnos: Waht ya think of ATtiny2313 ?
[03:17:32] <JymmmEMC> http://www.atmel.com/dyn/products/product_card.asp?PN=ATtiny2313
[03:18:03] <JymmmEMC> AVR040: EMC Design Considerations
[03:18:10] <JymmmEMC> heh
[03:18:27] <SWPadnos> I haven't looked at anything that small in a while
[03:18:49] <JymmmEMC> why not?
[03:19:00] <SWPadnos> I'm sure it's fine though - I used to use the 2313 (not the tiny, the original)
[03:19:06] <SWPadnos> because they're too small ;)
[03:19:13] <JymmmEMC> tiny is the replacement for it
[03:19:19] <SWPadnos> yes
[03:19:22] <JymmmEMC> too small for????
[03:19:25] <SWPadnos> used to = 10 years ago
[03:19:42] <SWPadnos> for anything I've done with a microcontroller in the last several years
[03:20:20] <SWPadnos> not enough I/O, or doesn't have the advanced PWM, or that kind of thing
[03:22:09] <JymmmEMC> SWPadnos: I was thinking might be cool for led control
[03:22:32] <JymmmEMC> I wonder if the tiny is pin compatable
[03:22:42] <SWPadnos> with the 2313?
[03:22:46] <JymmmEMC> yeah
[03:23:02] <SWPadnos> it looks it, except that the 2313 didn't have the option of an internal oscillator
[03:23:03] <JymmmEMC> drop in replacement that is
[03:23:13] <JymmmEMC> Yes it did
[03:23:26] <SWPadnos> so the xtal lines and reset aren't available for I/O on the 2313
[03:23:27] <SWPadnos> hmmm
[03:23:44] <JymmmEMC> it was 4MHz internally
[03:24:54] <SWPadnos> I don't see that for the 2313
[03:24:58] <SWPadnos> vs. the tiny2313
[03:25:04] <JymmmEMC> Page 2 last paragraph
[03:25:20] <JymmmEMC> The AT90S2313 provides the following features: 2K bytes of In-System Programmable
[03:25:20] <JymmmEMC> Flash, 128 bytes EEPROM, 128 bytes SRAM, 15 general purpose I/O lines, 32 general
[03:25:20] <JymmmEMC> purpose working registers, flexible Timer/Counters with compare modes, internal and
[03:25:20] <JymmmEMC> external interrupts, a programmable serial UART, programmable Watchdog Timer with
[03:25:20] <JymmmEMC> internal Oscillator, an SPI serial port for Flash memory downloading and two software
[03:25:36] <SWPadnos> programmable Watchdog Timer with
[03:25:38] <SWPadnos> internal Oscillator,
[03:25:40] <JymmmEMC> SWPadnos: It's the ONLY thing I know for sure it had
[03:25:43] <SWPadnos> tjhat
[03:25:55] <SWPadnos> that's for the watchdog only, not for the CPU itself
[03:26:20] <SWPadnos> it has an oscillator, but not a clock reference, inside
[03:26:45] <SWPadnos> so you can use crystals or resonators with it, or an external oscillator feeding XTAL1
[03:27:10] <JymmmEMC> hmmm
[03:27:32] <JymmmEMC> and the tiny does have an internal CLK ?
[03:28:02] <SWPadnos> yes
[03:28:29] <JymmmEMC> Then I'm not sure the diff between an OSC and a CLK
[03:28:33] <SWPadnos> the 3 extra I/Os are on the xtal1/2 and reset lines
[03:29:37] <SWPadnos> actually, the 2313 manual says it has "an inverting amplifier, which can be configured for use as an on-chip oscillator"
[03:29:43] <jepler> http://www.atmel.com/dyn/resources/prod_documents/doc4298.pdf AVR091: Replacing AT90S2313 by ATtiny2313
[03:31:47] <JymmmEMC> What's the difference between an OSC and a CLK ?
[03:32:38] <SWPadnos> an oscillator (in this case) is a circuit that can amplify a low level signal from a resonator of some sort (usually ceramic or crystal)
[03:32:51] <SWPadnos> when you combine a resonator and an oscillator, you have a clock generator
[03:32:58] <SWPadnos> (more or less)
[03:33:03] <tomp> tomp is now known as tomp3
[03:34:27] <JymmmEMC> and the tiny has (what you call) a CLK? As in not crystal required, but runs slower?
[03:34:36] <JymmmEMC> s/not/no/
[03:35:22] <SWPadnos> the tiny has an onboard RC oscillator, which can be used as a clock source
[03:35:43] <SWPadnos> so in that case they're using the word "oscillator" like "clock" :)
[03:35:59] <JymmmEMC> I don't see that as being different from the orignal 2313, but ok
[03:36:19] <SWPadnos> it is
[03:36:31] <JymmmEMC> I'll take your word for it
[03:36:43] <SWPadnos> you may have missed the part where it says there's an internal oscillator for the watchdog timer
[03:36:57] <JymmmEMC> probably.
[03:37:42] <JymmmEMC> SWPadnos: are you programming them in ASM or C ?
[03:37:51] <SWPadnos> ASM
[03:38:01] <JymmmEMC> *sigh*
[03:38:06] <SWPadnos> I will soon convert a large ASM program to C
[03:38:25] <SWPadnos> (in the realm of 800k of ASM source code)
[03:38:48] <JymmmEMC> The calibrated internal RC Oscillator provides a fixed 8.0 MHz clock.
[03:39:17] <SWPadnos> yep, that's the tiny2313
[03:39:36] <SWPadnos> you do need to calibrate it by reading a register and writing the value to another register, I believe
[03:39:54] <SWPadnos> or there's a value stored in EEPROM at first or something like that
[03:39:55] <JymmmEMC> I think ASM would be a bitch for me to learn, C will be bad enough =)
[03:40:07] <SWPadnos> assembly is easy, there's not much to it
[03:40:21] <SWPadnos> but you really do have to think in very small chunks :)
[03:40:35] <JymmmEMC> Sure, if you have a photographphic memory like you
[03:40:39] <SWPadnos> heh
[03:41:03] <SWPadnos> if you want to concentrate on what you're making, then something like C (or higher level) is better
[03:41:07] <JymmmEMC> Sorry, I'm not gonna remember every frickin register and instruction set tyvm
[03:41:14] <JymmmEMC> BASIC!!!
[03:41:20] <SWPadnos> with asembly, you have to get into the mechanics of things
[03:41:36] <JymmmEMC> 10 LPRINT CHR$(12) 20 GOTO 10
[03:41:42] <SWPadnos> if you know BASIC, and it's got the features you need, then it's a good language to use
[03:42:20] <SWPadnos> well, I'm gonna hit the sack. gotta take apart those computers tomorrow and reverse some poorly color-coded wires
[03:42:21] <SWPadnos> sigh
[03:42:23] <JymmmEMC> Actually, I don't mind re/learning C for this
[03:42:36] <SWPadnos> note: if you cdecide
[03:42:37] <JymmmEMC> G'Night
[03:42:38] <SWPadnos> gar
[03:43:01] <SWPadnos> if you decide to get an M300-LCD case (like from mini-box.com), the red wire for the power LED is not positive
[03:43:06] <SWPadnos> and the black is not negative
[03:43:44] <JymmmEMC> oh joy - can't just flip it?
[03:44:03] <SWPadnos> heh
[03:44:04] <SWPadnos> no
[03:44:19] <SWPadnos> in fact, the MB connector is 2 pins next to each other and the case connector has a gap
[03:44:22] <JymmmEMC> It's just a 2 pin header isn't it?
[03:44:26] <JymmmEMC> ah
[03:44:27] <SWPadnos> so we had to move one wire over in the first place
[03:45:24] <SWPadnos> well, night
[04:12:06] <LawrenceG> skunkworks, looooking gooood
[06:09:13] <toastyde1th> toastyde1th is now known as toastydeath
[07:35:22] <micges> good morning
[07:36:56] <Valen> zup
[08:08:44] <JustinXJS2_> JustinXJS2_ is now known as JustinXJS2
[09:03:43] <Mark_FAPS> hello everyone, can someone help me with reading the values of hal pins in pyhton?
[09:06:06] <piasdom> g'mornin all
[09:21:20] <piasdom> Mark_FAPS; i wish i could help you,but i'm new to EMC. they'll help you when they can.they're very good.
[09:24:52] <Mark_FAPS> thx, I think I figured out my problem already, strange how the solution comes to mind right after you ask for help :)
[09:25:41] <piasdom> hahahha..i'm glad you got it working.good luck
[09:39:10] <Valen> whats around in terms of ac servo motor drivers?
[10:22:42] <alex_joni> Valen: the rotor usually
[10:23:01] <Valen> If you were closer i'd poke you
[10:23:09] <alex_joni> lucky me :P
[10:23:15] <alex_joni> oh, wait.. you said driver
[10:23:21] <alex_joni> capacitors?
[10:23:55] <archivist> ew gear form thread on the list shows people not reading /me seeing repetition
[10:23:58] <alex_joni> joke aside, I think Jon Elson has some drivers that move AC or BLDC
[10:24:22] <alex_joni> archivist: the bikeshed thingie would be sooo apropriate on the emc2 list
[10:24:49] <alex_joni> archivist: http://www.bikeshed.org/
[10:25:32] <archivist> hehe
[10:28:09] <archivist> they are discussing the hard way and I chucked on a mostly working gcode done... and still they dont see :)
[12:06:02] <SWPadnos_> SWPadnos_ is now known as SWPadnos
[12:07:10] <issy> hi all , i need to connect external i/o modul to the hal , can anybody tell me haw to do it?
[12:09:57] <SWPadnos_> SWPadnos_ is now known as SWPadnos
[12:57:11] <skunkworks188> http://www.electronicsam.com/images/house/halfroof.JPG
[12:57:54] <alex_joni> whee
[12:58:24] <alex_joni> skunkworks188: which is the place for the K&T ?
[12:59:28] <skunkworks188> heh - that place isn't big enough ;)
[12:59:45] <archivist> extend it then
[13:00:10] <alex_joni> since it's not finished yet.. it's easier now :P
[13:00:22] <skunkworks188> :)
[13:01:07] <skunkworks188> the k&t also needs a 2ft thick concrete pad under it - x,z are separate from z. (get bolted to the floor)
[13:12:41] <Optic> moo
[16:32:02] <alex_joni> Why do mathematicians always confuse Halloween and Christmas?
[16:32:26] <seb_kuzminsky> heh
[16:32:33] <seb_kuzminsky> oct(31) == dec(25)
[16:32:45] <alex_joni> ;)
[16:32:58] <alex_joni> seb_kuzminsky gets a cookie
[16:33:02] <seb_kuzminsky> ooh!
[16:34:40] <alex_joni> yay, no more sharks.. it's jumbo's now
[16:34:42] <alex_joni> http://www.theregister.co.uk/2009/05/13/abl_two_blast_ambition/
[16:40:30] <alex_joni> An astronomer, a physicist and a mathematician are on a train in Scotland. The astronomer looks out of the window, sees a black sheep standing in a field, and remarks, "How odd. Scottish sheep are black." "No, no, no!" says the physicist. "Only some Scottish sheep are black." The mathematician rolls his eyes at his companions' muddled thinking and says, "In Scotland, there is at least one sheep, at least one side of which is black."
[16:50:16] <seb_kuzminsky> A biologist, a physicist, and a mathematician are sitting at a streetside cafe. They observe two people enter the building across the street. Shortly later, three people leave the building.
[16:50:26] <seb_kuzminsky> The biologist says "they must have reproduced".
[16:50:39] <seb_kuzminsky> The physicist says "our measurements were inaccurate".
[16:50:55] <seb_kuzminsky> The mathematician says "now, if exactly one person enters the building, it will be empty again".
[17:02:20] <alex_joni> heh
[17:16:09] <skunkworks188> well - they just got the hubble with the shuttles arm
[17:19:44] <SWPadnos_> SWPadnos_ is now known as SWPadnos
[18:00:06] <Optic> hi
[18:46:13] <Guest536> hi
[18:46:57] <skunkworks188> Guest536: Hi
[18:47:12] <Guest536> i got my machine moving in the xyz via emc2 yesterday, and now i've moved on to the vfd.
[18:47:24] <skunkworks188> Nice :)
[18:47:33] <Guest536> thanks! i was excited
[18:47:46] <Guest536> wayyyy better than the old bandit control
[18:48:33] <Guest536> my vfd has a 0-10v input, and i'm using a 5i20 i/o card....
[18:49:35] <Guest536> i was under the assumption that the 5i20 only puts out 3.xv or 5v, and i really dont understand what the integrator manual is saying about the multiplier
[18:49:41] <skunkworks188> do you have a 7I33?
[18:50:11] <skunkworks188> does your vfd input anything else?
[18:51:11] <Guest536> i have a breakout board from mesa, i'm trying to find the model #
[18:51:49] <Guest536> other than signal and direction?
[18:52:00] <Guest536> i think those need to be 10v+ too
[18:52:13] <Guest536> start and direction*
[18:52:31] <skunkworks188> how are your servos interfaced (servos or steppers?)\
[18:53:16] <Guest536> steppers... through the breakout board/5i20
[18:53:26] <Guest536> and leadshine drives
[18:53:50] <Guest536> but the drives are cool with 10v
[18:53:53] <Guest536> 5v*
[18:55:22] <Guest536> the vfd has digital and analog inputs
[18:55:26] <skunkworks188> ok. without any extra board from mesa - the mesa card only will output a PWM signal. Unless you make a pwm-> analog circuit - you need a 7I33 which will output a analog signal.
[18:56:29] <Guest536> crap
[18:57:13] <skunkworks188> unless anyone else has any idea...
[18:57:28] <skunkworks188> what is the vfd?
[18:58:01] <cradek> you could do fwd/rev with two digital signals, and turn the knob on the vfd for speed
[18:58:13] <Guest536> abb acs400
[18:58:15] <cradek> although, you better make darn sure you can hook up unisolated signals to the vfd.
[18:58:36] <cradek> on/off/reverse is much much better than nothing
[18:58:43] <Guest536> yea, true
[19:00:09] <Guest536> sorry if these are dumb questions, i'm a complete noob
[19:00:19] <Guest536> alot to take in
[19:00:21] <cradek> not at all
[19:00:26] <Guest536> some isnt computing lol
[19:00:39] <skunkworks188> You are doing great. :)
[19:00:45] <Guest536> thanks!
[19:00:46] <archivist> we have a real mix in here
[19:01:37] <Guest536> sometimes i can read something 3 times and it makes no sense, but someone can say somethnig and then it all clicks
[19:02:19] <issy> any idea haw to connect external io modul to the hal?
[19:02:58] <jepler> by writing an appropriate hal hardware driver
[19:04:08] <issy> well this is a problem , my modul is connected tru ft232 , so it is virtual com port by means of usb , so it is not realtime , and the hal is.
[19:04:51] <Guest536> i thought i read usb i/o ports dont play well with emc2
[19:04:59] <Guest536> is that true?
[19:05:02] <jepler> hal hardware interfaces can be userspace, but only if they are doing something that is not required to be realtime (e.g., position control/feedback, safety)
[19:05:14] <skunkworks188> usb work ok - just not reatime.
[19:05:24] <Guest536> ah ok
[19:05:47] <skunkworks188> lots of people using usb joysticks and such
[19:06:41] <Optic> cow
[19:07:21] <issy> the board is 32 inputs and 2 relay outpus and is used for M7-8 commands , lubrications , additional thinks , all of them not realtime , my idea is to control it from the hal using the "pins"
[19:08:15] <skunkworks188> does it show up as a usb device in ubuntu?
[19:08:20] <jepler> issy: then you need a hal userspace driver
[19:09:23] <issy> yes , but i have no idea haw to make it , the hal part is not my force
[19:09:34] <jepler> writing userspace components in python: http://www.linuxcnc.org/docview/html//hal_halmodule.html
[19:09:54] <jepler> an example of a userspace component in python that communicates with a serial device: http://emergent.unpy.net/01198525592
[19:10:25] <issy> nothing in my soft is in pithon , only C and C++ , the gui is also mine
[19:11:25] <jepler> "gs2_vfd.c" "modbus.c" and "modbus.h" together are a C userspace hal component that communicates with a serial device: http://cvs.linuxcnc.org/cvs/emc2/src/hal/user_comps/
[19:12:19] <jepler> no matter what the language, the general description of a hal userspace component is this: A userspace component begins by creating its pins and parameters, then enters a loop which will periodically drive all the outputs from the inputs.
[19:12:54] <jepler> the C APIs are documented in manpages, section 3hal -- html versions at http://www.linuxcnc.org/docview/html
[19:13:07] <issy> thank , now is clear to me :)
[19:14:52] <jepler> in your case, the part between "read inputs" and "drive outputs" will involve doing I/O to the usb serial device according to its protocol
[19:16:53] <issy> yep , i think is clear , easy to be done. thanks jepler :)
[19:17:11] <jepler> I'm glad I could help
[19:20:10] <Guest536> looks like my vfd has a preset speed selection that i think can be selected via a digital input
[19:20:52] <Guest536> might still be easier to use a pot to control it manually for now
[19:22:05] <skunkworks188> jepler: didn't you make play around with a simple opamp pwm-analog converter?
[19:22:12] <jepler> skunkworks188: I sketched one but never built it
[19:22:17] <skunkworks188> make/play around with
[19:22:30] <jepler> skunkworks188: anyway, jmk told me my design was bad :(
[19:22:47] <skunkworks188> heh - ok
[19:24:03] <Guest536> i dont have a problem buying another board, i just need to get it running today, so i'll have to jury rig it for now i guess
[19:24:13] <Guest536> no biggie
[19:24:18] <skunkworks188> No pressure ;)\
[19:24:55] <Guest536> it was fun gutting all the old electronics out of the control today
[19:25:12] <Guest536> i bet i can get some coin on ebay for most of that junk
[19:25:55] <skunkworks188> you got that thing running pretty fast then. what are you using for the stepper drives?
[19:25:58] <jepler> did you figure out which I/O card you do have?
[19:26:09] <jepler> the daughtercard, I mean
[19:26:19] <Guest536> leadshine m880a
[19:26:37] <Guest536> jepler, lemme go grap my paperwork, give me one sec
[19:28:27] <Guest536> ok its a mesa 7142ta
[19:28:38] <Guest536> 7i42ta*
[19:30:27] <jepler> Guest536: if you've determined that it's OK to connect a non-isolated signal to the analog input of your vfd, then there's a simple external circuit you can use to turn a 5V pwm output into a 0-5V analog value
[19:30:42] <jepler> Guest536: then you'd configure the VFD so that 0-5V gives you the full RPM scale, instead of 0-10V
[19:31:23] <alex_joni> you could also drive it through an optocoupler
[19:31:23] <Guest536> i will check on the isolation
[19:31:33] <alex_joni> then you can hook the isolated part to a 10V supply
[19:31:48] <Guest536> the vfd has a 10v output
[19:32:02] <alex_joni> Guest536: that would be the proper one to use
[19:32:07] <Guest536> cool
[19:32:19] <alex_joni> 7i42T output -> resistor -> diode part of the opto -> PC gnd
[19:32:40] <alex_joni> 10 V from the VFD -> transister part of the opto -> RC filter -> VFD Gnd
[19:33:17] <jepler> yes, an RC filter is what I am referring to
[19:33:45] <jepler> is your familiarity with electronics high enough to know what that is?
[19:34:11] <Guest536> not entirely, but i can research it
[19:34:28] <alex_joni> Guest536: take some extra time to research it first
[19:34:39] <alex_joni> don't do it under pressure the first time :)
[19:34:55] <alex_joni> if you need to get it running _now_ then spindle speed control should be left for later
[19:34:59] <jepler> yes indeed
[19:35:08] <Guest536> yea, that's the plan
[19:35:16] <Guest536> dont wanna fry anything
[19:35:24] <Guest536> or myself
[19:35:30] <alex_joni> and if you think it's completed, please try it on something else besides the mesa first :D
[19:35:57] <Guest536> fry the par port instead? lol
[19:36:13] <jepler> lots of opportunites to seriously injure yourself with the high voltages present in VFDs
[19:36:51] <alex_joni> Guest536: if I were to chose.. sure :D
[19:37:19] <alex_joni> using low current fuses is also a good thing to do when you're not sure about a design ..
[19:37:28] <Guest536> yea, i think i would too alex... the motherboard is way cheaper\
[19:37:43] <alex_joni> and you don't need to replace the mobo when the parport is fried :)
[19:37:48] <Guest536> good idea
[19:37:51] <alex_joni> you can always add a 10$ parport card
[19:38:14] <gtom> hello, need some help on rt-component
[19:38:18] <alex_joni> but still be warned, a fuse doesn't always prevent other things from failing
[19:38:27] <Guest536> man i got so much to learn, eventually i gotta tackle the tool changer
[19:38:43] <alex_joni> Guest536: one step at a time, and you'll get there
[19:38:47] <jepler> gtom: just go ahead and ask it
[19:39:27] <gtom> well, how can i get the direction of a move, im using joint-vel-cmd !?
[19:39:56] <cradek> what do you mean direction?
[19:40:18] <cradek> when velocity is positive, the joint is moving in the positive direction
[19:40:56] <gtom> well, wrote a rt-comp for integrating linear encoders & steppers, inside the comp i need to know where the axis is movin to...
[19:41:21] <cradek> you don't know its destination, you only know its position and velocity
[19:41:26] <Guest536> thanks guys, appreciate the help
[19:41:32] <jepler> Guest536: come back anytime
[19:41:35] <alex_joni> Guest536: sure thing, come back
[19:41:35] <Guest536> i guess i'm back to work
[19:41:41] <Guest536> will do!
[19:41:44] <Guest536> adios
[19:42:11] <alex_joni> cradek: I think I know what gtom is after
[19:42:19] <gtom> but the vel is negative if the joint is movin left and positive if its moving right, is this true?
[19:42:35] <jepler> using "left" and "right" are confusing
[19:42:38] <cradek> for some definition of right and left, yes
[19:42:39] <alex_joni> maybe discussing the problem has a better outcome than implementation details
[19:43:26] <alex_joni> using steppers + linear encoder
[19:43:40] <alex_joni> it's quite easy to still use the pos-cmd connected to stepgen
[19:43:51] <alex_joni> but the position from the linear encoder as pos-fb
[19:44:11] <cradek> if you don't want correction, sure
[19:44:17] <alex_joni> right
[19:44:36] <alex_joni> but if you want correction you have to add some component between motion output and stepgen input
[19:44:45] <alex_joni> be it pid or some other component
[19:44:50] <gtom> thas what i did...
[19:44:52] <alex_joni> gtom: on the right track so far?
[19:45:04] <gtom> more or less :-)
[19:45:20] <gtom> i dont want closed loop with pids..
[19:45:43] <cradek> well yes you do, more or less
[19:45:53] <cradek> seems like you don't want velocity mode pid
[19:45:59] <gtom> just want to correct small error moving the machine
[19:46:15] <alex_joni> position mode pid ?
[19:46:26] <cradek> that's what I'd try
[19:46:33] <gtom> no, too complicated
[19:46:38] <alex_joni> gtom: why?
[19:46:57] <gtom> well, lot of side effects...
[19:47:01] <cradek> pid with a low I gain only, maxoutput .02 inches, added to commanded position and sent into stepgen
[19:47:17] <cradek> if you lose position, you'll stop with an ferror because the pid will max out
[19:47:35] <cradek> otherwise, it might make take up backlash if you stop somewhere long enough
[19:47:49] <gtom> not neccesary, a comp betw axis pos-cmd and stepgen does the same, but not looped
[19:48:14] <cradek> maybe you're solving a different problem, so it has a different solution :-)
[19:48:15] <alex_joni> gtom: it needs to be looped
[19:48:16] <gtom> cradek is right, this comp eliminates backlash also
[19:48:19] <cradek> brb
[19:48:48] <alex_joni> gtom: if it takes the linear encoder position as an input, and the output goes to stepgen then it's a loop
[19:49:46] <gtom> its only a loop when changes in enc pos result in a move...
[19:50:49] <gtom> im just adding "steps" if the position falls a little bit behind (tolerance in drive, ballscrew etc)
[19:51:30] <archivist> but you get the error from the encoder so its a loop
[19:51:57] <alex_joni> anyways, it's not important how it's called ;)
[19:52:07] <alex_joni> gtom: lets switch back to the problem you were having
[19:52:43] <gtom> it does not respond to changes of encoder position...
[19:53:23] <gtom> ok, is there a easier way to get the direction or am i right usiing joint-vel-cmd ?
[19:54:09] <alex_joni> I think it's easiest using vel-cmd
[19:54:46] <alex_joni> I'm not convinced that it will be a stable system, but you're the one trying it out (and proving it ;)
[19:54:57] <gtom> ok, will continue testing this stuff, one axis is running fine...
[19:55:28] <alex_joni> take some halscope traces of the out pin from your component
[19:55:50] <gtom> will do that...
[19:57:26] <gtom> spend a day testing positions... 99% the machine position was slightly BEHIND the commanded position
[19:58:35] <gtom> this cause of the ballscrew- tolerances/ tolerances, thats why im only do corrections in ONE directon!
[19:59:04] <alex_joni> maybe one day when you're really bored you can try the pid in position mode solution too
[19:59:20] <alex_joni> I wonder if it's worse, although I doubt it
[20:00:15] <alex_joni> imagine you're facing off a plate in X only
[20:00:15] <gtom> i will get bored, quit working for one year...
[20:00:28] <alex_joni> under the heavy machine stress, Y will be pushed back a bit
[20:00:38] <alex_joni> what's wrong in compensating that?
[20:00:49] <archivist> cutting other direction drives off different bearings as well
[20:02:31] <archivist> and possible different wear profile on the ball screw
[20:03:16] <alex_joni> archivist: that's unrelated
[20:03:18] <gtom> But a normal stepper does nothing in that case...
[20:03:36] <alex_joni> gtom: right, a normal stepper doesn't have linear encoders either
[20:03:54] <alex_joni> archivist: gtom's component does compensate in the direction he's currently travelling
[20:04:11] <gtom> yes!
[20:04:12] <archivist> if he is correcting for actual position then wear profile left and right wont be the same
[20:04:40] <alex_joni> basicly gtom's component is a special case of pid
[20:04:52] <alex_joni> with certain params set to 0
[20:05:24] <gtom> i dont think so... Pid responds..
[20:05:29] <archivist> adding known error at current pos
[20:05:50] <gtom> only ONEWAY
[20:06:35] <archivist> one way seems so wrong unless you only cut one way
[20:06:56] <archivist> I actually cut one way
[20:07:15] <gtom> assuming that errors are 99% in the opposite direction also ?
[20:07:22] <alex_joni> gtom: you can clamp pid output to 0..maxoutput
[20:07:26] <gtom> me too
[20:08:00] <alex_joni> take abs(current-pos), abs(encoder feedback), feed it to pid
[20:08:08] <alex_joni> clamp pid > 0
[20:08:23] <alex_joni> then multiply the output with the sign from vel-cmd
[20:08:30] <alex_joni> and add the output to current pos
[20:08:34] <alex_joni> and you're done ;)
[20:08:52] <gtom> that was too fast for me... :-)
[20:09:59] <gtom> well i implemented a similar "comp" in turboCNC some years ago...
[20:10:11] <gtom> in pascal source...
[20:10:26] <gtom> was running fine...
[20:11:17] <alex_joni> it's probably the same you are doing, but only using HAL, no code
[20:11:51] <gtom> i understand code, need some time to get used to the HAL
[20:12:54] <gtom> ok, my girlfriend is waiting... pregnant an angry... :-(
[20:13:02] <gtom> bye
[20:13:21] <alex_joni> bye
[20:13:22] <cradek> that sounds ominous
[20:13:48] <alex_joni> * alex_joni is sympathetic
[20:13:53] <cradek> ha
[20:14:19] <skunkworks188> :)
[20:19:44] <alex_joni> good night all
[20:19:53] <alex_joni> * alex_joni disappears for similar reasons :D
[20:20:08] <skunkworks188> Night alex
[20:20:16] <alex_joni> see you.. nice roof ;)
[20:21:48] <archivist> * archivist is old free and single and hunting for bits to add another stepper
[20:23:31] <skunkworks188> skunkworks188 is now known as skunkworks_
[21:11:57] <leito1489> hello everybody, i hope anyone could help me with this, i need to use the iocontrol.0.tool-prep-number PIN to tell to an external board wich controls the tool turret what tool is requested, but i don't know where can i find the information about how to use the floating point or S32 pinout, i was wondering if in the manual or anywhere this information exists, because i couldn't find it.. thanks in advance :)
[21:12:53] <SWPadnos> you need some way of talking to the external board from HAL
[21:13:00] <SWPadnos> which implies a driver of some sort
[21:13:28] <leito1489> exactly... the board that i have is one that my brother made, and it works with a microcontroller
[21:14:02] <SWPadnos> ok, are you needing to convert from the S32 to a binary bit pattern for the board? do you need to send the nuber serially? ...
[21:14:18] <leito1489> yes
[21:14:25] <SWPadnos> that was two options ;)
[21:14:39] <leito1489> haha sorry let me read again
[21:15:41] <leito1489> well the microcontroller is an atmel 8051, and it works by default in serial protocol so, if is not too complicated it would be better to use it as a serial protocol
[21:17:30] <jepler> you would write a hal component which has pin(s) of the appropriate type(s). at short intervals, you would check the value of the pin(s) and if it indicates you need to communicate with the microcontroller, then you'd do the appropriate communication
[21:17:36] <jepler> this is the "driver of some sort" that SWPadnos refers to
[21:18:26] <jepler> based on communication from the microcontroller, you'd also probably update the value(s) on output pin(s) -- for instance, to signal that the tool prepare action is completed
[21:19:59] <leito1489> i see, and another question that came out with your answer, if i use the conv_s32_bit module, can i connect that to a parport pin and then get into the microcontroler?
[21:21:21] <jepler> I doubt that the conversion that conv_s32_bit performs is appropriate in this case
[21:22:05] <leito1489> i see, so you the best option is to make a hal component with my own protocol to use it with the microcontroller?
[21:22:06] <jepler> (it has two main modes: in one mode, the output is 0 when the input is 0, and 1 otherwise; in the other mode, the output is 0 when the input is odd, and 1 otherwise. if this doesn't sound like what you need, then conv_s32_bit is not appropriate)
[21:22:56] <SWPadnos> I could have sworn that someone wrote a converter, but maybe I'd be swearing at myself
[21:22:59] <jepler> yes, that is what I would do. It is probably only a few lines of Python, or only a few dozen lines of C.
[21:23:22] <SWPadnos> I know I've thought about it, but of course I'd have to make it very complicated
[21:24:15] <jepler> depending on the kind of communication, and on your preference between ladder logic and C or python programs, it might also make sense to do it in classicladder
[21:25:15] <leito1489> it would be easier.. and what about comp? i've red a little bit about it but i don't know if it's possible to use it
[21:25:24] <jepler> (for instance, if you have 5 physical output pins which should get a binary representation of the requested tool number, then classicladder will be an appropriate tool to turn the tool number into 5 bits)
[21:27:36] <leito1489> you mean that i have to use 5 physical pins for making a 5 bits code, i was thinking on using only one, but with 1 pin per bit is a lot easier..
[21:29:58] <leito1489> sorry if i say nonsense things, i'm getting started with the deep thing on emc.. i have only made hal configs and that kind of things..
[21:30:07] <SWPadnos> if you don't use one pin per bit, then you have a serial protocol of some sort
[21:30:30] <SWPadnos> that's the only way to get more than one bit out of a single pin
[21:30:35] <leito1489> yes, that's why i was wondering how to know the protocol
[21:30:45] <SWPadnos> ask your brother ;)
[21:30:55] <leito1489> but for that i have to make my own driver too right?
[21:31:09] <SWPadnos> which "that"?
[21:31:21] <leito1489> for use one pin with a serial protocol
[21:31:27] <SWPadnos> yes, you would
[21:31:52] <SWPadnos> there is a "parallel port SPI" component that someone wrote, which you could use as a starting point
[21:32:05] <SWPadnos> I don't know if it's in the source distribution or if he has it on his website
[21:33:17] <leito1489> thank you for the information i will check it out later (this pc only has windows)
[21:33:38] <SWPadnos> ok
[21:33:45] <archivist> log into irc on the machine :)
[21:33:51] <SWPadnos> you can browse the source at cvs.linuxcnc.org
[21:34:01] <SWPadnos> look at emc2/components
[21:34:04] <SWPadnos> err
[21:34:10] <SWPadnos> emc2/src/hal/components
[21:35:04] <leito1489> thank you you're all very generous :)
[21:35:27] <leito1489> and the last thing, for making my own hal component it's better to use C or python than using COMP ?
[21:35:54] <jepler> comp is really just a preprocessor; the guts of a comp are still in C
[21:36:43] <jepler> I'd use python if possible, then comp if possible, then C if absolutely necessary
[21:37:05] <leito1489> python is the easier ?
[21:37:31] <jepler> I personally find Python easier for a lot of tasks
[21:37:43] <jepler> but that's partly because of the length of my experience with Python
[21:39:39] <jepler> in any case, what you need to know first is how you would communicate with this device without emc or hal in the picture at all
[21:40:02] <jepler> imagine it was a program that just takes 1 argument: what tool number to prepare
[21:40:08] <jepler> and figure out what steps it would perform
[21:40:39] <jepler> that's half of the problem; the other half is how to get the information "prepare a specific tool now" from emc, and give back the information "the tool is prepared" to emc
[21:42:26] <leito1489> excelent, yes the problem is only with the pins that aren't true or false, the other pins are very easy to handle we've done thins already..
[21:43:11] <leito1489> but i will take a deep look to the manuals and then get into classic ladder or python to figure out what's the best way to do it
[21:43:44] <leito1489> thanks again for your help all of you guys :)
[21:45:18] <jepler> bbl
[23:01:13] <tomp3> tomp3 is now known as fredex
[23:01:19] <fredex> fredex is now known as tomp3
[23:57:00] <tomp> tomp is now known as tomp3