Hello Guest it is April 27, 2024, 12:35:24 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.


Topics - Toshio.K

Pages: 1 2 3 »
1
Hello.
I initialized my PC.
I have a Mach4 license.
Please tell me how to reinstall Mch4 on my PC.
Thank you very much.

2
Mach4 General Discussion / About m6
« on: July 06, 2023, 01:38:52 AM »
Hello.
I used the following "m6" that was on YouTube, but I would like to adjust the "tool setter: H = 31 mm".
"I did some research on my own, but I didn't understand."
Please someone tell me the solution.

problem
Line 46 returns to the machine coordinates of line 11.
After this, I want to correct "tool setter: H = 31mm".

***************************
1   :   function m6()
2   :   local inst = mc.mcGetInstance() ;
3   :   
4   :    local currentTool = mc.mcToolGetCurrent(inst)
5   :    local selectedTool = mc.mcToolGetSelected(inst)
6   :    local posmode = mc.mcCntlGetPoundVar(inst, mc.SV_MOD_GROUP_3) --get the current mode so we can return to it when macro ends
7   :            
8   :     --Get positions before moving to do tool change
9   :    local valX, rc = mc.mcAxisGetMachinePos(inst, mc.X_AXIS) --Get the position of the X axis in Machine Position
10   :    local valY, rc = mc.mcAxisGetMachinePos(inst, mc.Y_AXIS) --Get the position of the Y axis in Machine Position
11   :    local valZ, rc = mc.mcAxisGetMachinePos(inst, mc.Z_AXIS) --Get the position of the Z axis in Machine Position
12   :   
13   :    if selectedTool == currentTool then
14   :     return
15   :     mc.mcCntlSetLastError(inst, "Current tool == Selected tool so there is nothing to do")
16   :    else
17   :    
18   :     mc.mcCntlGcodeExecute(inst, "G90 G53 G0 Z0.0");--Move the Z axis all the way up
19   :     mc.mcCntlGcodeExecute(inst, "G53 X10 y0");--Move the X axis to the middle and Y axis to the end and
20   :     mc.mcCntlSetLastError(inst, "Change to tool " .. tostring(selectedTool) .. " and press start to continue") --Message at beginning of tool change
21   :     mc.mcCntlToolChangeManual(inst, true) --This will pause the tool change here and wait for a press of cycle start to continue
22   :     mc.mcCntlGcodeExecute(inst, "G53 G01 X10 y10 f350");--Move the X axis and Y axis to the tool setter
23   :     --mc.mcCntlGcodeExecute(inst, "G53 G0 z-2")--Moves the z axis down 5 inches rapid
24   :   
25   :    mc.mcCntlGcodeExecute(inst, "g53 G31 z-4 f15")--Probes z axis to the tool setter
26   :     mc.mcCntlSetLastError(inst, "Current tool == " .. tostring(selectedTool) .. "   Previous Tool == " .. tostring(currentTool)) --Message that shows after Cycle Start
27   :     mc.mcToolSetCurrent(inst, selectedTool) --sets the current tool displayed in mach to the selected tool
28   :     --local probedzW = mc.mcAxisGetPos(inst, 2)  --This would give 0 axis (z on my machine) coordinates in work coordinate syste, ive shown it just for educational purposes
29   :     local probedz = mc.mcCntlGetPoundVar(inst, 5073) --this retreives the Saved varible of the z position (#5073) in machine coordinates and assigns it to the name probedz
30   :   local ToolLength =math.abs(probedz)  -- this calculates the value of the tool lenght by using a gage line off of my spindle to the tool setter.  uses the absolute value fuction
31   :     mc.mcCntlSetLastError(inst, "Tool Length" .. tostring(ToolLength))
32   :     mc.mcToolSetData(inst, mc.MTOOL_MILL_HEIGHT, selectedTool, ToolLength)  --- this sets the tool length value into the tool table into the selected tool position number, Note - i havent reassigned current tool varible so i have to use the "selectedTool" name
33   :     mc.mcCntlGcodeExecute(inst, "G04 p.5")
34   :     mc.mcCntlGcodeExecute(inst, "G90 G53 G1 Z0 F80") --Retract back to Z home
35   :    
36   :     local MyChoice = wx.wxMessageBox("Remove Probe Clip","Click OK to continue" , 16)  -- brings up a dialog box and waits for a selection to proceed
37   :    
38   :     if (MyChoice == 16) then  --16 is cancel
39   :         rc = mc.mcCntlSetLastError(inst, 'probing.') 
40   :    
41   :     return
42   :     elseif (MyChoice == 4) then
43   :    
44   :     mc.mcCntlGcodeExecute(inst, string.format('G ' .. posmode))--return to pre macro mode G90, or G91
45   :     mc.mcCntlGcodeExecute(inst, "G90 G53 G0 X" .. tonumber(valX) .. "Y" .. tonumber(valY)) --Move back to X & Y initial location
46   :     mc.mcCntlGcodeExecute(inst, "G90 G53 G0 Z" .. tonumber(valZ)) --Move back to Z initial location
47   :    
48   :     mc.mcCntlSetLastError(inst, "Tool Change Complete H ".. tostring(selectedTool) .. "   set to  ".. tostring(ToolLength).."  inches")
49   :   end
50   :   
51   :   if (mc.mcInEditor() == 1) then
52   :    m6()
53   :   end

3
Hello.
Even if you operate the right arrow on the keyboard and the control key at the same time, it does not move in increments.
Why?
If you know, please let me know.

4
I am using Mach4 Hobby DEMO.

There is a problem in "Probing Outside Corner".
The probe (G31.1) works as follows and does not measure.
I think it works like the Mach Support video "Probing Outside Corner Part 2 in probing".
URL:https://www.youtube.com/watch?v=ole5nCpsxlU
I think there is something wrong with the program.
Please tell me how to solve the problem.

・ Set all X, Y, and Z axes to "0".
・ Click Measure Corner
・ 20mm probe moves and stops.
・ "No contact with probe" is displayed.
* Probe does not move in the X direction.

5
Mach4 General Discussion / Windows 11?
« on: December 14, 2021, 02:37:59 AM »
Hello everyone.
Does Mach4 support Windows 11?

6
Hello.

To change the direction of rotation of the motor, in the case of Mach3, I checked Reversed.
What should I do with Mach4?

7
Hello everyone.

I am migrating from Mach3 to Mach4.
I don't know about the following points, so please tell me.

In Mach3, the rotation speed of the spindle is confirmed by the Hall IC (DN6851).
In that case, the [Ratio] of Mach3 is set to 2.

In the case of Mach4, should I set "FeedBack Ratio" to 2 as shown in the picture? ?? ?? ?? ??

8
Mach4 General Discussion / About RETRACT
« on: October 30, 2021, 02:18:22 AM »
It seems that a new function "RETRACT" will be added to Mach4.
Please give a brief explanation of this function.
https://www.youtube.com/watch?v=FiRpNI0jcSw
videohttps://www.youtube.com/watch?v=FiRpNI0jcSw

9
General Mach Discussion / how to run Ref All Home on the numeric keypad
« on: October 10, 2021, 06:26:51 PM »
Hello everyone.
I have a problem, so please let me know.

If you know how to run Ref All Home on the numeric keypad, please let me know.
Thanking you in advance.

10
Mach4 General Discussion / How to use USB camera with Mach4
« on: October 05, 2021, 05:28:13 AM »

I want to align the origin using a USB camera.
Therefore, I embedded the script below in the button (Orijin).
How are you doing?
Please tell me how.
-------------------------------------------------- -------------
--Camera Origin. Add2021.10.3
-------------------------------------------------- -------------
local inst = mc.mcGetInstance ()

mc.mcCntlGcodeExecute (inst, "G91 G0 Z0.0 \ n G0 Y1.7 \ n G0 X7 2.0")

Pages: 1 2 3 »