Machsupport Forum
Mach Discussion => Mach4 General Discussion => Topic started by: stevehuck on August 22, 2021, 04:38:48 PM
-
Trying to add a cycle start button. Found an old thread telling how to edit the file to make the button work. I do the edits and get an error trying to save. Access error, cannot save file. I have not registered the Mach4 yet as the docs say to get everything working first. Could that be stopping me from a save. I do start the program in administrator mode. Any ideas as to why I would not be allowed to save a script?
-
Trying to add a cycle start button. Found an old thread telling how to edit the file to make the button work. I do the edits and get an error trying to save. Access error, cannot save file. I have not registered the Mach4 yet as the docs say to get everything working first. Could that be stopping me from a save. I do start the program in administrator mode. Any ideas as to why I would not be allowed to save a script?
No idea what are you doing and not save, not have something with not registered. Only thing i did was:
Add button
Add at left up script CycleStart()
Save script and close
Save screen and exit edit
Load gcode and mouse click on new button
-
I added a physical button in the control panel door. Then I mapped it thru the ESS and in mach4. If I go to the diagnostic screen and press the button the light for input0 lights. I read on the forum that the screen load file needs to be edited to associate the input0 button press with a cycle start to make the button work. I found the example in the file rem'd out. I made the changes to the script and when I tried to save the script I was denied.
-
I added a physical button in the control panel door. Then I mapped it thru the ESS and in mach4. If I go to the diagnostic screen and press the button the light for input0 lights. I read on the forum that the screen load file needs to be edited to associate the input0 button press with a cycle start to make the button work. I found the example in the file rem'd out. I made the changes to the script and when I tried to save the script I was denied.
This is something different..
At screen load script add or edit an already that is not used like this:
[mc.ISIG_INPUT0] = function (state)
if (state == 1) then
CycleStart()
end
end,
If you show the code you try to change it would be better to find the error, lua language is not forgiving about grammar errors.
-
You ARE editing the screen load script in the screen editor, correct? Not trying to edit some LUA file outside Mach4?
If so, just add a comment line somewhere, like:
--Comment to test
Save. Can you save?
-
[mc.ISIG_INPUT0] = funtion (state)
if (state == 1) then
cyclestart()
else
mc.mcCntlFeedHold (0)
end
end
This is what I believe the UnRemmed version would be based on my needs. I could be wrong I am used to VB script.
Yes I am editing inside of mach4 with the editor by clicking the "operator" tab and then "open script editor".
No I cannot save. tried at least half a dozen times
-
[mc.ISIG_INPUT0] = funtion (state)
if (state == 1) then
cyclestart()
else
mc.mcCntlFeedHold (0)
end
end
This is what I believe the UnRemmed version would be based on my needs. I could be wrong I am used to VB script.
At the second "end" must have a "," if is not the last.
end
end,
The "cyclestart()" need to be with capital c "Cyclestart() "
-
Here is the code I tried and the error I get trying to save
-
Yes I am editing inside of mach4 with the editor by clicking the "operator" tab and then "open script editor".
No I cannot save. tried at least half a dozen times
Now i see it, no don't use "open script editor". Just go in "operator" and "edit screen" option.
Then you select the first selection at left and go to load script.
-
Check the picture
-
I assume I should change mine to match yours?
-
I assume I should change mine to match yours?
Right of "Screen load Script" where says "pageid=0" if you click once with the mouse will get some "..." click there and will open the editor of load script.
There you will make the changes you want
-
That did the trick! Cycle start button is working.
Here is what I ended up with.
[mc.ISIG_INPUT0] = funtion (state)
if (state == 1) then
Cyclestart()
end
end
Thank you for taking the time to help. Much appreciated. Now I have a few other things to fix and I will be able to start making parts!!
-
That did the trick! Cycle start button is working.
Here is what I ended up with.
[mc.ISIG_INPUT0] = funtion (state)
if (state == 1) then
Cyclestart()
end
end
Thank you for taking the time to help. Much appreciated. Now I have a few other things to fix and I will be able to start making parts!!
No problem, wish you the best!