ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read Serial Data

Dear All,
I am reading data from serial port which the VISA read function stores in a string buffer.
 is dere any way by which i can store the data in a string array as i want to access the data in bytes separately??

Thanks
Ritesh
0 Kudos
Message 1 of 13
(4,295 Views)
You can acess each character seperately if you wire the string into a for loop and enable indexing.
0 Kudos
Message 2 of 13
(4,294 Views)
Hi drewsky!

This solution was new for me, so I tried to wire a string into a for-loop, but I can't enable indexing (top of image). Can you specify what you mean? Do you mean a solution as showed on the bottom of the image??



Greetings,

Christian


Message Edited by cschneider on 08-09-2008 04:40 PM

THINK G!! 😉
------------------------------------------------------------------------------------------------
Using LabView 2010 and 2011 on Mac and Win
Programming in Microsoft Visual C++ (Win), XCode (Mac)
0 Kudos
Message 3 of 13
(4,282 Views)
Yeah that's what I meant.  I don't have LV on this comp, so I didn't try it ahead of time. Smiley Sad

Will that work for you?
0 Kudos
Message 4 of 13
(4,259 Views)
Is this what want to do ?
0 Kudos
Message 5 of 13
(4,241 Views)
ritesh024,
 
You can enable indexing into and out of a FOR LOOP by right clicking on the input/output box at the boundary of the FOR LOOP.  In your case in the top FOR LOOP the pink incoming box.  Regards,  -SS


0 Kudos
Message 6 of 13
(4,214 Views)
that's what I thought too, but I just tried it, and it won't allow it.  The software I am using right now is beta, so I could be wrong...  I'll double check at the office tomorrow...
0 Kudos
Message 7 of 13
(4,208 Views)
LabVIEW 64-bit beta?  -SS


0 Kudos
Message 8 of 13
(4,205 Views)
yeah
0 Kudos
Message 9 of 13
(4,203 Views)
Thanks alot guys for your help.
That for loop solution works gr8.

and one more thing .. you cant do auto indexing for a string in for loop. you can only do it for an array..
so, u need to break the string into substrings for storing a string into array ..



Ritesh
0 Kudos
Message 10 of 13
(4,173 Views)