LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

dividing the hex to 8bit

how do i change this vi. so that after i received a continuous hex data it will divide into 8bit each

0 Kudos
Message 1 of 8
(3,242 Views)

Use String to Byte Array or Typecast to a U8 array.

 

Your VI is not capable of a continuous read unless you use the run continuous button which you should NOT be using. Use a while loop and exclude the init and close from the loop.

0 Kudos
Message 2 of 8
(3,230 Views)

is this one correct?

btw why i cant use the run continuous button?

if so how do i received continuous data from another program?

0 Kudos
Message 3 of 8
(3,220 Views)

Is what correct?

 

Run continuous is for special debug uses and its silly to configure the serial port over and over again.

 

You receive continuous data by using a while loop around your read code as I already said. You really need to look at the LabVIEW 101 tutorial.

0 Kudos
Message 4 of 8
(3,218 Views)

oh sory..i didnt notice that..here my vi.

0 Kudos
Message 5 of 8
(3,214 Views)

I'm confused about what you actually want. If you get 'abc', you want a string arrray with 'a' as the first element, 'b' as the seond, etc? If so, why don't you just read 1 byte at a time with the Build Array function?

0 Kudos
Message 6 of 8
(3,212 Views)

i want to divide it into 8bit

for example i received 123456788765432112345678.......

then i want to make array so my 1st element will be 12345678 and 2nd will be 87654321 and so on

0 Kudos
Message 7 of 8
(3,207 Views)

12345678 is not 8 bits. If ASCII, that is 8 bytes. Which can be simply done by specifying 8 bytes to read.

Message 8 of 8
(3,198 Views)