Hello
Guest
it is
May 12, 2025, 04:16:46 PM
Guest
Login
Register
Menu
Home
Help
Search
Login
Register
YouTube
Machsupport Forum
/
Mach Discussion
/
VB and the development of wizards
/
Log file?
« previous
next »
Print
Pages:
1
Go Down
Author
Topic: Log file? (Read 8356 times)
0 Members and 1 Guest are viewing this topic.
Tarak
229
Log file?
«
on:
December 06, 2012, 11:19:53 PM »
Is it possible to output the current machine position into a log file every time a certain M code is ran?
So every time the M code is called it just adds X_ _ Y_ _ X_ _ into the log file.
I think something like this would be great for debugging some VB code.
Darc
Logged
BR549
6,965
Re: Log file?
«
Reply #1 on:
December 06, 2012, 11:33:16 PM »
YES
Open"C:/Mach3/DebugLOG.txt" For Append As #1
Print #1,"X: " & GetDro(0) &" Y: " & GetDro(1) &" Z: " & GetDro(2)
Close#1
END
Logged
Tarak
229
Re: Log file?
«
Reply #2 on:
December 10, 2012, 02:58:56 PM »
Oh nice, thanks, I'll give it a go!
Logged
Tarak
229
Re: Log file?
«
Reply #3 on:
December 10, 2012, 03:31:53 PM »
Thanks BR549, that works great, just on another note.
Is it possible to trim to 4 decimal places rather than 13?
Darc
Logged
BR549
6,965
Re: Log file?
«
Reply #4 on:
December 10, 2012, 08:44:39 PM »
That interesting as HERE that script writes it exactly like it is in the DROs same format.
What version are you running?
(;-) TP
Logged
BR549
6,965
Re: Log file?
«
Reply #5 on:
December 10, 2012, 08:49:31 PM »
Try This
Open"C:/Mach3/DebugLOG.txt" For Append As #1
Print #1,"X: " & Format(GetDro(0),"0000.0000") &" Y: " & Format(GetDro(1),"0000.0000") &" Z: " & Format(GetDro(2),"0000.0000")
Close#1
END
Logged
Tarak
229
Re: Log file?
«
Reply #6 on:
December 10, 2012, 10:05:15 PM »
Thanks BR549, that works great.
BTW, I'm running Version R3.043.066.
Logged
Print
Pages:
1
Go Up
« previous
next »