Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: ssutton on December 08, 2013, 06:01:49 PM

Title: Serial input to Mach3
Post by: ssutton on December 08, 2013, 06:01:49 PM
Hi all. I am wanting to be able to input a analog value to Mach3 to control the feed rate of my machine. I understand that Mach is configured to operate within the modbus protocol and that the modbus analog digital value could be used to control the feed rate. I have a couple of ways that I can digitize the analog value and send it to Mach. 1, use a small PLC that I have on hand to read the value and send it out of the modbus serial port or 2, read the potentiometer with a PIC micro and serial the data out to Mach.

I have a couple of questions?

1. My PC does not have a modbus port that supports true modbus electrical signals, do I just use the serial DB9 port and an adapter so it can receive the 5 volt signals?

2. Does Mach allow for any other serial data input other than modbus? In other words could I simply send the data in ascii or hex format and map it the control the register I need in Mach? This would make things very simple as far as a micro is concerned.

Thanks for your thoughts,

Scott Sutton
Title: Re: Serial input to Mach3
Post by: mrprecise44 on December 10, 2013, 04:25:57 AM
Mach3 will read serial data from ModBus output.

You have to check the box in the first page of; Config/ Ports and Pins/Engine Configuration ...Ports & Pins.

Lower right corner box:
check;  ModBus InputOutput Support,
check; ModBus Plugin Supported.

Then you must enable the correct port in:
Config/ General Config; Lower left box "Serial Output, check the serial port#, input BaudRate in the box, select 8-bit 1stop.

Now open "Function Cfg's" on Menu; scroll down to "Setup Serial ModBus Control", and click open the page, "ModBus Configuration".

Fill in the boxes at the top of the page; Port Num:, Baud Rate,

Each ModBus input signal will be listed in one of the Cfg # rows. You can write in a brief description in the "Device" column.

When these are filled in, you can test your I/O with the "Test ModBus" box. In the case of an Analog input, you will see the values change as you turn the potentiometer.

Read the example in the ModBus section of the forum, written by Zafar. He has a complete step by step with pictures of setting up an Analog feedrate including the Brains. You need to write a brain, to input your ModBus analog input into an OEM code input.

After a bit of trial and error, you will get it working. Also have a look at some of the Mach3 videos regarding Modbus.

John




 
Title: Re: Serial input to Mach3
Post by: mrprecise44 on December 10, 2013, 03:00:27 PM
The ModBus tutorial by zafarsalam is: topic # 22982.