Sign in to follow this  
Followers 0
rajsiyer

Help on using Read_Var with execution check

4 posts in this topic

Hi fellas, The situation is like this I've a Premium PLC with an SCP-114 card configured as Modbus master. The master needs to poll 7-8 slave devices such as load cells & weighing scales. My dilemma is to choose between A) Use as-many Read_Var function blocks as there are slaves and poll them in a round-robin manner every 200 ms. or so OR B) Use a single Read_Var function block to which the addresses of the slaves as well as the reception zone/Management parameters are changed every 200ms or so. I've done both methods but as far as speed is concerned, the latter method is better but if a particular slave fails to respond then its assigned reception zone seems to intermittently receive the data of the prior slave which responded correctly. The problem with the earlier method is that if a single slave is not available, it holds up comms until it times out. So this tends to slow down comms as a whole for all slaves. There is one activity bit located at Management_parameters[0].0. This gets set on the trigger for the Read_Var Block. This resets when the comms execute correctly or later when there is a time-out. Again the Management_parameters[1] word must be zero after a correct exchange. Can anyone suggest a reliable way using these signals so that multiple slaves using a single Read_Var block obtain their data correctly within their own time-slot? Regards, best wishes, Raj S. Iyer

Share this post


Link to post
Share on other sites
I've come out with ONE way of doing this. Please go through the attached file. It needs Unity-Pro V4.0 I'll appreciate your valued comments,criticism & suggestions for improvement Raj S. Iyer Multi_Slave_1Read_Var.zip

Share this post


Link to post
Share on other sites
1_Slave_multi_read.zip Hello, I have Premium unity PLC using READ_VAR and WRITE_VAR blocks to read and write datas in a distant non Schneider PLC. I have only 1 slave but I use 3 READ blocks and 1 WRITE block in order to read words and booleans datas at different adress in the slave memory. My ladder program is close to what you have done, the only difference is that I don't use a timer to increase my block pointer value but the falling edge of the running block activity bit. Since the beginning I'm facing the following problem. The two PLC's exchange a life bit. If this one is steady for more than 20 seconds a fault is raised up. Unfortunately this appens regularly. The PLCs are distant from about 2 Kilometers but we are using a fiber optic network. Obviously the communication should be faster than what we have. Any suggest is welcome. I join the ladder program for the communication task (Hope that you can understand my english) Best regards

Share this post


Link to post
Share on other sites
Bonjour, mon ami, Je n'ai pas que comprend un peu de franglais! Merci beaucoup a votre reponde. Mais Je repondais en anglais. I can see nothing wrong in your code. But one thing you may please check in the hardware configuration of the comm port which is the modbus master, keep the time out at the very minimum ie 100ms.(n'est possible pour mettre ce moins de 100ms) and keep the number of RETRIES at zero this is most important. I hope you solve this issue soon and let us all know how you did it. Au revoir, Raj S. Iyer

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0