Hi! I apologize in advance for bad English. I really liked your library. It is easy and convenient to use. But we had a small problem. We have PLC1 and PLC2, which communicate with each other via Modbus TCP. And we have a PC that is connected to PLC1 and exchanges via USB by emulating the COM port. On the PLC1 side, an end-to-end exchange is made from USB to TCP. Therefore, we need to send over the USB connection via this communication channel (between PC and PLC1) Modbus TCP/IP packets and then PLC1 will transfer this packet further for PLC2. And the PC should also accept a Modbus TCP/IP packet from PLC1. Is it possible to add functionality to the library that implements this communication?
Thank you.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am not sure if I understood. You would like to send a Moddbus TCP Packet over a COM-Port? Is that what are asking for?
Modbus RTU is specified for a data exchange using serial connection. Couldn't you use Modbus RTU?
Stefan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Very nice work on the library! Is it possible to get the IP-address of the connected client when using your ModbusServer? I have > 256 connecting ModbusTCP client and would like to use ip-addresses to identify client instead of their station-ids
Regards
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi!
"You would like to send a Moddbus TCP Packet over a COM-Port? Is that what are asking for?" - yes, yoa are right.
But now we talked to the developer and agreed to redo the exchange according to the standard.
Also, I noticed one problem in your library. If you first initialize ModbusClient modbusClient = new ModbusClient (); Without passing a parameter with the name of the COM port and then specify it modbusClient.SerialPort = "COM1"; Then an error occurs when connecting -
System.UnauthorizedAccessException: "Access to the port 'COM1' is closed."
Any ideas?
Anyway, thank you for your library.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi! I apologize in advance for bad English. I really liked your library. It is easy and convenient to use. But we had a small problem. We have PLC1 and PLC2, which communicate with each other via Modbus TCP. And we have a PC that is connected to PLC1 and exchanges via USB by emulating the COM port. On the PLC1 side, an end-to-end exchange is made from USB to TCP. Therefore, we need to send over the USB connection via this communication channel (between PC and PLC1) Modbus TCP/IP packets and then PLC1 will transfer this packet further for PLC2. And the PC should also accept a Modbus TCP/IP packet from PLC1. Is it possible to add functionality to the library that implements this communication?
Thank you.
Hi,
I am not sure if I understood. You would like to send a Moddbus TCP Packet over a COM-Port? Is that what are asking for?
Modbus RTU is specified for a data exchange using serial connection. Couldn't you use Modbus RTU?
Stefan
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hello,
Very nice work on the library! Is it possible to get the IP-address of the connected client when using your ModbusServer? I have > 256 connecting ModbusTCP client and would like to use ip-addresses to identify client instead of their station-ids
Regards
Hi,
its not possible at the moment, but its a good point! Will add that soon.
Hi!
"You would like to send a Moddbus TCP Packet over a COM-Port? Is that what are asking for?" - yes, yoa are right.
But now we talked to the developer and agreed to redo the exchange according to the standard.
Also, I noticed one problem in your library. If you first initialize ModbusClient modbusClient = new ModbusClient (); Without passing a parameter with the name of the COM port and then specify it modbusClient.SerialPort = "COM1"; Then an error occurs when connecting -
System.UnauthorizedAccessException: "Access to the port 'COM1' is closed."
Any ideas?
Anyway, thank you for your library.
Hi,
at the moment you have to define the Serial Port in using the correct constructor.
ModbusClient modbusClient = new ModbusClient ("COM1");
But you are right that we could initialize the COM Port also as soon as the Property SerialPort changes. I will fix that in the new version.
Right now you have to use the correct constructor to initialize the Serial port.