> > The nano satellite will "talk" on RS-232 9600 baud and since I'm > programming the PIC MCU I can make up my own protocol. > > I'm thinking something like: > Groundstation sends this: ?Temperature1 > And the satellite then replies: !Temperature1[Data]EndofData > > I will have 10 different probes in the satellite, monitoring currents, > voltages and temperatures and I need some help and tips on how to > "filter" the incomming string and split it up so that I can route the > approrpriate data to the appropriate "frontpanel?" or graph. >
If you let the satelite send a ASCII telegram of comma separated floating point numbers (one float for each measured parameter) for example every second. You will have to predefine the number of parameters and in wich order they are sendt. After the last parameter you can add a checksum to varify the received telegram. End the telegram with a carriage return and linefeed. Satelite ID,CH1,Ch2,...,CHn,ChkSumCRLF In your serial read vi, you can detect the CRLF and convert the telegram into an array of floats. This is a common way of sending data from dataloggers. If you don't want to use a predefined update rate, you can poll the satelite and use the same sort of telegram as the answer. This way you don't need to worry about the identification of the measured parameters. Erik
