Hello Guest it is April 23, 2024, 06:59:39 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 »
31
Mach4 General Discussion / Re: mcAxisGetInfoStruct
« on: June 18, 2018, 08:06:38 PM »
mcAxisGetInfoStruct returns a table.

This is how I would get work and machine coords in lua.

Code: [Select]
local inst = mc.mcGetInstance()

local val, rc = mc.mcAxisGetPos(inst, mc.X_AXIS)

local xInfo, rc = mc.mcAxisGetInfoStruct(inst, mc.X_AXIS)

local xMpos = xInfo.Mpos --Machine position in user units.



unfortunately though, if the machine is not enabled then you get a -16 error saying the AXIS does not exist. I'd prefer to use the structure myself since I get both work and machine coords.

32
Mach4 General Discussion / Re: Wireless USB MPG Pendant Handwheel
« on: June 17, 2018, 03:04:12 AM »
There have been several versions of a plugin for Mach4 and the XHC WB04 controller. I'm working on one currently as well. Mine will not require a driver at all. Just plugin the dongle and my plugin finds it and connects. Right now it's very much a work in progress though.  I have alot of functions working, some well, some not so well. mpg is not working yet as I haven't spent alot of time on it yet.  Within a couple of weeks I will have it working good enough for a release. Currently I have the plugin, with a config dialog for entering the macro's in, a diag window for viewing the data being transmitted. One issue I've found is that the device will goto sleep on you. until you move a dial or push a button it will stay sleeping.

33
Mach4 General Discussion / Re: mcAxisGetInfoStruct
« on: June 16, 2018, 08:22:29 PM »
part of the issue here is that if Mach4 is not in an enabled state, this function returns -16.  Not sure how to work around this, since I need to access the DRO position's in order to update my pendant display. This is because the state of the DRO's is saved and reloaded at Mach4 restart. The DRO's should be available at any time you request it. Setting them would be another story.

34
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.

35
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.

36
Mach4 General Discussion / Re: mcRegGetHandle
« on: October 27, 2016, 08:34:58 AM »
Registers can only be created by plugins which are registered to the core and created in a config state, you could use the regfile plugin and create some registers for your scripts to use.

This would not allow a script author to distribute his script. I'm not likely to ever come to Australia to create the registers you would need in your regfile plugin in order to use my script. Although I wouldn't mind a free trip.


Quote
Another possibility is to use the mcProfile commands to create a key on the fly and then delete the key after use.

DazTheGas

This is possible, but not as user friendly. I basically want to avoid all that crap needed to create a wx window for configuring something. the Reg plugin seemed like a perfect place to create a user friendly, user accessible place to store script variable which can be modified.

37
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.

38
Mach4 General Discussion / Re: Line Tracing using Mach 4
« on: August 27, 2016, 04:25:58 PM »
at a guess, something like this would have to be a plugin. have a look at scanything from SheetCam. This looks like it does exactly what you want, but with Mach3 not Mach4

39
Mach4 General Discussion / Re: Line Tracing using Mach 4
« on: August 27, 2016, 12:57:36 PM »
another thing is that scanners are not very large. scanning a 4ftx8ft drawing would be interesting. I'm sure they make scanners that large, but they would be cost prohibitive for a hobbyist. Another thing is that, the item would now be in vector format.

40
Mach4 General Discussion / Re: Unable to complete RefAllAxisHome
« on: August 25, 2016, 08:43:38 AM »
it was thanks to your statement about axis 5 that got me thinking. I started looking at the soft limits first, but thought I'd take a look at the axis map and noticed the 5th in there enabled.

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