Reading Cycle time of DB Read #25
-
Hello, I am developing an HMI for my PLC using Sharp7 in C# based WPF Application. I want to read values from my DB in Siemens PLC in each 50 milliseconds if possible. I have found that my DB read command is taking time between 20ms to 100ms. Also, this time is different on each cycle. I would like to know why is this happening ? The same function trying to read same values from PLC is taking variable time. Here is the plotted graph of time taken to read vs 30 seconds time frame. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi! Thank you for starting a discussion here! In my opinion, reaching 50 ms of update rate may be difficult.
I think you have two way to go further: live with it or try to optimize. Live with itYour application can't practically reach a update rate better than 100 ms. If you can accept it, it's all right! Try to optimizeI see 2 main ways for speeding up such a process.
I hope I could help you. Best regards, |
Beta Was this translation helpful? Give feedback.
Hi!
Thank you for starting a discussion here!
In my opinion, reaching 50 ms of update rate may be difficult.
Sharp7 is build on the put/get functionality of every siemens PLC and this protocol is not real time.
A read duration up to 100 ms doesn't surprise me: there are many good reasons why this process may last longer than initially expected for example:
I think you have two way to go further: live with it or try to optimize.
Live with it
Your application can't practically reach a update rate better than 100 ms. If you can accept it, it's all right!
I don't know if you measured just one variable or more …