Own "Start On Line" button do not work
I noticed that a button of its own has not been displayed for a long time.
At first I thought that I had forgotten it when I transferred it to the new computer.
Now I've checked and found that the code:
Code:
"cmd: "Machine.Advanced.Start_From_Selected_Line" image="ownicons/SL.svg" imagechange="True"
is present in the file. But the button is not shown in the GUI.
It works on the old computer with an older TNG v2 version.
Re: Own "Start On Line" button do not work
Correct name is "Machine.Start_Option.Start_From_Selected_Line "
(test09.py returns list of all implemented commands)
Re: Own "Start On Line" button do not work
any special reason why its missing the s from Start_Options ?
where can the test09.py file be found?
Re: Own "Start On Line" button do not work
test09.py is part of API, available here:
https://planet-cnc.com/wp-content/uploads/sw/PlanetCNC_API.zip
Re: Own "Start On Line" button do not work
And with which app should I start this file?
Code:
Traceback (most recent call last):
File "/Users/admin/Downloads/API 2/Python/test09.py", line 5, in <module>
import tng
ImportError: No module named tng
Re: Own "Start On Line" button do not work
I am currently looking for the correct syntax for the following button
Code:
cmd: "Machine.Motors,_Limits,_Probe.Motors_Enable" image="ownicons/MLP.svg" updown="_mybutton == 1" updatefast="true" imagechange="True"
Code:
cmd: "Machine.Motors,_Limits,_Probe.Soft_Limits_Enable" image="ownicons/MLP.svg" updown="_mybutton == 1" updatefast="true" imagechange="True"
Code:
cmd: "Machine.Motors,_Limits,_Probe.Hard_Limits_Enable" image="ownicons/MLP.svg" updown="_mybutton == 1" updatefast="true" imagechange="True"
1 Attachment(s)
Re: Own "Start On Line" button do not work
should be
Machine.Motors.Motors_Enable
Machine.Limits.Soft_Limits_Enable
Machine.Limits.Hard_Limits_Enable
according to output from test09.py
to run test09.py you need to have python installed on your pc. And you need to extract the complete archive and not only the test9.py
In addition I needed to change line 8 in tng.py to point to the full path of PlanetCNCLib64.dll
I changed it from
dll_name = "PlanetCNCLib64.dll"
to
dll_name = "C:/PlanetCNC/PlanetCNCLib64.dll"
where C:/PlanetCNC/ is my installation path of PlanetCNC
Somehow my python installation did not correctly include the path variable (Gave it a try with dll_path and the system path variable first with no success)
Output from test9.py is attached to this post for convenience.