Hello Guest it is May 26, 2019, 01:41:54 AM

Author Topic: doubt Macros VBScript  (Read 490 times)

0 Members and 1 Guest are viewing this topic.

doubt Macros VBScript
« on: July 25, 2018, 02:28:00 AM »
Hello goodnight. I am writing to you because I want to learn to do macros in VBScript mainly to be able to do AutoToolZero.

I've been reading and researching programming using Cypress Basic (CB). What I've been reading about is that it has Dros functions, Button Commands and Leds functions. I was also reading the manual of Macro Programmers Reference Manual 2010 but I do not understand it very well.

Noce how to use this type of commands to program, I would greatly appreciate if someone could explain how it works, or put an example explained, a manual or book explaining all this.

This is an example that comes in the manual Mach3 Version 3.x Macro Programmers Reference Manual :

‘ Define the axes C
Const XaxisMultiFunctionOEMDRONum = 800
Const YaxisMultiFunctionOEMDRONum = 801
Const ZaxisMultiFunctionOEMDRONum = 802
‘ Write 1.2345 to Z axis DRO using SetOEMDRO
SetOEMDRO(ZaxisMultiFunctionDRONum, 1.2345) 
‘ Show the user the Z Axis DRO value, using
GetOEMDRO()
MsgBox “After using SetOEMDRO() the Z Axis DRO reads: “ & GetOEMDRO(ZaxisMultiFunctionDRONum)

I have no idea that it is stating with the constants and that it is equal to 800,801 and 802. I hope that someone can help me to understand how these commands work.

I attach the manual that I am using to learn
Re: doubt Macros VBScript
« Reply #2 on: July 26, 2018, 01:33:49 AM »
Thank you very much Tweakie.CNC for the links that you passed me, I understood a little more when I was reading the second link, I was already practicing with the GetScale and SetScale to get familiar with this type of programming.

But I still do not understand very well what it means OEM DROs, OEM Buttons, SetOEMDRO and GetOEMDRO. How can they be used in a program made in a VBScript?

Offline Tweakie.CNC

*
  • *
  •  7,765 7,765
  • Super Kitty
    • View Profile
    • Tweakie.CNC
Re: doubt Macros VBScript
« Reply #3 on: July 26, 2018, 01:54:43 AM »
There is explanation and working examples in the Customising Mach2 manual;  http://www.machsupport.com/wp-content/uploads/2013/02/Mach2_6.11_Custom.pdf

Tweakie.
Success consists of going from failure to failure without loss of enthusiasm.  Winston Churchill.
Re: doubt Macros VBScript
« Reply #4 on: July 27, 2018, 02:11:55 AM »
Thank you very much Tweakie.CNC, what I have read from the last manual that you had very well explained to me, I already had a lot of time looking for books, manuals on that subject but I had not found anything, now I'm just going to study and read that manual to be able to understand you more to the macros and again thanks for the information