× Forum Header

stepper motors moving REALLY slowly, stepconf test

More
26 Nov 2013 18:14 - 26 Nov 2013 18:16 #41176 by andypugh

There are new issues, with which I am currently fighting the good fight, but the motors are zooming about merrily.
The solution was: swap the step and direction signal around for each motor.
I don't really understand why, because now the step pin feeds into the DIR input on the driver board, but there you go.


It is possible that the boar dis badly labelled, or they gave you the manual for a previous model.

You could try tracing the board tracks and comparing to the stepper chip makers documents.

If you haven't tried it, you could try the original settings but with the step signals inverted in stepconf, just to be sure.

I think drives can appear to work with enable and step pins swapped, but I don't think they work with step and dir swapped.
Last edit: 26 Nov 2013 18:16 by andypugh.

Please Log in or Create an account to join the conversation.

More
28 Nov 2013 15:09 #41198 by Glamplitude
Dear Andy

Sorry for being a bit thick here, but things have taken a turn for the worse. I tried to install the 2.6 version as you suggested via buildbot. Many dependency issues ensued, so I switched on ALL repositories for apt (I had them previously disabled because of all of the dire warnings about not allowing ubuntu to update because it would replace the real-time kernel with a generic one).

One lingering dependency issue remained: libmodbus5 but I managed to get a pre-made copy for lucid from highlab.com/~seb/linuxcnc/libmodbus/ which I downloaded and installed by "dpkg -i libmodbus5_3.0.1-2.linuxcnc0_i386.deb"

However, now I can't run LinuxCNC - the error output moans about a parport error. When I run from the command line in terminal, it says I have to be root but when I run as root, it gives the parport error the same as if I run it from the desktop shortcut as myself.

What is my easiest route? Should I download a newer ISO and install from scratch? Does the latest ISO have version 2.6 included? As I say, I apologise for being a dummy here, but I'm not yet used to understanding the error nomeclature for this environment. (I am very used to linux, just not linuxcnc.)

I also don't understand how, after the upgrade to 2.6, error_output.txt contains the line
LINUXCNC - 2.5.0

With thanks in advance for your patience and apologies for being such a n00b

If it's any use, errors follow:

gareth@cnc-01:~$ cat linuxcnc_print.txt
RUN_IN_PLACE=no
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/usr/bin
LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/usr/lib/linuxcnc/modules
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/share/linuxcnc/tcl/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.5
INIFILE=/home/gareth/linuxcnc/configs/Gareth-Hotwire-CNC/Gareth-Hotwire-CNC.ini
PARAMETER_FILE=linuxcnc.var
TASK=milltask
HALUI=
DISPLAY=axis
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
Killing task linuxcncsvr, PID=4289
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments

gareth@cnc-01:~$ cat linuxcnc_debug.txt
4289
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components


gareth@cnc-01:~$ cat error_output.txt
Print file information:
RUN_IN_PLACE=no
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/usr/bin
LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/usr/realtime-2.6.32-122-rtai/modules/linuxcnc
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/share/linuxcnc/tcl/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.5
LINUXCNC - 2.5.0
Machine configuration directory is '/home/gareth/linuxcnc/configs/Gareth-Hotwire-CNC'
Machine configuration file is 'Gareth-Hotwire-CNC.ini'
INIFILE=/home/gareth/linuxcnc/configs/Gareth-Hotwire-CNC/Gareth-Hotwire-CNC.ini
PARAMETER_FILE=linuxcnc.var
TASK=milltask
HALUI=
DISPLAY=axis
Starting LinuxCNC...
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
Starting TASK program: milltask
Starting DISPLAY program: axis
Shutting down and cleaning up LinuxCNC...
Killing task linuxcncsvr, PID=1802
Killing task milltask, PID=1849
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
Cleanup done

Debug file information:
Can not find -sec MOT -var MOT -num 1
Can not find -sec IO -var IO -num 1
Can not find -sec LINUXCNC -var NML_FILE -num 1
Can not find -sec EMC -var NML_FILE -num 1
X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 3 (X_GetWindowAttributes)
Resource id in failed request: 0xffffffff
Serial number of failed request: 604
Current serial number in output stream: 605
1802
PID TTY STAT TIME COMMAND
1849
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components

Kernel message information:
[ 612.360258] I-pipe: Domain RTAI registered.
[ 612.360268] RTAI[hal]: <3.8.1> mounted over IPIPE-NOTHREADS 2.6-03.
[ 612.360271] RTAI[hal]: compiled with gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) .
[ 612.360279] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[ 612.360282] PIPELINE layers:
[ 612.360286] f8e7be20 9ac15d93 RTAI 200
[ 612.360289] c085cb20 0 Linux 100
[ 612.389710] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[ 612.389883] RTAI[sched]: IMMEDIATE, MP, USER/KERNEL SPACE: <with RTAI OWN KTASKs>, kstacks pool size = 524288 bytes.
[ 612.389891] RTAI[sched]: hard timer type/freq = APIC/8312480(Hz); default timing: periodic; linear timed lists.
[ 612.389896] RTAI[sched]: Linux timer freq = 250 (Hz), TimeBase freq = 2792858000 hz.
[ 612.389899] RTAI[sched]: timer setup = 999 ns, resched latency = 2944 ns.
[ 612.390037] RTAI[usi]: enabled.
[ 612.487382] RTAI[math]: loaded.
[ 612.612850] config string '0xa400 out '
[ 614.847937] RTAI[math]: unloaded.
[ 614.916351] SCHED releases registered named ALIEN RTGLBH
[ 614.933082] RTAI[malloc]: unloaded.
[ 615.032018] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[ 615.036786] I-pipe: Domain RTAI unregistered.
[ 615.036800] RTAI[hal]: unmounted.

Please Log in or Create an account to join the conversation.

More
28 Nov 2013 18:04 #41202 by andypugh

Starting DISPLAY program: axis

..

X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 3 (X_GetWindowAttributes)
Resource id in failed request: 0xffffffff
Serial number of failed request: 604
Current serial number in output stream: 605
.


It looks like a graphics problem. If you edit the INI file so that instead of
[DISPLAY] 
DISPLAY = axis
you have
[DISPLAY]
display = tklinuxcnc
then you may well find that LinuxCNC starts up, but that you don't end up with the fancy XYUV display (in fact, I don't think there is any graphical preview at all)

As for _what_ the problem is, I am not sure :-(
The following user(s) said Thank You: Glamplitude

Please Log in or Create an account to join the conversation.

More
28 Nov 2013 18:27 #41203 by Glamplitude
Hi Andy

Well, I tried the tk setting and got the same problem. Thanks for the idea, though, because it set me on a good path. After tklinuxcnc didn't work, I tried to run Stepconf again out of curiosity and it reported an error when I tried to press the Test button along the lines of not being able to test because linuxcnc was the simulator version.

I went back to Synaptic and removed linuxcnc-sim and re-installed linuxcnc and the problem has disappeared. What a relief! I guess it kind of makes sense that the simulator can't find the hardware, but it's a bit of a bug if it causes the program to crash.

Thanks as always for your patience - I will keep trying

Gareth

Please Log in or Create an account to join the conversation.

More
28 Nov 2013 18:42 #41205 by andypugh

I guess it kind of makes sense that the simulator can't find the hardware, but it's a bit of a bug if it causes the program to crash.

That's not a crash! There are error messages and suchlike, it is a controlled exit.

A program crash is when you have to walk across the room and pull the plug. (I do that quite often when developing)

Please Log in or Create an account to join the conversation.

More
28 Nov 2013 18:58 #41206 by Glamplitude
Even though I'm super-embarrassed to admit it, I must put the solution here so others who search the forums might find this and be able to benefit.

This is how my pins ought to have been wired according to my Stepconf setup:



And this is how they were wired in reality:



So, what was happening was that X step was never used, and in fact X dir was being sent to X step and Y step was being sent to X dir. A total shambles! What a n00b.

How did I find the problem? I tried Andy's suggestion of switching around the step and dir pins and a lot happened from that. Then I simply used an LED to trace signals during the stepconf test.

Good luck to you all

Please Log in or Create an account to join the conversation.

More
29 Nov 2013 13:10 #41217 by Glamplitude


It looks like a graphics problem. If you edit the INI file so that instead of [...]

As for _what_ the problem is, I am not sure :-(


I thought I'd post the solution. This was actually a repeat of my first ever problem with LinuxCNC; even before I joined the forum. The computer I use for LinuxCNC is buried in my work area so I do most of the configuration and so on via network: ssh and vnc. The above window error was because I was trying to run LinuxCNC over vnc.

For the record: Stepconf works over VNC, Axis does not. (probably because of OpenGL I guess)

Please Log in or Create an account to join the conversation.

More
29 Nov 2013 17:42 #41219 by andypugh

For the record: Stepconf works over VNC, Axis does not. (probably because of OpenGL I guess)


Actually, LinuxCNC will work over VNC if the configuration is correct. I do it occasionally.
I also run it with ssh -Y (ssh -X times-out annoyingly)

Please Log in or Create an account to join the conversation.

Time to create page: 0.100 seconds
Powered by Kunena Forum