02-21-2013 02:51 PM
Hello, I’m a novice LabVIEW user with LabVIEW 2012 full professional. I would like to communicate between two PC's using the RS-232 com1 ports. I will need one PC to be a controller and the 2nd to be a data recorder gathering data sent to it from the controlling PC. Once the data gathering PC digested the data, it will send a command to the controlling PC that it is ready to move on. Is this possible with LabVIEW? Can anyone point me in the right direction for information and or VI examples? I cannot use the Ethernet method as there will not be any access to servers at the test location.
Thanks
02-21-2013 03:02 PM
Yes. You can use RS-232. You will need a null modem cable. Look at examples for Serial ports within LabVIEW's example finder. You will just need to rework the examples so that you have one on each PC that can handle the command/response structure that you want to create.
Just because you don't have a server, you can still connect two PC's with an ethernet cable. Use a cross-over ethernet cable. Set the IP settings on the network card on each PC to be a private network such as 192.1.1.10 and 192.1.1.11. Then you can use TCP/IP examples to send data. Or even used shared variables. You will have effectively set up a mini-network of 2 PC's without needing a server.
02-21-2013 03:03 PM
@SMGTEM wrote:
Hello, I’m a novice LabVIEW user with LabVIEW 2012 full professional. I would like to communicate between two PC's using the RS-232 com1 ports. I will need one PC to be a controller and the 2nd to be a data recorder gathering data sent to it from the controlling PC. Once the data gathering PC digested the data, it will send a command to the controlling PC that it is ready to move on. Is this possible with LabVIEW? Can anyone point me in the right direction for information and or VI examples? I cannot use the Ethernet method as there will not be any access to servers at the test location.
Thanks
Who said anything about servers? All you need is a hub, switch, or crossover ethernet cable.
I have to ask about bandwidth and amount of data you want to move. RS-232 is not very fast at all. But it is simple.
Look in the LabVIEW Example Finder (in the help menu) for "Serial Read Write". There should be a few examples of how to communicate over the serial bus using VISA.
02-21-2013 03:08 PM
02-21-2013 10:03 PM
Thank you all for your responses. As I said, I am a novice and I thought a server was needed as a go between the two PC's. The reason I need RS-232 communication is that is what the testing lab service I am using requested for their controlling PC to send data to my supporting data recording PC. When I return to work I will do some more example searches under serial communications.
Thanks Again
02-22-2013 11:52 AM
@SMGTEM wrote:
Thank you all for your responses. As I said, I am a novice and I thought a server was needed as a go between the two PC's. The reason I need RS-232 communication is that is what the testing lab service I am using requested for their controlling PC to send data to my supporting data recording PC. When I return to work I will do some more example searches under serial communications.
Thanks Again
The unwritten question is: who tasked this poor soul with doing something that is so totally outside his area of expertise? 😞
02-22-2013 12:07 PM
@SMGTEM wrote:
Thank you all for your responses. As I said, I am a novice and I thought a server was needed as a go between the two PC's. The reason I need RS-232 communication is that is what the testing lab service I am using requested for their controlling PC to send data to my supporting data recording PC. When I return to work I will do some more example searches under serial communications.
Thanks Again
I understand them requesting the RS-232. But if you are moving any decent amount of data, you really should push back to use Ethernet.
02-22-2013 04:05 PM
The advantage of ethernet is that some of the low level stuff is already handled in the TCP/IP protocol. With RS-232, it is not. Suppose you send a message and the other PC doesn't get it, TCP/IP will have an automatic retry, whereas RS-232 won't.
02-22-2013 10:35 PM
billko wrote:
The unwritten question is: who tasked this poor soul with doing something that is so totally outside his area of expertise?
I have done some measurement automation with LabVIEW but it has all been with GPIB and instrument drivers so PC to PC with RS-232 serial was new to me.
I did find an example for port to port serial on the same PC to check port operation and I think I can modify it for my needs. There is not a lot of data being sent here, it is mostly a time stamp, frequency and amplitude measurements.
I will learn what I have to and do what is required of me to stay gainfully employed.
Thanks