AC500 ETH_MOD_MAST - how to close connection
Hi guys, I have a project with 30 energy meters communicating through Modbus TCP/IP with my PM573-ETH cpu. I have found that this type of cpu can open max. 12 sockets at once but I need 30 for now and later it will be more. When I use ETH_MOD_MAST function block to communicate with all devices one by one, I can read values from 10 devices and then there is an error message "No sockets available". My question is how can I correctly close connection to any device to release a socket for communication with next device? When I try only one device to see the response in "coupler settings" in PLC Browser, there is around 18 seconds to release the socket after EN:=False. But it is too long. I tried to change "connect timeout" value in Modbus_TCP_IP_Server settings in CBP from 18s to 1s but without any change. Or is there any other way to get values from these 30 devices? Thanks for your help.
Voted best answer
Hi ,
If you are using energy meters it is better to use in array format. Be sure you use to blocks to intiate and close connections.
Regards
Gautham
Answers
Helllo,
Please do go through the attachement. I hopethis will help you out.
Call the block as, 1st done bit will trigger the second..so on and the last block done bit will trigger the first one.
we also need to do same so we have done as attached snapshot.
the data which we need to read from energy meter is not in consecutive addressess so we used array in function.
Add new comment