10/11/2020 1:01 PM | |
Joined: 4/3/2019 Last visit: 2/20/2024 Posts: 116 Rating: (1) |
Hello I am trying to prepare a program which can calculate on line volume flow per second using only pulses from flowmeter - using s7-1200 I was looking in a forum but can't find solution, topic like this -https://support.industry.siemens.com/tf//ww/en/posts/flowrate-calculation-from-pulses/218456/?page=0&pageSize=10 is not working for me ...I do not know why. In attachemnt there is logic prepared according to pdf on the bottom of the above page but as I said is not working for me. My example is 1 pulse is for example 1 liter I would like to count volume flow per second - liters/seconds Kind regards Leszek [snip] - link to download tia portal 15 project (zip) Attachmentvolume flow.zip (273 Downloads) |
Last edited by: Leszek Jaszczak at: 10/11/2020 13:01:53Last edited by: Leszek Jaszczak at: 10/11/2020 13:02:48Last edited by: Leszek Jaszczak at: 10/11/2020 16:37:06Last edited by: Jen_Moderator at: 10/12/2020 11:16:26Removed link and added file as an attachment. |
|
10/12/2020 6:32 PM | |
Joined: 4/3/2019 Last visit: 2/20/2024 Posts: 116 Rating: (1) |
hello 0_Einstein - I will try your method with hardware when I get it, in the meanwhile I will try to do the simulation with only tia portal. In attachemnt I have sent screen of my "logic".It is not complete becouse I do not understand what should be - old and - new value. I have only current value from counter. |
10/13/2020 10:58 PM | |
Joined: 4/3/2019 Last visit: 2/20/2024 Posts: 116 Rating: (1) |
Jacek sorry but your calcuclation gives me "0" or value goes from 0 to 10...math dosen't work or I am still doing something wrong, please take a look at video.
Attachmentbandicam 2020-10-13 22-54-52-454.avi (148 Downloads) |
10/13/2020 11:03 PM | |
Joined: 4/3/2019 Last visit: 2/20/2024 Posts: 116 Rating: (1) |
qwazee thank you for advise it is 6.4 ms - attachement |
10/14/2020 7:06 PM | |
Joined: 4/3/2019 Last visit: 2/20/2024 Posts: 116 Rating: (1) |
Dear Jacek finally I have found mistake, thank you for help. The mistake was that I was placing MOVE before substraction. When it was before I get calculation result "0" - see attachemnt end of video. When I moved it as you wrote - SUBSTRACT before MOVE then it start to work. This was the most important words for me. Thank you. Now as I understand OB interrupt block read ones per second "new value", instruction MOVE change after one second "new value" to "old value", next substraction is beeing done also after one second and this gives result = 10 hz I am still not sure why it works that way, I know that program works from top to down. The best way of learnig for me is working with the problem. Anyway thank you for help and patience Jacek It is great to have this forum and pepole like you Einstein and Jacek
Attachmentbandicam 2020-10-14 18-44-26-161.avi (118 Downloads) |
This contribution was helpful to2 thankful Users |
10/14/2020 8:07 PM | |
Joined: 3/30/2020 Last visit: 5/3/2024 Posts: 4473 Rating: (936) |
Sorry for a late response. The filter setting has the ability to kill a fast pulse. The default is 6.4ms is a very bad setting for most applications that need HSC functions. The lazy way is to reduce the filter to the smallest value that is offered as a filter. The more proper way is to calculate the filter time that you require. As a rule-of-thumb, I use a factor of 10. Assume fmax is the fastest possible pulse that the input should detect. Assume tfilter is the input filter time. tfilter = 0.0064s is the default.
|
Activities of this user is voluntary. There is no obligation or liability placed on this user. Though optional, your 'please' and 'thank you' is highly valued. |
|
This contribution was helpful to2 thankful Users |
Follow us on