Hello Guest it is March 28, 2024, 11:30:29 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 - reuelt

251
Hi,

Quote
FACT: LUA language ALSO has the GETVAR() function.



Not according to:

https://www.lua.org/manual/5.2/

Craig

SETVAR() and GETVAR() are definable functions that can be defined in LUA.

http://lua-users.org/wiki/SetVariablesAndTablesWithFunction
 

252
General Mach Discussion / Re: Mill or Turn?
« on: April 15, 2019, 10:49:34 PM »
Mach3 TURN does not even have G96 (CSS) and G97 (to turn off CSS and go back to speed per rev).

253
"Are you aware that GETVAR(****) is a Visual Basic compliant statement?. Mach4 has absolutely nothing to do with Visual Basic.
The AutoZero macros supplied by NFS for Mach4 are all open source Lua macros."

FACT: LUA language ALSO has the GETVAR() function.
so does many other languages including C, java, python, autocad LISP etc..

I know LUA scripts because it ALSO came with (french) Harmony Assistant Notation software that I have had for over 10 years.
LUA is a Brazilian language !

254
General Mach Discussion / Re: Mill or Turn?
« on: April 15, 2019, 07:37:07 PM »
And also to add, CSS does not work in Mach3.

https://www.machsupport.com/forum/index.php?topic=25647.0
Myth BUSTED?

No, that proved it was not a myth and was indeed the case that CSS does not work in Mach 3. Spindle speed will vary at the correct rate/speed but the feed per rev does not stay constant. Mach basically changes to feed per minute when you start a CSS move and that only changes when you again command a different feedrate.
The macro attached at the end may work, can't recall if I tested it or not but Mach3 itself can not do true CSS.

So MACH4 turn (Hobby or just Industrial version ONLY?) has the G96 and G97 for Constant Surface Speed turning.
One more reason to go MACH4.

255
have WiXHC USB Motion card (controller)  to control stepper motors, which input sources do I use for this configuration.  configuration is power supply to Driver to controller using card output  X Axis, Y Axis and Z Axis, Just can't find the right combination for the Input Signals and Output Signals.

Thanks JT
XHC has only one series of USB motion controller design for MACH4 called MKX-M4.
Mk3-M4: 3-axis; Mk4-M4: 4-axis: Mk6-M4:

If you do not have one of MKX-M4, YOU cannot use MACH4.

If you have MKX-M4, it comes with a CD with not only its  plugin for MACH4 but also
std MACH4 config files  profiles - that WORKS straightaway.
They even give a custom macro for AUTO TOOL ZERO since SOME programmers in USA use "GETVAR(1001)" that can cause problems with their motion controller.

256
Just specify BEFORE you buy. They can put in MACH4 compatible motion controller...
(and NOT necessary only those made in China).
Or
Ask for the traditional "Parallel port version"
So you can connect WARP9 ESS or other Ethernet Motion Controller to the 25 pin port easily.

If you buy a machine with a "MACH3 USB controller" built-in you have to replace the motion controller card yourself and so VOID the warranty immediately.

LOOK before you leap.
Specify before you buy.

257

1) I was going to buy Mach4 but the supplier of my Router CNC 6040Z says that it supports only Mach3, is it true that Mach4 may be incompatible with a CNC router?


https://www.china-cncrouter.com/news/ChinaCNCzone-Latest-Mach4-CNC-6040-with-Mach4-USB-CNC-Controller.html
ChinaCNCZONE can supply MACH4 compatible 6040.
Their Website says:-
"And if you are familiar with mach4 hobby software and interested in the mach4 hobby cnc machine, Please kindly contact our sales."

Just specify BEFORE you buy. They can put in MACH4 compatible motion controller...


258
I have a few operations that I perform regularly on different parts. I would like to know if I can create a GCODE file to perform an operation then call that GCODE file.

Basically I create a hole for a countersunk 1/4" cap head bolt. Can I create a GCODE file that just creates this countersunk hole. Lets call the file BoltHole.NC

Then I have a file called CutPart.NC.

The in CutPart.NC can I call BoltHole.NC file? If so what would the command look like?

Mach allows a subprogram to be called from an external file. This way, multiple programs can call the same subprogram, without having the program in the main file. If a change needs to be made to the subprogram it only needs to be done in one file, not every file in which the sub is called. If the control does not find the program number in the current file it will then search for it in the Mach4\Subroutines directory. This time it will be searching filenames. The files in this directory should be named with the program number as follows:
Format: O____
Note the letter “O” followed by four numbers, and no file extension; O1234 not O1234.txt.
The file must end with M99.

Format: M98 P____ Q__ L__
P specifies the number of the program file to be called. This is a four digit integer number. When the M98 is read Mach scans the current file for a block containing the program number in the following form: Format: O1234


259

There is one thing you may be able to help me with. I have optioned all the buttons but I cant figure out how to option the controller to work the z axis touch probe. Any advice on how to get it working would be greatly appreciated.

Regards
Richard
Here is how I do it.
Operator | Edit button Script and select [Auto Tool Zero]

I have the following script there:
CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
CurrentAbsInc = GetOemLED(48) 'Get the current G90/G91 state
CurrentGmode = GetOemDRO(819) 'Get the current G0/G1 state

If GetOemLed (825)=0 Then 'Check to see if the probe is already grounded or faulty
DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
Code "G4 P3" ' this delay gives me time to get from computer to hold probe in place
Code "G90 G31Z-100. F100" 'probing move, can set the feed rate here as well as how far to move
While IsMoving() 'wait while it happens
Wend
ZProbePos = GetOEMDRO(85) 'get the exact point the probe was hit
Code "G0 Z" &ZProbePos 'go back to that point, always a very small amount of overrun
While IsMoving ()
Wend
Call SetDro (2, 19.8 ) ' change 19.8mm to your plate thickness and then adjust for final accuracy
Sleep 100 'Pause for Dro to update.
Code "G1 Z25. F200" 'put the Z retract height 25mm you want here, must be greater than the touch plate thickness
While IsMoving ()
Wend
Code "(Z axis is now zeroed)" 'puts this message in the status bar
Code "F" &CurrentFeed 'Returns to prior feed rate
Else
Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if applicable
End If
If CurrentAbsInc = 0 Then 'if G91 was in effect before then return to it
Code "G91"
End If
If CurrentGMode = 0 Then 'if G0 was in effect before then return to it
Code "G0"
End If   

Now I copy this script into a new custom Macro named M798.m1s full path C:\Mach3\macros\Mach3Mill\M798.m1s
Now I config |config plugin | xbox360.....
with the config as attached

Now the A button on the xbox controller is ALSO an [AUTO TOOL ZERO] button.

260
General Mach Discussion / Re: Strange Z zero problem
« on: April 15, 2019, 12:17:57 AM »
That makes no difference
In that case, there are many things to things to check in sequence order.
1. Mechanical - Check esp. motor to ball screw coupling. Is anything loose or broken. Are they well lubricated. Are shafts parallel?
2. Electrical - any dry joints or loose connection on the wiring from Break out board and drivers to the motors.  VERY COMMON!
3. is the ampereage and sub-step settings at the driver correct?
4. Mach3
4.1 Is pulse rate too high?
4.2 Is speed and acceleration set too high.
4.2 What is the step pulse and direction pulse too low. Try 15 and 15 to see if it makes any difference. Then decrease.
4.3 Have the z axis travel been calibrated?
4.4 Are there any entries in the tool table for radius and length compensation?
4.5 Are you using the Auto tool Zero probe to zero z axis?