earltyso
- 2nd May 2008, 19:43
Hello again,
I have a nifty project where I am taking in a data string from a "black box" we'll call it for now, and I only want one peice of data from the string.
I have attached a few samples of the string.... from my hyperterminal I figured out that the black box is sending out data at 9600 8N1 around 10x a second.
DEPTH 250.0 Ft SPEED 0.0 F/mTENSION 0 Lb
Here is the deal, All I want to store from this data (into a variable) is the depth...250.
That's it, I only need the first 3 sigfigs, I don't need speed or tension.
Here is how I think I will handle this.....
D0 var word
SERIN PORTA.?, N9600, ["DEPTH", D0]
Depth will be my qualifier, I am not sure if the depth is being sent from the blackbox as one word, or a byte per digit (character)???
How can I not take in the rest of the data until the qualifier is met again?
Am I on the right track?
thanks for any help
I have a nifty project where I am taking in a data string from a "black box" we'll call it for now, and I only want one peice of data from the string.
I have attached a few samples of the string.... from my hyperterminal I figured out that the black box is sending out data at 9600 8N1 around 10x a second.
DEPTH 250.0 Ft SPEED 0.0 F/mTENSION 0 Lb
Here is the deal, All I want to store from this data (into a variable) is the depth...250.
That's it, I only need the first 3 sigfigs, I don't need speed or tension.
Here is how I think I will handle this.....
D0 var word
SERIN PORTA.?, N9600, ["DEPTH", D0]
Depth will be my qualifier, I am not sure if the depth is being sent from the blackbox as one word, or a byte per digit (character)???
How can I not take in the rest of the data until the qualifier is met again?
Am I on the right track?
thanks for any help