10-07-2009 03:04 AM
Hi All,
As you can tell from the phrasing, im new here and new to labview, over the last month i have learnt the basics adn our control is very comprehensive, but........
I have written a control panel using buttons and joystick inputs for a UAV, all is working, but!....
The help im looking for is this.
On the 'format to string' there is 13 ins, 4 DBL`s and the rest are bools.....
this is outputed to the serial, which floods the port...everything slows down..etc....
What i need to do is ONLY send data for any or all of the string (controls) as and when it happens NOT continously.
i.e press a button this change in data is sent to the serial for the microcontroller to process
string output looks like...
AZ%d EL%d GIM%d CAMP%d IR%d AIRM%d FF%d IMS%d IVF%d IHF%d ICON%d IMDSP%d
say we change the AZ by joystick or button input ..only this information is passed to the serial port.
Sorry if this sounds very newb....but any help would be appreciated.
regards,
Mike.
Dr Mike Black
10-07-2009 04:10 AM
HI , just a post of the code.
regards,
Mike
10-07-2009 04:50 AM
10-07-2009 05:05 AM
Hi coq Rouge,
Thank you for the quick response.
Im a cought between a rock and a hard place, as the project we are working on is classified.
Is is possible that i can post only the part of the code that is relevant?
I thank you for letting me know that we should post code.
A short expenation would be that the pink wire out of the
'format into string' is the out put to the serial and carries all the variables, but as its in a while loop, its polling teh serial port all the time, what we need to do is only poll it to write when a value changes in that string.
Sorry i will try to extract the code you need to see and thanks for your patience in this.
10-07-2009 05:13 AM
Hi,
I did find this VI, that does (i think what we need) but can work out how to change the 'Cluster' to the output from our 'format to string'
make any sence?
10-07-2009 05:21 AM
Compare the sting output with the previous interations value (employ a shift register to save the previous value and feed the data back to the next iteration), if the value of the comparison is True do nothing, if it is False output the string data via the serial port (Use a true/ false case structure fed from the comparison check - Mike
10-07-2009 05:25 AM
10-07-2009 05:51 AM - edited 10-07-2009 05:52 AM
Hi Guys,
Mike, i think you have nailed it......
just going to go test with the microcontroller connected...give me 1/2 hour....
Coq, thanks, as i said...still very much a newb......adn learning all the time...I appreciate any help that you gurus have, and LOL....yes i have made that mistake.....LOL.......every days a school day as they say!
will report back in a few to see if this is the answer,
10-07-2009 06:02 AM
Mike, you are a star!!!!!!
If your ever in norwich, the beers are on me!....been scratching me wotsits for 3 days on this and the answer was a simple one (once pointed out to me)
Many Many thanks.....
Coq, thanks also for taking the time to post back to me.
dont know how you post kudus...but you deserve some for this....
its amazing how you can write a very complex app and not work out the simplest problems.....
again my sincere thanks for yoru help.