as i said before, create a new VI, then use this VI to test the algorithm,
after you understood what it does you can put it into your "real" VI.
activate the context help (CTRL+H)
read up on all the things,
play with the things to understand what they do.
.... and keep your wires straight
Thank you very much for the help provided. I have understood the logic but the only problem is that it sends 0 rather than sending nothing when none of the " specified times" match. im trying to resolve but if you have the suggestion, pls share.
I think, I have found the reason, I was writing too fast for the remote device. I have put some delay and it worked fine. That makes the read slow, so I will take the write in another loop.
Thanks for your immense help
Sorry guys I am still having the same issue. Even with the wait block in the loop, still the receiving end receives 40 and 0 and sometimes 40 only at the specified time. Is there any way this can be resolved ?
Only if I use 3000ms as delay and read write in the same loop, it always sends the right value. And that also makes the read v slow, current readings reflect v delayed.
Guys please help out as Im unable to figure out why sometimes it sends both 40 and 0 and sometimes only 40 at the specified time. How can this be avoided ?
There's an interesting function in the middle of this VI that compares two Booleans, X and Y, using ">" and returns T only if X is True and Y is False. This is exactly the negation of the (probably-rarely-used) Boolean function "Implies", which (as I remember from my class in Symbolic Logic) is True unless X is True but Y is False. [If X is True and Y is False, then clearly "X Implies Y" must be false. If X is False, then from a Falsehood, you can (logically) imply anything, hence X implies Y is always True if X is false). X Implies Y can also be written (Not X) Or Y. My personal preference is to use Logic functions for Boolean variables ...