#garfield Logs

Aug 24 2017

#garfield Calendar

12:23 AM ^kat^: rue, if i use http://www.ebay.com/itm/112450686808 to couple a 24v motor to an intermediate shaft, and from there a chain drive to the tire, for 4 wheel drive will cost me $100
12:26 AM ^kat^: why isn't this cheaper?
12:26 AM ^kat^: why is "timing belt ad sheave" so pricey?
06:57 PM zhanx: just finished applying for a job
06:58 PM zhanx: only longer application was joining the army
06:58 PM rue_shop3: hah
07:07 PM Tom_itx: dammit i wish i knew how to code better
07:28 PM zhanx: why?
07:31 PM Tom_L: maybe i could fix my problem then
08:37 PM rue_shop3: dunno what to work on next
09:08 PM Tom_L: rue_shop3, want a hint?
09:09 PM Tom_L: load up linuxcnc and fix this damn thing
09:09 PM rue_shop3: I dont ahve the hardware
09:09 PM Tom_L: you got enough junk just laying on your bench alone to do this
09:10 PM Tom_L: lemme post some .png files and give me your take on it
09:15 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/cnc/configs/screenshots/Idle.png
09:16 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/cnc/configs/screenshots/M3_Spindle_on.png
09:16 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/cnc/configs/screenshots/M19_R10_P1.png
09:16 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/cnc/configs/screenshots/T5_M6_Screenshot.png
09:16 PM Tom_L: the 3rd one is the main one of interest
09:16 PM Tom_L: it's using the M19 spindle orient command
09:17 PM Tom_L: idle shows the spindle brake on
09:17 PM Tom_L: M3 shows the spindle on and forward
09:18 PM Tom_L: so you can see how the different signals change
09:18 PM Tom_L: however with M19 none of the spindle is active except orient
09:19 PM Tom_L: i'm not sure if i'm supposed to clear the motion.spindle-index-enable or not
09:19 PM Tom_L: however there is a line in the .hal file that does that
09:20 PM Tom_L: notice also that from M3 to M19 it switches PID loops and outputs thru the MUX2 in either case
09:21 PM Tom_L: mux2.0.in0 is the normal one and mux2.0.in1 is the orient one
09:22 PM Tom_L: so that part is switching and outputting a signal
09:22 PM Tom_L: notice on the M3 the value is around 500ish for ~200 rpm
09:23 PM Tom_L: and on the M19 it's around 270 but if i let it go it will max at 1000
09:23 PM Tom_L: which is plenty of output to produce at least 500 rpm
09:24 PM Tom_L: also notice the orient.angle is 10 deg, the orient.position is 34 so it knows it's not in the right place
09:26 PM Tom_L: the T5_M6_screenshot.png is of little consequence here but put in for completeness
09:26 PM Tom_L: it will come into play once i get the spindle moving
09:27 PM Tom_L: if...
09:29 PM Tom_itx: net spindle-index-enable motion.spindle-index-enable <=> hm2_[HOSTMOT2](BOARD).0.encoder.01.index-enable
09:30 PM Tom_L: is the line that ties them together
09:30 PM Tom_L: motion.spindle-index-enable is both input and output
09:31 PM Tom_L: you also use that line to tie the spindle to an axis for synchronized motion
09:32 PM Tom_L: ^^ having a 'rue' talk to myself moment :)
10:32 PM rue_shop3: cleaning out a shed, back in a bit
11:09 PM rue_house: so, whats supposed to happen?
11:37 PM Tom_L: i _think_ the index-enable will assert, the spindle will turn up to one turn to the commanded angle and stop
11:38 PM rue_shop3: so, the idea is that it stops in a particular spot?
11:38 PM Tom_L: yes
11:38 PM rue_shop3: on the index mark?
11:38 PM Tom_L: for a tool changer
11:39 PM Tom_L: no not necessarily
11:39 PM Tom_L: but it uses the index mark to determine where it's at
11:39 PM rue_shop3: what resolution can the encoder do?
11:39 PM Tom_L: 2000
11:39 PM rue_shop3: wow
11:39 PM rue_shop3: and it works at 20k?
11:40 PM Tom_L: 500 count quadrature 2000
11:40 PM Tom_L: mine goes to about 5-6k
11:40 PM rue_shop3: ah
11:40 PM Tom_L: and yes it keeps up
11:40 PM rue_shop3: ok, so its just not turning on the motor?
11:40 PM Tom_L: that's right
11:40 PM Tom_L: it just sits there
11:41 PM rue_shop3: does it do everything else? set the direction and set the speed?
11:41 PM Tom_L: yes
11:41 PM rue_shop3: I wonder what is supposed to turn the motor on
11:41 PM Tom_L: the speed used in that mode is the pid1 which is positional not velocity
11:41 PM Tom_L: that's the same thing i'm wondering
11:42 PM Tom_L: it may be the motion.spindle-index-enable
11:42 PM Tom_L: in that mode anyway
11:42 PM rue_shop3: do you have a controller for pid1?
11:42 PM Tom_L: what do you mean?
11:42 PM rue_shop3: is the control loop there to do positioning
11:42 PM Tom_L: it switches between pid0 and pid1 in software
11:43 PM Tom_L: yes
11:43 PM rue_shop3: yea, the fpga is doing the pid1?
11:43 PM Tom_L: the velocity one works fine
11:43 PM Tom_L: well lcnc is
11:43 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/cnc/configs/screenshots/M19_R10_P1.png
11:43 PM rue_shop3: can you manually push it into pid1 mode?
11:43 PM Tom_L: and you can see that pid1 is outputting a value
11:44 PM Tom_L: yes with the M19 command
11:44 PM Tom_L: the whole thing switches over to it
11:44 PM Tom_L: with the mux2 component
11:44 PM Tom_L: and the other one is disabled
11:45 PM rue_shop3: whats yellow mean on pid1.enable?
11:45 PM Tom_L: i'll worry about tuning once it turns
11:45 PM Tom_L: yellow is asserted
11:45 PM Tom_L: red is off
11:45 PM rue_shop3: what speed is the speed controller actaully getting?
11:46 PM rue_shop3: its just not letting off the motor control disable, right?
11:46 PM Tom_L: it would be a voltage based on the 274 value
11:46 PM rue_shop3: motion.spindle.on ?
11:46 PM Tom_L: that just says it's on in normal mode
11:47 PM Tom_L: i dunno if it's supposed to be on in orient mode or not
11:47 PM Tom_L: since it's got an orient pin also
11:47 PM Tom_L: which is 'on' or yellow
11:47 PM rue_shop3: isn't motion.spindle-on the motor disable?
11:47 PM Tom_L: i would think so
11:47 PM Tom_L: but this is a 'not normal' case
11:48 PM Tom_L: so it may behave differently
11:48 PM rue_shop3: I'd expect that the spindle is always enabled in pid1
11:48 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/cnc/configs/screenshots/M3_Spindle_on.png
11:48 PM Tom_L: those are numbers when it's 'disabled'
11:50 PM rue_shop3: so, when you tell it to orient, if you give the spindle a manual rotation, does it start to flip out on the controller side?
11:50 PM Tom_L: no not really
11:50 PM rue_shop3: can, you manually enable the motor while its in pid1?
11:50 PM Tom_L: it just adjusts the numbers
11:50 PM rue_shop3: electrically?
11:50 PM Tom_L: no
11:51 PM Tom_L: well i don't think so
11:51 PM rue_shop3: well, _I_ would force the motor driver power on while its in pid1 and see if it takes a position
11:51 PM rue_shop3: then you know if thats the only impeding factor
11:52 PM Tom_L: it's power is always on
11:52 PM rue_shop3: the motor driver "power supply"
11:52 PM Tom_L: i just don't think it's getting a pwm signal to it
11:52 PM Tom_L: yeah it's wired to 110vac
11:52 PM rue_shop3: isn't the motor speed controller done with a 0-10V signal?
11:53 PM Tom_L: yes
11:53 PM rue_shop3: so whats the voltage on it?
11:53 PM Tom_L: i didn't check that
11:53 PM Tom_L: probably 0
11:53 PM rue_shop3: didn't you say that the motor driver is disabled?
11:53 PM rue_shop3: by the software?
11:53 PM Tom_L: it has an inhibit signal
11:53 PM Tom_L: but it's just pulsed
11:53 PM rue_shop3: yea
11:53 PM Tom_L: not steady
11:53 PM rue_shop3: so is the motor inhibit active?
11:54 PM Tom_L: just so it ramps up slow on a direction change etc
11:54 PM Tom_L: no
11:54 PM Tom_L: and by default it's always in fwd mode
11:54 PM Tom_L: the dpdt relay switches it to reverse
11:54 PM rue_shop3: so, when its not orienting like it should, the speed is set to 0 and the inhibit is inactive
11:55 PM Tom_L: and the inhibit relay sends a pulse to the inhibit line as that happens
11:55 PM rue_shop3: hey, thats a good point too,
11:55 PM Tom_L: yes
11:55 PM rue_shop3: if you have it in orient mode, and move it back and forth half a turn, you should hear the direction relay flip back and forth trying to correct
11:56 PM Tom_L: no it doesn't that i recall
11:56 PM rue_shop3: so pid1 is broken
11:56 PM Tom_L: i think for testing i have it set to orient in fwd only right now
11:56 PM rue_shop3: cause its not even trying to do the position control
11:56 PM rue_shop3: hu?
11:56 PM rue_shop3: how the hell do you do postioning with only one dir?
11:57 PM Tom_L: http://linuxcnc.org/docs/2.7/html/man/man9/orient.9.html
11:57 PM Tom_L: 'mode'
11:57 PM Tom_L: it should have a 'near' component but i didn't put that in yet
11:58 PM Tom_L: so it doesn't wobble around the setpoint
11:59 PM rue_shop3: so try mode 0 and see if its properly trying to operate the motor
11:59 PM Tom_L: actually it is in mode 0 if you look at the screen shot
11:59 PM rue_shop3: you need to work out which of the 2 parts isn't working
11:59 PM Tom_L: i must have switched it
11:59 PM rue_shop3: the enable or the speed