Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copying text out of string without deleting previous text.

Status
Not open for further replies.

Guest
Hi,

I need to read in data from an engine, the meter sends :
B+105#H+500#C+200#D+100#A+100#F+250#G+50# through the serial port. I need to find each channels value without deleting the previous text. Pos(Letter, String) works fine but pos(Hash,String) only finds the 1st Hash.

Function works fine that I wrote, except it takes too long
copying the buffer to 8 channel variables and then deleting everything in front of the letter used and then converting it into numbers that I can use. How can I get the text I want with only one buffer and one variable.

Any suggestions?
 
Replies continue below

Recommended for you

What kind of CPU, language do U use ? What does # and the letters mean ? <nbucska@pcperipherals.com>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor