LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to implement an OR condition for 2 strings?

Solved!
Go to solution

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?

Now on LabVIEW 10.0 on Win7
0 Kudos
Message 1 of 5
(1,085 Views)

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?).

 


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 2 of 5
(1,075 Views)

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...

Now on LabVIEW 10.0 on Win7
0 Kudos
Message 3 of 5
(1,051 Views)

@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.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 4 of 5
(1,024 Views)
Solution
Accepted by topic author LV_Enthu

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.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 5 of 5
(1,007 Views)