Hello Guest it is November 27, 2021, 04:33:56 PM

Author Topic: Mach 4/LUA Ethernet Explicit Messaging  (Read 245 times)

0 Members and 1 Guest are viewing this topic.

Mach 4/LUA Ethernet Explicit Messaging
« on: April 06, 2021, 10:16:00 AM »
Hi All,

I'm just curious for the time being if this is possible. I would like to interface Mach 4 to a servo drive which can communicate over Ethernet/IP. The motion control signals will be Step and Direction coming from an Ethernet Smoothstepper, however I can also pull diagnostic information over Ethernet *if* there is a way to form and transmit a generic ethernet packet using LUA in Mach 4.

I did something similar a few years back using the serial port to pull diagnostics out of a servo drive and that actually worked great, now I'd like to repeat the endeavour using a different servo drive and Ethernet/IP.

So the question is: does anyone know of a LUA function or library which supports read/write over Ethernet?

Thanks much,

Mike
 

Offline smurph

*
  • *
  •  1,475 1,475
  • "That there... that's an RV."
    • View Profile
Re: Mach 4/LUA Ethernet Explicit Messaging
« Reply #1 on: April 08, 2021, 12:24:21 AM »
Mach4 comes with the LuaSockets module that can do what you want. 

http://w3.impa.br/~diego/software/luasocket/reference.html

Warning: It isn't for the feint or heart.  :(  But it is possible.

Steve