SAPHIR - Toolkits Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Running two slaves in one computer using GModBUS

Hello, 

 

I would like to simulate two slaves running in the same program or at least on the same computer. I have one master that requests data from those two slaves via ModBUS over serial communication. I have run the program with only one slave at a time and it works. However, when I try to run both at the same time, it doesn't quite work. The slaves have different addresses. Is this possible using the GMobBUS  toolkit? 

0 Kudos
Message 1 of 5
(4,984 Views)

Hello,

The configuration you're running should work fine. I quickly run the simple slave VI you can find in the LabVIEW example twice and connect simple master VI once to the first slave and once to the second slave. It works fine.

Could you please tell me more about the issue you are running across ?

 

Thanks,


Olivier Jourdan

Wovalab founder | DQMH Consortium board member | LinkedIn |

Stop writing your LabVIEW code documentation, use Antidoc!
0 Kudos
Message 2 of 5
(4,956 Views)

Thank you for your response Olivier. I have tested this program and it works. However, this is only simulating one of the slave devices I need. I was trying to run a second slave device with address 5 (the program I posted is using address 4) on the same program/computer. My master program takes turns requesting blocks of information from the two slave devices. How could I simulate the two slave devices on the same program/computer? When I try to do do it, my master doesn't receive the data correctly, it seems that there's some data missing.

0 Kudos
Message 3 of 5
(4,952 Views)

Could you tell me more about your serial port configuration ? As far as I understand, you want 2 slaves running on one PC. Each slave listens to a different port. I guess your master is running on another PC. How is it linked to the slaves ? Also, I'd be interested to know more about your use case. It seems to be unusual...


Olivier Jourdan

Wovalab founder | DQMH Consortium board member | LinkedIn |

Stop writing your LabVIEW code documentation, use Antidoc!
0 Kudos
Message 4 of 5
(4,948 Views)

Yes, I have two slaves running on one computer and the master is running on another one. the connection is made using modbus over serial connected on an Ethernet port in the master's side, and on a USB on the computer running the slaves. I'm trying to simulate two power meters that provide data (voltages, power values) when requested by the master (which is continuously, it takes turns asking for the data from each meter). In the field application, the communication is also performed through modbus over serial, using the same slave addresses (4 and 5).

 

The program runs perfectly when I do it for each slave individually. However, when I'm trying to figure out how to run both.

 

0 Kudos
Message 5 of 5
(4,923 Views)