Machsupport Forum
G-Code, CAD, and CAM => G-Code, CAD, and CAM discussions => Topic started by: Giuno85 on February 18, 2025, 03:23:06 AM
-
hello everyone,
I would like to know if it is possible to pass a string like a message written on the Gcode in VB macro to be able to process it with the macro language.
-
In most cases you call an M code to ask for the text.
Dim Name As String
Name = AskTextQuestion(“Please enter your name:”)
Message “Hello, “ & Name
It is also possible to use Param1(), Param2() & Param3() in an M code to read the P,Q & R value sent to the call e.g. M1234 P65 Q66 R67 the ASCII values of A,B & C
-
hi Graham thanks for the reply, that was what I was looking for, I tried to integrate it with the M6 code with a Q parameter and it works very well.
what I would like to do is insert from the M6 code in addition to the ut Number also diameter which at this point I call it Q and I would also like to insert Tool description but it is a string... and I don't know how to do it...
Reading your message I didn't understand what you mean with "the ASCII values of A,B & C"
-
You can handle messages from G-code by reading the G-code string in a VB macro, extracting the message, and writing the processing logic for it. This way, you can effectively deal with messages from G-code in a VB macro.