Mach3 macro: How to create a dialogue form?
ฝัง
- เผยแพร่เมื่อ 27 ส.ค. 2020
- How to capture the user input data when a macro is running using mach3 predefined function AskTextQuestion(). Here is the code (see also • How to create a new us... ):
'Assume that cutter position is at XYZ(0,0,25)
'Probe position is at XY(100, 20)
'Move cutter to probe position
'Code "G0 X100 Y20" 'We will replace this line
'using mach3 predefined AskTestQuestion() to receive data from
'user when macro is running
Probe_X = AskTextQuestion("Enter Probe position X: ")
Probe_Y = AskTextQuestion("Enter Probe position Y: ")
Code "G0 X"& Probe_X &" Y" & Probe_Y
'We need to enter these lines
While IsMoving() 'ensure previous command is completed
Wend
answer = MachMsg("Press enter to continue", "M779: User enter data", 0)
'G31 fast moving
Code "G31 Z-10 F200"
While IsMoving()
Wend
answer = MachMsg("End of G31 fast moving", "M779 Auto Tool Zero", 0)
'G31 slow moving
z = GetOEMDRO(802) 'get current Z coordinate value
Code "G0 Z" &(z+1) 'move back 1mm
Code "G31 Z-10 F25"
While IsMoving()
Wend
answer = MachMsg("End of G31 slow moving", "M779 Auto Tool Zero", 0)
'Set zero
SetOEMDRO(802, 0) '802 hold Z coordinate value
'End
Hi sir am Vijay from India. I have mach3 controlled CNC Lathe.But mach3 software doesn't support # G71-Turning cycle. I need #G71 or custom macros for that code function.Can you arrange that marco i will ready to purchase that.. Kindly give me the positive response.
Hay algun curso dsde cero?
Sorry we do not provide it at the moment.