PC to PC RS-232 communications

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

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.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines

Similar Messages

  • XMII and RS-232 communication

    As most of us are aware xMII does not support RS-232 communication. Recently some customers have come up with requirements of interfacing weigh scales to SAP.
    Most of these weigh scales have only the RS-232 interfacing option. (I am not sure if these could be OPC compliant as well.. Some higher and expensive ones come with a software version which I guess can be configured to write a file or some come even with a Database Option.)
    With xMII 12 would it be possible, lets say, to write a custom action 'RS-232 Listner' which could allow this to happen?
    What are SAP's thoughts on this?

    Yes, this is a common request.  I think in part because sometimes customers get the impression that xMII can do this from the "sales force" and can do it "easily".
    We had some luck with this in the past.
    Sometimes what we have seen in the past, is that the rs-232 devices have a transmit or send button that sends a signal back to a pc that the device is attached to.  If you use an application like WinWedge that takes the signal from the device and decodes it to text, it can be used to get the information.  WinWedge typically comes with handheld USB or Serial barcode scanners.  It's main purpose is to take the signal from the device and "pop" it into the active window's cursor location.  So if you scan a barcode with Word open and active, the barcode scanner sends the signal to WinWedge on the PC, WinWedge translates the signal to text and throws in at the cursor location. 
    If your cursor is in an HTML form input box, and you can capture the data as descibed above, now you can use the data via Javascript and pass it to an applet on the page.

  • Rs 232 communication

    i must read and write data and command from a custom card with a labview vi.
    can someone send me documentation or example of serial communication
    protocol that can be implemented in labview?
    thanks.
    david

    in what site can i search example of rs 232 communication protocols or
    drivers ?
    david.
    "PdB_Serenity_nl" ha scritto nel messaggio
    news:[email protected]..
    > Good examples of drivers to support RS-232 devices can be found on
    > this site.
    > If you bought the card, you can ask the supplier for the
    > protocol/command set.
    > If it is an internally developed device (we do that frequently) the
    > complexity/robustness of the protocol will depend on what the task of
    > the device is (and under what conditions, lab is quite different from
    > plan-operation). And as long as this will not be sold as an open
    > commercial system to the outside world, you can use your own protocol.
    > Sorry, have no example.

  • MAX 232 communication with microcontroller GUI

    Hello,
             I am new to embedded world and new to lab windows. I am doing one project ( Checking an errors and scrach on CD,So i divide CD area into different square blocks , i want to select some CD blocks to check ) in which i have to control two stepper motors which further control vertical and circular deflections. I am using Atmel AT mega32 microcontroller. I wanna construct one GUI in which i can select some square block for checking and some part i can leave by clicking or unclicking,further  which can show serial communication parameters, postion, angle of motor deflection..I wrote a programm in atmel studio. How can i construct such a GUI  in Lab Windows and how do i make a connection between these two programms.
    Thanks millions.
    Regards:
                 Singh

    Hello Singh,
    I'm almost sure no CVI program can run on Atmel microcontroller, but since you have already created the mc program with proprietary compiler, I suppose your problem is now in interfacing mc application with an external PC that monitors test execution.
    Since you mention MAX232, I suppose you plan to perform communication between the microcontroller and the CVI program over the serial channel. CVI comes with a native RS232 library which permits you to easily configure and open a serial communication channel and write/read over it. Searching with the Example Finder (Help >> Find examples... menu item) with 'serial' keyword will return you with some basic serial communication examples that you can use to start developing your application.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • RS 232 Communications

    I am new to Labview and serial communications. I am trying to read data
    from a computer running on windows 3.1 to a computer with a win 98 OS. I am
    having no luck. I am using the labview VI's. I am looking for suggestions
    on how to figure out whats going on.

    I have used the both the VISA and Serial Communications VI examples in
    LabView with no sucess. I am trying to read ASCII strings from machine
    control software on the Win 3.1 computer. I don't know the format of the
    strings which is part of the problem.
    Question 1 is how can I test the communications between the computers to see
    if the serial ports are set correctly? I've seen hyperterminal mentioned,
    but don't know what that is.
    Labviewguru wrote in message
    news:[email protected]..
    > Go to the Examples Database and open up the LabVIEW Serial example.
    > This will get you started.
    >
    > Please post if you still cant figure things out. When you do, please
    > be more specific as to the problem you are havin
    g.

  • [q]Check lists of RS-232

    Dear all,
    I want to do some labview work using RS-232 communication of a commercial instrument.
    The RS-232 cable was made by myself for a reason (50pin).
    But my normal skill of RS-232 is not applied the instrument.
    1. How to check the RS-232 cable?
    The homemade cable (50->9 connection) couldn't test in other instruments.
    For example, Could you tell me some error results in Labview?
    (Always, the error_out code is 0 irregardless of my intentional error conditions(com_port/bad commander).
    Some written commander('RE') to set the remote operation was re-read.
    In the manual, OK or NG should be read under RE commander.)
    2. According to my former experience with RS-232, a final character(like \r,\n) could be a problem.
    Normally, the commander is RE(I mean, ascii code) without some additional characters(like 'RE' written in my manual).
    Can you comment about the type of characters which I can type in labview?
    Any comments are helpful to my works and experiences.
    Very thank you.
    Lee

    The first thing you should do is test the communication with Hyperterminal. If you can communicate there, then you know that the cable and com settings are correct.
    Once you've debugged the cable, etc., you should be able to use LabVIEW. I don't understand what you mean about not getting an error. If you're using VISA for writing (and you should be), then setting an invalid port will definitely give you an error.

  • Establish a connection through RF modem's on client & server side & to set up PPP communication for data transfer

    hi
    can any1 over here help me out in how to establish connection between 2 RF modem's for data transfer , between client & server USing LABVIEW?
    I want to establish a connection between 2 PC's through  RF modem on client & server side & to set up PPP communication for data transfer.
    (I have tried data transfer through RS-232 using TCP/IP whn the 2 PC's are connected over ethernet... which is working.
    I also tried connecting loopback cable between 2 PC's COM port & geting data transfer using VIsa configure serial port & other visa functions  ... which is working)
    can u guide me how to establish connection between 2 RF modem's using LABview?
    & how does the data transfer take place between 2 RF modems through RS-232?
    is it using TCP/IP?
    If you got any links to go abt this issue do send me related links .. or any examples .....
    I am currently using Labview version 8.
    Waiting in anticipation.. reply ASAP..
    thanking you
    Regards
    Yogan..

    Howdy yogan,
    Maybe you could clarify a few things for me, and we'll see how we can help ya. TCP/IP protocol occurs through an ethernet connection; RS-232 communication occurs through an RS-232 serial connection, typically through a cable that has a DB9 connector on both ends. Do you mean that the RF modems in question have the option to communicate via RS-232 and/or via TCP/IP ethernet? Specific information like the manufacturer of your RF modems, the model number of your RF modems, and how you connect the modems to the PC would enable us to give you more efficient support.
    You can check our Instrument Driver Network (IDNet) to see if a plug-and-play/IVI driver already exists for your RF modem. (You'll need to know its manufacturer and model number.) In the case that you do find an IDNet driver for your modem, you can use this KnowledgeBase article for instructions on how to use the driver.
    Another excellent resource to consider is the NI Example Finder. You can access this within LabVIEW by navigating to Help»Find Examples and then searching for serial or TCP/IP examples.
    Message Edited by pBerg on 03-10-2008 04:35 PM
    Warm regards,
    pBerg

  • Wait on Event causes serial communication errors

    Hi,
        I've been trying to to create a VI that can send and receive text data to a device via RS-232.  I started out with the Basic Serial Read and Write.vi that comes as an example with LabView and that works.  However, all it does is wait for specified amount of time before trying to read incoming data.  I thought to make that example more robust by polling the serial port for incoming characters.  I did some Googling and I came upon this page:
    http://digital.ni.com/public.nsf/allkb/179E61F87CF8B340862571EA0037CFA3
    Preventing LabVIEW from Continuously Polling the Serial Port.
    When I modified the Basic ... VI to include this however, I get all manner of errors.  Sometimes, I don't get any response at all.  Sometimes, I get response data from a previous request (but not all of it), and sometimes the device I'm communicating with tells me it's seeing a framing error.  I don't think I've ever actually received a correct response.  Can someone tell me if I've implemented this incorrectly?  Does the page above ONLY apply to PXI controllers or can I use this for RS-232 communication?  Do I need to be waiting on a different event?
    Thanks,
    Jason Mazzotta 

    Seems like your expected string is actually terminated by a linefeed character. VISA supports character terminated reads and even enables that for serial ports by default.
    The entire loop in the middle and the "wait for event "can be simply replaced by a single VISA Read when you let VISA use read termination mode. It even uses line feed by default as termination character but you can easily modify that at the VISA Serial Init function.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How to save a datas from serial port?

    How to save a datas from serial port?

    Hi
    I need some help about rs-232 communication. I want to make a vi witch can do this things:
    -read a txt file (to simulate a serial port like when the datas are coming)
    i will get 3 different data in serial port (like this: 121 213 135)
    i want to save in a txt file what datas get my vi
    so
    -write in a txt file or draw in a diagram (or both)
    so my problem is: read in serial port and save in a file and draw a diagram.
    if anybody can help pls HELP ME because im a beginner in this problem.
    I already do something but Im not sure that good.
    Thx for all.

  • Create Installer and disable reboot now

    I'm building a couple of installers, and both of them ask me to restart after I install them on a non-LabVIEW computer. They contain the LabVIEW RTE as well as NI-VISA runtime components.
    I've noticed that I can install them and click "Restart Later" and the applications will run without error. Is there any way I can suppress the "Restart Now" message after my installer completes? 

    That may very well be true, but I'm only using NI-VISA in order to do some basic serial (RS-232) communication.
    As I've said, I've installed the two applications I'm building, ignoring the reboot prompts both times, and then proceeded to run and use both applications (again, without a reboot). Both worked without errors.
    I agree that it may not be a "good idea" or good practice by any means, but for convenience's sake... it'd be a huge bonus. I'd hate to write up instructions for my apps that include several lines of "Press 'Reboot Later' if the installer prompts you to restart your computer."  

  • Monitoring a Watlow F4 Controller

    Hey Everyone,
    I have an ESPEC humidity chamber that uses a Watlow F4 controller.  I am using this to run environmental tests on a device.  Ideally I want to monitor the conditions inside the chamber and my device in the same VI.  So far I have been having trouble communicating with the chamber using labview.  It is using a serial port on the chamber and a serial to USB converter on the PC side.  I have created a small Vi that will just act as a chamber monitor for me.  I have attached the monitor VI below.   It doesn't sense the chamber at all and give me the set points or current conditions. Any help you guys can give would be greatly appreciated!
    Regards,
    PChemist
    Solved!
    Go to Solution.
    Attachments:
    ESPEC Monitor.vi ‏162 KB

    I am not familiar with Hyperterminal. I was searching around and found this from another company who uses these contollers from the same thing. 
    http://chamber.testequity.com/rs232.html
    RS-232 Troubleshooting
    Tips for TestEquity Chambers
    We receive many calls
    each week regarding RS-232 communication issues. There are several
    issues which must be addressed in order to communicate successfully
    with the chamber. With thousands of chambers in the field, we have
    never had a verified case of a bad serial interface in the controller.
    Below are several of the most common communication issues.
    Are you
    using the correct cable?
    The DB-9 connector is wired to accommodate a null-modem cable. A null-modem
    cable has pins 2 and 3 swapped on each end. You CANNOT use a straight
    through cable.
    Is the baud
    rate set correctly?
    All TestEquity chambers
    shipped since mid-2003 have the baud rate set at 9600. Older chambers
    have the baud rate set at 19200. The baud rate of the controller MUST
    match the baud rate in your communications program. The baud rate is
    changed in the controller's Go to Setup\Communications menu. You may
    require a password to enter the Setup menu. If so, call TestEquity to
    get the password.
    Does your
    software communicate using the Modbus RTU protocol?
    To communicate with
    the controller from a PC, you need to run software that uses the Modbus
    RTU protocol. You CANNOT use Hyperterminal.
    Modbus Registers
    Each controller
    function has a "register" number which can be read or written to (when
    applicable). These registers are listed Chapter Seven of the Series
    F4 User's Manual (pdf, 4M) .
    Common Modbus
    Registers
    The actual chamber
    temperature reading is Modbus register 100 (Input 1 Value).
    The static temperature
    set point is Modbus register 300 (Set Point 1).
    The temperature
    set point during a profile is Modbus register 4122 (Set Point 1,
    Current Profile Status).
    The decimal points
    are implied. For example, 1005 is actually 100.5 and -230 is -23.0.
    The Digital Output
    1 (Event 1) function is Modbus register is 2000
    It appears that I can't use Hyperterminal for testing with the F4.
    Since is says that I cannont use a straight through cable I wired up a quick cross over adapter ( http://digital.ni.com/public.nsf/websearch/1EE0DD8AF67922FA86256F720071DECF?opendocument&Submitted&&... ) and tried it.  I am getting error codes for function in MAX now.  Do you guys know if the F4 requires Handshaking? I didn't wire that into the adapter, just pins 2, 3 & 5.

  • Mixing MAX Task under one Start/Stop

    Hi,
    I have an end-of-line app that is testing some radio boards.  These tests will require turnng on/off the some digital lines, reading some analog values and some RS-232 communications, sorta async stuff for the most part. 
    I have defined several specific tasks in MAX for the digital and analog operations.  My question, that I cannot seem to find an answer or example for, is can I mix analog reads and digital writes under a single StartTask/ StopTask(see below)?  If not, what is the method.  Please advise and an example that gets posted on the web would be GREAT.
    Will the StopTask and ClearTask stop and clear all loaded tasks?  I guess a more in-depth of what is really going on might be helpful.
    thanks
    tim
        DAQmxErrChk DAQmxLoadTask("D_TurnOnPwr", taskHandle)
        DAQmxErrChk DAQmxLoadTask("A_MeasurePwr", taskHandle1)
        DAQmxErrChk DAQmxStartTask(taskHandle)
        DAQmxErrChk DAQmxWriteDigitalLines(taskHandle, 1, F, 1, _
            DAQmx_Val_GroupByScanNumber, i(0), sampsWritten, ByVal 0&)
         DAQmxErrChk DAQmxReadDigitalLines(taskHandle, 1, 10#, _
            DAQmx_Val_GroupByChannel, readArray(0), arraySizeInBytes, _
            sampsPerChanRead, numBytesPerSamp, ByVal 0&)
        DAQmxErrChk DAQmxStopTask(taskHandle)
        DAQmxErrChk DAQmxClearTask(taskHandle)

    Hi Tim,
    From what I understand, it appears that you are trying to generate digital signal and acquire analog signal at the same time.  If your card is line addressible, for example, the PCI-6221, you can add one line per task and address your lines in seperate tasks or you can add multiple lines per task and address your lines within the task.  You have to make sure to set up the task to be in "One Line Per Channel" mode, so you can address your digital lines one by one.  You need a seperate TaskHandle for each task.  On top of that, you cannot mix input and output, digital and analog in one task. However, you can always create multiple tasks for each operation you are trying to do, and once you start the task, you can read from or write to those channels, and the value will stay until you either clear the task or write some new values.  The values written into each digital line will not affect the values in others.  Make sure when you clear the task, use the correct taskhandle.
    Hope this information helps.
    Yi Y.
    Applications Engineer
    National Instruments
    http://www.ni.com/support

  • Dialup to Serial (non-PPP) modem?

    Hi,  I just got my first Blackberry 8820 and really like it so far.  I can do everything I need at work with it, except for one thing I haven't figured out yet.  I have already figured out how to connect my laptop to the blackberry and get Internet access, no problem there.   But (and I know this is soooo 1990's, but...)  I need to support some customers via plain old dialup.  Not PPP/Slip, just ordinary serial connection to the modem.  Basically what I do is start up a terminal emulator, connect it to my modem port, enter the Hayes AT commands to dial out, and then log into the customer's computer.
    How do I do this using the Blackberry like a cellular modem?

    Howdy yogan,
    Maybe you could clarify a few things for me, and we'll see how we can help ya. TCP/IP protocol occurs through an ethernet connection; RS-232 communication occurs through an RS-232 serial connection, typically through a cable that has a DB9 connector on both ends. Do you mean that the RF modems in question have the option to communicate via RS-232 and/or via TCP/IP ethernet? Specific information like the manufacturer of your RF modems, the model number of your RF modems, and how you connect the modems to the PC would enable us to give you more efficient support.
    You can check our Instrument Driver Network (IDNet) to see if a plug-and-play/IVI driver already exists for your RF modem. (You'll need to know its manufacturer and model number.) In the case that you do find an IDNet driver for your modem, you can use this KnowledgeBase article for instructions on how to use the driver.
    Another excellent resource to consider is the NI Example Finder. You can access this within LabVIEW by navigating to Help»Find Examples and then searching for serial or TCP/IP examples.
    Message Edited by pBerg on 03-10-2008 04:35 PM
    Warm regards,
    pBerg

  • LabView serial control

    Hello,
    I'm currently trying to use LabView for RS-232
    communication. The thing is, instead of using
    the standard hardware flow control method, I'd
    like to be able to control the flow control lines
    manually. Is there any way to set the values of
    these pins?
    Thanks,
    M
    Sent via Deja.com http://www.deja.com/
    Before you buy.

    VISA will let you do this. There is a bit of a learning curve, it's
    slightly more complicated than the standard serial port VI's but a whole lot
    easier than using In/Out port. Once you learn to conform to the standard
    style then it actually makes your diagrams straightforward and data-centric.
    Also VISA is platform independent, at least it works fine on Win9x/NT. I
    have had some trouble with Win3.11 though.
    Brendon
    wrote in message news:899l6f$4kk$[email protected]..
    > Hello,
    >
    > I'm currently trying to use LabView for RS-232
    > communication. The thing is, instead of using
    > the standard hardware flow control method, I'd
    > like to be able to control the flow control lines
    > manually. Is there any way to set the values of
    > these
    pins?
    >
    > Thanks,
    > M
    >
    >
    > Sent via Deja.com http://www.deja.com/
    > Before you buy.

  • ASCII protocol & Labview 7.1 + PCI-2323/8

    Greetings, I'm trying to do a simple command and response with labview 7.1 adn a varian multigauge that accepts ASCII Protocol. For now, I would be happy just to get a response back from the instrument. I'm not sure that I'm setting the program up correctly ( see attachment). I'm not getting a response to dat, so I was hoping that someone could give me some feedback.
    Here is the data on the multigauge comms. Varian Multi-Gauge Controller accepts RS-232 communication in ASCII protocol:
    Baud is selectable (9600 is selected)
    Parity is selectable (none is selected)
    unit address is selectable ( aa is selected)
    All LOWER-CASE characters are placeholders and the command format is:
    # {address} {command} {data} {carriage return}
    The response is:
    { data} {carriage return}
    Example: sending command to read software version is: #aa05t
    aa = 2 character hex bus address.
    05 = 2 character hex byte value.
    t = message terminator character (#13, charage return character).
    response is: hhhht, where software version is hh.hh
    hh = 2 character hex value
    t = message terminator
    I also included a manual of the multigauge + generic VISA. Any help would be appreciated.
    Scott
    Attachments:
    rs232talk.zip ‏2286 KB

    When you post something like this, you should enter data into the controls and then go to Operate>Make Current Values Default. As it is, no one knows what command you're sending and whether it has the right syntax. You should also include VISA Configure Serial Port to set baud rate, etc. Make sure these settings match what the instrument is set to. Page L-15 of the manual includes some advice that I always recomend. That's to use the built-in windows terminal emulation program Hyperterminal, before doing any custom programming. Do this first and make sure your cable and com port settings are correct. When you do get that working and get back to LabVIEW, wire the error out of VISA Write to the error in of VISA read and wire your error cluster indicator to the error out of VISA Read. Without doing that, you'll never know if VISA Read is giving you an error.

Maybe you are looking for

  • 1st Generation Ipod Touch Fall

    Hi guys I have had a 1st generation Ipod touch for 2 years and still use it pretty much everyday. Unfortunately I dropped it onto a hard floor today for the first time. I was kneeling over and it dropped out of my shirt pocket onto the aluminium back

  • IPod Nano Freezes when unplugged with static type line on screen

    I've seen a lot about the "white screen" but mine is slightly different. It's a 2nd gen, 4GB. When plugged in, everything works fine. Syncs up, plays music, etc. As soon as it's unplugged, it gets a static looking bar across the screen and everything

  • How to scan highest quality .pdf's with Image Capture?

    Hi, I need to scan a pile of official documents and I'm trying to use Image Capture for that. How can I get the highest quality and the files at a reasonable size at the same time? It shouldn't be necessary to end up with 12 MB .pdf files to get a le

  • Ale Custom filter group

    Hi All, I need to transfer cost centers via ALE. The issue is that the filter which I have to implement in the distribution model is based on company code (unlike controlling area which is the standard filter group for message type cosmas). I searche

  • Safari window turns white when opening a new tab

    Hi, I noticed yesterday that when I launch Safari, and cmd click to open a new tab, the Safari window turns white for a second or two before coming back to life. This is an intermittent issue, I have only had it two or three times so far and it doesn