Hello Guest it is April 28, 2024, 10:28:45 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 - HimyKabibble

941
General Mach Discussion / Re: New Mach3 v4 VB Interface
« on: October 17, 2009, 08:08:39 PM »
Thanks Ray,

Quote
*** SetButtonText has always been there, but probably never documented.  GetButtonText is new.
:)

Quote
*** I will ask, but my guess is the answer is "no".  OnPress, of course, you already have - the button script.

The main one to add for the buttons would be on release. Brian had said in the past he would add that function so hopefully it will be included. The others were just wishful thinking. As it is right now you can add a system function jog button that works as it should, but from VB you have to add a stop jog button which leaves a lot to be desired IMO. I never suggest a jog button be done from VB as it is now. Maybe this could be handled with a function (sysfunction&) and add VB to it? Some of the system functions versus VB do quirky things and maybe this would be a good option to handle that. I always prefer system functions to VB but if you want your buttons to do more than one thing you have to do them in VB. The jog stop on release is just one example but I think that function would add a lot of flexability (more than sysfunction&). Mouse is over would be great for interactive training screens but I knew when I mentioned it it was a stretch.  ;D


Quote
*** DoSpinCW() should not have been in there.  DoSpinCW and DoSpinCCW are replaced by SpindleOn(DIR).
Thanks for clearing that up.  :)

Quote
*** All these are already accessible via OEM LEDs. I did not see the point in adding explicit functions for things that are available in OEM LEDs and DROs
Fair enough. Why are these (Sub SetIJIncremental(Boolean), Function IsIJIncremental() As Boolean)worthy of having their on functions and these (SetIJABS, IsIJABS) aren't?

Quote
I think that any DRO or tick box in any and all config. pages should have associated DROs and LEDs that you can at least read and as many as possible that you can read/write to from VB would be great.

*** I looked at all the config stuff, and couldn't see any real value in making it VB accessible.  Any examples of some that would be really useful, and for what?
I can't remember now what I was wanting to monitor and act on from VB at the moment. But then again there are quite a few I have had no need for in the past but I suppose someone has. It would also help with consistency IMO. Would certainly be able to build one heck of a diagnostics page though.  ;D


Thanks,
Brett


Brett,

I will pass all your requests along to Brian, and see what he says.  I certainly agree it would be nice to have the OnRelease calls for buttons.  My own experience is pretty limited, so it's hard for me to know what's really useful and what's not, unless it's something I've needed myself.

Regards,
Ray L.

942
General Mach Discussion / Re: Gcode questions pt2
« on: October 17, 2009, 06:39:23 PM »
put the revised # value in square brackets -

#100 =[#100+0.010]

this should work now ;)

Now you know why I use CAM, rather than writing my G-code by hand....  :-)

Regards,
Ray L.

943
General Mach Discussion / Re: New Mach3 v4 VB Interface
« on: October 17, 2009, 12:20:28 PM »
Updated list with a few minor corrections:

Port/Signal I/O:
Sub AssertOutput(Signal As Integer)
Sub DeassertOutput(Signal As Integer)
Function IsInputAsserted(Signal As Integer)As Boolean
Function IsOutputAsserted(Signal As Integer) As Boolean
Function IsSignalDefined(Signal As Integer) As Boolean

File I/O:
Sub OpenDigFile()
Sub CloseDigFile()
Function OpenTeachFile (Filename As String) As Integer
Function AppendTeachFile(Filename As String) As Integer
Sub CloseTeachFile() As Integer
Sub LoadTeachFile() As Integer
Function GetFileName() As String
Function GetMach3Folder() As String
Sub LoadProgram(FilePath As String) As Integer
Sub LoadAndRunProgram(FilePath As String) As Integer
Sub RunProgram() As Integer
Sub LoadWizard(WizardName As String) As Integer

Screenset/UserI/O:
Function AskUserForDouble() As Double
Function AskUserForText() As String
Function AskUser(Prompt As String, Title As String, DialogType As Integer) As Integer
Function AskUserForCoords(Prompt As String) As Integer
Function GetXCoord() As Double
Function GetYCoord() As Double
Function GetZCoord() As Double
Function GetACoord() As Double
Function GetBCoord() As Double
Function GetCCoord() As Double
Sub ErrorMessage(MessageText As String)
Sub TickerMessage(TickerNum As Integer, TickerText As String)
Sub DoOEMButton(OEMButtonCode As Integer)
Function GetOEMLED(LEDNum As Integer) As Integer
Sub SetOEMDRO(DRONum As Integer, DROVal as Double)
Function GetOEMDRO(DRONum As Integer) As Double
Sub SetUserLED(LEDNum As Integer, State As Integer)
Function GetUserLED(LEDNum As Integer) As Integer
Sub SetUserDRO(DRONum As Integer, DROVal As Double)
Function GetUserDRO(DRONum As Integer) As Double
Sub SetVar(VarNum As Integer, Val As Double)
Function GetVar(VarNum As Integer) As Double
Sub SetUserLabel(LabelNum As Integer, LabelText As String)
Function GetUserLabel(LabelNum As Integer) As String
Sub SetButtonText(Text As String)
Function GetButtonText() As String
Sub SetScreensetPage()
Function GetScreensetPage() As Integer
Sub ToggleScreenset()
Sub ReloadScreenset()
Sub SetTriggerMacro(Signal As Integer, MacroName As String)

G-Code:
Sub SetBufferedCodeState(Boolean)
Function GetBufferedCodeState() As Boolean
Sub Code(Gcode As String)
Function GetXMinExtent() As Double
Function GetYMinExtent() As Double
Function GetZMinExtent() As Double
Function GetAMinExtent() As Double
Function GetBMinExtent() As Double
Function GetCMinExtent() As Double
Function GetXMaxExtent() As Double
Function GetYMaxExtent() As Double
Function GetZMaxExtent() As Double
Function GetAMaxExtent() As Double
Function GetBMaxExtent() As Double
Function GetCMaxExtent() As Double

Machine Control:
Sub SpindleOn(DIR)
Sub SpindleOff()
Sub SetRPM(RPM As Double)
Function GetRPM() As Double
Function IsSpindleOn() As Boolean
Sub SetFeedRate(FeedRate As Double)
Function GetFeedRate() As Double
Sub Function CoupleSlave(MasterAxis As Integer, SlaveAxis As Integer)
Sub UncoupleSlave()
Function GetCurrentTool() As Integer
Sub SetIJIncremental(Boolean)
Function IsIJIncremental() As Boolean
Sub SetSafeZPos(SafeZ As Double)
Function GetSafeZPos() As Double
Sub GotoSafeZ()
Function IsSafeZEnabled() As Boolean
Sub SetAxisScale(Axis As Integer, Scale As Double)
Function GetAxisScale(Axis As Integer) As Double
Function GetSelectedTool() As Integer
Sub SetCurrentTool(ToolNum As Integer)
Function GetAxisToolChangeStartPos()
Sub SetToolParam(ToolNum As Integer, ParamNum As Integer, ParamVal As Double) - Replaced by individual Set/Get functions
Function GetToolParam(ToolNum As Integer, ParamNum As Integer) - Replaced by individual Set/Get functions
Sub SetParam(ParamName As String, ParamVal As Double) - Replaced by individual Set/Get functions
Function GetParam(ParamName As String) As Double - Replaced by individual Set/Get functions
Function IsInEStop() As Boolean
Function IsProgramLoading() As Boolean
Function IsMoving() As Boolean
Sub WaitForTrigger(Signal As Integer)
Sub SwapAxis(FirstAxis As Integer, SecondAxis As Integer)
Sub UnSwapAxis()
Sub AxisJogOff(Axis As Integer)
Sub AxisJogOn(Axis As Integer, Dir as Integer)
Sub FeedMove(X, Y, Z, A, B, C As Double)
Sub RapidMove(X, Y, Z, A, B, C As Double)
Sub NotifyPlugins(Event As Integer)
Function CannedCycleRetractMode() As Integer
Sub SaveWizard() As Integer
Function SetAxisFormula(Axis As Integer, Formula As String) As Integer
Sub SetSpindlePulley(Pulley As Integer)

Lathe Only:
Function IsDiameterMode() As Boolean
Function GetToolTurretAng() As Double

Torch Only:
Sub THCOff()
Sub THCOn()
Sub ZeroTHC()
Sub ResetTHC()

VB/Misc:
Function PParameter() As Double
Function QParameter() As Double
Function RParameter() As Double
Sub PlayWave(Filename As String)
Sub Sleep(Time As Integer)
Sub Speak(TextToSpeak As String)
Function GetVBVersion() As String
Function GetMach3Version() As String

944
General Mach Discussion / Re: New Mach3 v4 VB Interface
« on: October 17, 2009, 11:09:28 AM »
Scott,

See below...

I see your "set Ticker message",
but didnt see the "get Ticker message"

*** Not sure what that would be useful for...  The status lines are by definition write-only.

Please make sure you keep the:  Set and Get Timers (the VB timers)

***Actually, the timers are going away, because they are part of the PP driver, so only availalbe if using PP.  And the PP, in the long run, is going away.

also:
you say that you no longer need the "While IsMoving()", what takes its place?

*** WhileIsMoving is still there, it's just now rarely needed.

also:

What do you do for "Wait For Signal", if you want your VB to pause until a signal appears or disapears?

*** It's being replaced by WaitForTrigger, which will be FAR more flexible.

scott

945
General Mach Discussion / Re: New Mach3 v4 VB Interface
« on: October 17, 2009, 11:05:39 AM »
Brett,

See comments below...

Hey Ray, Have I missed these in the past or are they new? Either way I love the idea of being able to have dynamic button labels in our screen sets.  :)

*** SetButtonText has always been there, but probably never documented.  GetButtonText is new.

Sub SetButtonText(Text As String)
Function GetButtonText() As String

Would it be possible to add these functions to make our buttons smarter?

On press
On release
Mouse is over
Mouse is not over

*** I will ask, but my guess is the answer is "no".  OnPress, of course, you already have - the button script.

A couple I don't see that would be nice.

DoSpinCCW

*** DoSpinCW() should not have been in there.  DoSpinCW and DoSpinCCW are replaced by SpindleOn(DIR).

IsSpindleOnCW
IsSpindleOnCCW
SetIJABS
IsIJABS

*** All these are already accessible via OEM LEDs. I did not see the point in adding explicit functions for things that are available in OEM LEDs and DROs.

GetZMaxExtent
GetZMinExtent
GetAMaxExtent
GetAMinExtent
GetBMaxExtent
GetBMinExtent
GetCMaxExtent
GetCMinExtent

*** Meant to add these, but forgot...

A little off subject............... I think it would be a good idea to have a page number DRO.  I relise we have Sub SetScreensetPage() and Function GetScreensetPage() As Integer that we could use but a DRO would be nice IMO. Also a screen set label would be nice (1024.set).

Axis at refrence position LEDs for all axis (individually) would be nice too. These would be different from the refrenced LEDs we have now. They would be good for a quick visual check to see if the axis is at refrence position if you needed to know (during a tool change for example) without haveing to use DROs on a particular screen or running a brain in the background.   

*** I'll bounce these all off "the boss"...

I think that any DRO or tick box in any and all config. pages should have associated DROs and LEDs that you can at least read and as many as possible that you can read/write to from VB would be great.

*** I looked at all the config stuff, and couldn't see any real value in making it VB accessible.  Any examples of some that would be really useful, and for what?

Looking good so far.   :)
Brett




Hey Ray, Have I missed these in the past or are they new? Either way I love the idea of being able to have dynamic button labels in our screen sets.  :)

Sub SetButtonText(Text As String)
Function GetButtonText() As String

Would it be possible to add these functions to make our buttons smarter?

On press
On release
Mouse is over
Mouse is not over

A couple I don't see that would be nice.

DoSpinCCW
IsSpindleOnCW
IsSpindleOnCCW
SetIJABS
IsIJABS
GetZMaxExtent
GetZMinExtent
GetAMaxExtent
GetAMinExtent
GetBMaxExtent
GetBMinExtent
GetCMaxExtent
GetCMinExtent

A little off subject............... I think it would be a good idea to have a page number DRO.  I relise we have Sub SetScreensetPage() and Function GetScreensetPage() As Integer that we could use but a DRO would be nice IMO. Also a screen set label would be nice (1024.set).

Axis at refrence position LEDs for all axis (individually) would be nice too. These would be different from the refrenced LEDs we have now. They would be good for a quick visual check to see if the axis is at refrence position if you needed to know (during a tool change for example) without haveing to use DROs on a particular screen or running a brain in the background.   

I think that any DRO or tick box in any and all config. pages should have associated DROs and LEDs that you can at least read and as many as possible that you can read/write to from VB would be great.

Looking good so far.   :)
Brett





946
General Mach Discussion / Re: Gcode questions pt2
« on: October 16, 2009, 11:47:07 PM »
You ask about Y cuts, I was settling for repetition on any axis. If I could cut both From X0 to X7 say .005 a pass and then Y0 to Y2.5 at the same rate .005 that would be great but as you can see I dont really have an idea how to implement it. I would think there has to be a final destination though 50 passes @.005 indicates 1/4".  
 

You're going about this in a rather unconventional way.  The more "normal" way to do it is to step down in Z, cutting the entire profile in each pass, then do one final, full-depth pass to put the final finish on.  So, for example, to cut a 2" square, 1/4" deep, centered on X0, Y0, using a 1/4" endmill, with a 0.010" finishing pass:

M3 (Spindle On CW)
M7 (Coolant On)
#100 = 0.000 (Register for current Z depth)
G0 Z1 (Move to safe height)
G0 X-1.135 Y1.135 (Move to start position)
M98 P0001 L25 (Do roughing passes down to full depth)
(Do finish pass, taking off 0.010")
G1 X-1.125 Y1.125 F5  (Move to start position for finish pass)
G1 X1.125 F5  (Cut top edge of square)
G1 Y-1.125 F5  (Cut right edge of square)
G1 X-1.125 F5  (Cut bottom edge of square)
G1 Y1.125 F5  (Cut left edge of square)
G0 Z1 (Retract to safe height)
M9 (Coolant Off)
M5 (Spindle Off)
M30 (Program End)
(Roughing Subprogram)
O0001 (Do one pass of roughing cut)
G0 Z#100 (Rapid to depth of last cut)
#100 = #100 + 0.010 (Step down in Z)
G1 Z#100 F5 (Feed move to new depth)
G1 X1.135 F10  (Cut top edge of square)
G1 Y-1.135 F10  (Cut right edge of square)
G1 X-1.135 F10  (Cut bottom edge of square)
G1 Y1.135 F10  (Cut left edge of square)
M99 (Return)
M30

The above code *should* work, but for some reason stalls on the #100 = #100 + 0.010, but should give you the idea of how it's more typically done.  Really, though, except for very simple parts, writing G-code by hand is pretty painful.  You should look into some CAM software.  I can highly recommend SheetCAM.

Regards,
Ray L.

947
General Mach Discussion / Re: Gcode questions pt2
« on: October 16, 2009, 10:55:09 PM »
OK, try this:

G90
G0 X0 Y0
G0 Z0.000
G0 Z-2
M98 P0001 L50
M30
O0001
G91 (Set incremental mode)
G1 Y0.005 F25 (Step over +0.005 in Y)
G90 (Set absolute mode)
G1 X7 F50  (Cut from X0 to X7)
G0 X0 (Return to X0)
M99 (Return)
M30

 I gave you a bum steer.  The G98/G99 should've been M98/M99.

Regards,
Ray L.

948
General Mach Discussion / Re: New Mach3 v4 VB Interface
« on: October 16, 2009, 10:25:51 PM »
Quote
Function AskUserForCoords(Prompt As String) As Integer

Shouldn't this be "as double"?


Quote
Function AskUser(Prompt, “Title” As String, DialogType As Integer) As Integer

What's this do?


AskUser displays a dialog with a variety of different buttons and fields in it.  This is the old MachMsg() function - see the v3 document I posted a few weeks ago for details.

Regards,
Ray L.

949
General Mach Discussion / Re: Gcode questions pt2
« on: October 16, 2009, 10:17:42 PM »
You don't want G17s in there.  Those should be G1s.  Also, all your moves are in X.  Where are the Y moves?

Regards,
Ray L.

950
General Mach Discussion / Re: New Mach3 v4 VB Interface
« on: October 16, 2009, 09:57:49 PM »
Quote
Function AskUserForCoords(Prompt As String) As Integer

Shouldn't this be "as double"?


Ger,

No.  That function puts up a dialog where the user can fill in values for all axes.  The return value indicates whether the user closed the dialog with the OK or Cancel button.  The values entered are read using the GetXCoord()...GetCCoord() functions.  This is unchanged from the v3 interface, except the B and C axes will be added to the dialog.

Regards,
Ray L.