11/9/2022 11:04 PM | |
Joined: 6/20/2020 Last visit: 11/19/2024 Posts: 44 Rating:
|
Hello, In my program, I perform the calculation of a flow from pulses over a period of 9 seconds. Refreshing of the value takes place every 9 seconds. I would like to refresh more quickly by performing the same operation over 3 periods of 9 seconds, each shifted by 3 seconds from each other. The display can then be refreshed every 3 seconds. I tested 2 versions: The first does not work because I did not succeed with the block threshold trigger because they start at the same time, they are the same periods and are not delayed. I can't seem to delay them because there is no enable mode. The second more complicated or I made myself an equivalent of the threshold trigger block. It works but the display is badly refreshed because of the Anlog MUX block which rotates the display. Inputs S1 and S2 do not change state at the same time. (you have to vary the frequency of I3 to see this) In my intended use, the period will be 30 seconds, so a display refresh every 10 seconds. Can you help me, suggest me something simpler ? Thanks a lot AttachmentLOGO Flow rate.zip (587 Downloads) |
Last edited by: a.piquerel35 at: 11/09/2022 23:04:59 |
|
11/10/2022 2:47 AM | |
Joined: 12/18/2014 Last visit: 9/4/2025 Posts: 35925 Rating:
|
I'm sorry, but I didn't understand what you have programmed. I don't understand the point of your reasoning. |
11/11/2022 8:41 AM | |
Joined: 6/20/2020 Last visit: 11/19/2024 Posts: 44 Rating:
|
Hi. Exemple with this topic : Flowrate with pulses Logo 8 In my case, i have a water flowmeter with puls output, variable between 0,33 and 5,55 pulses per second and I want the momentary flow every 10 secondes. The problem is a 10 second sample is not enough for accuracy. a 30 second sample is better. Is it possible to make 3 samples delayed by 10 seconds between them. At the end of each sample, so every 10 seconds, calculate the flow rate with the result of each of these samples
Sorry I do not understand |
Last edited by: a.piquerel35 at: 11/11/2022 08:49:02 |
|
11/11/2022 8:56 PM | |
Joined: 6/11/2019 Last visit: 8/31/2025 Posts: 2623 Rating:
|
A program often speaks more than 1000 words. Here's an example.But I worked with the reset pulses for the individual counters, which leads to the same counting on the first run. This would then possibly have to be adjusted according to your own ideas. Kind regards Ella_68 (translated with Google) AttachmentSample1.zip (611 Downloads) |
Last edited by: Ella_68 at: 11/11/2022 21:12:03Last edited by: Ella_68 at: 11/11/2022 21:31:37program corrected |
|
11/12/2022 2:12 PM | |
Joined: 6/20/2020 Last visit: 11/19/2024 Posts: 44 Rating:
|
Thanks Ella, I made two versions so one that uses your sample. In both I temporized the MUX to not see the value change on the screen. For the tests, I put a refresh every second, so with 3 counters, the total period is 3 seconds. The result is not identical in the two versions, test at 100Hz for example. Thanks ! AttachmentLOGO Flow rate v3 et v4.zip (667 Downloads) |
11/12/2022 5:27 PM | |
Joined: 6/11/2019 Last visit: 8/31/2025 Posts: 2623 Rating:
|
How did you do the test? On a logo or in the LSC simulator mode? The LSC not only runs slower than on a Logo, but is also heavily affected by the fluctuations caused by the program processing of the operating system. Normally this is not noticeable, but with time sensitive programs this can be a big problem. You also have a "dead" area where you don't count. E.g. the 0.01s for the clock generator or the delay that some blocks need for internal processing. This comes into play with high numbers of pulses per time unit. But why are you stressing yourself ? Just get a threshold switch for the fast inputs with a capture for 3 seconds and then extrapolate to 9s Ella_68 (translated with Google) Attachmentother way.zip (622 Downloads) |
Last edited by: Ella_68 at: 11/12/2022 17:34:51example attached |
|
11/12/2022 9:58 PM | |
Joined: 6/20/2020 Last visit: 11/19/2024 Posts: 44 Rating:
|
Yes I also just noticed that the 0.01s added a dead time. I replaced the asynchronous pulse generator with a timer on delay. The result is slightly better but yes I'm in simulation because I don't have the material with me. Thank you for this information, it reassures me!
Look at the attchment of my first post of this topic : I have a very simple example with a threshold switch, the program is much simpler but I don't think it's possible to have 3 of the same duration but shifted in time (There is only the Gate time parameter). There is no "EN" connector If it's possible, it could be very easy. In reality, the period will be 30sec, maybe even 1 minute. But if it's 30 seconds, then the user will have to wait 30 seconds to know the bitrate, which is too long. The objective is to see the effect of an adjustment on the flow. By creating 3 periods of 30 seconds which are staggered by 10 seconds each, then the user will only have to wait 10 seconds.
AttachmentLOGO Flow rate v0 - threshold trigger.zip (718 Downloads) |
Follow us on