04-27-2023 12:02 PM - edited 04-27-2023 12:03 PM
Yes, I understand and I try avoiding feedback node, but let's say the acquired data is greater than 10.5 for more than 5 seconds, your counter will keep counting.
Maybe what we need to know is for how long the acquired data would stay greater than 10.5.
04-27-2023 12:18 PM
@GRCK5000 wrote:
Yes, I understand and I try avoiding feedback node, but let's say the acquired data is greater than 10.5 for more than 5 seconds, your counter will keep counting.
Maybe what we need to know is for how long the acquired data would stay greater than 10.5.
It should not be the case, basically for every iteration it acquires data it should validate irrespective of timing (nowhere he mentioned timing).
Let him come back after testing.
04-27-2023 12:22 PM
Palanivel! Don't talk to me like that. Lol... just kidding 😁. I'm also learning myself, but yeah let's see what he says after testing.
04-27-2023 04:33 PM
Im going to be real honest I am so confused with what is going on. Because the GRCK5000 your code only counts to 1, while PALANIV your code once it is triggered it just counts when the it gets tripped, but only when going really fast. It is missing all of the slow trips. But when having the refresh rate at 1 isn't that the fastest it will go. It is reading too slowly. So using the Palaniv side of the code, is there any way to speed it up. This is what I used.
04-28-2023 01:11 AM
Hi Collin,
modify use "convert from dynamic data" as shown with the arrow below.
04-28-2023 04:21 AM - edited 04-28-2023 04:22 AM
@collin_g_10 wrote:
Im going to be real honest I am so confused with what is going on. Because the GRCK5000 your code only counts to 1, while PALANIV your code once it is triggered it just counts when the it gets tripped, but only when going really fast. It is missing all of the slow trips. But when having the refresh rate at 1 isn't that the fastest it will go. It is reading too slowly. So using the Palaniv side of the code, is there any way to speed it up. This is what I used.
The code which i have shared is nothing to do with timing (Fast/Slow), The timing is purely depends on your Data Acquisition part and your wait time.
Still you are not clarifying your use case. When do you want to Increment the count (For every value >10.5 or whenever there is a transition from 10.5 to Lesser and Lesser Value to 10.5).
IMHO:People here are to help the new learners to Understand and do the stuff by themselves so need to be clear on your issue and able to understand the work that we do for you.
04-28-2023 10:08 AM
Hi Collin,
Can you answer these questions asked by PALANIV? We just need clarification. Try your best to be as clear as possible, use pictures or anything if needed.
But feel free to try the code that I have attached below.