LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

String Data TO serial Flooding port PLEASE HELP!?!?

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

 

 

 

0 Kudos
Message 1 of 9
(3,394 Views)

HI , just a post of the code.

 

 

regards,

Mike

Regards,

Mike

Dr Mike Black M.D UCAS-SYSTEMS

Flight Is Life, Autonomous Flight Is The Source
0 Kudos
Message 2 of 9
(3,383 Views)
Please post your code not a picture. Your problem could be outside the picture you sent us. We need to see the "bigger picture" Then addressing this forum always post code if you have some.


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 3 of 9
(3,373 Views)

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.

 

 

Regards,

Mike

Dr Mike Black M.D UCAS-SYSTEMS

Flight Is Life, Autonomous Flight Is The Source
0 Kudos
Message 4 of 9
(3,370 Views)

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?

Regards,

Mike

Dr Mike Black M.D UCAS-SYSTEMS

Flight Is Life, Autonomous Flight Is The Source
0 Kudos
Message 5 of 9
(3,367 Views)

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

 

Message 6 of 9
(3,364 Views)
You do not have post ALL your code just the relevant part ;). By the way do you use open and close serial port every time you address the serial port. That is not the correct way of doing things. But it is a very common beginner mistake


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 7 of 9
(3,358 Views)

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,

 

 

Message Edited by Dr Mike Black on 10-07-2009 11:52 AM
Regards,

Mike

Dr Mike Black M.D UCAS-SYSTEMS

Flight Is Life, Autonomous Flight Is The Source
0 Kudos
Message 8 of 9
(3,342 Views)

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.

Regards,

Mike

Dr Mike Black M.D UCAS-SYSTEMS

Flight Is Life, Autonomous Flight Is The Source
0 Kudos
Message 9 of 9
(3,336 Views)