Hello Guest it is April 26, 2024, 02:29:34 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 - rhtuttle

221
Mach4 General Discussion / Re: pmdx411 cannot communicate with device
« on: February 28, 2019, 09:04:07 PM »
Steve, thanks but I am an electronics idiot.  The mc60 is 5 ft from the g540.  Does that make a difference?

I will google for what a choke is

Tia
RT

222
Mach4 General Discussion / Re: last line not executing
« on: February 28, 2019, 07:39:58 PM »
GCodeX0 = string.format("G92 X%.4f\n", zero)
mc.mcCntlGcodeExecuteWait(inst, GCodeX0)
GCodeY0 = string.format("G92 Y%.4f\n", zero)
mc.mcCntlGcodeExecuteWait(inst, GCodeY0)

--move material back to start position
GCodeXMov = "G01 X-7.0 F100.0"
mc.mcCntlGcodeExecuteWait(inst, GCodeXMov)

I believe the recommended way to do this is:

GCodeX0 = string.format("G92 X%.4f\n", zero)
GCodeY0 = string.format("G92 Y%.4f\n", zero)
GCodeXMov = "G01 X-7.0 F100.0\n"

local s=GCodeX0..GCodeY0..GCodeXMov
mc.mcCntlGCodeExecute(inst,s)
or
mc.mcCntlMdiExecute(inst,s)

HTH

RT


223
Mach4 General Discussion / Re: changing value in CurrentX dro
« on: February 28, 2019, 07:28:53 PM »
Make sure that the droCurrentX editor property is not still set as read only.  This was reported a year ago for the lathe screen set and wasn't changed the last time I downloaded a new version last fall.

Not sure what you are trying to do but I think you probably should be using mc.mcAxisSetPos(inst,mc.X_AXIS,10.3456) rather than changing screen  values.

Just my 2 cents worth

HTH

RT

224
Mach4 General Discussion / pmdx411 cannot communicate with device
« on: February 28, 2019, 07:15:17 PM »
Using pmdx411 - g540 and Mach4 lathe

Switched out my lathe spindle controller for a MC-60.

After about 10 seconds of run time at any speed the spindle stops.  G540 is still green and no disabling of Mach.  When I do hit the disable button, PMDX throws a 'Cannot communicate with device' message.  I have checked all three wires for continuity and connection status.  MC60 shows it is providing 11.32volts at the g540 vfd+ and vfd Ground connections.

I have it set up with manual switches to go from Mach controlled and manual potentiometer controlled and the MC60 runs the spindle smoothly for any speed and duration using the potentiometer. 

Any suggestions as to how I should proceed do to track this problem down?

TIA

RT


225
Mach4 General Discussion / Re: write to a register
« on: February 28, 2019, 10:15:11 AM »
Been working on hardware lately and not coding LUA.  Thanks for catching that.

226
General Mach Discussion / Spindle control - db25
« on: February 27, 2019, 03:58:36 PM »
Have been cleaning up my wiring that has accumulated over the years (limit switches, spindle tach, probe) by adding a db25 connector to my power/control box.  Really eliminates a lot of cords/cables.

I have plenty of pins left but was wondering whether it is okay/normal to use those for the VFD 10v+, Output and Ground on a Gecko g540?  Don't know anything about electrical limits.  Any help appreciated.

TIA

RT



227
Mach4 General Discussion / Re: write to a register
« on: February 27, 2019, 03:46:41 PM »
Sometimes it is pretty easy to get lost in coding and miss details.
EnScale is a variable but when you tried to set the 'iRegs0/EncScale' register you passed the string 'EncScale' not the variable EncScale

local mc.mcRegSetValue(hreg,'EncScale')<----the string
local mc.mcRegSetValue(hreg,EncScale) <----the variable value

which for safety sake:
local mc.mcRegSetValue(hreg,asnumber(EncScale'))




228
Mach4 General Discussion / Re: write to a register
« on: February 27, 2019, 10:46:21 AM »
did you test the value in EncScale that returned?  Was it a double?
Did you test the value returned to hReg, rc= mc.mcRegGetHandle(inst, 'iRegs0/EncScale')?
What value was returned by rc = mc.mcRegSetValue(hreg,'EncScale')

229
Mach4 General Discussion / Re: Connect to Mach4 using VS 2012 C++
« on: February 13, 2019, 02:31:17 PM »
The key word in the api document under "supported platforms" is the word "plugins".  The SDK is only available for those writing hardware plugins. (Correct me if I am wrong guys)/

I have coded in C, C++, pascal and object pascal.  Learning LUA is painful but if you are going to use Mach4 for anything beside running gcode you would benefit from giving it a t try.  I have attached a link that demonstrates how to connect to mach4 and call the API functions from object pascal.  You should be able to modify it for C++ 

https://www.machsupport.com/forum/index.php?topic=34259.msg237003#msg237003

HTH

RT

230
how high did you have to go get a visual?