Showing results for 
Search instead for 
Did you mean: 

RIO Modbus Master Slave

I'm using the Single Board RIO.  I would like to use the only RS232 port to communicate RS485 Modbus.  I have the converter, an HMI panel (RTU capable) and a Simpson Meter (Modbus RTU).  How can I use LabView to receive information (as a slave) from the HMI panel (which has no memory registers, it only trasmits and recieves the data, acting as a master) and also talk to the meter (using LabView as a Master) to get the readings each with it's own slave address but using only one com port (com1)?  Basically, I want to get LabView to act as a master and a slave each with it's own adress but both on COM1.  First I will get it to work on my desktop, then I will worry about getting it to work on the SbRIO.


LabView querying data from Meter at address 42821

LabView sending data to HMI from address 30001 and receiving data on address 40001


Thanks in advance for any help!  Jeff Slota



0 Kudos
Message 1 of 7

Hi Jeff,


Generally there should only be one master in the Modbus network.  Is there a way you could make one part of the system be the master for all of them?  Maybe have LabVIEW get query commands from the HMI panel and then send them out.  


It has been a couple days since you posted.  Have you had any success using the one serial port?  If not, can you use ethernet to communicate with the HMI?


Best Regards,

Bryan H.
0 Kudos
Message 2 of 7

No, I have not had any success yet.  I do know that you are not supposed to use two masters on one network (even though it can tachnically be done with some tricky timing).  But, in this case, the HMI panel does not have any memory registers to query so it will only broadcast information continuously and receive it directly.  I can't use the Ethernet because the two devices are serial modbus only.


I am, however, trying a different route.  I am going to try to use the FPGA on the SbRIO to communicate RS485 directly and I will use this for the HMI panel.



0 Kudos
Message 3 of 7

You can have multiple master devices on modbus serial. Modicon used to make a device called a bridge multiplexer BM85 that had four serial ports on it. One port would get connected to the HMI and it would act like a master device reading or writing data to the labview program. Salve devices get connected to the other ports. You should be able to setup an address table in each port for routing commands to the correct device. Any master can read or write data from any slave device on the network. The trick becomes, do you only want one master device to write certain data areas??

0 Kudos
Message 4 of 7
0 Kudos
Message 5 of 7

Here is a great article on this topic.

0 Kudos
Message 6 of 7

Great!!  Thanks!!  I am going definitely look into these, they may also be useful for other projects.  I will still also try the FPGA option though, just for fun and learning. 🙂



0 Kudos
Message 7 of 7