LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Binary string monitoring

Solved!
Go to solution

Hi All!

I have a tricky task to do 🙂

I get binary string from serial port – 00000000

Then I increase voltage and see if any bit changed its state.

So if I see something like 10000100 I can write:

Bit3 and Bit7 become 1 at 2.5 volt.

How can I do it?

Thank you.

0 Kudos
Message 1 of 5
(2,607 Views)

Hi John,

 

At what stage of the task are you in?

Do you get the reading from the serial port? If not, what did you try?

Once you have the string it's a simple task, you can manipulate strings using Functions->Programming-> Strings....

I'll try to help more once you have a more specific question.

0 Kudos
Message 2 of 5
(2,604 Views)

Hi John,

 

just use sam simple comparison functions:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 5
(2,593 Views)

simply_me  - I have nice clean string from serial port.

GerdW - Look nice but how can i track index of a bit that was set?

0 Kudos
Message 4 of 5
(2,574 Views)
Solution
Accepted by topic author john7

Hi John,

 

use Search1DArray repeatedly to get indices of TRUE bits...

Or use a FOR loop to index through the resulting boolean array!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 5
(2,568 Views)