Hello Guest it is May 07, 2024, 04:18:54 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - TPS

261
General Mach Discussion / Re: Arduino - Mach 3 - Gcode M6 T0101
« on: March 29, 2022, 12:01:09 PM »
ok, i see you will use modbus for communication with your Arduino, than you can forget about the code sample
i posted. this will only work as a simple serial interface without modbus framing.

for modbus you have to set up modbus in Mach3 and the used In/Out registers.

262
General Mach Discussion / Re: Arduino - Mach 3 - Gcode M6 T0101
« on: March 29, 2022, 02:18:02 AM »
the code of the posted example:

https://www.machsupport.com/forum/index.php?action=dlattach;topic=1658.0;attach=1174

will send a small string via SendFifo() witch is an undocumented Mach3 VB script function.
this string will contain: 

StartSign (Hex 1E) + toolnumber + CR (Hex 0D)

witch "gives" the Adrduino a minimum chance to check the received data for validity.
than it will wait for a response (Hex B6) to know that Arduino has "understand" the order.

sorry but can not "assist" on Arduino side.

263
General Mach Discussion / Re: Arduino - Mach 3 - Gcode M6 T0101
« on: March 28, 2022, 12:05:15 PM »
might be interesting:

https://www.machsupport.com/forum/index.php?topic=1658.0

but the question is why using a arduino to control the ATC. IHMO there can be nothing on a ATC
what Mach3 can not control itselve via a VB Script.

264
Machscreen Screen Designer / Re: Box Joint Wizard
« on: March 25, 2022, 03:19:03 AM »
ok, let's say you place a dro for example OEMDro(1250) to your screen.
then you put a transparent button over this DRO and this will excecute the VB Script.
the code for this button would be:

Code: [Select]
Sub Main
Call NumericKeyboard(1250,0,999)

End Sub


#Expand "c:\Mach3\macros\Mach3Mill\numerickeyboard" 



with this you should be able to enter a value into DRO 1250

the you place a normal button also with VBscript to do the entire move code:

Code: [Select]
  Code "G1 Z" &GetOEMDRO(1250) &" F200"
and thats it.

265
i think a good start would be to studdy some manuals:

https://www.machsupport.com/wp-content/uploads/2013/02/Mach3_V3.x_Macro_Prog_Ref.pdf
https://www.machsupport.com/wp-content/uploads/2013/02/VBScript_Commands.pdf

a simple search in the forum for M6Start macro will bring up a lot of sample script's and a lot of
samples to copy and paste.

266
brains will not be the way you are looking for. if your Arduino wil accept ModBus you can find a lot about modbus
here on the forum. also a complete sample for modbus arduino communication is in the modbus aeria.

https://www.machsupport.com/forum/index.php?topic=21105.0

for a simple serial output you can use VBScript.

from the manual:

SendSerial
Sub SendSerial(Data As String)
This function send the String Data to the serial port specified in the Config-
>GeneralConfig serial port configuration. This provides transmit-only capability, at any
supported BAUD rate.
Arguments:
String message to be sent to configured serial device
Return Value:
None
Example:
‘ Send “Hello, world!” to serial device
SendSerial(“Hello, world!” & chr(10) & char(13))
See also:

267
VB and the development of wizards / Re: M6Start macro problem
« on: March 23, 2022, 04:45:28 AM »
just for a simple test

Code: [Select]
  Code "G53 G0 Z-50"
  While IsMoving()
  Wend
  Code "G53 G0 Z-100"
  While IsMoving()
  Wend

i have used code like this in many of my macros

268
VB and the development of wizards / Re: M6Start macro problem
« on: March 23, 2022, 03:56:02 AM »
if you use the >|| Button in VBScripter it usually can not stuck in this line, it allways should jump into the
Sub.

you can try to use the Call keyword:
Code: [Select]
call ZtoChPosition ' Z axe to tool change position <<<--- HERE MACRO STUCK

maybe it help's, never heared about such a problem

269
VB and the development of wizards / Re: M6Start macro problem
« on: March 23, 2022, 02:45:13 AM »
tested your code here, no problem.
try to run it in VBScripter window to see where it stucks excactly.

btw.
Code: [Select]
code("G53 G00 Z"& ToolZlockPos & "F" & ATCFEEDRATE)

a feedrate does not make sense with a G0, but it should not matter.

270
VB and the development of wizards / Re: M6Start macro problem
« on: March 22, 2022, 01:11:08 PM »
without the seeing the code it will be hard to help.