LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Interfacing RS232 directly with computer

hello all....

I am a beginning beginner in Lab View  !

Started learning Laview using the videos available in Youtube's Labview Channel .

Some doubts i search here in this forum and got the answers too .

 

But i am not able to understand interfacing a device with computer..

In a video , the instructor says to connect a data acquition device with the computer..

http://www.youtube.com/user/Labview#p/c/10/ofzbA3keOYE

 

"My device sends a signal (voltage) and transmits through a RS232 port .


Is it possible to directly connect the RS232 to the computer without using NIDAQ devices ??

In the video , right click on back panel and  input -> DAQ assistant... i cannot get this option...using labview 2009 ... Should i use a DAQ device compulsory ... Will i not be able to correct directly and even if i connect how can i take the values from the port ?

 

what am i missing ?

kindly help

 

Thanks

 

0 Kudos
Message 1 of 21
(4,299 Views)

You will need some type of a device that will measure your voltage (meter, DAQ device, etc) and then that device will send a "message string" via RS232 telling you what it measured.

 

You can't connect your voltage directly to your RS232 port! You run a big risk blowing something up!

 

But does the device have an RS232 output? If so it is not covered by DAQmx drivers. You will need to read the manual for your device and most likly use SCIP commands via VISA drivers in LabVIEW.

Omar
0 Kudos
Message 2 of 21
(4,298 Views)

Of course you can use RS-232 to communicate.  Look at the examples that ship with LabVIEW to get an idea how:

Help > Example Finder... Hardware IO > Serial.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 3 of 21
(4,295 Views)

 


defconD wrote:

 

"My device sends a signal (voltage) and transmits through a RS232 port .


That's a bit vauge. Does it measure a voltage, or does it send the value via an RS232 message? What is this device that you have?

 

0 Kudos
Message 4 of 21
(4,294 Views)

 


@Omar II wrote:

You will need some type of a device that will measure your voltage (meter, DAQ device, etc) and then that device will send a "message string" via RS232 telling you what it measured.

 

You can't connect your voltage directly to your RS232 port! You run a big risk blowing something up!


I think (hope) he's talking about a device that uses RS-232 protocol already.

 

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 5 of 21
(4,292 Views)

I can not open the video. Perhaps the best thing, as the setup sounds kind of dodgy. RS232 is digital communication method. It has nothing to do with NI-DAQ and analog measurement. You can of course have some sort of instrument that use RS232 to communicate data to Labview.



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 6 of 21
(4,288 Views)

Thanks OmarII, NIquist,smercurio_fc,coq rouge for replying...

 

Sorry for not giving the exact terminology...

its the digital data that is transmitted from my device through RS232 .

 

Description about the 'learning' project : A MicroController, Interface kit, Potentiometer 

 

I have to create a 'guage' (Range- 0 to 24 v)  in LABVIEW , which will read and indicate the value of the potentiometric voltage that can be varied  !!

Using A/D converter in the microcontroller, the potentiometric voltage is converted into digital data and transmitted via RS232.

 

 

"Can i interconnect the incoming data and the guage ?"

 

As far i have understood in your posts, it is possible to connect directly RS232 without any NI kit in between...( am i right ? )

 

@coq rouge..sorry mate...here is the link

http://www.youtube.com/watch?v=ofzbA3keOYE&feature=channel_video_title

 

 

0 Kudos
Message 7 of 21
(4,257 Views)

Youtube is blocked by most companies, so I can view it.

 

As stated above, you can connect a RS232 device directly to a RS232 comport on your computer (might need a null modem cable or might need a straight through cable).

 

I would first try to talk to it using something like HyperTerminal to check out the comport settings are needed and to get a feel on what you have to send to it and what it sends back. Then you should be able to do the some with LabVIEW using VISA functions.

Omar
0 Kudos
Message 8 of 21
(4,250 Views)

Connect?  Yes, if it's a standard RS-232 device.  [EDIT:  AND as Omar said, you will have to set up the port properly (Baud rate, parity, etc...)]

 

Communication is a different story though.  You will need to understand the messages coming down the serial line and translate them into a number representing voltage.  That should be easy.  Most likely your device will send a string consisting of something like this <Start Message Character> <Hex value of the voltage Character> <End Message (termination) Character>

 

See your devices manual for the details.

 

In addition to the Hyper Terminal idea, NI-MAX has features that can help you setup comm parameters with VISA protocols (RS-232, GBIP).

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 9 of 21
(4,249 Views)

Iack  then I saw the video the first thing that come to mind was a dodgy used car salesman. Real Labview programming is not throwing in some Express VIs. Quickly wire it together and then done

But well back on topic. Yes you can do serial communication in a basic Labview version. No need for any kit. Go to help in toolbar. Then select Find Examples and search for serial. Then you will find some example code in using the serial port. What kind of micro controller setup are you using is it a pre made kit? It could be that you must add a RS232 to TTL level converter on the controller side. If you build your controller setup from start.  



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 10 of 21
(4,244 Views)