Hello Guest it is October 28, 2020, 05:10:25 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 - smurph

The LUA sockets module is in the Modules directory. 

Setting the package path and cpath is important.  This is an email example, but it is proof of concept for using the LUA sockets module.

Code: [Select]
-- Replace the from and to addresses, as well as the mail server IP address,
-- with something useful.

package.path = package.path .. ";./Modules/?.lua;"
package.cpath = package.cpath .. ";./Modules/?.dll;"

function email()

    -- load the smtp support
    local smtp = require("/socket.smtp")

    -- Connects to server "localhost" and sends a message to users
    -- "fulano@example.com",  "beltrano@example.com",
    -- and "sicrano@example.com".
    -- Note that "fulano" is the primary recipient, "beltrano" receives a
    -- carbon copy and neither of them knows that "sicrano" received a blind
    -- carbon copy of the message.
    from = "<mailfrom@sendingdomain.com>"

    rcpt = {

    mesgt = {
        headers = {
            to = "Some User <someuser@somedomain.com>",
            subject = "email test"
        body = "This is a message from M300."

    r, e = smtp.send{
        from = from,
        rcpt = rcpt,
        source = smtp.message(mesgt),
        server = "" -- mail server to use...  defaults to port 25.
    r = r


Mach4 General Discussion / Re: Mach 4 Lua Scripting modbus
« on: February 24, 2016, 12:29:58 AM »
Just tell the DRO to use the modbus exported register via the "Register" property in the screen editor.  No code needed.


Galil / Re: Trouble with RESET
« on: November 24, 2015, 01:06:47 AM »
Not sure if the Galil plugin for Mach 4 will be done by then.  I'm talking Beta status by then maybe.  But Mach 4 will be a better system in the end.  It is the future.


Galil / Re: Trouble with RESET
« on: November 22, 2015, 02:59:12 PM »
I believe that you will have the battle regardless of Mach3 or Mach4.  Because I think there is some Galil code on that controller (or jumper settings) that is causing the issue.  In other words, something is changing the default state of the controller.  The Galil debug file looks correct. 

Galil / Re: DMC-2143 time out
« on: November 18, 2015, 01:09:50 PM »
The difference between 4.5 and 4.6 is the Galil communication libraries.  I don't know what may be causing the CPU load.  I simply don't see it on my machine at all.  But...  25% is not 100%, so it should run fine.

Galil / Re: Trouble with RESET
« on: November 18, 2015, 11:56:45 AM »
There is your problem.  There is nothing that is doing a SH for your B axis.  When you issue a global SH (SH by itself) command, it basically does a SH ABCD thus covering the B axis.  Typically, slaving is done through Mach and not on the Galil controller.  You would map your Galil B axis to a Mach A, B, or C axis and then slave X to the chosen axis.  In short, nothing in the Galil plugin is going to issue a SH for your B axis unless it is mapped to a Mach axis.


Mach4 General Discussion / Re: Re: Mach 4 and Galil
« on: November 17, 2015, 06:20:08 PM »
We are working on it with Galil.  Maybe a beta by the end of the year.  But nothing set in stone as yet. 


Galil / Re: Trouble with RESET
« on: November 17, 2015, 12:15:39 PM »
Check your MO jumper settings.  In the file, there is a clear SH ACD that should have enabled all of the servos.  Also, check that there is no code on the controller that is disabling the axes.  Like a #AUTO script.


Galil / Re: DMC-2143 time out
« on: November 17, 2015, 12:10:53 AM »
D2700-MUD Atom board.  2.1 GHz, I believe.  4GB of RAM on Windows 7 32 bit.


Galil / Re: Trouble with RESET
« on: November 17, 2015, 12:08:34 AM »
Are you running steppers?