LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RS232 Connections with LabVIEW

For a research project, we need to use RS232 connections to communicate with a device (Control and Data Log) that we are planning to use. Therefore, kindly request your suggestions on how we can use RS232 connections along with LabVIEW.

0 Kudos
Message 1 of 9
(1,383 Views)

VIWeek 2020/Proper way to communicate over serial


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 9
(1,371 Views)

@crossrulz wrote:

VIWeek 2020/Proper way to communicate over serial


That link actually gave me some great ideas on how to refactor my existing serial port routines.  (I looked it up a while ago when you first posted it.)  I suck at setting up serial port comms, but I suck less at it now.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 3 of 9
(1,340 Views)

@billko wrote:

@crossrulz wrote:

VIWeek 2020/Proper way to communicate over serial


That link actually gave me some great ideas on how to refactor my existing serial port routines.  (I looked it up a while ago when you first posted it.)  I suck at setting up serial port comms, but I suck less at it now.


The bad part is that some engineers think "ah, here's some code from the 1950s!  That should work!"

The worst part.... It still works. 


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 9
(1,333 Views)

@JÞB wrote:

@billko wrote:

@crossrulz wrote:

VIWeek 2020/Proper way to communicate over serial


That link actually gave me some great ideas on how to refactor my existing serial port routines.  (I looked it up a while ago when you first posted it.)  I suck at setting up serial port comms, but I suck less at it now.


The bad part is that some engineers think "ah, here's some code from the 1950s!  That should work!"

The worst part.... It still works. 


Just because code is old does not mean it is bad and/or there is a better way to do it.  Granted, my old code was horrible because I learned better over the years.  But if you can take the code somebody did 10 years ago and use it, it is probably at least decent code.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 9
(1,324 Views)

@crossrulz wrote:

@JÞB wrote:

@billko wrote:

@crossrulz wrote:

VIWeek 2020/Proper way to communicate over serial


That link actually gave me some great ideas on how to refactor my existing serial port routines.  (I looked it up a while ago when you first posted it.)  I suck at setting up serial port comms, but I suck less at it now.


The bad part is that some engineers think "ah, here's some code from the 1950s!  That should work!"

The worst part.... It still works. 


Just because code is old does not mean it is bad and/or there is a better way to do it.  Granted, my old code was horrible because I learned better over the years.  But if you can take the code somebody did 10 years ago and use it, it is probably at least decent code.


Well I learned better when I first watched your presentation.  😉

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 6 of 9
(1,295 Views)

@billko wrote:

@crossrulz wrote:

@JÞB wrote:

@billko wrote:

@crossrulz wrote:

VIWeek 2020/Proper way to communicate over serial


That link actually gave me some great ideas on how to refactor my existing serial port routines.  (I looked it up a while ago when you first posted it.)  I suck at setting up serial port comms, but I suck less at it now.


The bad part is that some engineers think "ah, here's some code from the 1950s!  That should work!"

The worst part.... It still works. 


Just because code is old does not mean it is bad and/or there is a better way to do it.  Granted, my old code was horrible because I learned better over the years.  But if you can take the code somebody did 10 years ago and use it, it is probably at least decent code.


Well I learned better when I first watched your presentation.  😉


OK we've gone off topic!  Somehow that doesn't disappoint me. 

 

RS-232,   you should know that the RS is short hand for Recommended Standard.  Isn't that a wonderful oxymoron?  So, you need to Read The Friendly Manual, RTFM, for the device to learn how that engineer implemented RS-232 on that day.  There are several different ways it can be done.   Some ways should be drawing a pention. 


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 9
(1,265 Views)

@JÞB wrote:

OK we've gone off topic!  Somehow that doesn't disappoint me. 

 

RS-232,   you should know that the RS is short hand for Recommended Standard.  Isn't that a wonderful oxymoron?  So, you need to Read The Friendly Manual, RTFM, for the device to learn how that engineer implemented RS-232 on that day.  There are several different ways it can be done.   Some ways should be drawing a pention. 


Continuing with the off topicness...

 

RS-232 only defines the hardware level.  The voltage shall be -12V for a 1 and +12V for a 0 (or something like that, it has been a long time since I read it).  What we normally think of RS-232 uses a byte protocol called UART, which defines how to read the 0s and 1s into a byte.  There are then a gazillion (estimated) message protocols on top of that UART protocol which is on top of RS-232.  RS-422 is the same way (only defines a differential pair to define a 0 and 1).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 9
(1,247 Views)

@crossrulz wrote:

@JÞB wrote:

OK we've gone off topic!  Somehow that doesn't disappoint me. 

 

RS-232,   you should know that the RS is short hand for Recommended Standard.  Isn't that a wonderful oxymoron?  So, you need to Read The Friendly Manual, RTFM, for the device to learn how that engineer implemented RS-232 on that day.  There are several different ways it can be done.   Some ways should be drawing a pention. 


Continuing with the off topicness...

 

RS-232 only defines the hardware level.  The voltage shall be -12V for a 1 and +12V for a 0 (or something like that, it has been a long time since I read it).  What we normally think of RS-232 uses a byte protocol called UART, which defines how to read the 0s and 1s into a byte.  There are then a gazillion (estimated) message protocols on top of that UART protocol which is on top of RS-232.  RS-422 is the same way (only defines a differential pair to define a 0 and 1).


Tim, you are mixing layers!  The 232 phy layer may be 3, or 5 single ended wires or up to 9 wires .  3v3 single ended is common these days since it doesn't really take a huge current to charge a mosfet gate at high speeds. 

 

Drop down to 77-300 baud over 56k copper phone line and ..... well, do the math.  Two twisted pair, 24 differential volts, a few 12v lead acid batteries and some relays makes sense. <that level of technology still drives most RR crossings>  

 

The driving code should post date the machine at Union Station in Chicago.   But, thanks T.A.E! that computer still works today.

 

History lesson off 


"Should be" isn't "Is" -Jay
0 Kudos
Message 9 of 9
(1,184 Views)