Hello Guest it is June 28, 2022, 01:57:03 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 - cd_edwards

Pages: 1 2 »
1
Mach4 General Discussion / wine
« on: May 24, 2021, 04:18:53 PM »
Not sure if this actually works or not as my machine is not running at the moment. I also don't think it's a great idea for production however, god dammmn.

2
Mach4 General Discussion / Reading SDK CHM file
« on: December 22, 2018, 09:22:12 AM »
Here's something I came across that has always confused me. Every version of the sdk has had a compiled HTML SDK document which has all the functions in it. On my system at least, it was always blank when I checked out a function in the file. I discovered that in the properties tab of the file (right click it). there is a check box to Unblock it due to it being compiled on another computer and you have a readable document finally. It's only been 3 years before I found this :/

3
Mach4 General Discussion / mcMasterModule question
« on: June 28, 2018, 03:07:19 PM »
does the following even work? I added the rc variables to find out where the problem was. mc.mcRegGetHandle returns a -27 which causes mc.mcRegSetValueString to return -27.
#define MERROR_REG_NOT_FOUND        -27

function Master.LoadRegister(ini, name)
   local val, rc = mc.mcProfileGetString(inst , tostring(ini), name, "0.000")
   local hreg, rc = mc.mcRegGetHandle(inst, string.format("iRegs0/%s", name))
   rc = mc.mcRegSetValueString(hreg, val)
   return tonumber(val)
end

I've been trying to gain access to the scr.* properties. in particular some DRO's I've created for use in the m6() macro.
I added the following to my m6 startup.

if (package.loaded.scr == nil) then
   scr = require "screenipc"
   scr.scIpcInit("127.0.0.1")
end

scr.GetProperty("droSafeZ", "Value") always returns "" even though I've set it earlier to a value of 0.75 using scr.SetProperty("droSafeZ", "Value", tostring(num))

I have two functions.. I've modified mcMasterModule.lua's LoadRegister function so it returns the numeric value of the register.

function LoadAll()
{
   SafeZ = mcp.LoadRegister(N_, "SafeZ", "0.00")
        scr.SetProperty("droSafeZ", "Value", tostring(SafeZ))
}

function SaveAll()
{
    val = scr.GetProperty("droSafeZ", "Value")
    mcp.SaveRegister(N_, "SafeZ", val)
}

if (mc.mcInEditor() == 1) then
     LoadAll2016()
     SaveAll2016()
end

4
Mach4 General Discussion / XHC WB04 4 axis controller
« on: June 21, 2018, 03:42:37 PM »
I have just uploaded a plugin for the WB04 4 axis controller to the plugins. If you have one of these please check it out.
I'll eventually fix all the bugs.  :o


https://www.machsupport.com/forum/index.php/topic,37581.0.html

5
Mach4 Plugins / XHC WB04 plugin
« on: June 21, 2018, 03:40:07 PM »
Here is a plugin for the XHC  WB04 4 axis controller. Thanks to Brian Barker I was able to decipher his code and make this plugin with my own spagetti code. (I hate c++).
Most things are working. Anything that is not, will eventually be fixed.

Colten Edwards
CE Signs

6
Mach4 General Discussion / mcAxisGetInfoStruct
« on: June 16, 2018, 04:13:22 PM »

        axis = Y_AXIS;
   rc = mcAxisGetInfoStruct(xh->mInst, axis, &ainf);
   if (rc)
      send_to_diag("mcAxisGetInfoStruct returned an error");

this is always returning -16 which is axis not found. I'm using the Sim plugin for a motion controller. Doesn't seem to matter what I send as an axis though, they all return -16.
xh->mInst is 0 and the structure is axisinfo_t. I'm using this function to gain access to  both Work coordinate's and machine coordinates.
I'm using build 3805 of Mach4. This is C++ code, not lua as i'm writing a plugin.

7
Mach4 General Discussion / peck drilling
« on: June 05, 2017, 08:39:53 PM »
just a question about peck drilling. I decided to use mach4 for it's first job this weekend. created the job in aspire using the 2010 screenset post. loaded the file into mach4 and got everything setup. when i ran the file some strange behaviour was observed. After the first hole which seemed to go ok, the bit did not pickup out of the material and instead stayed at a depth in the material this cut a long line across the material quite deep, until the bit broke. (aluminum with 1/8 carbide upcut spiral). I then switched over to mach3 used the same file and it worked exactly as it should have.

So is peck drilling implemented in mach4 or the ESS driver?

On another topic, it's nice that keyboard input is now made to switch on/off with program focus. what's not nice is that keyboard input and button input do not react the same when changing modes to incremental/continous. keyboard seems to stay in continous whereas button control follows the mode of the incremental button. definitely was not expecting a full size movement when I was expecting 0.01" of movement.

8
Mach4 General Discussion / mcRegGetHandle
« on: October 26, 2016, 11:45:39 PM »
function SetRegister(regname, val)
 local inst = mc.mcGetInstance()
 local hreg = mc.mcRegGetHandle(inst, string.format("iRegs0/%s", regname))
 mc.mcRegSetValueString(hreg, val)
 if (debug_scp == 1) then
    mc.mcCntlSetLastError(inst, "regname = " .. regname .. "val = " .. val)
 end
end

I'm attempting to use registers to store script values. This has the effect of having human readable names for variables in a script instead of #var's.
The function above should work and does if there are values already in register "regname". I would like my script to be able to initialize the Register variables and this is proving impossible to implement as the mc.mcRegGetHandle() will not create a variable. it will only return an already existing variable handle. I've looked all over and see no function for creating a Register variable from lua.

or else I'm missing something.

9
Mach4 General Discussion / Compiling Sim
« on: August 24, 2016, 11:16:09 AM »
What version of VC was used to compile Sim? I have vc10 installed and when I attempted to compile it failed with a bunch of undefined error message. I'm at work right now, but I will send in the error log after work.. got wxwidgets compiled and I think I have the header's installed in the correct places since there were no error's so far concerning that.

10
Mach4 General Discussion / Unable to complete RefAllAxisHome
« on: August 22, 2016, 10:08:04 PM »
For some reason Reference All Axis Home has quit working. When I reference all, each axis does it thing. You can see that they all turn green. But it will not complete. I have to Disable Mach4 at  which point I get a msg about referencing is complete, however this also de-references all axis's. My Y axis is slaved to my A axis, with home switches on each side. These switches each have a separate input. X and Z each have a switch as well. In my history, I see that X, Y and Z each home, but without that disable, it will not go any further.. Anyone have any idea's on what to try? Btw, I've only setup home switches and no limit switches to make it simpler in the config.

Just discovered that if I click Stop, it will complete referencing and keep it. Still should not have todo this though.

Pages: 1 2 »