Loading ...
Sorry, an error occurred while loading the content.

Re: [mach1mach2cnc] dos commands

Expand Messages
  • Eric Vogels
    Hi Art. Thanks. Regards, Eric. ... From: Art Fenerty To: mach1mach2cnc@yahoogroups.com Sent: Tuesday, October 02, 2007 3:11 PM Subject: Re: [mach1mach2cnc] dos
    Message 1 of 14 , Oct 2, 2007
    • 0 Attachment
      Hi Art.
      Thanks.
      Regards,
      Eric.
      ----- Original Message -----
      From: Art Fenerty
      To: mach1mach2cnc@yahoogroups.com
      Sent: Tuesday, October 02, 2007 3:11 PM
      Subject: Re: [mach1mach2cnc] dos commands


      Hi Eric:

      Read the customising Doc's. They show how to make a macro file, and call it from Gcode.
      In essence, all you have to do is make a file called M666.m1s for example, then in the code call M666

      Thanks,
      Art
      www.artofcnc.ca

      ----- Original Message -----
      From: Eric Vogels
      To: mach1mach2cnc@yahoogroups.com
      Sent: Tuesday, October 02, 2007 7:28 AM
      Subject: Re: [mach1mach2cnc] dos commands

      Hi.
      But I don't know how to call a macro from G-code.
      Perhaps I can get an advice?
      Thanks.
      Eric

      ----- Original Message -----
      From: Eric Vogels
      To: mach1mach2cnc@yahoogroups.com
      Sent: Saturday, September 29, 2007 11:14 PM
      Subject: Re: **SPAM: Re: [mach1mach2cnc] dos commands

      Hi Henrik.
      If I can call a macro from G-code, I've a big step into the right direction.
      Thanks.
      Eric.

      ----- Original Message -----
      From: Henrik Olsson
      To: mach1mach2cnc@yahoogroups.com
      Sent: Saturday, September 29, 2007 12:22 PM
      Subject: **SPAM: Re: [mach1mach2cnc] dos commands

      Hi Eric,
      I don't think that's possible.
      Depending on what exactly you want to do it may be possible to write a macro
      that can be called from the G-Code. In that macro you can do can do certain
      stuff. What is it you'd like to do?

      /Henrik Olsson.

      -----Original-----

      Hello.

      Is it possible to have Dos command lines in G-code that are processed by
      Mach3?

      Thanks,

      Eric.

      [Non-text portions of this message have been removed]

      [Non-text portions of this message have been removed]

      [Non-text portions of this message have been removed]





      [Non-text portions of this message have been removed]
    • Eric Vogels
      Hello Art. Is the Visual Basic macro language a special stripped version of Visual Basic? I ve the feeling that one can only interact with Mach3 but nothing
      Message 2 of 14 , Oct 4, 2007
      • 0 Attachment
        Hello Art.
        Is the Visual Basic macro language a special stripped version of Visual Basic? I've the feeling that one can only interact with Mach3 but nothing more.
        Thanks.
        Eric.

        ----- Original Message -----
        From: Art Fenerty
        To: mach1mach2cnc@yahoogroups.com
        Sent: Tuesday, October 02, 2007 3:11 PM
        Subject: Re: [mach1mach2cnc] dos commands


        Hi Eric:

        Read the customising Doc's. They show how to make a macro file, and call it from Gcode.
        In essence, all you have to do is make a file called M666.m1s for example, then in the code call M666

        Thanks,
        Art
        www.artofcnc.ca

        ----- Original Message -----
        From: Eric Vogels
        To: mach1mach2cnc@yahoogroups.com
        Sent: Tuesday, October 02, 2007 7:28 AM
        Subject: Re: [mach1mach2cnc] dos commands

        Hi.
        But I don't know how to call a macro from G-code.
        Perhaps I can get an advice?
        Thanks.
        Eric

        ----- Original Message -----
        From: Eric Vogels
        To: mach1mach2cnc@yahoogroups.com
        Sent: Saturday, September 29, 2007 11:14 PM
        Subject: Re: **SPAM: Re: [mach1mach2cnc] dos commands

        Hi Henrik.
        If I can call a macro from G-code, I've a big step into the right direction.
        Thanks.
        Eric.

        ----- Original Message -----
        From: Henrik Olsson
        To: mach1mach2cnc@yahoogroups.com
        Sent: Saturday, September 29, 2007 12:22 PM
        Subject: **SPAM: Re: [mach1mach2cnc] dos commands

        Hi Eric,
        I don't think that's possible.
        Depending on what exactly you want to do it may be possible to write a macro
        that can be called from the G-Code. In that macro you can do can do certain
        stuff. What is it you'd like to do?

        /Henrik Olsson.

        -----Original-----

        Hello.

        Is it possible to have Dos command lines in G-code that are processed by
        Mach3?

        Thanks,

        Eric.

        [Non-text portions of this message have been removed]

        [Non-text portions of this message have been removed]

        [Non-text portions of this message have been removed]





        [Non-text portions of this message have been removed]
      • poolq9900
        It s VBA. The same thing available in excel and word, but with some custom additions for Mach3. VBA is slightly different than regular VB syntax wise and you
        Message 3 of 14 , Oct 4, 2007
        • 0 Attachment
          It's VBA. The same thing available in excel and word, but with some
          custom additions for Mach3. VBA is slightly different than regular VB
          syntax wise and you can't make a standalone .exe.

          macros are very easy and well documented, make sure the macro file is
          in the macro dir and just call it like any other sub from vb.

          this is my macro call

          G0 Z0
          M300
          M3 S3000

          the M300 is a file M300.m1s
          this is in the macro file
          SwapAxis( 6, 3 )

          and thats it




          --- In mach1mach2cnc@yahoogroups.com, "Eric Vogels" <eric@...> wrote:
          >
          > Hello Art.
          > Is the Visual Basic macro language a special stripped version of
          Visual Basic? I've the feeling that one can only interact with Mach3
          but nothing more.
          > Thanks.
          > Eric.
          >
          > ----- Original Message -----
          > From: Art Fenerty
          > To: mach1mach2cnc@yahoogroups.com
          > Sent: Tuesday, October 02, 2007 3:11 PM
          > Subject: Re: [mach1mach2cnc] dos commands
          >
          >
          > Hi Eric:
          >
          > Read the customising Doc's. They show how to make a macro file,
          and call it from Gcode.
          > In essence, all you have to do is make a file called M666.m1s for
          example, then in the code call M666
          >
          > Thanks,
          > Art
          > www.artofcnc.ca
          >
          > ----- Original Message -----
          > From: Eric Vogels
          > To: mach1mach2cnc@yahoogroups.com
          > Sent: Tuesday, October 02, 2007 7:28 AM
          > Subject: Re: [mach1mach2cnc] dos commands
          >
          > Hi.
          > But I don't know how to call a macro from G-code.
          > Perhaps I can get an advice?
          > Thanks.
          > Eric
          >
          > ----- Original Message -----
          > From: Eric Vogels
          > To: mach1mach2cnc@yahoogroups.com
          > Sent: Saturday, September 29, 2007 11:14 PM
          > Subject: Re: **SPAM: Re: [mach1mach2cnc] dos commands
          >
          > Hi Henrik.
          > If I can call a macro from G-code, I've a big step into the right
          direction.
          > Thanks.
          > Eric.
          >
          > ----- Original Message -----
          > From: Henrik Olsson
          > To: mach1mach2cnc@yahoogroups.com
          > Sent: Saturday, September 29, 2007 12:22 PM
          > Subject: **SPAM: Re: [mach1mach2cnc] dos commands
          >
          > Hi Eric,
          > I don't think that's possible.
          > Depending on what exactly you want to do it may be possible to
          write a macro
          > that can be called from the G-Code. In that macro you can do can
          do certain
          > stuff. What is it you'd like to do?
          >
          > /Henrik Olsson.
          >
          > -----Original-----
          >
          > Hello.
          >
          > Is it possible to have Dos command lines in G-code that are
          processed by
          > Mach3?
          >
          > Thanks,
          >
          > Eric.
          >
          > [Non-text portions of this message have been removed]
          >
          > [Non-text portions of this message have been removed]
          >
          > [Non-text portions of this message have been removed]
          >
          >
          >
          >
          >
          > [Non-text portions of this message have been removed]
          >
        • Eric Vogels
          Thanks Henrik and poolq9900. That is a great help. I noticed that the Mach3 is executing the macros that are embedded in the G-code during loading of the
          Message 4 of 14 , Oct 4, 2007
          • 0 Attachment
            Thanks Henrik and poolq9900.
            That is a great help.
            I noticed that the Mach3 is executing the macros that are embedded in the G-code during loading of the G-code file and not when running the G-code file. Since I want things to happen 'during' the job I'm afraid I cannot get what I want. I tested that by creating a M999.m1s that starts the Windows calculator. Now when I load the G-code, the calculator starts and when I run the G-code file, Mach3 is standing and waiting on the M999 statement. Too bad, M999 was supposed to start my vacuum cleaner ;=)
            Regards,
            Eric.

            ----- Original Message -----
            From: Henrik Olsson
            To: mach1mach2cnc@yahoogroups.com
            Sent: Thursday, October 04, 2007 2:20 PM
            Subject: Re: [mach1mach2cnc] dos commands



            Hi Eric,
            Actually it's called Cypress Enable and it's a VBA (Visual Basic for
            Applications) *compatible* scripting language so it's not VisualBasic
            per se. You can do a lot more that call Mach3's internal functions. You
            can download the language reference here:

            http://www.cypressinc.com/techsupp.htm

            I've done some experiments with it in the past, calling external DLL's
            for my laser scanner, writing data to files etc. All with various
            degrees of success. If I remeber correctly I had problems scripts
            running even thoug STOP was pressed etc. For somethings it works good
            for other things it does not IMO. I don't know if it's a problem with
            my programming skills (probably), the scripting engine itself or it's
            integration into Mach3 (which I understand is quite complicated).

            I belive Art said he had contacted them about some problems (1-2 years
            ago)but that they where anything but interested to help/fix it - but I
            may be wrong on that point.

            /Henrik.

            ---===Original Message===---
            >Hello Art.
            >Is the Visual Basic macro language a special stripped version of Visual Basic? I've the feeling that one can only interact with Mach3 but nothing more.
            >Thanks.
            >Eric.




            [Non-text portions of this message have been removed]
          • Henrik Olsson
            Hi Eric, Actually it s called Cypress Enable and it s a VBA (Visual Basic for Applications) *compatible* scripting language so it s not VisualBasic per se. You
            Message 5 of 14 , Oct 4, 2007
            • 0 Attachment
              Hi Eric,
              Actually it's called Cypress Enable and it's a VBA (Visual Basic for
              Applications) *compatible* scripting language so it's not VisualBasic
              per se. You can do a lot more that call Mach3's internal functions. You
              can download the language reference here:

              http://www.cypressinc.com/techsupp.htm

              I've done some experiments with it in the past, calling external DLL's
              for my laser scanner, writing data to files etc. All with various
              degrees of success. If I remeber correctly I had problems scripts
              running even thoug STOP was pressed etc. For somethings it works good
              for other things it does not IMO. I don't know if it's a problem with
              my programming skills (probably), the scripting engine itself or it's
              integration into Mach3 (which I understand is quite complicated).

              I belive Art said he had contacted them about some problems (1-2 years
              ago)but that they where anything but interested to help/fix it - but I
              may be wrong on that point.

              /Henrik.

              ---===Original Message===---
              >Hello Art.
              >Is the Visual Basic macro language a special stripped version of Visual Basic? I've the feeling that one can only interact with Mach3 but nothing more.
              >Thanks.
              >Eric.
            • Henrik Olsson
              Eric, Something wrong there. It should not execute the macro when loading, only when running the G-code. What if you, in your M999.m1s put: Code S1500 Code
              Message 6 of 14 , Oct 4, 2007
              • 0 Attachment
                Eric,
                Something wrong there. It should not execute the macro when loading, only
                when running the G-code. What if you, in your M999.m1s put:
                Code "S1500"
                Code "M3"
                Does it start the spindle when you load the G-code into Mach3?

                /Henrik.


                >Thanks Henrik and poolq9900.
                >That is a great help.
                >I noticed that the Mach3 is executing the macros that are embedded in the G-code during loading of the G-code file and not when running the G-code file. Since I want things to happen 'during' the job I'm afraid I cannot get what I want. I tested that by creating a M999.m1s that starts the Windows calculator. Now when I load the G-code, the calculator starts and when I run the G-code file, Mach3 is standing and waiting on the M999 statement. Too bad, M999 was supposed to start my vacuum cleaner ;=)
                >Regards,
                >Eric.
                >
              • Henrik Olsson
                Eric, (and Art if you are seeing this) I just tried what you did. I put the following in M999.m1s: Sub Main() Dim X, Today, Response, Xpos X = Shell
                Message 7 of 14 , Oct 4, 2007
                • 0 Attachment
                  Eric, (and Art if you are seeing this)

                  I just tried what you did. I put the following in M999.m1s:

                  Sub Main()
                  Dim X, Today, Response, Xpos
                  X = Shell ("Calc.exe", 1)
                  Today = Now
                  Xpos = GetDRO(0)
                  Response = MsgBox("Macro run " & Today & " X Pos: " & XPos, 0)
                  End Sub

                  And sure enough that code executes when a G-code file containing M999 is
                  loaded. I also tried adding some Code "G0 X0" statements and those
                  statements did NOT execute untill the file was run - which is good of
                  course. I don't know if this is by design, Art?

                  If by design, is there a way to know what code will execute when loaded and
                  what code will execute only at runtime (of the G-code).

                  TIA

                  /Henrik.


                  -----Original message-----

                  Eric,
                  Something wrong there. It should not execute the macro when loading, only
                  when running the G-code. What if you, in your M999.m1s put:
                  Code "S1500"
                  Code "M3"
                  Does it start the spindle when you load the G-code into Mach3?

                  /Henrik.


                  >Thanks Henrik and poolq9900.
                  >That is a great help.
                  >I noticed that the Mach3 is executing the macros that are embedded in
                  >the G-code during loading of the G-code file and not when running the
                  >G-code file. Since I want things to happen 'during' the job I'm afraid I
                  cannot get what I want. I tested that by creating a M999.m1s that starts the
                  Windows calculator. Now when I load the G-code, the calculator starts and
                  when I run the G-code file, Mach3 is standing and waiting on the M999
                  statement. Too bad, M999 was supposed to start my vacuum cleaner ;=)
                  Regards, Eric.
                • Art Fenerty
                  Henrik: No movement code will run during load, but the file has to run all macro s to be accurate as to what is displayed in the toolpath. There is a macro
                  Message 8 of 14 , Oct 4, 2007
                  • 0 Attachment
                    Henrik:

                    No movement code will run during load, but the file has to run all macro's to be accurate as to what is displayed in the toolpath. There is a macro call you can use to stop any lines from running..

                    IsLoading() will return a true if the program is generating a toolpath during load, so you can use
                    that as a if then control to skip any things you dont want to run during a load. No movement will be done in any case..


                    Thanks,
                    Art
                    www.artofcnc.ca

                    ----- Original Message -----
                    From: Henrik Olsson
                    To: mach1mach2cnc@yahoogroups.com
                    Sent: Thursday, October 04, 2007 1:42 PM
                    Subject: Re: [mach1mach2cnc] dos commands


                    Eric, (and Art if you are seeing this)

                    I just tried what you did. I put the following in M999.m1s:

                    Sub Main()
                    Dim X, Today, Response, Xpos
                    X = Shell ("Calc.exe", 1)
                    Today = Now
                    Xpos = GetDRO(0)
                    Response = MsgBox("Macro run " & Today & " X Pos: " & XPos, 0)
                    End Sub

                    And sure enough that code executes when a G-code file containing M999 is
                    loaded. I also tried adding some Code "G0 X0" statements and those
                    statements did NOT execute untill the file was run - which is good of
                    course. I don't know if this is by design, Art?

                    If by design, is there a way to know what code will execute when loaded and
                    what code will execute only at runtime (of the G-code).

                    TIA

                    /Henrik.


                    -----Original message-----

                    Eric,
                    Something wrong there. It should not execute the macro when loading, only
                    when running the G-code. What if you, in your M999.m1s put:
                    Code "S1500"
                    Code "M3"
                    Does it start the spindle when you load the G-code into Mach3?

                    /Henrik.

                    >Thanks Henrik and poolq9900.
                    >That is a great help.
                    >I noticed that the Mach3 is executing the macros that are embedded in
                    >the G-code during loading of the G-code file and not when running the
                    >G-code file. Since I want things to happen 'during' the job I'm afraid I
                    cannot get what I want. I tested that by creating a M999.m1s that starts the
                    Windows calculator. Now when I load the G-code, the calculator starts and
                    when I run the G-code file, Mach3 is standing and waiting on the M999
                    statement. Too bad, M999 was supposed to start my vacuum cleaner ;=)
                    Regards, Eric.






                    [Non-text portions of this message have been removed]
                  Your message has been successfully submitted and would be delivered to recipients shortly.