Hello Guest it is March 28, 2024, 06:05:45 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 - revwarguy

Pages: 1 2 »
1
General Mach Discussion / Re: help with fundamental question
« on: April 04, 2010, 10:12:10 AM »
Thnaks, Hood.

I'm a Gcode newbie - what gcode would be specified to cause an offset.  Something is off because when I load the file into Mach, the new x and y are beyond the size of any of the parts. (like 38 inches for X when the extend of the part is only 8 inch o n X.)

If I have the gcode to cut out a rectangle, and then want to cut out a total of 5 just like it, how do I write the gcode to do that?   (if there is a good refernce somewhere to put me to, I would go look at that.)  Just looking at the codes, I don't see one to specify a new offset.




2
General Mach Discussion / help with fundamental question
« on: April 03, 2010, 02:57:37 AM »
Hello,

I go through my usual routine to position and zero the x, y, and z axies.  Then I load a g-code file, and the x,y, and z DROs all read crazy values.  How come?  What do I have to do to keep the DRO's zeroed?  Why would loading any g-code file affect the DRO's since nothing's moved on the machine?   ???

Thanks in advance,




3
General Mach Discussion / Re: OEM codes for buttons, DRO's and LED's
« on: February 10, 2010, 11:01:42 AM »

DOH!  ::)

(sheepish grin)

Sorry about that, sometimes things have a perverse way of hiding from me.

Thanks.

4
General Mach Discussion / Re: OEM codes for buttons, DRO's and LED's
« on: February 10, 2010, 10:24:48 AM »
Hello Hood, et al,

Could one of you please tell me or point me to an explanation of how you open the gcode file on a screen?  I have been looking into screen design, and am trying to make one of my own, and I think I can "hook up"mostl the buttons I need, whether they are standard functions, or VBscripts, except how to load the gcode file.  I know every one needs to do this, but I just haven't been able to find an example.  I don't see it listed on the standard function list, which is odd.  Is it done in VB?

TIA,


5
Sure...  I think the wiki writer just meant to show the syntax of Declare Sub Sleep Lib "Kernel32" (ByVal dwMilliseconds As Long)  there, and did not intend for that to be part of the code snippet in the example.

That was the way I took it, at least.  :)


6

Is this  better?  From the Mach 3 wiki:


A frequent requirement is to have to wait for Mach3 when doing several commands, to keep them executing in order. The:

While IsMoving
Wend

Loop is the typical way of doing this.

ex:

code "G0X100"
While IsMoving()
Wend

However, this causes the system to make millions of calls to the subsystem to determine if Mach3 is finished. The CPU load rises terribly. A solution is to wait for 100ms or so each time you check unless you need a very tight response time. The solution is to use a syntax as follows..

Declare Sub Sleep Lib "Kernel32" (ByVal dwMilliseconds As Long)
.
.
.
Code "G0X100"
While ismoving()
Sleep 100
Wend


I suppose its somewhat moot, since this will go away in V4.

7
Other than potentially unnecessary delays in the scripts, do you know of any other impact V4 will have on scripts or addons?

Also, any idea about the target date for when v4 will be available?

8
Thanks to both of you for your patience, I think I have a better understanding.  I guess you just have to be very careful when writing VB scripts.  I did look at the earlier reference to your thread, Ian, but I guess I gave up too soon, sorry - my bad.  I will make the recommended changes. 

It sure makes me wonder how many other sync problems are lurking.

Too bad there isn't a way to keep a single place for updated/corrected scripts and other add-ons, so that folks don't download the same troubles over and over.  At least, if there is, I wish it were more obvious!

Thanks again for your help.

9
I think I see what you mean, but don't understand why.  If you include the previous two lines before your snippet:

  While IsMoving ()
   Wend

   If PlateOffset <> 0 Then
      Call SetDro (2, PlateOffset)   'set the Z axis DRO to  plate thickness
      Code "G4 P0.25"       'Pause for Dro to update.
      ZNew = PlateOffset + .25
      Code "G0 Z" &ZNew       'put the Z retract height you want here
      Code "(Z axis is now zeroed)"    'puts this message in the status bar
   End If

You see a While IsMoving () ... Wend just got executed, so the table is now stationary.  Since PlateOffset is never zero, it falls through to the SetDro line, then the Code G4 P0.25.  My mistake, since I didn't think the SetDRO command needed any latency, as it doesn't involve the actual table movement, it just sets an internal Mach variable such that it is complete before it returns to the next line.  I take your word for it, but why do we need to wait for SetDro?  What other commands that don't involve the physical table need to be waited on in these scripts?

Trying to learn,



10
Since the plate offset has never been zero, didn't the "while isMoving() ... wend: just get executed?  If so, what difference could a G4 make - i.e., shouldn't the G4 just be deleted then?

Ahhh, the incremental/absolute thing - this has always bugged me.  Why do g-code generators assume which mode it should be?  Should that be declared specifically whenever it is used thereby avoiding any conflict?  I will add the G90 to the G32 line, but I did check, and this is the mode that is the default upon launch.

Pages: 1 2 »