Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: jimpinder on November 13, 2009, 04:10:54 AM
-
I have written a program to re-profile railway wheels which involves a short G Code program and a Vis Basic macro. The program takes about half an hour or so to run.
I would like to be able to have an "indicator" to tell me where in the program the machine is.
I have tried using the message line - but I can't include variables in the text of the line - e.g. Code "(Pass Number PassNum) to show on the message line. I have tried sending a number to a User DRO, but when I regen the display, or start the code, the Vis Basic executes right through and indicates the final position on the DRO - not really what I wanted.
I have a FOR/NEXT loop in the macro - and all I really wanted to do was it to indicate which number loop it was actually cutting.
-
Hi Jim,
you can have something like this in a macro
Graham
Dim a As Integer
For a = 1 To 100
message("line " & Str(a))
code "g01 g91 x10. f100."
While ismoving()
Wend
Next
-
You *can* put variables on the message line. Use Message(), rather than writing a G-code comment. For example:
Pass = Pass + 1
Message("On Pass " & Pass)
Regards,
Ray L.
-
Thanks guys - My thanks message didn't register yesterday, or again today, so I have switched to "Opera".
Yes, I stumbled across "Message" in the wikki, I haven't tried it yet, but I will. I see Graham agrees I will have to use the "While Is Moving" line. I didn't really want to, but I can't see any alternative. At least I have got round to having my labels on the various DRO's changing according to their function in a particular program. Before I had to remember them all.