Reload Program Through Pin

More
10 years 6 months ago #72799 by bogie6040
jake@debian-test:/usr/bin$ pwd
/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.

More
10 years 6 months ago - 10 years 6 months ago #72800 by bogie6040
Don't know if this means anything but.......\


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$
Last edit: 10 years 6 months ago by bogie6040. Reason: Here is the file as it sits in /usr/bin Remove .txt of course

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

More
10 years 6 months ago #72801 by andypugh
Replied by andypugh on topic Reload Program Through Pin
I think I have given misleading advice.

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.

More
10 years 6 months ago #72803 by bogie6040
test_postgui.hal contains:

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.

More
10 years 6 months ago #72815 by andypugh
Replied by andypugh on topic Reload Program Through Pin
First, get rid of the DOS-style line endings.

The pin existed before:
Code:
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.

More
10 years 6 months ago #72850 by bogie6040
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....
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.

Time to create page: 0.349 seconds
Powered by Kunena Forum