Hello Guest it is April 24, 2024, 12:17:48 AM

Author Topic: multiple serial modbus slaves  (Read 14539 times)

0 Members and 1 Guest are viewing this topic.

Re: multiple serial modbus slaves
« Reply #10 on: December 20, 2011, 05:37:05 AM »
Hi Ian,

With Brains you use the Modbus CFG# entries in Modbus setup tab.

This interface is actually a general purpose Modbus plugin itself that provides the Modbus data accessible by Brains. So you set up all the Modbus interaction you require in this Modbus setup tab.  Each row, has;

Cfg#Buffer Number
CommentJust a Comment
Port AddressSerial port number. Must match the port used
SlaveModbus Slave address
refreshRate at which request is made
AddessAddress of first Modbus register
No. RegsThe number of registers to read/write
DirectionRead/Write and the data regiter type

Each row sets up a Modbus transaction. Once set up these transactions will occur automatically forever. This is transferring to/from these buffers and the devices.

The slave ID is how you control which modbus device is being communicating with. So if you have 2 devices then they will have different slave addresses.

Does that clear it up?

Cheer,


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

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: multiple serial modbus slaves
« Reply #11 on: December 20, 2011, 06:07:55 AM »
Hi Peter

Just tried checking "Modbus Plugin Supported" on the ports n pins dialog and I see now how you access the CFG# entries. I HAD been using vanilla Modbus WITHOUT plugin support which uses a different setup dialog which doesn't mention CFG# numbers. I hadn't checked plugin support because I'd assumed that referred to a 3rd party plugin i.e. the one you've said is broken.

AAAAGGGHHHH! ;D All is clear now - I'll give it a go.

Many thanks for your help.

Ian
Re: multiple serial modbus slaves
« Reply #12 on: December 20, 2011, 06:31:05 AM »
Ian,

Ok. Just remember that when you access a  register in the cfg# buffer from brains, the first register in the buffer is item 0, the 2nd is item 1, etc. You do not use the Modbus register number, say 1150, but the offset into the Buffer. So if the cfg# is set up to read 10modbus  registers, starting at register 115. So, to access register 1154 in brains it is item 4 in the buffers.

Cheers,


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

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: multiple serial modbus slaves
« Reply #13 on: December 20, 2011, 06:37:37 AM »
Thanks Peter

I'll take a look and get back

Cheers

Ian

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: multiple serial modbus slaves
« Reply #14 on: December 20, 2011, 12:57:04 PM »
Success Peter - Thanks again for your help.

JFYI this was so I can run my THC alongside any other modbus devices such as pendants etc.

Cheers

Ian
Re: multiple serial modbus slaves
« Reply #15 on: December 20, 2011, 03:29:52 PM »
Hi Ian,

Good to hear you have has success.

BTW, Which THC is it? Do you have a link?

Cheers,

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

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: multiple serial modbus slaves
« Reply #16 on: December 21, 2011, 04:12:16 AM »
Hi Peter

It's my own DTHC which I've been developing/testing for a while which I'm hoping to put on sale very soon. It's designed to work exclusively (at the moment) with certain Hypertherm models - Powermax45 for example.

Just a thought. In your opinion, if for example you had a system with just two modbus slaves, would it make more/any sense to use two serial - RS232 - ports rather than add the "complexity" of an RS485 bus?

Cheers

Ian

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: multiple serial modbus slaves
« Reply #17 on: December 21, 2011, 10:36:01 AM »
 ;D :D HOT Dog, Yous guys are speaking what I want to hear.  >:D

(;-) TP

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: multiple serial modbus slaves
« Reply #18 on: December 22, 2011, 08:31:27 AM »
Just a thought. In your opinion, if for example you had a system with just two modbus slaves, would it make more/any sense to use two serial - RS232 - ports rather than add the "complexity" of an RS485 bus?
OK - answered my own question - you can't do this because Mach can only access 1 port at a time. looks like RS485 it is.

Ian