05-08-2009 05:37 PM
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
05-11-2009 05:15 PM
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,
05-11-2009 06:36 PM
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.
Jeff
05-12-2009 12:40 PM
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??
05-12-2009 12:58 PM
Here is another device for multiple serial ports on modbus.
05-12-2009 01:01 PM
Here is a great article on this topic.
05-12-2009 01:06 PM
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. 🙂