Reload Program Through Pin
Where did you save the file? (ie, the Python file here:
I placed the newly created file in /usr/bin with all permissions and executable.
Please Log in or Create an account to join the conversation.
Is it possible that the #! does not point to your version of Python?
Please Log in or Create an account to join the conversation.
/usr/bin
jake@debian-test:/usr/bin$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
jake@debian-test:/usr/bin$ ls -l update
-rwxrwxrwx 1 root root 319 Apr 4 14:44 update
jake@debian-test:/usr/bin$ halrun
.
halcmd: loadusr update
halcmd: show pin
Component Pins:
Owner Type Dir Value Name
5 bit IN FALSE update.trigger
halcmd: exit
jake@debian-test:/usr/bin$ cd /home/jake/linuxcnc
jake@debian-test:~/linuxcnc$ pwd
/home/jake/linuxcnc
jake@debian-test:~/linuxcnc$ halrun
.
halcmd: loadusr update
halcmd: show pin
Component Pins:
Owner Type Dir Value Name
5 bit IN FALSE update.trigger
halcmd: exit
Please Log in or Create an account to join the conversation.
jake@debian-test:/usr/bin$ python update
RTAPI: ERROR: could not open shared memory (No such file or directory)
HAL: ERROR: could not initialize RTAPI
Traceback (most recent call last):
File "update", line 4, in <module>
h = hal.component("update")
hal.error: Invalid argument
jake@debian-test:/usr/bin$
Please Log in or Create an account to join the conversation.
There is no "update" function as the component is a user-space program, not a realtime component.
Ignore the "addf" line, it will never work. But the component itself ought to have the desired effect if you toggle the update.trigger pin.
Please Log in or Create an account to join the conversation.
loadusr update count=1
# addf update servo-thread
net jake-update-backplot update.trigger <= pyvcp.update-button
I still get this:
Debug file information:
inifile: warning: File contains DOS-style line endings.
inifile: warning: File contains DOS-style line endings.
inifile: warning: File contains DOS-style line endings.
inifile: warning: File contains DOS-style line endings.
.
inifile: warning: File contains DOS-style line endings.
inifile: warning: File contains DOS-style line endings.
inifile: warning: File contains DOS-style line endings.
inifile: warning: File contains DOS-style line endings.
inifile: warning: File contains DOS-style line endings.
test_postgui.hal:3: Pin 'update.trigger' does not exist
22738
PID TTY STAT TIME COMMAND
22792
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components
Please Log in or Create an account to join the conversation.
The pin existed before:
halcmd: loadusr update
halcmd: show pin
Component Pins:
Owner Type Dir Value Name
5 bit IN FALSE update.trigger
There it is....
Please Log in or Create an account to join the conversation.
I assume the warning is talking about the configurations main .ini file (in this case axis.ini which is attached) I have looked all through the file and I don't see anything out of the ordinary.
The pin existed before:
halcmd: loadusr update
halcmd: show pin
Component Pins:
Owner Type Dir Value Name
5 bit IN FALSE update.trigger
There it is....
I don't understand what your getting at here....
Please Log in or Create an account to join the conversation.
DOS style endings.... I have seen this in other posts, I have yet to see a definitive answer on what they look like or how to find them.
There is a (CR) at the end of the line "# EMBED_TAB_COMMAND = python camview.py -w {XID}"
I found it by turning on line-ending visibility in Notepad++
I think that there is a similar feature in gedit.
I don't understand what your getting at here....
You loaded the component. The pin existed then. what has changed since if the pin does not exist now after you load the component?
Please Log in or Create an account to join the conversation.
Why does it care anyway just ignore them.....
I also got the error to go away but it still doesn't work, so this won't work with a pyvcp type hal pin??
Please Log in or Create an account to join the conversation.