LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial data

im new to labview...

i would like to know how to read data serially??

I have done the required initialisation, serial read and then when i try to run it...it shows some error stating some device driver is not located or loaded. I tried installing it again but it still shows the error...

Kindly help....

And one more query is that on recieving data serially how can i plot it in form of a graph??

0 Kudos
Message 1 of 18
(7,473 Views)

Hi!

 

Would you try this tool first:

http://labviewportal.eu/en/device-i-o/79-rs232-terminal

 

If it works without errors, you can adapt it for your issue.

0 Kudos
Message 2 of 18
(7,472 Views)

this is wat i actually designed...

I would actually want to know if this is sufficient for the operation of reading data serially through a serial port and displayin the same in a string

0 Kudos
Message 3 of 18
(7,461 Views)

Hi guest of ni,

 

Can you post your vi for lv 8.0?

0 Kudos
Message 4 of 18
(7,454 Views)

Here is the screenshot of that VI.

 

 

 

 

Not much is going to happen with this VI.  It is all going to execute in one shot.  You will configure the port which will basically opens it.  You check the number of bytes at the port.  This will be zero since you just opened the port.  Or it will be a very small number if your device is continually sending data and you just happen to get some bytes in the buffer between the near instantaneous time of opening the port and check the number of bytes.  Then you will read that number of bytes, probably none, or just a couple of the full message.  Then you close the port which will prevent any more data from showing up in the buffer.

 

Does your device require a command to be sent to it before it returns any data?

 

Look at the example Basic Serial Write and Read.Vi in the example finder and understand how that works.  Then look at the other serial examples.  You will probably want to repeatedly get data which means putting the write, wait, and read in a loop.  Put the configure port ahead of the loop, and the close port after the loop.

Message Edited by Ravens Fan on 07-25-2009 01:18 AM
Message 5 of 18
(7,422 Views)
"it shows some error stating some device driver is not located or loaded."
When I run your VI after selecting a VISA resource name, I get no error. Could you post the error you get, screenshot maybe? Also a screen shot of the settings you input on the FP when you run it and get the error would be nice. Does the com port work with other software, like HyperTerminal, or the VI suggested by Eugen Graf?

 "And one more query is that on recieving data serially how can i plot it in form of a graph??"
You will need to decode the serial data. You will be getting a series of byte values, does these represent binary encoding of singles, doubles, ints, or maby an asci representation of same? Maybe something much more complex? When you have decoded the data and generated numerical values from it, via type cast, string conversion routines or other methods, you can wire that to a chart or graph.
 
Espen
0 Kudos
Message 6 of 18
(7,399 Views)

im posting the error that occurs at three instances if i ask to continue...

1 is at the serial initialisation

2 at the property node

3 at the serial read

 

error_bd.JPG

 

and the screenshot of the front panel is as follows

 

serial read_fp.JPG

0 Kudos
Message 7 of 18
(7,376 Views)

Hi guest of ni,

 

You need to select the com port number under resource name. You will get this error If you just right clck -->create control and donot select the com port.

0 Kudos
Message 8 of 18
(7,367 Views)

ya we had selected and entered COM1 previously but we did get the same error...

by default u have refresh as the option but we selected COM1

0 Kudos
Message 9 of 18
(7,361 Views)
And may I know How you know that com1 is THE port ? Did you check it in max?
0 Kudos
Message 10 of 18
(7,356 Views)