Showing results for 
Search instead for 
Did you mean: 

serial read, and data import into spreadsheet

@tgilbert wrote:

Sorry - RS232 serial message packet is: 1 start bit; 7 data bits; 1 parity bit; and 2 stop bits.  So I guess I read 11 bits, strip bits 1-6, and reassemble into data?

NO. You don't read bits at all and you don't strip anything. When you do a read, all you get is the data. Everything else is done for you by specifying the correct number of start/stop bits, number of data bits, etc.

0 Kudos
Message 41 of 86

Is this something you customize within the VISA Configure Serial Port vi (i.e. -  change the number of data bits)?  

0 Kudos
Message 42 of 86


0 Kudos
Message 43 of 86

@tgilbert wrote:

Is this something you customize within the VISA Configure Serial Port vi (i.e. -  change the number of data bits)?  

Why are you even asking this? Surely you have context help turned on where all of the inputs/outputs (i.e. 'data bits') are fully documented.

0 Kudos
Message 44 of 86

There are few combinations in life as satisfying as a Serial Port, a noob, and Dennis.


0 Kudos
Message 45 of 86

I was expecting the answer was yes, but wanted to be sure. Smiley Wink

0 Kudos
Message 46 of 86






Here's the Data Output Formatting from the scale...




What I want to do is grab two pieces of information: the value; and the units.  And, then display the value graphically and numerically.  The units will be displayed and placed into the spreadsheet (worry about that later).  I am using a string subset function to pull bytes 9-16 and then display them.  The front panel shows the output I'm getting.  I'm guessing that the data I'm working with is the first 22-bytes - am I wrong in thinking this?  BTW, the bytes I'm displaying in "Bytes Written" represent the Esc P command - needed to request data from the scale.  It's possible I'm using this incorrectly, too.  Any thoughts?  Thanks.   


0 Kudos
Message 47 of 86

Here's block diagram and front panel.




0 Kudos
Message 48 of 86

Hi, you can use a string subset function for extracting the string to write in the excel sheet. For the value/data bytes, you want a plot of those right?.


For the graph: You can use a string to byte(considering your data bits is 😎 array and give it to a chart or graph depending on which you want to use.You can extract the unit bytes as a string and and give it to a property node for displaying the unit on besides the scale name.


For displaying the data numerically, you will need to use an array, you can than just send the array of numbers in to the array indicator and use a string indicator to display the units.


For the excel part, just write down the string you extracted in the first place as mentioned above.


PS: If the data is one value than you can use Decimate 1D array to separate the bytes and than combine them according to your will. Use a simple numeric indicator then.


LabVIEW 8.2,8.6,2009...still learning 😛
0 Kudos
Message 49 of 86

Thanks.  I do want want to plot the data.  I tried to use a string subset to grab only the data I want, but I suspect I'm using it improperly - I'm only getting a character representation, and not the numeric data.

0 Kudos
Message 50 of 86