marwanco Posted August 16, 2011 Report Posted August 16, 2011 Hello All, I'm stuck with displaying continuous speed of moving cylinder on HMI. Basically what I want is car llike digital speedometer. When I stop the cylinder, speed must go to 0 instantly. I'm using S7-200, but it doesnt matter I guess. I tryed to calculate diference in position every 1 second, but the value keep jumping up and down. something to do with timing, cant solve it. The cylinder speed must be around 20mm/sec, I'm measuring the position with 4-20mA current comming fromwire potentiometer, there is no problem here. Thanks, Marwan
Peter Nachtwey Posted August 31, 2011 Report Posted August 31, 2011 What you whan is impossible with what you have. You need to use a filter to compute a relatively accurate speed but it will not have an instant response. If you are controlling the cylinder there are more options and algorithms available. If you really want to know the speed you should get a hydraulic motion controller. A hydraulic motion controller can update the actual speed every millisecond or faster. Think about this. How, can one control the velocity if the velocity isn't known? The same thing goes for position. The motion controller must be able to control the speed between positions. A good hydraulic motion controller can control the position, velocity and acceleration. The problem is that a hydraulic motion controller will cost a lot more than a S7-1200 but you get what you pay for. A more direct question is .... What is the application and what are you really trying to do? Did you know there are forums dedicated to simply calculating the velocity from positions? Here is one. http://www.holoborodko.com/pavel/numerical-methods/numerical-derivative/lanczos-low-noise-differentiators/ and another http://www.holoborodko.com/pavel/numerical-methods/numerical-derivative/smooth-low-noise-differentiators/ The Savitsky-Golay filters are a good place to start but they will not stop instantly. Pavel was innovative and came up with his smooth robust differentiators. The smooth noise robust differentiators will not stop instantly.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now