Hello Guest it is March 28, 2024, 04:32:45 AM

Author Topic: Keeping informed on Vis Basic  (Read 2975 times)

0 Members and 1 Guest are viewing this topic.

Offline jimpinder

*
  •  1,232 1,232
  • Wakefield, West Yorks, UK
    • View Profile
Keeping informed on Vis Basic
« 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.
Not me driving the engine - I'm better looking.

Offline Graham Waterworth

*
  • *
  •  2,668 2,668
  • Yorkshire Dales, England
    • View Profile
Re: Keeping informed on Vis Basic
« Reply #1 on: November 13, 2009, 09:51:49 AM »
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  
« Last Edit: November 13, 2009, 12:21:04 PM by Graham Waterworth »
Without engineers the world stops
Re: Keeping informed on Vis Basic
« Reply #2 on: November 13, 2009, 10:21:51 AM »
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.
Regards,
Ray L.

Offline jimpinder

*
  •  1,232 1,232
  • Wakefield, West Yorks, UK
    • View Profile
Re: Keeping informed on Vis Basic
« Reply #3 on: November 16, 2009, 05:26:13 AM »
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.
Not me driving the engine - I'm better looking.