05-19-2023 01:52 PM - edited 05-19-2023 01:56 PM
Hi,
how can i command a digitalWrite input to toggle between two states true and false and pause in the false state, i thought of using wait but i don't know how to do it? can you provide a sample program please
05-19-2023 02:05 PM
Hi Sarhila,
@Sarhila123 wrote:
how can i command a digitalWrite input to toggle between two states true and false
You need to wire your TRUE/FALSE value to the DigWrite function, changing between states!
@Sarhila123 wrote:
and pause in the false state, i thought of using wait but i don't know how to do it?
Place a Wait function in the FALSE state!
To sum up: in a statemachine your questions are easily to solve, all you need to do is to program the proper actions in each state…
05-19-2023 02:42 PM
I am a beginner in labview programming for this I find difficulties. as you see in the picture i control three digitalPin at a time but i need to switch between two states only digitalPin 2 (valve), so can you suggest an example program please.
05-20-2023 12:17 PM
It is not polite to show plagiarized code without giving a link or context.
You simply need another state (call it "wait"!) and switch to it depending on needs.