Hello Guest it is March 31, 2020, 10:00:47 AM

Author Topic: MACH4 - Modbus  (Read 54538 times)

0 Members and 1 Guest are viewing this topic.

Re: MACH4 - Modbus
« Reply #100 on: March 22, 2015, 05:28:39 PM »
There is no such thing as an analog register in Modbus, just holding registers, input registers, output coils and input discretes.

To read an analog value such as a potentiometer, your modbus device such as a ModIO will need an analog to digital converter, putting the value into an input register (or holding). Modbus then transfers this as a 16bit Register to Mach4. You can then take this 16 bit value and apply it to whatever you want such as spindle speed override, etc.

Cheers,

Peter
----------------------------------------------------
Homann Designs
http://www.homanndesigns.com
email: peter at homanndesigns.com

Offline poppabear

*
  • *
  •  2,233 2,233
  • Briceville, TN, USA
    • View Profile
    • S S Systems, LLC
Re: MACH4 - Modbus
« Reply #101 on: March 22, 2015, 09:44:03 PM »
Yeap,

Got Pete's MP-03 pendant kit based on his Mod IO reading/writing modbus: Digital Inputs/Outputs,
Analog in, MPG and Strings out to the LCD, just LOVE the Mod IO an awesome piece of work. It is running gang-busters with mach4's modbus.

Thanks for a great product Pete!!

Scott
Commercial Mach3 & Mach 4, Design/Build/Retrofit CNC and Industrial machines.
http://www.ss-systems-llc.com/

Offline simpson36

*
  •  1,371 1,371
    • View Profile
Re: MACH4 - Modbus
« Reply #102 on: March 23, 2015, 06:34:01 AM »
There is no such thing as an analog register in Modbus . . .

Certainly not per Modbus spec. I think maybe what I was reading was just a reference to a Modbus 'analog' register was just descriptive of the use of the register for xfer analog data (after A/D). I have a separate thread going about getting analog into MACH4 in general. I just posted here specifically about Modbus.

The application is a 0-10V DC signal from an Industrial AC servo drive that tracks motor load. The solution does not need to be Modbus. A plug-in is fine so long as it is stable and not serial interfaced (including USB). So far the options I have collected are the analog inputs on the Arduino DUE processor board in my 4th axis motor controler, and a Pokeys board.

Does Homann have a solution that will accept a 0-10v DC signal and connect via Ethernet?
« Last Edit: March 23, 2015, 06:37:22 AM by simpson36 »
Re: MACH4 - Modbus
« Reply #103 on: March 24, 2015, 02:22:31 PM »
Any idea on why I don't get any com ports in the drop down menu for ports in modbus setup?


Thanks
Dave

Offline smurph

*
  • *
  •  1,230 1,230
  • "That there... that's an RV."
    • View Profile
Re: MACH4 - Modbus
« Reply #104 on: March 24, 2015, 10:46:42 PM »
We use the WINAPI EnumPorts() function to get the ports.  This API call is part of the printing subsystem.  Check to see if that is disabled/not installed on your machine.  It might be something like "print spooling" or the like.  If it is XP embedded, print support may not even be installed. 

You are the first to see this that I know of.  So I would be very interested in what Windows version you are running. 

Steve
Re: MACH4 - Modbus
« Reply #105 on: March 24, 2015, 11:28:12 PM »
Thanks Steve,

when I installed xp I stripped out anything I didn't think I had use for on a cnc machine with n-lite. never planned on using a printer... no games, no media player. ect. it's only intended purpose was to run the machine.

Thanks
Dave

Offline simpson36

*
  •  1,371 1,371
    • View Profile
Re: MACH4 - Modbus
« Reply #106 on: May 15, 2015, 12:03:16 PM »

Setting up coils in Modbus does not create registers.

How are coils accessed in LUA?

Offline simpson36

*
  •  1,371 1,371
    • View Profile
Re: MACH4 - Modbus
« Reply #107 on: May 15, 2015, 01:59:15 PM »
Never mind. Figured it out.

Offline simpson36

*
  •  1,371 1,371
    • View Profile
Re: MACH4 - Modbus
« Reply #108 on: May 17, 2015, 07:36:41 AM »
This is a MACH3 Modbus question, but is related to MACH4. I have done a forum search and did not find an answer.

I have been tinkering with 'bitpacked' registers in MACH4 TCP Modbus and it all seems to work fine . . . BUT . .

My device currently works with both AMCH3 and MACH4 and before I change over to using bitpacking in MACH4, I would like to know if the same function is working reliably in MACH3 TCP Modbus. I have read variously that is works and also that it is broken. Certainly I could just try it, but even if it works, that does not necessarily mean it is reliable.

What is the current status of bitpacking in MACH3 TCP Modbus?
Re: MACH4 - Modbus
« Reply #109 on: May 17, 2015, 05:47:51 PM »
Is Ethernet Modbus working in M4?  I went through a few pages of posts and it seems everyone is working with serial Modbus.  The device I'm connecting to requires Modbus TCP.

Thanks
« Last Edit: May 17, 2015, 05:49:54 PM by rrc1962 »