LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

receive data to array using serial communication

Thank you a lot , finally it is working . I've added a write measure file (for later analysis) , and the "String to Byte Array function" .

what im planning here , im sampling lung sound using arduino and sending it to labview , now im training with serial communication later i will use XBee.

I have few more questions :

1. my first 8 bit in the array are "START" and the last 8 are the "END", is there any option to make the VI work on "IDLE" and listen to the port , only if the 8 start bit recevied , continue receive data until the 8 end bit recieved , and then stop. 

0 Kudos
Message 11 of 15
(1,066 Views)
Like STX and ETX bytes? The VI would not be idle but reading 1 byte at time and looking for the start byte. The termination character can be set to whatever stop byte you are using. By specifying some large byte count and not the Bytes at Serial Port, the read will automatically terminate.
0 Kudos
Message 12 of 15
(1,053 Views)

im sorry , but it just hard for to understand what do you mean , can you try explain more simplely . 

 

0 Kudos
Message 13 of 15
(1,039 Views)
You have a loop that reads one byte at a time. Read the bye and compare it to your start byte. The output of the compare is wired to the loops termination terminal. You then pass to another VISA Read with the bye count set to a much higher count than what you would expect. The VISA Configure Serial Port has an input for the termination character. Set it to your stop value.

Please make sure that you have context help turned on. Reading the help of the functions should explain much of what you need.
0 Kudos
Message 14 of 15
(1,030 Views)

Ok , i will try to found out how to implement it , thank you for everything/

0 Kudos
Message 15 of 15
(1,008 Views)