Reading Buffer

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 7.

Moderator: Benj

Post Reply
User avatar
jollybv
Flowcode v5 User
Posts: 374
Joined: Thu Feb 12, 2009 5:20 am
Location: Cape Town
Has thanked: 81 times
Been thanked: 25 times
Contact:

Reading Buffer

Post by jollybv »

Hi Guys

I'm trying to figure out how I can read a section of the circular buffer and when it gets to a certain termination character (.) it must jump out

The string that is being sent is something like Name.1111.Hellow World How Are You.

The Name is fine as I'm using LookForValue the pin is also fine as I'm counting 4 digits but the message is a problem as it can be anything from 1 to 20 characters.
Buffer.fcfx
(17.24 KiB) Downloaded 202 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Reading Buffer

Post by Benj »

Hello,

If everything is delimited with a full stop then I would do something like this using a finite state machine approach.
Parser.fcfx
(11.17 KiB) Downloaded 227 times
You might need a timeout to reset the RxMode back to 0 if no data is received for several seconds.

User avatar
jollybv
Flowcode v5 User
Posts: 374
Joined: Thu Feb 12, 2009 5:20 am
Location: Cape Town
Has thanked: 81 times
Been thanked: 25 times
Contact:

Re: Reading Buffer

Post by jollybv »

Hi Ben

Thanks, I will go through this and see if I can make it work

Post Reply