LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can I monitor RS232 temperature sensor data streaming to browser ? and alert ? help.. for sample

i just need to view my room temperature that using rs232 data.
0 Kudos
Message 1 of 14
(5,037 Views)
Can you be a bit more explicit ?
Do you have a problem communicating with a thermometer serial device ?
Or what ?
Chilly Charly    (aka CC)
0 Kudos
Message 2 of 14
(5,037 Views)
yes i have a problem capturing input stream data from rs232 temperature data. the data something like this
1 54.33
1 54.30
1 54.35
etc.
these are the data stream from the temperature sensor device connected through rs232. 1 means 1 sensor up to 4.
i can use hyperterminal to get this data stream and log into a file, but I just wondering if Labview can capture this data and log it, and display it.
may be on the browser if possible so I can see it from anywhere.
does anyone ever done this capturing data ??
help...
0 Kudos
Message 3 of 14
(5,037 Views)
Hello,

You can read the data you are receiving in LabVIEW using the VISA API. Basically, you will use a VISA Configure Serial Port VI to set serial settings on your machine to match what you expect from your instrument (such as a baud rate), then use VISA Read in a loop to read the data continuously, then use VISA Close when you are done.

JLS
Best,
JLS
Sixclear
0 Kudos
Message 4 of 14
(5,037 Views)
You will met two difficulties here :
1- synchronize with the data stream
2- extract the temperature from the readings

Step 1 : after initiliazing the serial port, you have to flush the buffer where all the incomming chars are stored. Then, you can read in a loop a string terminated either with a CR or a LF (or both). These are control chars that can be displayed by labVIEW, if you activate the option "display \ codes" of your indicator. You will have to play with the port settings.
You should maintain a reading rate higher than the rate at which your device is sending the data (ie the buffer should remain empty...)
There are several other solutions, for instance using the event manager, to maintain the synchrony.

Step 2 - Once you get a proper
reading of the string, you can extract the temperature value (and the channel number...) using a "Scan from string" function (in the String sub-palette).

See the attached vi, and ask if you need further help.
Enjoy LV...
Chilly Charly    (aka CC)
0 Kudos
Message 5 of 14
(5,037 Views)
thank you for the detail respond, i did try the attach file from you , and i have a problem error while prosessing VISA Serial.
i did set the 2400 boud rate, 8bits, no parity, etc according to the sensor required.

i have no background of programmng, but i love this labview, i just want to learn that will take time.

second questions, how i display this result later on web browser ?

regards
ruddy
0 Kudos
Message 6 of 14
(5,037 Views)
1/Could you pass the error number ?

2/ go to menu : Tools/Web Publishing Tool..., then press Preview in Browser.
Chilly Charly    (aka CC)
0 Kudos
Message 7 of 14
(5,037 Views)
-1073807202
i think this is the error #

regards
ruddy
0 Kudos
Message 8 of 14
(5,037 Views)
The code error correspond to the following error
"VISA: (Hex 0xBFFF009E) A code library required by VISA could not be located or loaded".
That means that you don't have the proper ressources to access the serial port from LV. Go to the following section on NI site :
Support/Drivers and updates/Current software versions/Instruments connectivity/VISA and load the latest NI-VISA Version for your system.
That should solve your problem...
Chilly Charly    (aka CC)
0 Kudos
Message 9 of 14
(5,037 Views)
thank you for fast respond, i thougt so, i'm DL visa 320 full.... hmnnn. 87Mb.
i'll let you knwo what happend.
btw i solve how to web publish it.

regards
ruddy
0 Kudos
Message 10 of 14
(5,037 Views)