Hello Guest it is May 10, 2024, 12:25:33 PM

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 - Bill_O

221
striplar,

You might look at the Vital Systems controllers.
They can use a secondary encoder input.

Bill

222
Mach4 General Discussion / Re: Trouble using scr Library
« on: March 19, 2021, 03:50:10 PM »
I think you will need to put something in the PLC Script.

223
Mach4 General Discussion / Re: Strange tangential knife movement
« on: March 19, 2021, 03:39:40 PM »
Tweekie,

Thanks.
I will try it.

224
Mach4 General Discussion / Strange tangential knife movement
« on: March 18, 2021, 01:51:49 PM »
I have 2 files that did not work correctly.
E Knife does a 360 degree turn while it is still moving and in the material at the point indicated in the picture.
I removed a point in that area for E Knife 2 and the tangential knife does not turn at all.
Mach4 version 4517
ESS version 260

225
Mach4 General Discussion / Re: auto soft limits again
« on: February 23, 2021, 05:28:24 PM »
cd_edwards,

I did something similar depending on if they  Referenced the machine.
If they did Reference the machine soft limits are active if they did not the soft limits are inactive.
Good job on the code.

Bill

226
Mach4 General Discussion / Re: auto soft limits again
« on: February 23, 2021, 05:22:11 PM »
Brian and Totally,

I understand what you are saying but I personally want to know how to do this stuff in Lua.
I am sure some things can not be done in PMC.

Bill

227
Mach4 General Discussion / Re: Read DRO from Lua
« on: February 22, 2021, 08:57:07 AM »
Kent,

This might help.
Use the version from 6_22_2020 towards the bottom.

https://www.machsupport.com/forum/index.php?topic=43260.msg279695#msg279695

Bill

228
Mach4 General Discussion / Re: edit screen
« on: February 19, 2021, 04:41:04 PM »
Steve,

I thought so but just wanted verification.
Thanks,

Bill

229
Mach4 General Discussion / edit screen
« on: February 19, 2021, 03:04:16 PM »
If I edit the screen (some of the code in the Screen Load script) are the changes all in the screen?
So if I replace any other machines screen will they have the new script?
 

230
Mach4 General Discussion / Re: service timer
« on: February 05, 2021, 09:14:07 AM »
Here is what I use.
You need to make a couple of registers also.

In PLC
-------------------------------------------------------
--  Cycle time label update
-------------------------------------------------------
--Requires a static text box named "CycleTime" on the screen
if (machEnabled == 1) then
   local running = mc.mcCntlIsInCycle(inst)
   if (running == 1) then
      local cycletime = mc.mcCntlGetRunTime(inst, time)
      scr.SetProperty("CycleTime", "Label", SecondsToTime(cycletime))
   
      --run time
      local hRun = mc.mcRegGetHandle(inst, 'iRegs0/RunningTime')
      RunTime = cycletime
      mc.mcRegSetValue(hRun, RunTime)
   
   end
end


In PLC First Run section
---------------------------------------------------------   
   --Pop up message for maintenance
   --Keep at bottom
   ---------------------------------------------------------      
   local MaintReg = mc.mcRegGetHandle(inst, 'iRegs0/MaintTime')
   local MaintRegVal = mc.mcRegGetValue(MaintReg)
   if (MaintRegVal >= 144000) then
      mc.mcRegSetValue(MaintReg, 0.0)
      wx.wxMessageBox("Please perform maintenance")
   end



In the Cycle Start function in Screen Load Script
         --Set time on Maintenance timer
         local hMaint = mc.mcRegGetHandle(inst, 'iRegs0/MaintTime')
         local MaintTime = mc.mcRegGetValue(hMaint)
         local hRunning = mc.mcRegGetHandle(inst, 'iRegs0/RunningTime')
         local RunningTime = mc.mcRegGetValue(hRunning)
         MaintTime = (MaintTime + RunningTime)
         mc.mcRegSetValue(hMaint, MaintTime)
         mc.mcRegSetValue(hRunning, 0.0)