Hello Guest it is March 28, 2024, 01:29:52 PM

Author Topic: Draft Mach3 v3.x Programmers Reference Manual  (Read 27652 times)

0 Members and 1 Guest are viewing this topic.

Re: Draft Mach3 v3.x Programmers Reference Manual
« Reply #20 on: August 01, 2010, 12:43:00 AM »
Hi,

My current licensed version of Mach3 is Version R3.042.038.

I've downloaded and viewed all drafts of the V3.x Prog Ref from v0.11 through June 2010's v0.18 and I must say all these versions are identical for the following sections GetDRO(), GetOEMDRO(), SetDRO() and SetOEMDRO() , but they among these they seem to be contradictory with what forum post discussions say about them.  Some clarifications would be greatly appreciated.

The manual states GetDRO and SetDRO are deprecated and to be superseded by GetOEMDRO and SetOEMDRO.  I've been using the SetDRO code variant successfully with the following syntax "Call SetDRO( 0, .5)" to set the X axis DRO from someone's example.
My understanding from more experienced Mach3 VB authors is that "SetOEMDRO(800, .5) is the equivalent form, or 801 for Y-axis, 802 for z-axis.

However, examples in all versions of the draft manual give examples one way for GetDRO, no example for GetOEMDRO and one way for SetDRO and another SetOEMDRO.  And the Get vs. Set in both variants seem to be reversed.

Do these not have the same syntax format? 

Doesn't SetOEMDRO expect the DRO argument to be 800, 801, 802, 803, etc.?

I ask because I've been trying to update my VB script to use SetOEMDRO instead of SetDRO, I've tried it with and without the "Call" prefix, and I experience error beeps when I hit the SetOEMDRO, and sometimes the value written is off by 20-30 ten-thousandths (and I'm using Sleep 100 statements following it).

So, what is the REAL deal?

Thanks

airnocker

Everything depends on everything else

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Draft Mach3 v3.x Programmers Reference Manual
« Reply #21 on: August 01, 2010, 07:10:07 AM »
The manual appears to have the examples for SetDRO and SetOEMDro mixed up.

For SetOEMDRO and Get OEMDRO, use the numbers in the Wiki. 800, 801, 802.....

http://www.machsupport.com/MachCustomizeWiki/index.php?title=OEM_DROs
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Draft Mach3 v3.x Programmers Reference Manual
« Reply #22 on: August 01, 2010, 12:46:56 PM »
FYI - As I have access to the Programmer's manual, I have taken the liberty to edit the relevant sections of the manual to clarify this topic.

The new revision (0.21) It will be included with the next MSM beta release. When that is ready, I'll also send the revision to Scott so he can update the version linked to from the download page.

Dave
Author of the MachStdMill Extensions for Mach3
www.CalypsoVentures.com
Re: Draft Mach3 v3.x Programmers Reference Manual
« Reply #23 on: August 01, 2010, 02:45:52 PM »
Thanks Dave and Gerry!
airnocker

Everything depends on everything else
Re: Draft Mach3 v3.x Programmers Reference Manual
« Reply #24 on: August 01, 2010, 07:12:43 PM »
I found a bug in GetOEMDRO() but maybe it has already been reported.  Also found an odd one in the handling of "MsgBox" and variable results on the first GetOEMDRO() depending on the Sleep duration  (Sleep 100 is not long enough for the first GetOEMDRO.)

1.  Open the attached "TestSetOEMDRO.m1s" file in VB Editor and run it first as is.  Note all the Sleep durations are 1000.
2.  The first GetOEMDRO() value is very interesting don't you think.  See attached screenshot GetOEM Error.jpg
3.  then compare it to the GetOEMError2.jpg screenshot.  GetOEMDRO value bug occurs if you set the DRO to an all zero value.  It isn't handling the first 4 decimal places correctly but reports the 0.00003813065 value as 3.813065...e-009.
4.  as long as the value set is none zero, e.g. 0.0001, or 0.0010 then GetOEMDRO reports correctly.
5.  now make changes to the Sleep duration, go down to 100, then up to 200.  The first GetOEMDRO doesn't have enough time it appears and instead reports the last reported DRO value but the subsequent GetOEMDRO calls seem fine.

MsgBox refresh handling oddity.  See attached GetOEMDRO Error2.jpg for an example.
Now, when a MsgBox is displaying, drag it to one side a little or a lot, then click it's OK button.

Cheers,

airnocker

Everything depends on everything else
Re: Draft Mach3 v3.x Programmers Reference Manual
« Reply #25 on: August 01, 2010, 08:48:12 PM »
You need to tell us what version of mach you ran the script on...
Dave
Author of the MachStdMill Extensions for Mach3
www.CalypsoVentures.com
Re: Draft Mach3 v3.x Programmers Reference Manual
« Reply #26 on: August 01, 2010, 09:13:37 PM »
I did, at the very beginning of this discussion  :), Version R3.042.038.
airnocker

Everything depends on everything else

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Draft Mach3 v3.x Programmers Reference Manual
« Reply #27 on: August 01, 2010, 09:24:40 PM »
I just tested your first Macro and it looks fine. BUT I have seen what you are seeing before. Have you tried shutting down MACH and the computer and do a cold reboot? IF that fixes it fine if NOT,

Try reloading your backup of the XML. NOT the autosave version but the original XML.You did save that right(;-)

You may have a corrupt XML

Just a thought,(;-)
Re: Draft Mach3 v3.x Programmers Reference Manual
« Reply #28 on: August 01, 2010, 11:22:04 PM »
Thanks BR549.  The cold boot had no affect.  So I reverted to my original XML and all those disparities I mentioned vanished, including the screen echoing when the MsgBox was moved on the screen.

I noticed that GetOEMDRO now returned only whole numbers, e.g. "2" rather than "2.0000".  So is that as designed?

Once again, rescued by BR549!



airnocker

Everything depends on everything else

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Draft Mach3 v3.x Programmers Reference Manual
« Reply #29 on: August 02, 2010, 08:36:49 PM »
Well NO it is not normal But that is another story.  Just make sure you keep an original XML handy if you need it. DO NOT depend on the autosave version. IF you need to do an update to config as soon as you do the update save off anew copy. I date them so I know what is what.

Just a thought, but it works for me.