Hello Guest it is April 26, 2024, 07:52:48 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 - cd_edwards

Pages: « 1 2 3 4 5 6 7 8 9 10 »
21
Mach4 General Discussion / Re: mcMasterModule question
« on: June 28, 2018, 03:37:50 PM »
btw Master.LoadRegister is part of the mcMasterModule.lua file which is supposed to be an example.

22
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

23
Mach4 Plugins / Re: XHC WB04 plugin
« on: June 25, 2018, 02:42:27 AM »
Quote
Maybe XHC will send me a sample of the WB03 and one of there newer devices so support can be added.. hint hint.

I think you may have to ask.  ;)

Tel: +86-028-81701768  Fax: +86-028-81705368
Mob/What's App: +86-13568946750
Email: xhctech-alex@hotmail.com
Skype: alex86he

Tweakie.

Can't hurt to ask.
Thanks for the info.

24
Mach4 Plugins / Re: XHC WB04 plugin
« on: June 25, 2018, 02:07:05 AM »
I've been updating and improving the plugin. currently I have the home button and safe-z buttons displaying the proper icon's when invoked. They also follow the buttons in Mach4 so everything is nicely in sync. Maybe XHC will send me a sample of the WB03 and one of there newer devices so support can be added.. hint hint.

25
Mach4 General Discussion / Re: My new screenset (and thanks to all)
« on: June 25, 2018, 02:02:24 AM »
good work. I started todo this as well. I got to a certain point and then had to quit due to RL situations.


26
Mach4 General Discussion / Re: Wireless USB MPG Pendant Handwheel
« on: June 21, 2018, 04:41:14 PM »
2.4G CNC 3 axis wireless hand wheel MPG remote controller MACH3
 http://s.aliexpress.com/2Mja2Ujm?fromSns
Driver I just uploaded is for this exact model of XHC HB04. I have one of these albatrosses.

27
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

28
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

29
Mach4 General Discussion / Re: mcAxisGetInfoStruct
« on: June 19, 2018, 09:14:55 AM »
that would have been an issue for sure. I was going by the .chm helpfile. This looks definitely like it should have returned what i needed. but I have what I need now, so I'm good on this issue. Now I just need to find out why I never get a MSG_HOME_AXIS or a MSG_DREF_AXIS

   double Pos;             // Position in user units.
   double Mpos;            // Machine position in user units.

30
Mach4 General Discussion / Re: mcAxisGetInfoStruct
« on: June 18, 2018, 08:33:10 PM »
it's possible. but then mcAxisGetMachinePos and mcAxisGetPos shouldn't work either then.

I have it working now with the above two functions.. I just would have prefered the other way for cleanliness

Pages: « 1 2 3 4 5 6 7 8 9 10 »