07-27-2011 10:09 AM
hello, i have external flash memory data coming from serial port to LV, and i would like to sense when the incoming data ends. In my microcontroller code, i have assigned an EOS characters (to mark end of data), however, I would like to check if EOS has arrived OR a continous FFFFFFFFFFFF is sent from flash mem(indicating there is no more data in flash). how can i perform ORing of these two strings?
Solved! Go to Solution.
07-27-2011 10:47 AM
Well, a "continuous string of FFFFFF..." is difficult, because you would need to wait forever to ensure it is continuous. 😄
You need to decide how many continuous FFFFF constitute a termination event. Do you have a good guess?
In any case, once you decide how to detect the condition and output a boolean, a simple OR from the boolean palette will do. The other condition is the presence of EOS (what character is that?).
07-27-2011 12:06 PM
hahaha... altenbach, i shoudl have mentioned about the FFFFF, well, i am checking if 10 (FF)h are observed or not... that shuold be good i guess...
the other EOS is (St~P) ... i made it complex so that lv doesn't get confused the EOS with actual data...
07-27-2011 05:02 PM - edited 07-27-2011 05:04 PM
@LV_Enthu wrote:
hahaha... altenbach, i shoudl have mentioned about the FFFFF, well, i am checking if 10 (FF)h are observed or not... that shuold be good i guess...
the other EOS is (St~P) ... i made it complex so that lv doesn't get confused the EOS with actual data...
10 (FF)h? What do you mean. 10 consecutive Fs?
Is this just another method you are using to signal EOS?
Why do you need two different EOS flags? Just use the EOS character to determine the end of transmission. Please clarify what your intentions are. Posting your VI would be helpful.
07-27-2011 05:19 PM
After studying your post, I clarified my own question. See attached. As was stated earlier, you will need to determine when the 10th F is received. You could simply output a boolean to the OR gate once you have received enough Fs or a string like in my example. Your choice.