Technical FAQs

Ask a Question

M340 Read_Var or Write_Var function block freeze in case slave not response.

Check the Timeout setting in GEST parameter of read_var EF. If it is not set then assign the timeout value. 
Timeout is a multiple of 100ms means if 30 is setted as timeout then it will be 30*100ms =3sec. Reduce it if want a fast response considered that the slave device should be get replied in this time frame.
If the communications timeout is left at the default value of zero (0). A timeout value of zero 0) will cause the function block to never timeout. 

This results in the The READ_VAR and WRITE_VAR block to never close the TCP/IP connection. To resolve the issue, define a timeout value in  the '%MW+2' management word of the READ_VAR or WRITE_VAR block. 
Was this helpful?
What can we do to improve the information ?