#garfield Logs

Jul 04 2020

#garfield Calendar

12:43 AM rue_shop1: last one!
10:33 AM rue_shop2: ok, tree guys been here
10:34 AM rue_shop2: gonna get him to take 4 down for me, not gonna kill the budget
10:34 AM rue_shop2: cnc machine is done bearing blocks,
10:34 AM rue_shop2: need shower and breakfast
10:35 AM rue_shop2: Tom_L, give me a shout when your around
10:36 AM Tom_L: been working on cad models
11:04 AM rue_mohr: ok
11:27 AM Tom_L: you don't have an axe?
11:55 AM rue_mohr: axe and chainsaw
12:11 PM Tom_L: ok, bak later if you feel like testing
02:09 PM Tom_L: bak
02:48 PM Tom_L: ok all set. added new cutter profiles to my cad cam
03:59 PM rue_shop1: I'm just trying to catch up with tasks
04:00 PM Tom_L: if you do, let me know how
04:01 PM Tom_L: hopefully i got these tool profiles entered right
05:10 PM rue_shop1: I'm fighting to do a few simple things unrelated
05:10 PM rue_shop1: the floppy emulator stopped working
05:10 PM Tom_L: wonder why
05:11 PM rue_shop1: it WAS working fine
05:11 PM Tom_L: cold solder joint somewhere?
05:14 PM rue_shop1: jumper C
05:14 PM rue_shop1: now maybe I can finish the simple thing I set out to do this morning
05:21 PM rue_shop1: but why didn't it need the jumper last time?
05:21 PM rue_shop1: why does fate want me to open the case of this computer every time I want to use it
05:21 PM Tom_L: you sure it didn't?
05:21 PM rue_shop1: it had worked fine!
05:22 PM rue_shop1: I worked on it till it did
05:22 PM Tom_L: the jumper has a flip flop attached to it
05:23 PM rue_shop1: I'd also accept that the clock on the floppy control card is drifting
05:24 PM Tom_L: what's jumper C do?
05:56 PM rue_mohr: I suspect it operates the drive ready signal, but it makes it work, so whatever :)
05:59 PM rue_shop2: ok! the eprom is written...
06:00 PM rue_shop2: gonna pack the station away and try the rom
07:19 PM rue_shop2: so I'll work on the NC file issue before I do the other adapters I need for my gearbox
07:43 PM Tom_L: k
08:28 PM rue_shop1: ok
08:28 PM rue_shop1: so, which one would you like me to try
08:31 PM Tom_L: the newest one
08:32 PM rue_shop2: :) help me out with that directory again would ya?
08:32 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/rue/coupler/coupler1a_no_lines.txt
08:32 PM Tom_L: and if that doesn't fly, i'll move the M05 to a line by itself
08:33 PM Tom_L: G53 G00 Z0 M05
08:33 PM rue_shop2: well I want to look for it acting up anywhere
08:33 PM Tom_L: several of those in the file
08:33 PM rue_shop2: so I'll just single step it and look for issues
08:33 PM Tom_L: that's why i changed it to no lines
08:34 PM Tom_L: that's alot of stepping
08:34 PM rue_shop2: sure
08:35 PM Tom_L: so it will crash even during single stepping?
08:35 PM rue_shop2: I'll try just a run and look for issues
08:35 PM rue_shop2: it shouldn't be able to
08:35 PM Tom_L: i'd run it thru just to see first
08:35 PM rue_shop2: the handshaking is turned off for single stepping
08:36 PM Tom_L: then if you get errors, edit that G53 line
08:36 PM Tom_L: and try again and if you _still_ get errors, single step
08:36 PM Tom_L: alot quicker testing that way
08:38 PM rue_shop2: the ack (~) generates one extra OK
08:39 PM rue_shop2: there is somehting at the start of it generating extra ones too
08:39 PM rue_shop2: its a handshaking issue
08:39 PM rue_shop2: if I polled the machine queue this wouldn't happen
08:39 PM Tom_L: remove the () comment line
08:39 PM Tom_L: at the top and every tool change
08:39 PM rue_shop2: but their return string is horrid, and I didn't want to parse it
08:42 PM rue_shop2: so G43 isn't supported
08:44 PM Tom_L: tool offsets
08:44 PM rue_shop2: I think its literally me sending the resume command
08:44 PM rue_shop2: the ~ that I send to make it resume after stop
08:44 PM rue_shop2: generates an OK
08:44 PM rue_shop2: but then the M00 that caused it generates another OK
08:44 PM Tom_L: that's a grbl command though
08:44 PM rue_shop2: yes
08:45 PM rue_shop2: I should figure out proper queue managment
08:46 PM rue_shop2: instead of just assuming every "OK" means its good to send another line
08:46 PM Tom_L: or just make exception for the few it doesn't like
08:47 PM Tom_L: does it ignore the G43 ok?
08:47 PM rue_shop2: the G43 doesn't cause an problem, it just says error
08:47 PM rue_shop2: yea
08:47 PM Tom_L: that's tool length offset
08:48 PM rue_shop2: k
08:50 PM Tom_L: i can try to remove those, not sure i can in the post
08:55 PM rue_shop2: but the problem seems to be that I cant send a resume character without screwing up the handshaking
08:55 PM rue_shop2: I'm looking now how to get the status of the command queue
08:56 PM Tom_L: i removed the G43 line
08:56 PM rue_shop2: ok, I still cant resume the hold without screwing up the handshaking...
08:57 PM Tom_L: i wonder if a button on the control would work
08:57 PM Tom_L: if you added one
08:57 PM rue_shop2: not trivial...
08:57 PM Tom_L: probably too much work to try that
08:57 PM rue_shop2: I want to know how to query if the parser is ready for another command
08:58 PM Tom_L: fix that and any file should fly then
08:59 PM Tom_L: we used to spoon feed the big machines but they either used ack nak or xon xoff
08:59 PM rue_shop2: "status report mask"
09:00 PM rue_shop2: rx buffer
09:00 PM rue_shop2: is 3
09:00 PM rue_shop2: add 8
09:00 PM rue_shop2: = 11
09:00 PM rue_shop2: $10=11
09:01 PM Tom_L: i _could_ turn off line numbers if you prefer too
09:02 PM Tom_L: make the dl a bit shorter
09:02 PM rue_shop2: hmm
09:15 PM rue_shop2: the program is hard to test the queue stuff with cause its so many short commands
09:15 PM rue_shop2: I have two ideas
09:15 PM rue_shop2: ignore an OK for anything the user sends
09:15 PM rue_shop2: or parse the acutual RX queue
09:15 PM Tom_L: is it the M00 that triggers the error?
09:15 PM Tom_L: because you have to resume
09:16 PM rue_shop2: its not triggering an error
09:16 PM rue_shop2: the M00 generates an OK
09:16 PM rue_shop2: and me sending ~ to resume generates an OK
09:16 PM rue_shop2: my handshake code sends a line of code for every OK it gets
09:16 PM Tom_L: so make a short one with a tool change, a G1 move and an M00
09:16 PM rue_shop2: so the extra OK means that its pushing an extra command in
09:17 PM rue_shop2: and as they build up, the handshaking fails to give the machine a chance to finish commands before more are pushed in
09:17 PM Tom_L: this was a bad one to test this on
09:17 PM rue_shop2: tis ok, I have some programs with long commands in them
09:17 PM rue_shop2: circles and stuff
09:18 PM Tom_L: so without the pause, the program would probably run ok?
09:21 PM rue_shop2: yes
09:21 PM rue_shop2: but the bit wou;dnt take it
09:21 PM Tom_L: i know
09:23 PM Tom_L: not much to change in the post file. i removed the G43 and can remove line numbers if you prefer
09:23 PM Tom_L: the rest looks ok
09:26 PM rue_shop2: I have to ponder
09:26 PM rue_shop2: the only way I can get the status, is to send a ?
09:26 PM rue_shop2: and then it returns a large string that needs to be parsed
09:26 PM rue_shop2: but it all needs to happen out of band, kinda
09:27 PM rue_shop2: if I stop my spooler at every tool change, then the buffer has a chance to clear
09:27 PM rue_shop2: then I can hit run again and its ok
09:28 PM Tom_L: you can't just: if input_buffer "~" ignore next "OK"
09:28 PM Tom_L: there are no tool changes
09:29 PM Tom_L: just pauses and spindle stops
09:29 PM rue_shop2: kinda
09:29 PM rue_shop2: its all oop
09:29 PM Tom_L: yeah i never could grasp that very well
09:29 PM rue_shop2: for this, it worked, normally I find oop pointless
09:33 PM rue_shop2: hmm
09:35 PM Tom_L: set the avr up for software flow control and use a serial terminal
09:46 PM rue_mohr: maybe I can patch it to ignore an OK for user-injected content?
09:46 PM rue_mohr: or I wonder if I count OKs
09:46 PM rue_mohr: which it should do now, but
09:47 PM rue_mohr: the concept of "that ok wasn't for you"
09:48 PM Tom_L: yeah
09:48 PM Tom_L: wouldn't it be easier to look for the "~"
09:49 PM rue_mohr: no, other things can cause this too
09:49 PM Tom_L: oh
09:49 PM rue_mohr: and, there is another bug along this line
09:49 PM rue_mohr: if I pause the spooler, the handshaking breaks
09:49 PM rue_mohr: grbl runs out of commands
09:50 PM rue_mohr: but when you resume the spooler, it needs to see an OK before it'll send anything
09:50 PM rue_mohr: so, you have to hit "single step" to force a send so that it'll get an OK and continue
09:50 PM Tom_L: i've used 3 different terminal programs using software flow control on the big ones
09:51 PM Tom_L: procomm, hyperterm, and i forget the name of the other one but it's really good
09:51 PM rue_mohr: i read that grbl doesn't do flow control
09:51 PM Tom_L: ok
10:04 PM Tom_L: hmm they bumped my package delivery up by 2 days
10:05 PM Tom_L: says it's already in town
10:05 PM rue_mohr: cool
10:06 PM Tom_L: i bet you never get that :)
10:09 PM Tom_L: i kinda wish i'd have ordered a couple more now
10:49 PM rue_mohr: but the cnc issue is definitly on me
10:49 PM rue_mohr: part of the issue is that I cant understand either of the numbers regarding the buffer state
10:49 PM rue_mohr: one of them bottoms out at zero, the other 1
10:49 PM rue_mohr: (they have two different status buffers for it)
11:09 PM rue_mohr: hmm, the sine wave pwm project needs a 17 bit synchronous counter
11:09 PM rue_mohr: which is a chip-nightmare
11:10 PM rue_mohr: I'm > < that close to throwing an FPGA at it
11:10 PM rue_mohr: which would also be horrid
11:14 PM rue_mohr: I wonder if I can trick an avr into it
11:14 PM rue_mohr: the pwm can be from an external clock
11:15 PM rue_mohr: whjich means I can use one clock for the instruction counter and one for the pwm
11:16 PM rue_mohr: it would take 1k of program space min.
11:18 PM rue_mohr: no 2k
11:19 PM Tom_L: what's that for?
11:19 PM rue_mohr: the true-sine inverter project
11:19 PM Tom_L: oh
11:19 PM rue_mohr: the lights in the shed need clean power
11:19 PM rue_mohr: they wont accept the modified sine from a cheap inverter
11:19 PM Tom_L: led?
11:19 PM rue_mohr: yea
11:20 PM rue_mohr: so I'm digging up an old project
11:20 PM rue_mohr: remember kat told me to encode the pwm onto the lookup rom for the sine values?
11:20 PM Tom_L: you gonna hit hard clay if you dig much
11:20 PM rue_mohr: well its that project
11:20 PM rue_mohr: I know
11:20 PM rue_mohr: I think there are still chinamen leaking out the last hole
11:20 PM Tom_L: i don't remember you n kat discussing that
11:21 PM rue_mohr: ah, it was an awesome idea from her
11:21 PM rue_mohr: worked out great
11:21 PM rue_mohr: last night I coded myself to sleep
11:21 PM rue_mohr: got an image made for a different version
11:21 PM rue_mohr: I tried it today and it worked
11:22 PM rue_mohr: but
11:22 PM rue_mohr: the counter isn't
11:22 PM rue_mohr: its a ripple counter, so the bit times are kinda random
11:22 PM rue_mohr: and it causes noise in the lookup output
11:23 PM rue_mohr: so I need a synchronous counter
11:23 PM rue_mohr: the only chip I have to do that is 74ls161
11:23 PM rue_mohr: its a 4 bit chip
11:23 PM rue_mohr: so I'd need 5 of them
11:24 PM Tom_L: or 1 fpga
11:24 PM rue_mohr: yea
11:24 PM rue_mohr: maybe an atmega88 if I can pull it off
11:25 PM rue_mohr: same as the DAC one, but have it write to the pwm registers instead
11:25 PM rue_mohr: the realization is that the clocks can be seperate
11:25 PM rue_mohr: and that fixes the issue I had with it before
11:28 PM rue_mohr: I'd like to know a bit more about what the lamps internally do with the pwer
11:28 PM rue_mohr: the twice they fired on the modified sine they made a lot of ill sounding noises
11:29 PM rue_mohr: I need to sleep for a bit