implementing gantrykins
this is my first post ever on this forum btw.
I'm in my last year of electromechanics and i want to use EMC2 to run on a CNC-machine.
However i have never used this program before but i think i figured it out.
I want to use 2 motors on the X axis to make sure that both sides are running together but i want to let them home independently.
So i tried to use gantrykins from the samples but i have no idea how to use gantrykins with EMC2.
So i would like to ask if someone could give me a tutorial to use gantrykins with emc2.
untill now i have been using the stepconfig wizard but i didn't find any .stepconf file.
i have never ever used emc 2 before so please be very clear
thanks
Please Log in or Create an account to join the conversation.
The traffic is low enough that bumping threads is not needed here.
John
Please Log in or Create an account to join the conversation.
What isn't immediately obvious is that after homingyou need to switch to World Mode (XYZ) which you do using the $ key.
(if you do not have a dollar key then it can be done from the menu).
Running the sim will create a copy of that configuration in your home/linuxcnc/configs directory. You can compare the gantry HAL file to your stepfconf-created HAL file.
The changes are quite small, mainly changing loadrt trikins to loadrt gantrykins axes=XYZX (or something like that)
Please Log in or Create an account to join the conversation.
i tried moving the folder with the samples to the stepconf folder and opening it in stepconfig but that didn't work
Please Log in or Create an account to join the conversation.
ok i will try that but what isn't clear is how i load the gantrykins sample in the first place
i tried moving the folder with the samples to the stepconf folder and opening it in stepconfig but that didn't work
Ah, no. You can't see "inside" the configuration with Stepconf.
What I meant was that you should start LinuxCNC in the normal way, then choose samples->sim->gantry-hs as the configuration.
You will need to look at the HAL and INI files with a text editor. Don't be too worried, it is all moderately simple in there.
Please Log in or Create an account to join the conversation.
but now when i try to start the gantry i get the following error:
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/eric/linuxcnc/configs/gantry-1'
Machine configuration file is 'gantry-hs.ini'
INIFILE=/home/eric/linuxcnc/configs/gantry-1/gantry-hs.ini
PARAMETER_FILE=emc.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
Shutting down and cleaning up LinuxCNC...
Killing task linuxcncsvr, PID=2819
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
Could not open command file 'custom.hal'
2819
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components
Kernel message information:
[ 452.739294] I-pipe: Domain RTAI registered.
[ 452.739308] RTAI[hal]: <3.8.1> mounted over IPIPE-NOTHREADS 2.6-03.
[ 452.739314] RTAI[hal]: compiled with gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) .
[ 452.739326] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[ 452.739331] PIPELINE layers:
[ 452.739337] f8685e20 9ac15d93 RTAI 200
[ 452.739342] c085cb20 0 Linux 100
[ 452.786661] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[ 452.786895] RTAI[sched]: IMMEDIATE, MP, USER/KERNEL SPACE: <with RTAI OWN KTASKs>, kstacks pool size = 524288 bytes.
[ 452.786905] RTAI[sched]: hard timer type/freq = APIC/6312115(Hz); default timing: periodic; linear timed lists.
[ 452.786912] RTAI[sched]: Linux timer freq = 250 (Hz), TimeBase freq = 1817973000 hz.
[ 452.786917] RTAI[sched]: timer setup = 999 ns, resched latency = 2944 ns.
[ 452.787088] RTAI[usi]: enabled.
[ 452.948885] RTAI[math]: loaded.
[ 453.035170] GANTRYKINS: joints[0] = 0
[ 453.035180] GANTRYKINS: joints[1] = 1
[ 453.035186] GANTRYKINS: joints[2] = 2
[ 453.035192] GANTRYKINS: joints[3] = 3
[ 453.035198] GANTRYKINS: joints[4] = 4
[ 453.035204] GANTRYKINS: joints[5] = 5
[ 453.035210] GANTRYKINS: joints[6] = -1
[ 453.035222] GANTRYKINS: joints[7] = -1
[ 453.035239] GANTRYKINS: joints[8] = -1
[ 453.081116] config string '0x378 out '
[ 453.827142] RTAI[math]: unloaded.
[ 453.946535] SCHED releases registered named ALIEN RTGLBH
[ 453.961573] RTAI[malloc]: unloaded.
[ 454.060028] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[ 454.066822] I-pipe: Domain RTAI unregistered.
[ 454.066842] RTAI[hal]: unmounted.
i can't figure it out
and btw thanks for all te help
Please Log in or Create an account to join the conversation.
Machine configuration directory is '/home/eric/linuxcnc/configs/gantry-1'
Machine configuration file is 'gantry-hs.ini'
INIFILE=/home/eric/linuxcnc/configs/gantry-1/gantry-hs.ini
...
Could not open command file 'custom.hal'
It looks like there is a bit of tidying up to do in your config directory.
You seem to be using the INI file from the gantry sample in your own configuration (which might not be what you wanted to do at all)
That INI file is referencing a custom.hal file which you don't have.
I think you need to go back to your original INI file, assuming it still exists somewhere. You do need to check that your INI contains the [TRAJ]DEFAULT_ACCELLERATION parameter though.
Please Log in or Create an account to join the conversation.
I have been searching for the original custom.hal file but I didn't find it.
Neither did i find a [TRAJ]DEFAULT_ACCELLERATION parameter in the INI file.
I tried to find it on the original Installing CD but it isn't there neither.
Could someone post the original gantry folder please?
Thank you
Please Log in or Create an account to join the conversation.
add and or remove from the ini file
to add DEFAULT_ACCELERATION FIND THE [TRAJ] section in the INI file and add DEFAULT_ACCELERATION = 20
( 20 is an arbartary value just to start with and can be changed to suit your requirements
to remove custom.hal
either just make a file with gedit called custom.hal in your folder ( custom.hal is by default a blank file )
or find the HAL section again in the ini file ... and delete or just # comment the custom.hal entry
Please Log in or Create an account to join the conversation.
But now I've stumbled across yet another problem.
When I try to home the joints, joint 1 and 3 move at the same time on screen but my steppermotors dont move with the screen. Only when i jog them i seem to get a single tick in the motors when i click + and - a lot but its still just one step they take...
also i have no more interaction between my home switches and my computer.
i tried using another config and there it works fine so maybe i have to define my motors and swiches somewhere in the gantry_hs.ini file?
Thanks in advance
B
Please Log in or Create an account to join the conversation.