HalView - view HAL pin values externally in C++

More
12 May 2013 23:22 #33959 by ArcEye
That's right, then you have to connect up to the pins you want to monitor in your hal file.

Hopefully it is all explained in the zip, been a long time since I used it myself

regards

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

More
12 May 2013 23:45 - 12 May 2013 23:53 #33961 by mariusl
There seem to be more problems with the path as I get this error when I connect through HAL. I cannot compile the client either. It does not find the hiredis.h file
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/marius/linuxcnc/configs/mc200'
Machine configuration file is 'mc200.ini'
INIFILE=/home/marius/linuxcnc/configs/mc200/mc200.ini
PARAMETER_FILE=emc.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
Shutting down and cleaning up LinuxCNC...
Killing task linuxcncsvr, PID=19794
iocontrol: machine: 'MC200'  version 'unknown'
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 
(time=1368376740.330430,pid=19794): Registering server on TCP port 5005.
(time=1368376740.330605,pid=19794): running server for TCP port 5005 (connection_socket = 3).
redisclient: error while loading shared libraries: libemchal.so.0: cannot open shared object file: No such file or directory
mc200.hal:8: redisclient exited without becoming ready
19794

Regards
Marius


www.bluearccnc.com

Last edit: 12 May 2013 23:53 by mariusl.

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

More
13 May 2013 00:40 #33965 by ArcEye

redisclient: error while loading shared libraries: libemchal.so.0: cannot open shared object file: No such file or directory


That's the problem, symlink that name to liblinuxcnchal.so.0 (or whatever it is called)

The branding name change caused lots of problems which I sidestepped completely with symlinks which enabled me to continue as before.

(I still type in emc at the commandline and don't get a warning because I have a symlink called emc which points to linuxcnc - 3 letters or 8 - no brainer )

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

More
13 May 2013 02:24 #33967 by mariusl
It works with the symlink. I would like to get the stuff to compile later but for now it does well.
What am I supposed to see in the textboxes on the form?

Regards
Marius


www.bluearccnc.com

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

More
13 May 2013 15:03 #33978 by ArcEye

What am I supposed to see in the textboxes on the form?


See the halview_README file in the zip

Basically, whatever signals you have linked the pins to, the values of the out pins attached to those signals will be displayed.

I wrote it when I was testing a toolchanger component and trying to get particular homing behaviour at start up. This meant having to stop and re-start lcnc over and over again and I was getting sick of opening up a window to watch pins every single time I did it.

regards

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

More
13 May 2013 18:20 #33982 by mariusl
That is exactly why I am excited about this tool. I hate the constant restart while you are testing new stuff.

I get the values displayed like this "1 = 125.0000" in the label field but the text box us empty. I does not really bother me, I just wanted to know what the intended contents were. As long as I can see the values somewhere.

Regards
Marius


www.bluearccnc.com

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

More
13 May 2013 18:31 #33986 by mariusl
OK I read the info in the zip file. The net name should be displayed but mine is blank. Is there a special way to write the net name?

Regards
Marius


www.bluearccnc.com

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

More
13 May 2013 21:08 #33993 by ArcEye
I think you mean the text box next to the field display.

It is just a text box, click on it and you can type whatever you like in there, as a reminder of what you are looking at.
It does not fill itself in.

I am guilty of the usual programmers error, being so familiar with the program that it all seems obvious so I don't explain it properly :S




regards
Attachments:

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

More
13 May 2013 23:50 #34014 by mariusl
OK, that is usefull enough as it is. I have to make notes these days otherwise I dont remember what went where. :huh:

Regards
Marius


www.bluearccnc.com

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

More
18 Aug 2014 19:04 #49996 by mariusl
Hi
I am on this boat again. I compiled and installed redis and hiredis without issues but now I cannot get the redisclient.comp to compile. The error is that it cannot find the header file. I did an export to include the location in the path.
What am I missing again?
marius@cnc-dev:~/programs/halview$ echo $PATH
/home/marius/dev/linuxcnc-dev/bin:/home/marius/dev/linuxcnc-dev/scripts:/home/marius/dev/linuxcnc-dev/tcl:/home/marius/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/marius/bin:/usr/local/java/jdk1.7.0_51/bin:/home/marius/programs/hiredis-master
marius@cnc-dev:~/programs/halview$ 
marius@cnc-dev:~/programs/halview$ comp --compile redisclient.comp 
gcc -Os -g -I. -I/usr/realtime-2.6.32-122-rtai/include -I. -I/usr/realtime-2.6.32-122-rtai/include -D_FORTIFY_SOURCE=0 -mhard-float -DRTAI=3 -fno-fast-math -mieee-fp -fno-unsafe-math-optimizations -DRTAPI -D_GNU_SOURCE -Drealtime -D__MODULE__ -I/home/marius/dev/linuxcnc-dev/include -Wframe-larger-than=2560 -URTAPI -U__MODULE__ -DULAPI -Os  -o redisclient /tmp/tmpRfXK3r/redisclient.c -Wl,-rpath,/home/marius/dev/linuxcnc-dev/lib -L/home/marius/dev/linuxcnc-dev/lib -llinuxcnchal 
redisclient.comp:63:40: error: hiredis.h: No such file or directory
redisclient.comp:67: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
redisclient.comp:68: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
redisclient.comp: In function ‘user_mainloop’:
redisclient.comp:82: error: ‘context’ undeclared (first use in this function)
redisclient.comp:82: error: (Each undeclared identifier is reported only once
redisclient.comp:82: error: for each function it appears in.)
redisclient.comp:103: error: ‘reply’ undeclared (first use in this function)
make: *** [redisclient] Error 1

Regards
Marius


www.bluearccnc.com

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

Time to create page: 0.095 seconds
Powered by Kunena Forum