Hello Guest it is May 19, 2025, 12:25:55 AM

Author Topic: PASS STRING OR MESSAGE FROM GCODE TO VB MACRO  (Read 1728 times)

0 Members and 1 Guest are viewing this topic.

PASS STRING OR MESSAGE FROM GCODE TO VB MACRO
« 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.

Offline Graham Waterworth

*
  • *
  •  2,782 2,782
  • Yorkshire Dales, England
Re: PASS STRING OR MESSAGE FROM GCODE TO VB MACRO
« Reply #1 on: February 18, 2025, 08:25:12 PM »
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

 
« Last Edit: February 18, 2025, 08:28:42 PM by Graham Waterworth »
Without engineers the world stops
Re: PASS STRING OR MESSAGE FROM GCODE TO VB MACRO
« Reply #2 on: February 19, 2025, 03:12:32 AM »
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"
Re: PASS STRING OR MESSAGE FROM GCODE TO VB MACRO
« Reply #3 on: April 21, 2025, 01:47:58 AM »
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.