LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to separate and group string?

I'm working on a radar project, and propose to receive two types of signal in labview through serial port.

The receiving signal is like:

I350

Q350

I250

Q150

IXXX

QXXX

one signal with header I, the other one with header Q, my question is how can I group string with header I together in one array, and group string with header Q in another array?

 

 

 

 

 

0 Kudos
Message 1 of 21
(2,952 Views)

Hi yatang,

 

Are you using LabVIEW 2012 or later? If so, I believe this code should work for you.

Result.png

 

Just use String Subset to extract the first letter, then compare it with I and Q, and finally, use the auto-indexing with conditional tunnel to separate out signals that starts with I and starts with Q.

Link about auto-indexing with conditional tunnel: http://zone.ni.com/reference/en-XX/help/371361K-01/lvhowto/condacc_valuesnloops/

 

Hope this will be helpful.

 

-Ee Lim-



See that button on the left side of this post...

If you feel my post is helpful, all you need is just (at most) 2 seconds to click that button, to show your appreciation. Thank you~~



Message 2 of 21
(2,933 Views)

Fantastic!! Thank you very much!! I'll try this method!!

0 Kudos
Message 3 of 21
(2,879 Views)

If course if you want to do it a bit faster than that.Smiley Wink

 

!1.png

Smiley Wink


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 21
(2,865 Views)

I have a strong suspicion that the Search 1D Array is not doing what Jeff thinks it is doing.

Message 5 of 21
(2,849 Views)

@Darin.K wrote:

I have a strong suspicion that the Search 1D Array is not doing what Jeff thinks it is doing.


Yes, that should be find first match!  (Not my day)


"Should be" isn't "Is" -Jay
0 Kudos
Message 6 of 21
(2,844 Views)

Thank you! And  I have another question, please have a look on this code, I tried two ways to display the graph after FFT, but there's no graph displayed T_T

0 Kudos
Message 7 of 21
(2,835 Views)

That would be becaues you a feeding an array of size 1 into the FFT

 

(Get rid of those DDTs- they are only letting you mis-wire your data.


"Should be" isn't "Is" -Jay
0 Kudos
Message 8 of 21
(2,827 Views)

OK, so I should build a array, thank you!

0 Kudos
Message 9 of 21
(2,814 Views)

one more question please, how can I do it inside the loop?

0 Kudos
Message 10 of 21
(2,813 Views)