02-20-2015 04:03 AM
Hi everybody,
It`s my first step on the NI forum. My apologize in advance if I`m not in the right section 🙂 but I think it`s the good one.
To resume my situation in two words, I`m making my intership for the end of my studies. I`m ingeneer in biochemestry and i have to work on labview.... so i`m not very good but i get by in this software (to be honest I like this).
Anyway,
With labview, I have to control two servomotor to open two gate but not together. I open the gate in the same time and then I have to close one and then the second. (or in the other sens).
My problem is that when I close the front gate and then the behind door everything it`s ok. But when I have to close the behind gate first I can`t close the other gate. And I have an error message (furthermore, arduino and Labview are desynchronised, it`s very boring)
I`m sure that my problem come from the end when i have to close the motor. I join my software and one picture.
I didn`t find others solutions to close the arduino card after everything. Maybe I can tr with one boucle while like in the beginning of my code. But I don`t want to add an other button.
Thank you a lot for your answer.
PS: I`m french and I`m Learning english.... so maybe it`s not perfect ^^
Solved! Go to Solution.
02-20-2015 06:21 AM
I tried whit one boucle while.
(I was focus on my idea but I`m not oblige to put on button stop)
But it`s weird because everything works when I launch the software with the " higtlight execution" but without I have the same problem than before.
I don`t understand why.
Thanks
Maxime
02-20-2015 06:37 AM - edited 02-20-2015 06:38 AM
Hi Gerday,
everything works when I launch the software with the " higtlight execution" but without I have the same problem than before.
Well, you burn your CPU using loops without wait states! Put some wait function in your loops. All of them!
I don`t understand why.
Running a program as fast as possible is seldomly the best way…
The last loop (to the right) is pure nonsense! Use proper DATAFLOW provided by error cluster wires…
02-20-2015 08:47 AM
Thank you a lot for your answer.
I didn`t know about the wait states and that I was burning my CPU (But i`m not an informatician, so I don`t know exactly what it is ^^ but this week-end I will update myself)
Anyway with the wait states now everything works. ( by the way, is there a minimal for the wait states ?)
and about this sentences :
" Use proper DATAFLOW provided by error cluster wires…"
I found nothing with the clusters. I can`t regroup the error wires or the pink wire..... Can I more information about this?
But thank you a lot for your answer.
I`m happy to succceed the control of my servomotors during this week.
Maxime