pyvcp connection with hal

More
23 Mar 2013 21:33 #31763 by charrier
hello

i try to install a copy to make my new panel like in your docs /2.5/html/hal/pyvcp
i make a copy on custompanel and the display is ok

<pyvcp><labelframe text="Boutons de Jog"><font>("Helvetica",16)</font><!-- le bouton de jog de l'axe X --><hbox><relief>RAISED</relief><bd>3</bd><button><font>("Helvetica",20)</font><width>3</width><halpin>"x-plus"</halpin><text>"X+"</text></button><button><font>("Helvetica",20)</font><width>3</width><halpin>"x-moins"</halpin><text>"X-"</text></button></hbox><!-- le bouton de jog de l'axe Y --><hbox><relief>RAISED</relief><bd>3</bd><button><font>("Helvetica",20)</font><width>3</width><halpin>"y-plus"</halpin><text>"Y+"</text></button><button><font>("Helvetica",20)</font><width>3</width><halpin>"y-moins"</halpin><text>"Y-"</text></button></hbox><!-- le bouton de jog de l'axe Z --><hbox><relief>RAISED</relief><bd>3</bd><button><font>("Helvetica",20)</font><width>3</width><halpin>"z-plus"</halpin><text>"Z+"</text></button><button><font>("Helvetica",20)</font><width>3</width><halpin>"z-moins"</halpin><text>"Z-"</text></button></hbox><!-- le curseur de vitesse de jog --><vbox><relief>RAISED</relief><bd>3</bd><label><text>"Vitesse de Jog"</text><font>("Helvetica",16)</font></label><scale><font>("Helvetica",14)</font><halpin>"jog-speed"</halpin><resolution>1</resolution><orient>HORIZONTAL</orient><min_>0</min_><max_>80</max_></scale></vbox></labelframe></pyvcp>


after i copy on custom_postgui.hal

# connecte les boutons PyVCP pour X
net my-jogxmoins halui.jog.0.moins <= pyvcp.x-moins
net my-jogxplus halui.jog.0.plus <= pyvcp.x-plus

# connecte les boutons PyVCP pour Y
net my-jogymoins halui.jog.1.moins <= pyvcp.y-moins
net my-jogyplus halui.jog.1.plus <= pyvcp.y-plus

# connecte les boutons PyVCP pour Z
net my-jogzmoins halui.jog.2.moins <= pyvcp.z-moins
net my-jogzplus halui.jog.2.plus <= pyvcp.z-plus

# connecte le curseur de vitesse de jog PyVCP
net my-jogspeed halui.jog-speed <= pyvcp.jog-speed-f# Inclure vos commandes HAL personnalisées ici
Les commandes contenues dans ce fichier seront lancées après quel'interface graphique AXIS (PyVCP inclus) aura démarré.

after this error message when i laught linux cnc


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.2
Machine configuration directory is '/home/charrier/linuxcnc/configs/ma-machine'
Machine configuration file is 'ma-machine.ini'
INIFILE=/home/charrier/linuxcnc/configs/ma-machine/ma-machine.ini
PARAMETER_FILE=linuxcnc.var
TASK=milltask
HALUI=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 HAL User Interface program: halui
Starting TASK program: milltask
Starting DISPLAY program: axis
Shutting down and cleaning up LinuxCNC...
Killing task linuxcncsvr, PID=3587
Killing task milltask, PID=3688
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
custom_postgui.hal:2: Pin 'halui.jog.0.moins' does not exist
3587
PID TTY STAT TIME COMMAND
3688
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components

Kernel message information:
[ 4549.462842] I-pipe: Domain RTAI registered.
[ 4549.462849] RTAI[hal]: <3.8.1> mounted over IPIPE-NOTHREADS 2.6-03.
[ 4549.462849] RTAI[hal]: compiled with gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) .
[ 4549.462885] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[ 4549.462886] PIPELINE layers:
[ 4549.462888] f8780e20 9ac15d93 RTAI 200
[ 4549.462890] c085cb20 0 Linux 100
[ 4549.476127] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[ 4549.476250] RTAI[sched]: IMMEDIATE, MP, USER/KERNEL SPACE: <with RTAI OWN KTASKs>, kstacks pool size = 524288 bytes.
[ 4549.476253] RTAI[sched]: hard timer type/freq = APIC/12556305(Hz); default timing: periodic; linear timed lists.
[ 4549.476256] RTAI[sched]: Linux timer freq = 250 (Hz), TimeBase freq = 2913615000 hz.
[ 4549.476257] RTAI[sched]: timer setup = 999 ns, resched latency = 2944 ns.
[ 4549.476312] RTAI[usi]: enabled.
[ 4549.504765] RTAI[math]: loaded.
[ 4549.560611] config string '0x378 out '
[ 4552.762679] RTAI[math]: unloaded.
[ 4552.773501] SCHED releases registered named ALIEN RTGLBH
[ 4552.804194] RTAI[malloc]: unloaded.
[ 4552.904028] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[ 4552.905660] I-pipe: Domain RTAI unregistered.
[ 4552.905701] RTAI[hal]: unmounted.


what i the problem i try to understand hal but it so difficult to find the good command

best regards

rv

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

More
23 Mar 2013 22:52 #31766 by ArcEye
Replied by ArcEye on topic pyvcp connection with hal
Hi

custom_postgui.hal:2: Pin 'halui.jog.0.moins' does not exist


The problem is that hal only speaks English!

Substitute minus for moins

regards

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

More
23 Mar 2013 23:36 #31768 by charrier
Replied by charrier on topic pyvcp connection with hal
it's really a problem for me but i try

regards

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

More
24 Mar 2013 06:10 #31777 by andypugh
Replied by andypugh on topic pyvcp connection with hal

it's really a problem for me but i try


You can call the signals anything you like. So

# connecte les boutons PyVCP pour Z
net my-jogzmoins halui.jog.2.moins <= pyvcp.z-moins

The comment is OK in French, and my-jogzmoins is a perfectly valid signal name.
You can also happily call the pyvcp pins anything you like, so pycvp.z-moins is good too, if that is how it is defined in the XML file.

Unfortunately the pin halui.jog.2.minus pin is pre-defined as part of HAL (created by the halui module, all the pins are listed here:
www.linuxcnc.org/docs/html/man/man1/halui.1.html

And if you want to use those pins in your HAL file, then you need to call them by the same names.

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

More
25 Mar 2013 19:48 #31838 by charrier
Replied by charrier on topic pyvcp connection with hal
Je commence à comprendre le fonctionnement de hal'.

J'ai rajouter sur mon écran axis les jog. X y z. et la modification de jog comme sur l'exemple dans docs, par contre quand la modification de jog est à 80 , la vitesse des axes est. Très lente par rapport. Au touche. Flèche en haut. Flèche bas ,côté droit, côté gauche, est ce qu'il n'y a pas aussi. Le scale trop petit ?

est il modifiable par le même genre de curseur que le jog ? et rajouter une variation de scale. Avec la commande Hallui Max vélocity scale. ???????

Peut on aussi faire une prise d'origine Pom. Directement par une seule touche.

Peut on par une seule touche faire une. Descente lente de z, faire la prise d'origine et de remonter de 5 MM.

Merci Regards

Rv

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

More
25 Mar 2013 19:54 #31840 by andypugh
Replied by andypugh on topic pyvcp connection with hal
axis.N.jog-scale?

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

More
25 Mar 2013 21:35 - 26 Mar 2013 00:56 #31850 by charrier
Replied by charrier on topic pyvcp connection with hal
sorry for mistake it's not scale but velocity

i find the problen the velocity on the jog scale was 80 with the button but with the <= => up and down the velocity can go 1500 .

i change in hal the minmun scale number to 100 and the maximum to 1000 and now it's ok

sorry for my mistake

regards (it's very hard a new language)

rv
Last edit: 26 Mar 2013 00:56 by charrier. Reason: find solution

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

More
26 Mar 2013 19:48 #31909 by andypugh
Replied by andypugh on topic pyvcp connection with hal

now it's ok


Glad to hear it.

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

Time to create page: 0.099 seconds
Powered by Kunena Forum