Hello Guest it is May 11, 2024, 09:26:07 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Cbyrdtopper

231
Mach4 General Discussion / Re: Mill Profile Initialisation String
« on: July 10, 2019, 09:00:56 AM »
Does this happen the first time you press enable?
On a lathe in the shop, I get the first instance of the Enable, it is a Core/inst register "cmdEnable" if that is == to 1 then I run a function that will set the current tool in the turret and then set the cmdEnable to 2 that way it doesn't loop the function endlessly.   
You may be able to do this to set your desired work offset.

232
Andygraphy,
It looks like you're using the Lathe profile, the colors from mill to lathe are different.
Will the axis move it you command them to from MDI?

233
Mach4 General Discussion / Re: Mach closing randomly 4162
« on: July 10, 2019, 08:47:46 AM »
Steve, the error checking is just the mc.mcsignalwait that I'm using; just to be sure the pneumatic cylinders extend properly.
I'm not formatting any strings in my code; so I don't have to worry about that aspect of the LUA code right now.

I will change my locals to a table.  How would I use them after that?

local vars = {
    Alarm = mc.mcSignalGetHandle(inst, mc.OSIG_ALARM)
    POTUp = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT12)
    POTDown = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT13)
    CurrentTool = mc.mcToolGetCurrent(inst)
}

mc.mcSignalSetState(Vars.POTDown, 0)
mc.mcSignalSetState(Vars.POTUp, 1)

Is this correct above?

234
Mach4 General Discussion / Re: Mach closing randomly 4162
« on: July 09, 2019, 01:59:05 PM »
I downloaded 4162 on my work computer and adjusted my m6 macro to not have the error check in it.  I am able to run through the macro several times and I've had no issues.
I added buttons on the screen that do the same thing as my trouble shooting buttons, excluding the Error check as well.

Does the new LUA version do something different with the error checking?  So far that has been the only difference in this test vs the machine.

235
Mach4 General Discussion / Re: Mach closing randomly 4162
« on: July 08, 2019, 03:07:35 PM »
Here is the m6 and a button script

236
Mach4 General Discussion / Mach closing randomly 4162
« on: July 08, 2019, 02:26:00 PM »
Mach4 is closing randomly whenever I run scripts. 
I originally thought the issue was with my m6 macro, but I was testing the position of my tool carousel and kept cycling the POT up and down with trouble shooting buttons on the screen that will run a small chunk of code to turn on an output and check for an input and Mach4 closed on me when I was pushing these buttons.

It was suggested that I make sure the code is still compatible with the new version of LUA, I looked through the code and found no errors and it worked several times before Mach4 just closes; same with the m6 macro, I ran a couple of tool changes with no issues, then randomly it will close.

237
Once I get back from Church camp next week, I'll go through the macros and be sure they are compatible with the new version of lua.

238
Does it do something to the file when it conpiles them?   It ran them fine in 3804 and it will run them in 4162, A-side from Mach closing randomly.   I'm having the problem when I relaod 3804.  Now it's like my macros are missing from the folder.   
Specifically the error message says tge mclua.MCC file is missing.

239
I reconfigured the 4162 profile and everything started working fine.
However, when I run a tool change, it will (almost everytime) close mach4.  No warning or anything, mach4 just closes.
I tried to go back to V3804 and when I run ANY macro, it says the mclua.mcc file does not exist.  I put the backup mclua file in the macros folder and it didn't help.
Any idea why this is happening?

240
Mach4 General Discussion / Re: Mach4 5 Axis RTCP
« on: June 27, 2019, 09:35:35 AM »
I don't think Mach4 has kinematics yet.