#linuxcnc-devel Logs

Jun 12 2017

#linuxcnc-devel Calendar

10:37 AM TurBoss: Hello
10:38 AM TurBoss: I have a question or maybe a bug report not sure
10:38 AM TurBoss: I'm on stepconf Axis test diaglog
10:38 AM TurBoss: 2.8 bb
10:38 AM TurBoss: I noticed that if you leave the dialog open and not click on run
10:38 AM TurBoss: the motor moves one step arround 30 secs
10:39 AM TurBoss: - arround + every
10:39 AM TurBoss: could be my parport modules interfering? or its a bug of stepconf?
10:42 AM TurBoss: this is a whc82 pcie parport board
10:42 AM TurBoss: it doesn't happend when machine is on (Axis or others)
10:45 AM archivist: if ok on axis, that removes a lot of possibilities
10:46 AM TurBoss: yes it only happends on the test axis dialog of stepconf
11:15 AM skunkworks: Tom_L, yes aircraft drills
04:48 PM TurBoss: sorry I have reported the wrong version
04:48 PM TurBoss: the error I have is only on 2.79 I Can't reproduce it on 2.8 from bb
04:48 PM TurBoss: I should open an issue?
05:40 PM seb_kuzminsky: TurBoss: that's strange
05:40 PM TurBoss: I know
05:40 PM TurBoss: could be my card?
05:40 PM TurBoss: pcie parport wch382
05:41 PM seb_kuzminsky: can you get the system into the state where it takes steps every 30 seconds, and then paste the output of "halcmd show all"?
05:41 PM TurBoss: sure
05:41 PM TurBoss: give me a min
05:48 PM TurBoss: sorry but can't reproduce, will wait a bit more
05:49 PM seb_kuzminsky: my first guess is you have electrical noise causing the stepper amps to take steps even though no steps are commanded by linuxcnc
05:50 PM seb_kuzminsky: if you get a 'halcmd show all' before and after it takes a step we can see if the stepgen command changed
05:50 PM TurBoss: http://dpaste.com/3Z1K660
05:51 PM seb_kuzminsky: great
05:51 PM seb_kuzminsky: now lets wait until it takes a step and check again
05:51 PM seb_kuzminsky: we're looking specifically at this pin: 5 s32 OUT -107 stepgen.0.counts
05:51 PM TurBoss: ok
05:52 PM seb_kuzminsky: and this one: 5 float IN -53.61009 stepgen.0.position-cmd <== cmd
05:52 PM TurBoss: is not happening...
05:53 PM seb_kuzminsky: try plugging in the shop vac in the same power strip as the computer and turn it on and off a bunch of times ;-)
05:55 PM TurBoss: ok will keep you informed
05:55 PM seb_kuzminsky: ok cool, i'll be in and out of this room but i'll read back
05:56 PM TurBoss: thanks
05:56 PM seb_kuzminsky: would you update #282 with the "sometimes happens, sometimes doesn't" information we just gathered? it points to a hardware/electrical problem rather than a software problem
05:57 PM TurBoss: but there is no AC here
05:57 PM TurBoss: only computer mains
05:58 PM seb_kuzminsky: noisy AC is not the only cause of electrical problems
05:58 PM TurBoss: ok its happening
05:58 PM TurBoss: but I did a reboot
05:58 PM seb_kuzminsky: good!
05:58 PM seb_kuzminsky: aww bummer
05:59 PM TurBoss: :(
05:59 PM TurBoss: will reboot get halcmd show all and the wait
05:59 PM seb_kuzminsky: get another 'halcmd show all' before and after a step and we'll see if it's software or something else
05:59 PM TurBoss: ok so no need for reboot
06:00 PM seb_kuzminsky: no need
06:00 PM TurBoss: http://dpaste.com/3WR667P < first
06:00 PM TurBoss: waiting
06:00 PM seb_kuzminsky: we just need one "halcmd show all" before it takes a step, and one "halcmd show all" after it takes a step, with no reboot in between
06:00 PM seb_kuzminsky: cool
06:01 PM TurBoss: I think that he knows that we are watching...
06:01 PM TurBoss: :)
06:01 PM seb_kuzminsky: a watched circuit never glitches
06:16 PM Tom_L: ---^-----
06:16 PM Tom_L: spike
06:16 PM TurBoss: :)
06:22 PM seb_kuzminsky: TurBoss: another thing you could try is hooking an oscilloscope to the step wire right where it enters the stepper amp, and trigger on something just a little above 0
06:23 PM TurBoss: ok
06:23 PM seb_kuzminsky: the shape of the pulse should be clearly different if it's a deliberate software-generated step pulse or just noise
06:25 PM TurBoss: probe in place
06:28 PM TurBoss: catch it
06:30 PM TurBoss: seb_kuzminsky: http://dpaste.com/0Q69NYX <------
06:31 PM seb_kuzminsky: hmm, did you jog in between "first" and "second"?
06:31 PM TurBoss: no
06:31 PM TurBoss: onle before
06:31 PM TurBoss: only*
06:31 PM TurBoss: so it start after jogg
06:32 PM TurBoss: now its like a clock
06:32 PM TurBoss: scope died out of batery
06:32 PM seb_kuzminsky: in "first", the stepgen command is 0.0, in "second" it's 28.68795
06:32 PM seb_kuzminsky: so *something* commanded a bunch of motion
06:32 PM TurBoss: sek
06:32 PM TurBoss: I'l re take the paste
06:34 PM TurBoss: http://dpaste.com/3C21GCW <--- 2 in 1
06:34 PM TurBoss: 2 halcmd show all in one paste
06:35 PM seb_kuzminsky: yep, stepgen.counts incremented between first and second, so it's definitely commanded motion
06:35 PM seb_kuzminsky: not noise
06:35 PM TurBoss: :(
06:36 PM TurBoss: will update the issue to note that must jog to the bug to fire
06:36 PM seb_kuzminsky: good
06:36 PM seb_kuzminsky: include the 2 in 1 paste too, that shows the problem clearly
06:37 PM TurBoss: that paste will expire i'll do a new one
06:37 PM seb_kuzminsky: you can attach it to the github issue comment directly, no need for a separate paste server
06:39 PM TurBoss: ok
06:40 PM TurBoss: done
06:40 PM seb_kuzminsky: great
06:40 PM TurBoss: its still clicking like a clock
06:40 PM TurBoss: no more tests needed?
06:41 PM TurBoss: i'll shutdown then
06:41 PM seb_kuzminsky: yeah, no more is needed until we have a fix to test
06:41 PM TurBoss: fine
06:41 PM TurBoss: Thanks
06:43 PM seb_kuzminsky: thanks for you help in chasing this down
06:43 PM TurBoss: :)
06:45 PM TurBoss: glad to be helpful
06:46 PM seb_kuzminsky: do you want to try fixing the bug?
06:47 PM TurBoss: wich language?
06:47 PM TurBoss: C?
06:48 PM TurBoss: i'm a python newbie
06:48 PM TurBoss: know something about C and c++ but just a bit of hacking
06:49 PM seb_kuzminsky: steptest is written in a variant of C, a domain-specific language called "comp" or "halcompile" that compiles down to C
06:49 PM seb_kuzminsky: the code is in src/hal/components/steptest.comp
06:50 PM TurBoss: ok
06:50 PM TurBoss: checking
06:50 PM seb_kuzminsky: https://github.com/LinuxCNC/linuxcnc/blob/master/src/hal/components/steptest.comp
06:51 PM seb_kuzminsky: though looking at it, i think the problem is an interaction between stepgen and steptest
06:52 PM seb_kuzminsky: stepgen gets a command, and produces a feedback, but the feedback drifts a little bit, hunting for the target (.position-cmd)
06:52 PM TurBoss: steptest.comp seems very simple
06:52 PM seb_kuzminsky: normally that's fine, because the command doesn't change (when no motion is commanded)
06:53 PM seb_kuzminsky: but notice how steptest continuously copies the feedback to the command, when it's supposed to not be running
06:53 PM TurBoss: sorry this is a big task for me , i can only act as rubber duckç
06:53 PM TurBoss: :D
06:53 PM seb_kuzminsky: so each time the stepgen drifts a little bit, the drifted location becomes the new command, and that lets stepgen keep drifting, instead of drifting back
06:54 PM seb_kuzminsky: sure :-)
06:54 PM seb_kuzminsky: if you can, try commenting out line 72 (the one where steptest copies position_fb to position_cmd), and see if that doesn't fix the problem
06:55 PM seb_kuzminsky: i can make the change and have the buildbot make a deb for you if you like
06:55 PM TurBoss: the second id ok
06:55 PM TurBoss: *is
06:55 PM seb_kuzminsky: ok
06:57 PM TurBoss: I don't have any compile tools on this machine
06:57 PM TurBoss: and others are x86:64
06:58 PM TurBoss: i mean desktop
06:58 PM KGB-linuxcnc: 03Sebastian Kuzminsky 052.7-steptest-stop-after-jog e35c177 06linuxcnc 10src/hal/components/steptest.comp steptest: don't change position-cmd when not running * 14http://git.linuxcnc.org/?p=linuxcnc.git;a=commitdiff;h=e35c177
06:58 PM TurBoss: only sim here
06:58 PM seb_kuzminsky: the debs should be ready in two hours or so
06:58 PM TurBoss: ok
06:59 PM seb_kuzminsky: you'll have to get them from the "scratch" archive, do you know how to do that?
06:59 PM TurBoss: the deb?
06:59 PM seb_kuzminsky: yeah
06:59 PM TurBoss: i can take a look
06:59 PM seb_kuzminsky: ok
06:59 PM seb_kuzminsky: i've got to run, i'll check back later tonight
07:00 PM seb_kuzminsky: thanks again for the bug report and your patience and help in tracking the problem down
07:00 PM seb_kuzminsky: bye!
07:00 PM TurBoss: vu
07:00 PM TurBoss: cu
07:31 PM TurBoss: afk