Saving parameters after shut down

More
09 Jan 2020 20:25 #154481 by jurod
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 ###################################

net a-plus pyvcp.aplus motion.digital-out-01
net a-minus pyvcp.aminus motion.digital-out-02
net a-nula pyvcp.anula motion.digital-out-00

# pomocne suradnice
net pos-x pyvcp.iks
net pos-y pyvcp.yps

#vymena nastroja v spinboxe
net tool halui.mdi-command-11 pyvcp.tool

# **** Setup of spindle speed display using pyvcp -END ****



My change.ngc:


o<change> sub

o100 if [#<_current_tool> EQ #<_selected_tool>] (safe, pri zvoleni nastroja, ktory uz je vo vretene)
G43
o<vymena> endsub [1]
M2
o100 endif

M5
M9
G12.5
G53 G0 Z0
G53 G0 Y200
(DEBUG,VYMEN NASTRJ C. #<_selected_tool>)
...
...
...

M68 E #<_ini[pins]writetool> Q#<_selected_pocket>

M64 P3
G4 P0.5
M65 P3
M64 P4
G4 P0.5
M65 P4


#<TEMP> = #<_hal[pyvcp.mat]> + #<_hal[pyvcp.pris]>] *[-1
G10 L20 P0 Z[276.9 -#5403 +[#<TEMP>] ]

G54
G43
G64 P0.001
M199
o<change> endsub [1]
M2


My gcod G88.1 cool ngc. on start AXIS:

o<g881> sub
M61 Q#<_hal[paramsaver.outvalueS-001]> g43
o<g881> endsub [1]
m2

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

More
12 Jan 2020 09:13 #154666 by jurod
Please help me. Some example, link, reference, anythink.

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

More
14 Jan 2020 17:09 #154833 by andypugh
What problem do you have?

ie: What do you do, what happens, how is that different from what you expected to happen?

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

More
16 Jan 2020 06:45 #154996 by jurod
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

Change:
o<vymena> sub
o100 if [#<_current_tool> EQ #<_selected_tool>]
o<vymena> endsub [1]
M2
o100 endif

M5
M9
G12.5
G53 G0 Z0
G53 G0 Y200
...
...
...
(without tool)
(DEBUG,VYMEN NASTRJ C. #<_selected_tool>)
M68 E4 Q0
M64 P3
G4 P1.2 (must be min 1.2)
M65 P3
M64 P4
G4 P1.2 (must be min 1.2)
M65 P4
...
...
...
(with tool)
M68 E4 Q#<_selected_tool> ;zapise do premennej "memory_pins.sav" nastroj c. "selected tool"
;E4 je pripojene v pyvcp_options.hal (net tool_number_in motion.analog-out-04 => paramsaver.invalueF-002)
M64 P3
G4 P1.2 (must be min 1.2)
M65 P3
M64 P4
G4 P1.2 (must be min 1.2)
M65 P4
...
...
...
G54
G43
G64 P0.001
M199
o<vymena> endsub [1]
M2


Thanks.

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

Time to create page: 0.105 seconds
Powered by Kunena Forum