annulla
Visualizzazione dei risultati per 
Cerca invece 
Intendevi dire: 

set ON with delay

Risolto!
Vai alla soluzione

Hi guys,

I'm new in LabView and in programming as well. What I need is to control Arduino microcontroller with LabView and it's nessessery for my diploma thesis. I looked for solution of my problem here in forum and all over the web, but im little bit confused of all of that.

What I need to do is when it comes TRUE value from sensor, it sets ON an output pin for set delay (in ms) and after time is runned out, it sets OFF again. I tried it with elapsed time in While loop, but when there is loop with elapsed time running in loop of main code (while loop in while loop) -> the main code cicuit stops until the loop with elapsed time runs out. It is nessessery for me to run the main code all the time without stop delays. Im little bit in blue, so...

Please help.

Thanks a lot..Hanes 

0 Kudos
Messaggio 1 di 13
3.545Visualizzazioni

Hanes, 

 

You need to provide more information, such as the hardware you are working with and attach your code. No one here noew what you are involved with and so post as much information as you can in a structured and concise way.

 

Also, spell LabVIEW correctly.

0 Kudos
Messaggio 2 di 13
3.536Visualizzazioni

Also, when you post your message, give MEANINGFUL message subject, so that people who have knowledge in that particular area will be able to easily recognize your post and what you are trying to do.

0 Kudos
Messaggio 3 di 13
3.534Visualizzazioni

Ok,

In attachment is a picture of the block diagram. The whole code is for automatic wattering of experimental plants. Sensor is analog soil moisture sensor, which gives values around 0 - 900. If soil moisture is drier then is set treshold value -> it sets ON a digital pin of watter pump, which runs until set time runs out ant then switches OFF again. All the code is unnecessarily big to uplod it here and all labels are in czech...

0 Kudos
Messaggio 4 di 13
3.528Visualizzazioni

|SO, your basic problem is that your timer?

0 Kudos
Messaggio 5 di 13
3.505Visualizzazioni

Yes, the main problem is, how to construct timer, with no main loop pause.

0 Kudos
Messaggio 6 di 13
3.501Visualizzazioni

You can use a Timer or a Tick Counter I think.

0 Kudos
Messaggio 7 di 13
3.495Visualizzazioni

Are you able to give mi more concrete help?..:D

0 Kudos
Messaggio 8 di 13
3.494Visualizzazioni

due to windows...you will not get exact times in ms. post a vi and not a png, they do not give us a complete picture

0 Kudos
Messaggio 9 di 13
3.487Visualizzazioni

All right, here is .vi file 🙂 It's for 2011 version, because of arduino drivers. 

0 Kudos
Messaggio 10 di 13
3.480Visualizzazioni