Hello Guest it is December 01, 2021, 02:56:17 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.

Topics - Tony Bullard

Pages: 1 2 3 4 »
PoKeys / Pokey57CNC Pendent signals
« on: June 05, 2021, 07:45:55 AM »
Before I set the pendent up I'd like to know if there is a way to change the value the Jog Step Increment signals.
I'd like to use the "Step x0.001" signal to have a value of 0.0001. Does the "Step x0.001" signal represent the Control General Config Jog Increment Position 4 or is it in the Pokeys code?

Thanks for any help.

I updated to version from Now I can't load screens. I get this message:

Mach4gui Error
Unexpected Exception has occurred: bad allocation, the program will terminate.

I switched back to .4300 and all is well. Any help would be appreciated.


Mach4 General Discussion / G31 not working in screen function
« on: December 17, 2020, 09:51:44 AM »
Mach4Lathe: When G31 G01 X-.20 F5 is called from the MDI the machine stops at the probe strike as it should.

I have this function in the screen load script and it is called from a button press.
Code: [Select]
function TestG31()
local inst = mc.mcGetInstance()
mc.mcCntlGcodeExecute(inst, "G31 G01 X-.20 F5")
It doesn’t stop at the probe strike but finishes as a G01 X-.20 command. I eventually would like this code in the RefAllHome() function to stop on an encoder Index pulse.
Any help with this would be appreciated.

Mach4 General Discussion / Mach4 Lathe Home with limit and encoder index
« on: December 06, 2020, 07:56:27 AM »
I have encoders with index pulse on the lead screws and X and Z limit switches. I would like to home on the limit switches then move off to the first index pulse using a probing call, mc.mcCntlGcodeExecute(inst, "G31.3 X-.5000 f2"), near the end of the refAllHome function.

There is no Probe, Probe1 or Probe2 Signals under the Control Configuration Input Signals. There is Digitizing, and Probe3 through Probe9. The G31 doesn’t work even in the MDI with a probe signal from a push button for test and a LED assigned Input Signal = probe3. The LED lights but the motion doesn’t stop until G31.3 finishes. At that point the X, Z and A probe # variables are updated.

Any help with this would be appreciated. Also is the a different or better way to do this?

Mach4 General Discussion / How to run functions in macros
« on: February 04, 2020, 11:03:45 AM »
I have this function in my Screen Load Script:
function SetSigState (sig,state)
      local hSig = mc.mcSignalGetHandle (inst,sig)
      mc.mcSignalSetState (hSig,state)

It works like this in signal and button scripts:

--Example: local state = GetSigState(mc.OSIG_OUTPUT1)
       SetSigState(mc.OSIG_OUTPUT1, 1)  --turns on output 1
     Or    SetSigState(mc.ISIG_INPUT1, 0) set input 1 off

This is M code m111:
function m111()
   local inst=mc.mcGetInstance()
   mc.mcCntlSetLastError(inst, 'Test m111')
   SetSigState(mc.OSIG_OUTPUT2, 0)
if (mc.mcInEditor() == 1) then

When I run it in the debugger I get the following error:

Debugging session started in 'C:\Mach4Hobby\Profiles\TBtest\Macros\'.
m111.mcs:6: attempt to call a nil value (global 'SetSigState')
stack traceback:
   m111.mcs:6: in function 'm111'
   m111.mcs:9: in main chunk
Debugging session completed (traced 6 instructions).
Program completed in 19.11 seconds (pid: 3412).

Any help would be appreciated. Thanks, Tony

Mach4 General Discussion / Motion Device Grounding
« on: December 31, 2019, 03:58:57 PM »
I’m using a PoKeys57CNC Ethernet CNC motion controller and a PoKeys57E Ethernet I/O device powered by a 12 volt isolated power supply. That is the 12 volt common (Vo) is not connected to machine or earth ground. I will not be using any input signals that connect to machine ground like some probes do. Is it best to ground  it anyway or let it float which would reduce the risk of ground loops?
Thanks for any help,


Mach4 General Discussion / msvcp140.dll missing
« on: December 28, 2019, 09:08:38 AM »
Macros will not run in the Edit/Debug scripts editor. This is the error message: Attached

The file does appear to be in the Mach4 folder. See attached.

I’m using Mach4 version build 4300 Windows 7 64 bit. I’ve reinstalled Mach4 to no avail. Any help would be appreciated.
Thank you,

PoKeys / Mach4 Pokeys57Ecnc Encoder speed
« on: May 19, 2019, 09:28:54 AM »
Three fast encoders input pairs are available and can handle quadrature signal frequencies to about 100 kHz. Their raw value is held in registers. How can I in real time compare pulses to a time base to get a speed? Or how can I get the frequency? Is there another Pokeys plug-in That has this option?

Thanks for any help.

Mach4 General Discussion / Mach4 Timer Script
« on: April 30, 2019, 10:31:01 AM »
I’d like to have a timer start and stop a lub pump after an hour of spindle on time. That would be an accumulated time of spindle on and off time. The scr.StartTimer(#,Time,oneshot) starts the event after the time has expired. The scr.StopTimer(#) seems to cancel the timer before the event. I’d like to start and then pause the timer and then restart. The scr.RestartTimer(#) doesn’t seem to have any effect on the timer. How Is the RestartTimer supposed to work? Thanks for any help.

Mach4 General Discussion / Mach4 Timer Script Error
« on: April 25, 2019, 03:56:45 PM »
I’d like to set up some Mach4 timers to control a lub pump.
I believe I’ve followed Daz’s tutorial https://www.youtube.com/watch?v=wNPMqjkcJ_8 correctly. I’ve set the Mach4 Timer Script, Screen Load Script and a Button Script. This is the code.
Code: [Select]
--Timer Script:

if timer == 0 then
elseif timer == 1 then
elseif timer == 2 then
elseif timer == 3 then
elseif timer == 4 then
elseif timer == 5 then
elseif timer == 6 then
elseif timer == 7 then
elseif timer == 8 then
elseif timer == 9 then
mc.mcCntlSetLastError(inst, 'Timer out of range')

--add  TB 04-24-19
--Screen Load Script
function timer0()   --This timer is called from "Test 2" button
wx.wxMessageBox("Hello From timer 0")

--Button Script:

This is the error I get when the timer runs. Any suggestions as how to fix the error? Thanks for any help

Pages: 1 2 3 4 »