- Posts: 68
- Thank you received: 0
Saving parameters after shut down
6 years 9 months ago #154481
by jurod
Replied by jurod on topic Saving parameters after shut down
Hi
I have problem with paramsaver syntax. "safe tool change" . I would like the syntax and links to hal components. I need at the toolchange, write new tool to paramsavers. I would like to look into yours hal and ini.
I don't know how to use M68, with motion.analog-out-xx.
My hal:
# _DO NOT_ include your HAL commands here.
# Put custom HAL commands in custom_postgui.hal
# The commands in this file are run after the GUI loads
# **** Setup of spindle speed display using pyvcp -START ****
net spindle-vel-cmd-rpm-abs => pyvcp.spindle-speed
#prisavky s materialom
net appc halui.mdi-command-10 pyvcp.appc
net ap halui.mdi-command-12 pyvcp.ap
net am halui.mdi-command-13 pyvcp.am
net nul halui.mdi-command-14 pyvcp.nul
########################## FILE SAVER ###################################
#
loadusr -W paramsaver f=3 s=1 b=0 filename=memory_pins onstart=1 onexit=1
net material_in pyvcp.mat => paramsaver.invalueF-000
net material_out pyvcp.spinbox.0.param_pin <= paramsaver.outvalueF-000
net podlozka_in pyvcp.pris => paramsaver.invalueF-001
net podlozka_out pyvcp.spinbox.1.param_pin <= paramsaver.outvalueF-001
############################### Memory tool #########################################
net tool_number_in iocontrol.0.tool-number => paramsaver.invalueS-000
net tool_number_out ?????????????????? <= paramsaver.outvalueS-000
net writetrigger motion.digital-out-03 paramsaver.writetrigger
net readtrigger motion.digital-out-04 paramsaver.readtrigger
########################## FILE SAVER END ###################################
.......
I have problem with paramsaver syntax. "safe tool change" . I would like the syntax and links to hal components. I need at the toolchange, write new tool to paramsavers. I would like to look into yours hal and ini.
I don't know how to use M68, with motion.analog-out-xx.
My hal:
# _DO NOT_ include your HAL commands here.
# Put custom HAL commands in custom_postgui.hal
# The commands in this file are run after the GUI loads
# **** Setup of spindle speed display using pyvcp -START ****
net spindle-vel-cmd-rpm-abs => pyvcp.spindle-speed
#prisavky s materialom
net appc halui.mdi-command-10 pyvcp.appc
net ap halui.mdi-command-12 pyvcp.ap
net am halui.mdi-command-13 pyvcp.am
net nul halui.mdi-command-14 pyvcp.nul
########################## FILE SAVER ###################################
#
loadusr -W paramsaver f=3 s=1 b=0 filename=memory_pins onstart=1 onexit=1
net material_in pyvcp.mat => paramsaver.invalueF-000
net material_out pyvcp.spinbox.0.param_pin <= paramsaver.outvalueF-000
net podlozka_in pyvcp.pris => paramsaver.invalueF-001
net podlozka_out pyvcp.spinbox.1.param_pin <= paramsaver.outvalueF-001
############################### Memory tool #########################################
net tool_number_in iocontrol.0.tool-number => paramsaver.invalueS-000
net tool_number_out ?????????????????? <= paramsaver.outvalueS-000
net writetrigger motion.digital-out-03 paramsaver.writetrigger
net readtrigger motion.digital-out-04 paramsaver.readtrigger
########################## FILE SAVER END ###################################
.......
Please Log in to join the conversation.
6 years 9 months ago #154666
by jurod
Replied by jurod on topic Saving parameters after shut down
Please help me. Some example, link, reference, anythink.
Please Log in to join the conversation.
6 years 9 months ago #154833
by andypugh
Replied by andypugh on topic Saving parameters after shut down
What problem do you have?
ie: What do you do, what happens, how is that different from what you expected to happen?
ie: What do you do, what happens, how is that different from what you expected to happen?
Please Log in to join the conversation.
6 years 9 months ago #154996
by jurod
Replied by jurod on topic Saving parameters after shut down
I have problem with paramsaver, his syntax. Not worked.
But now i have progress with the paramsaver.
This works:
In custom hal:
loadusr -W paramsaver f=3 s=0 b=0 filename=memory_pins onstart=1 onexit=0 (onexit=0 it has to be)
net tool_number_in motion.analog-out-04 => paramsaver.invalueF-002
net tool_number_out <= paramsaver.outvalueF-002
net writetrigger motion.digital-out-03 paramsaver.writetrigger
net readtrigger motion.digital-out-04 paramsaver.readtrigger
in INI:
MDI_COMMAND=M120 M61 Q[#<_hal[tool_number_out]>]
REMAP=G88.1 modalgroup=1 ngc=g881 (The program that is called on the last calibrated axis)
The program:
o<g881> sub
M61 q#<_hal[tool_number_out]>
o<g881> endsub [1]
m2
Thanks.
But now i have progress with the paramsaver.
This works:
In custom hal:
loadusr -W paramsaver f=3 s=0 b=0 filename=memory_pins onstart=1 onexit=0 (onexit=0 it has to be)
net tool_number_in motion.analog-out-04 => paramsaver.invalueF-002
net tool_number_out <= paramsaver.outvalueF-002
net writetrigger motion.digital-out-03 paramsaver.writetrigger
net readtrigger motion.digital-out-04 paramsaver.readtrigger
in INI:
MDI_COMMAND=M120 M61 Q[#<_hal[tool_number_out]>]
REMAP=G88.1 modalgroup=1 ngc=g881 (The program that is called on the last calibrated axis)
The program:
o<g881> sub
M61 q#<_hal[tool_number_out]>
o<g881> endsub [1]
m2
Thanks.
Please Log in to join the conversation.
5 years 10 months ago #193170
by jurod
Replied by jurod on topic Saving parameters after shut down
Hi
Problem with "paramsaver" in version 2.8.0
For version 2.7.14 in the terminal compile command "halcompile --install --userspace /home/hcnc/linuxcnc/paramsaver.c" looks like this:
Extract from the terminal:
Works OK on my config machine,
but for version 2.8.0 in the terminal compile command "halcompile --install --userspace /home/hcnc/linuxcnc/paramsaver.c" looks like this:
Extract from the terminal:
this no works. The paramsaver component was not created.
From the terminal LinuxCNC Errors:
I have already installed "build-essential" and "linuxcnc-dev"
Where is the problem? Please help.
Problem with "paramsaver" in version 2.8.0
For version 2.7.14 in the terminal compile command "halcompile --install --userspace /home/hcnc/linuxcnc/paramsaver.c" looks like this:
Extract from the terminal:
Code:
root@H61M-C:/home/hcnc# halcompile --install --userspace /home/hcnc/linuxcnc/paramsaver.c
gcc -Os -g -I. -I/usr/realtime-3.4-9-rtai-686-pae/include -I. -I/usr/realtime-3.4-9-rtai-686-pae/include -I/usr/include/i386-linux-gnu -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -fno-math-errno -funsafe-math-optimizations -fno-rounding-math -fno-signaling-nans -fcx-limited-range -mhard-float -DRTAI=3 -fno-fast-math -mieee-fp -fno-unsafe-math-optimizations -DRTAPI -D_GNU_SOURCE -Drealtime -D__MODULE__ -I/usr/include/linuxcnc -Wframe-larger-than=2560 -URTAPI -U__MODULE__ -DULAPI -Os -o paramsaver /tmp/tmpgNP5a4/paramsaver.c -Wl,-rpath,/lib -L/lib -llinuxcnchal
root@H61M-C:/home/hcnc#
Works OK on my config machine,
but for version 2.8.0 in the terminal compile command "halcompile --install --userspace /home/hcnc/linuxcnc/paramsaver.c" looks like this:
Extract from the terminal:
Code:
root@E8400:/home/hcnc# halcompile --compile --userspace /home/hcnc/linuxcnc/paramsaver.c
gcc -I/usr/include -I/usr/include/linuxcnc -URTAPI -U__MODULE__ -DULAPI -Os -o paramsaver /tmp/tmpAzSwbK/paramsaver.c -Wl,-rpath,/lib -L/lib -llinuxcnchal
root@E8400:/home/hcnc#
From the terminal LinuxCNC Errors:
Code:
File "/usr/bin/paramsaver", line 3
paramsaver component
^
SyntaxError: invalid syntax
pyvcp_options.hal:13: waitpid failed paramsaver paramsaver
pyvcp_options.hal:13: paramsaver exited without becoming ready
3626
3679
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime
I have already installed "build-essential" and "linuxcnc-dev"
Where is the problem? Please help.
Please Log in to join the conversation.
- tommylight
-
- Away
- Administrator
-
Less
More
- Posts: 22012
- Thank you received: 3
5 years 10 months ago #193181
by tommylight
Replied by tommylight on topic Saving parameters after shut down
Well for one you are using ROOT on a Linux box, and that is never a good idea, from security standpoint and from the issues that arise with software that is made to run as a normal user with limited privileges, access to files and folders, etc.jurod wrote: Where is the problem? Please help.
Please Log in to join the conversation.
5 years 10 months ago #193194
by phillc54
The second command only compiles the component it does not install it. You need to use the first command to install the component.
Edit:
linuxcnc.org/docs/html/hal/comp.html#_compiling
Replied by phillc54 on topic Saving parameters after shut down
jurod wrote:
Works OK on my config machineCode:halcompile --install --userspace /home/hcnc/linuxcnc/paramsaver.c
this no works. The paramsaver component was not created.Code:halcompile --compile --userspace /home/hcnc/linuxcnc/paramsaver.c
The second command only compiles the component it does not install it. You need to use the first command to install the component.
Edit:
linuxcnc.org/docs/html/hal/comp.html#_compiling
Please Log in to join the conversation.
5 years 10 months ago #193195
by jurod
Replied by jurod on topic Saving parameters after shut down
BOOM!!!!! I'm stupid. I didn't notice the difference written --install and --compile. Thanks.
It's already working.
It's already working.
Please Log in to join the conversation.
5 years 10 months ago #193471
by andypugh
Replied by andypugh on topic Saving parameters after shut down
I have been keeping this in my inbox to get back to.
Glad that I didn't need to.
But I will point out that you should probably have saved the file as "paramsaver.comp" and used halcompile --install paramsaver.comp
You don't say if you pre-processed to a C file, but I assume so. There is no need.
The .comp file has the keywords to declare that it is userspace.
Glad that I didn't need to.
But I will point out that you should probably have saved the file as "paramsaver.comp" and used halcompile --install paramsaver.comp
You don't say if you pre-processed to a C file, but I assume so. There is no need.
The .comp file has the keywords to declare that it is userspace.
Please Log in to join the conversation.
5 years 5 months ago #207799
by jurod
Replied by jurod on topic Saving parameters after shut down
Hi, I have a problem again. After a clean installation 2.8.1 i can't install paramsaver correctly.
From terminal>
Paramsaver is not in the machine configuration.
I did the installation:
BUSTER
sudo apt-get install build-essential
linuxcnc-uspace-dev
linuxcnc-uspace-dbgsym
EDIT: solved
From terminal>
Code:
hcnc@DH61SA:~$ sudo halcompile --install --userspace /home/hcnc/linuxcnc/paramsaver.c
gcc -I/usr/include -I/usr/include/linuxcnc -URTAPI -U__MODULE__ -DULAPI -Os -o paramsaver /tmp/tmpbF1yoR/paramsaver.c -Wl,-rpath,/lib -L/lib -llinuxcnchal
I did the installation:
BUSTER
sudo apt-get install build-essential
linuxcnc-uspace-dev
linuxcnc-uspace-dbgsym
EDIT: solved
Please Log in to join the conversation.
Time to create page: 0.105 seconds
