Hello Guest it is April 29, 2024, 02:33:55 AM

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 - HimyKabibble

1241
Scott,

Obviously, I would be really happy to see this.  I doubt I know enough to be useful (just dangerous....) but I'd be happy to proof-read and provide feedback.

Regards,
Ray L.

1242
General Mach Discussion / Re: VB Is Laughing At Me....
« on: March 23, 2009, 12:49:45 AM »
Terry,

   Thanks, it is all behaving now.  I've written a whole pile o'macros today, and all are now working fine.  I wrote nice, clean macros for doing edge, corner and center finding, and aligning a vise, or similar object, to the table, as well as one for re-mapping buttons on the ShuttlePro on-the-fly.

   I get the impression there was an intent there to re-think the macro interface, and make it more regular and consistent.  That would explain the User/OEM stuff.  But obviously only the interface was defined, with no supporting functionality, and the existing macros use a mish-mash of different methods of access.  There's a whole section in the "manual" listing deprecated functions, most of which are used in the macros that ship with Mach.

Regards,
Ray L.

1243
General Mach Discussion / Re: VB Is Laughing At Me....
« on: March 22, 2009, 12:42:06 PM »
HIYA RAY, Welcome to the been laughed at by MACH club. (;-)

Could you give a brief explanation of what you need the macro  to do.

Do you need DROs? Do you have them on a page for veiwing or could Vars be used.

I "think" I see your problem but need an explanation of what you think the code is suppose to do to verify it.

NOTE: There may be an easy way to do it.

Just a thought, (;-) TP

Terry,

   I *think* I have it working, and the problem does appear to be confusion over when/where/how to use the various LED and DRO functions.  Near as I can tell, there is no reason to ever use SetDRO/GetDRO.  I believe whatever they can do, can be done through SetOEMDRO/GetOEMDRO or, just as well, SetUserDRO/GetUserDRO.  Likewise, I was led astray by some of the information on the Wiki, which suggested using SetUserLED/GetUserLED use LED numbers from 0 to 255, which is not correct.

Regards,
Ray L.

1244
General Mach Discussion / Re: VB Is Laughing At Me....
« on: March 22, 2009, 12:32:39 PM »
OK, I did some experimentation, to see how these things really work.  Here's what I've found:

For LEDs, unless I'm missing something, the only Set method we have is SetUserLED.  SetLED and SetOEMLED just throw syntax errors.  Similarly, GetLED seems to not throw a syntax error, but also doesn't seem to actually do anything.  GetOEMLED and GetUserLED appear to be identical, other than their names.  Either seems able to read any LED, and both appear to expect "User" LEDs to be numbered above 1000.

For DROs, I see no difference between SetOEMDRO/GetOEMDRO and SetUserDRO/GetUserDRO, and both appear to expect "User" LEDs to be numbered above 1000.  Any DRO written by one, can always be read by the other.  SetDRO/GetDRO has me a little confused, as it seems to access a different "space" from the other two.  i.e. - A DRO written by SetOEMDRO or SetUserDRO cannot be read by GetDRO, and vice-versa.

So, what, exactly, is the difference between all these, and why are there seemingly identical functions with different names?

Regards,
Ray L.

1245
General Mach Discussion / Re: VB Is Laughing At Me....
« on: March 22, 2009, 10:59:03 AM »
Poppabear,

    I've tried that, and, if anything, it made things worse.  My understanding (perhaps wrong....) is that UserLEDs have OEM codes from 1000 up, buy if you use Get/SetUserLED to access them, you use the number - 1000.  On the DROs, GetDRO seems to work with ANY DRO number, whether OEM or User.  I do wish this stuff was actually documented, as the information available is cryptic, and often contradictory.

Regards,
Ray L.

1246
General Mach Discussion / VB Is Laughing At Me....
« on: March 21, 2009, 09:26:37 PM »
I'm writing a bunch of Mach macros lately, to automate common tasks. But I'm finding myself scratching my head at times. The below code does not execute correctly. It calls the M900 macro, which works perfectly when called directly from button scripts. The M900 macro uses DRO 1105 to tell it which axis to probe (0=X, 1=Y, etc.), and DRO 1106 tells it which direction to probe (1=Plus, -1=Minus). When I run the code below, the M900 macro does run, but it gets the wrong parameters - I'm telling it to probe X in the Plus direction, and that is what is displayed by the code below, but the same printout code in the M900 macro shows the parameters it receives tell it to probe Y in the Minus direction. How can this be?


MacroParameter1DRO = 1105
MacroParameter2DRO = 1106

EdgeFindMacro = "M900"

XProbeDirection = GetDRO(MacroParameter1DRO)

' Probe first in X
SetDRO(MacroParameter1DRO, 0)
SetDRO(MacroParameter2DRO, XProbeDirection)

' Show the parameters we're passing
AxisName = Chr(Asc("X") + GetDRO(MacroParameter1DRO))
If GetDRO(MacroParameter2DRO) = 1 Then
    Direction = "+"
Else
    Direction = "-"
End If
Code "(Probing " & AxisName & Direction & ")"
Sleep 1000

' Set the "busy" LED
SetUserLED(200, 1)

Code EdgeFindMacro

' Wait until EdgeFindMacro completes, clearing UserLED 100
While GetUserLED(200) = 1
    Sleep 100
Wend

Regards,
Ray L.

1247
General Mach Discussion / Re: screen
« on: March 19, 2009, 10:55:24 AM »
what i would like is to be able to use the standard windows controls and interface to keep it simple. being albe to disign fancy buttons and bitmaps is sure an interesting feature but in the end what i want is to cut some chips whatever the color or form of the buttons. is there a place where i could get the information about the format of these screens so i could make my own designer?

Mach3 is not designed to USE standard Windows controls and interface, so you're stuck with Scream4.  It is highly idiosynchratic, but it does get the job done.  There is a period of several hours (or days), when you first start using it, that you'll be convinced it's impossible to get any useful work done with it, but then you'll get the hang of how to work around its many quirks, and it's really not THAT bad.  The most important thing is to make frequent backups, as it will, occassionally, hose the screenset file beyond repair.  All the functionality is there to make some very nice screensets, it just takes patience and perseverence.  For me, the hard part is having to generate all the custom bitmaps, because I have no artistic skill whatsoever.

I've only seen buttons become "unselectable" under two circumstances.  First is if the button is behind something else - in which case you must move that something else out of the way first.  Second is when bitten by a bug in Scream4 that causes it to display ALL objects in the wrong position, so what you see is NOT what you get.  That can be resolved by working on a larger monitor.  Buttons configured to change screen pages seem particularly troublesome.  Sometimes you can solve sticky selection problems by doing a drag select around an object, rather than by clicking on it.  And just in case you're not aware, all objects are edited by right-clicking on them, *except* non-image buttons, which must be double-clicked (Why? I have no idea....).  Buttons are basically inactive in Scream4, *except* for those configured to change screen pages, which means when you click on them to try to edit them, they change screens and disappear.  Shift-clicking overcomes this.

Regards,
Ray L.

1248
General Mach Discussion / Re: mpg's and parallel ports
« on: March 17, 2009, 10:08:34 PM »
Consider getting a Contour ShuttlePro. It's about $85, has a very nice Mach plug-in, which is highly configurable, and works great as a pendant.

Regards,
Ray L.

1249
Ray

Get familiar with this page,  http://www.machsupport.com/MachCustomizeWiki/index.php?title=OEM_Buttons

Also looking at other screens will reveal OEM codes that are more obscure sometimes.

OEM button 216 is the one you are looking for.

Greg

Greg,

Yup....  Sometimes, you look at the list, and just don't see the one you're looking for.  Then you find it, or someone points it out to you, and you realize what a dope you are.....

Thanks!

Regards,
Ray L.

1250
How can I create a macro that will display a FileOpen dialog to open a G-Code file, then load the file?  The GetOpenFilename method that I use in Excel doesn't seem to work in Mach - gets a syntax error.  I want to create a dupliciate of the Open G-Code File button with some extra functionality.

Regards,
Ray L.