-
-
Notifications
You must be signed in to change notification settings - Fork 855
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modbus RTU multiple devices per serial port. #211
Comments
Hi, Thanks for the report. |
Hope to see this update! |
I studied the code a little bit and seems that need another layer for the physical connection (serial port) above the device layer, or assumes that the device is the serial port and each tag have the modbus unit id property. The same will apply to issue #755. |
@rvbatista Hi, I have not yet examined it well, but I think it might be sufficient to map all tags of all devices configured as RTUs to one device by grouping them by Id. |
@unocelli this will be faster to do, but will break the timeout and connect logic. I'm not experienced in node and zero experience in angular, but it's I'm interested in trying to implement this modification. |
@rvbatista polling waits for the response with await and before reading you can sets the respective deviceId, after correct mapping you extend _readMemory with the deviceId parameter and before reading it you sets the id |
@rvbatista thinking back, maybe it is simpler to share the client component (ModbusRTU) between the different devices and define a main device (the first one) that handles the connection, in this case you don't have to make a new mapping but to synchronize the communication |
I implemented the function of multiple SlaveID under ModbusRTU by adding a SlaveID property to each Tag. |
@PaDaBooo this sharedDevices was the beginning of development and really does nothing at this moment. I didn't had much time to work with this issue. The solution that you implemented is not the best, but better to have something as work around than wait for the best solution. |
Hi there |
I've found a method to reuse a serial port. Usage Instructions: For instance, if you have a serial port at /dev/ttyAMA2 and you wish to connect it to localhost on port 10001, you can use the following command:
Upon executing this command, you will have a Modbus TCP port accessible at 127.0.0.1:10001. At FUXA, you can config like this: If you need further assistance or have more details to add, feel free to let me know! |
Hello,
when i create multiple device's as ModbusRTU and want to use the same serial port, it does not work.
That make sense as it try's to open a new connection to the serial port.
But i habe a ModbusRTU with multiple devise's and all different ID's and i can only access one at a time.
Would be nice to add the possibility to communicate with multiple ID's on the same RTU connection.
Kindly regards :)
The text was updated successfully, but these errors were encountered: