Hello Guest it is April 25, 2024, 10:19:28 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 - DazTheGas

291
Mach4 General Discussion / Re: Lua success with external buttons to Mach4
« on: January 22, 2017, 06:04:01 PM »
Not as straight forward, now if they used the resolution of 4096 that would be too simple!! but instead here`s an extract from the manual.

Quote
you should see the value change from 0 to 1 as you turn the potentiometer. Value of 0 equals to a voltage of 0 V, while the value of 1 equals to voltage of +3.3 V on the analog input pin


DazTheGas

292
Mach4 General Discussion / Re: Help with my profile
« on: January 22, 2017, 11:26:22 AM »
One of the firsts things you need to do is a little upgrade, but first backup your old so you have a reference to your current settings

Install latest version of mach4 if not already done,
after loading mach4 use a copy of the wx4 screenset (you have the very very old wxmach loaded)
update the ESS plugin to the latesr v193 (you have v186) http://warp9td.com/index.php/kunena/7-general-discussion/5843-ess-mach4-build-193


DazTheGas

293
Mach4 General Discussion / Re: Lua
« on: January 22, 2017, 07:29:02 AM »
How very odd, ive just read the pokey`s manual and the analog is a value between 0v and 3.3v so I will have to redo the table to reflect this as the value its picking up is 0 so thinking you want only 50%

Take no notice of the screenset name thats just purely a name.

Quote
which in my case is “Analog pin 42”
that is the name of the register, if you look above this then you will have the controller name too, (take a look at page 32 of the pokeys manual at 2 pics at top)

Code: [Select]
local hreg = mc.mcRegGetHandle(inst, string.format("NAME OF CONTROLLER", "Analog pin 42"))
I will redo the table and repost.

PS what nag do you have in the PLC??

DazTheGas


294
Mach4 General Discussion / Re: Preload-Tool Macro
« on: January 21, 2017, 05:15:44 PM »
Theres also a setting in the mach config under the tools tab that changes between m6 being tool in use or next tool to use.

DazTheGas

295
Mach4 General Discussion / Re: M4,ESS and Limit/Home issues
« on: January 21, 2017, 09:18:43 AM »
First things I would check is wether you have set the polarity correct between the limit being High/Low then if no luck use the noise filter on about 1000, if this works then keep halving that amount until it happens again then up it a bit.

DazTheGas

296
Mach4 General Discussion / Re: Need help getting started Mach4
« on: January 21, 2017, 04:46:44 AM »
OOOppps TYPO ALERT

mc.mcGetInstance is a function and is missing the () at the end, so should of been mc.mcGetInstance() - although if this is in the screen load script then it is already declared at the beginning.

I also noticed I had`nt ended any of the if statements, so heres the same code without the typo`s

Code: [Select]
--------------------------------------------
----Cycle Start buttons on MachMate
--------------------------------------------
local inst = mc.mcGetInstance()

SigLib = {
[mc.ISIG_INPUT1] = function (state)
    if (state == 1) then   
        mc.mcCntlCycleStart(inst)
    end
end,

---------------------------------------------
----Feed Hold Buttons on MachMate
----------------------------------------------
[mc.ISIG_INPUT2] = function (state)
    if (state == 1) then   
        mc.mcCntlFeedHold(inst)
    end
end,

[mc.ISIG_INPUT3] = function (state)
     if (state == 1) then   
        -- do something
     end
end,

[mc.ISIG_INPUT4] = function (state)
    if (state == 1) then   
        -- do something
    end
end,

[mc.ISIG_INPUT5] = function (state)
    if (state == 1) then   
        -- do something
    end
end
} -- etc.............................

DazTheGas

297
Mach4 General Discussion / Re: High GPU usage workaround
« on: January 20, 2017, 07:02:51 PM »
Just copied and pasted into V3233 and ran fine

DazTheGas

298
Mach4 General Discussion / Re: Switching to Mach4 hobby from chilipeppr
« on: January 20, 2017, 02:26:39 PM »
And choccy biccies ;-)

299
Mach4 General Discussion / Re: Need help getting started Mach4
« on: January 20, 2017, 02:25:36 PM »
You seem to be doubling up the function, try cutting down too

Code: [Select]
--------------------------------------------
----Cycle Start buttons on MachMate
--------------------------------------------
local inst = mc.mcGetInstance

SigLib = {
[mc.ISIG_INPUT1] = function (state)
     if (state == 1) then   
        mc.mcCntlCycleStart(inst)
end,

---------------------------------------------
----Feed Hold Buttons on MachMate
----------------------------------------------
[mc.ISIG_INPUT2] = function (state)
     if (state == 1) then   
        mc.mcCntlFeedHold(inst)
end,

[mc.ISIG_INPUT3] = function (state)
     if (state == 1) then   
        -- do something
end,

[mc.ISIG_INPUT4] = function (state)
     if (state == 1) then   
        -- do something
end,

[mc.ISIG_INPUT5] = function (state)
     if (state == 1) then   
        -- do something
end
} -- etc.............................

DazTheGas

300
Mach4 General Discussion / Re: High GPU usage workaround
« on: January 20, 2017, 01:47:35 PM »
Sorry Mauri, got your email but just incase others wanted to know too, you can find the code here

http://www.machsupport.com/forum/index.php/topic,30928.0.html

DazTheGas