06-05-2012 07:00 PM
06-05-2012 07:58 PM
That is the Feedback Node that has been right clicked on and had "Change Direction" selected. The top one has had its properties changed to have a delay of 2 (default, is 1). It is similar to Steve's suggestion of using a shift register (which would have the advantage of giving you your loop to get each of the bytes).
Rob
06-05-2012 11:39 PM
@baseball07 wrote:
The data is being sent from a microchip microprocessor, using the internal 8-bit USART transmitter which goes to a bluetooth transmitter. I first send the 8-bit header, then the data of interest which is split into two bytes. Since the transmitter is only able to send one byte at a time, I had to divide it into 3 parts and send separate, rather than a single 3-byte transmission. My program needs to find the header and delete, then combine the next 2 bytes that follow which is the data, and repeat.
You don't need to delete the header, simply ignore it and process the next two bytes. Use the header as a trigger. Scan the incoming string using a loop. Load the data bytes 1 and 2 after your header is received.
06-05-2012 11:39 PM
@baseball07 wrote:
The data is being sent from a microchip microprocessor, using the internal 8-bit USART transmitter which goes to a bluetooth transmitter. I first send the 8-bit header, then the data of interest which is split into two bytes. Since the transmitter is only able to send one byte at a time, I had to divide it into 3 parts and send separate, rather than a single 3-byte transmission. My program needs to find the header and delete, then combine the next 2 bytes that follow which is the data, and repeat.
You don't need to delete the header, simply ignore it and process the next two bytes. Use the header as a trigger. Scan the incoming string using a loop. Load the data bytes 1 and 2 after your header is received.
06-06-2012 08:54 PM
Thanks everyone, I took your suggestions and the program runs very good!
06-06-2012 09:09 PM
A couple tips:
1. Don't split the array wire and use two different Index Array functions. Use a single index array. Drag the bottom border downward and you'll have two outputs. By default, they'll be indices 0 and 1, so you won't even have to wire up constants to the index input.
2. Your byte manipulation is a Rube Goldberg. To convert the integers to string Hex characters, concatenating them, then converting the hex characters back to an integer is just not necessary. There is a Join Numbers function that will convert two U8 integers to a single U16 integer.
3. Also since you are just getting a single byte from the Read function, I would convert that to a U8 array, then indexing the array there to get a single element before putting it into the right hand shift register. That way you don't need to do all the Index Array functions for the data coming out of the left hand shift registers. They will already be a scalar integer.
06-07-2012 07:18 AM
Ah, Rube Goldberg. I get it now. I've seen this name mentioned many times on the forum but did not have a clue as to walk folks were talking about. Thanks for the link to the thread.