01-03-2018 04:49 AM
hi im new tl labview and can anyone help me to solve this below problem
a digital input will be continuously ON. at particular instance the digital input ON for 2 sec and 2 sec off. this will repeat 5 times. if the input on off time repeated 5 times (2sec on & 2sec off) i have to make a count
i did some vi but it is not working. when the condition stay true, it counting continuosly
Solved! Go to Solution.
01-03-2018 05:42 AM - edited 01-03-2018 05:45 AM
Hi bramma,
at particular instance the digital input ON for 2 sec and 2 sec off. this will repeat 5 times. if the input on off time repeated 5 times (2sec on & 2sec off) i have to make a count
So you need to implement:
1. check for "digital input is FALSE for ~2s, then TRUE for ~2s"
2a. when condition1 is met, then increment a counter
2b. when condition1 is not met, then reset the counter to zero
3. when counter reaches value 5, then your desired signal pattern is detected
4. reset your counter to zero, after signal pattern is detected
Btw. you should also remove those Rube-Goldbergs in your code:
- what's the point of comparing a boolean to FALSE?
- what's the result of "x NOR FALSE"? (It's just a NOT…)
01-04-2018 12:26 AM
thank u