"how to read serial port using labview 6.0"

sir i am doing a project and is in a need to extract data from serial port. can anyone help me

This link, and the links from it, are a great place to start:
http://zone.ni.com/devzone/conceptd.nsf/webmain/8DECBF3E0B714BF3862568F9006E7851?opendocument
2006 Ultimate LabVIEW G-eek.

Similar Messages

  • "how to read parallel port using labview"

    "i am doing a bio medical project and need to read data from parallel port using labview. can anyone help me"

    Hi
    in most cases a simple example helps best.......see attachment. Find in addition in Word document a helpful picture of LPT - Pins.
    In case you work with WinNT, W2k, XP - you need to install accesshw.
    Regards
    Werner
    Attachments:
    printer_port_test.zip ‏41 KB
    dsub_25_parallel_port.doc ‏29 KB

  • How to transfer file from PC to PC via serial port using labview

    I need to transfer files(.txt, .doc, .xls) from PC to PC via serial port using LabVIEW. Is it possible to transfer files, if so how to transfer?
    Solved!
    Go to Solution.

    Yes, it is possible to transfer files with the serial port using LabVIEW.  Files are just collections of bytes and the serial port is pretty good at shipping bytes from one PC to another.  You need to connect the serial ports together with a null modem cable.
    First, take a look at the example for serial communication.   In LabVIEW, go to the Help menu and select "Find Examples...".  From there you can search for "serial" or navigate to Hardware Input and Output >> Serial.  Select the "Basic Serial Write and Read.vi".  Experiment with that example to gain confidence on the serial communication methods.
    Next, it's time to learn about how to read and write files.  For that, the examples could be somewhat confusing since they all deal with files that are presumed to have data of a specific type in them.  I would recommend just getting familiar with the functions on the File I/O palette.  Specifically, get to know the following functions.
    Open/Create/Replace File - On your destination side, you'll need to create the copy of the file that you are trying to transfer
    Close File - When you are finished reading from or writing to a file, you should close it.  It cleans up the memory being used and finalizes any write operations that are still floating in the write buffer.
    Read From Binary File - The best way to read from a file when you do not really care what type of file it is.  In your case, you just want to get those bytes read and sent out so they can be written down at the destination.
    Write to Binary File - At the destination side, this is what will store those bytes to the file you created with number 1.
    Get File Size (under the Advanced File Functions sub-palette) - You need to know how big the file is so you know when you are finished.
    OK, so once you are able to create files, write bytes to them, and read bytes from existing files you can move on to transferring.
    The basic method I would suggest is to have the user specify a source file on the source PC and a destination folder on the destination PC.  Then, find out the size of the source file using number 5.  Divide that size number by the number of bytes you feel like transferring at once.  The serial buffers are usually around 32k (if I remember correctly) so do not exceed that.  Now begin sending data by reading some number of bytes and wiring that string output to the VISA Write function.  On the destination side, you'll want to be monitoring the serial port for bytes and reading them when they arrive.  Wire that string to the Write to Binary File function to add them to your destination file.
    That is the basic outline of how to do it.  You have to be careful not to overload the write and read buffers on the serial ports.  Initially you can use delays on the sending side to make sure the reading side has enough time to digest.  To get things moving faster, you can bring in some flow control.
    If all that sounds a bit intimidating, there are Alliance Member companies out there (such as PrimeTest Automation) who can write such code for you and even provide a turnkey solution for you.
    Happy wiring,
    Dan Press
    Certified LabVIEW Architect
    PrimeTest Automation

  • How to read serial port and substring

    I am new for labview .I send data from microcontroller with C languange every 1 minute this codeprintf("T%3.2f,H%3.2f",fTemp_true,fRh_true);
    And I read data with Hyperterminal it show this T29.11,H67.88 I want to show 29.11 and 67.88 only and stroe in database. I study connect serial port in example and I have a question. If I use this code.Can I auto read every 1 minute or this code can read 1 time only and I have to click every 1 minute.How to auto read when I send data to serial port with microcontroller every 1 minute. And I cannot substring 29.11 and 67.88 because %3.2f can show T29.11,H67.88 or T129.11,H100 . and  How can I simple send data to database. Thank you . 

    No, you don't have to click run every minute. You just need to place a while loop around the VISA Read. You could use Wait (ms) but it would be better to use something like the Elapsed Time function and wire the time has elapsed output to a case statement with the VISA Read inside the true case.
    This is one way to parse the string:
    If you have the database connectivity toolkit, you can easily write to a database. There is also something called LabSQL.
    Message Edited by Dennis Knutson on 01-22-2010 01:42 PM
    Attachments:
    Parse String.png ‏16 KB

  • How to access parallel ports using LabVIEW?

    I want to send data to a device which is connected through LPT1.when Iam using serial port write.vi with port number 10(for LPT1) it is giving an error code 37 which means the device not found. whether those vis are only for accessing serial ports? Then how to access LPT1 using LabVIEW?

    Most likely you need to modify your labview ini file to let it know that LPT1 (or whichever) will be controled through the serial port control. See the following link for a knowledgebase answer to this question:
    http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/a5abd9d76665217b86256333005ac9a5?OpenDocument
    Jared

  • How to read serial port only when new data has been sent to it

    I've written this very simple vi to read the serial port whenever the MKS Helium Detector sends a new value.  The timing of new data is controlled directly from the front panel of the MKS instrument.  I thought it was as simple as looking at the "bytes at port", and reading the port only if the value is not zero.  The problem I'm having is that the read function is occuring whether I want it to or not.  Consequently, the "Scan from String" function is returning an error (0) once in a while, because it's reading the serial port as it's being updated (I think).   Apparently, when the port is in the process of being updated, it is not zero.   Anyway, I'm assuming there is a simple fix, but I'm having no luck finding the Easter egg.  Any help would be, as always, very much appreciated. 
    Attachments:
    MKSRead.vi ‏55 KB

    You can approach your problem in a couple of ways. The way you've got it written now, as soon as the number of bytes is non-zero, you read and convert. This means that when a partial string is there, you conversion is nor correct. One way is to wait until non-zero bytes like you do now, and then in another loop, read until the byte count is equal to zero and then do the conversion. You can also read until the cr\lf is detected and then do the conversion on the string. You can also enable the termination character for the read but then you'll have to increase the number of bytes to read to something other than just the number of bytes first available. If the instrument always returns the same number of bytes, you can use that as a constant for the VISA Read. Then the read will terminate whenever the byte count OR the termination character is detected.
    I modified your VI to show you how you might put it in a loop and what for the CR/LF to be detected. You would want to add a timeout to this so that if the character does not show up, the loop will not run infinitely
    Attachments:
    MKSRead_mod.vi ‏68 KB

  • How to access serial port using servlet

    I want to communicate with a microcontroller connected to the serial port of my computer.
    *I am using the following:
    Windows 98 operating system
    Tomcat web server 4.1
    *The directory structure is as given:
    Tomcat 4.1/webapps/myjsp/web-inf/classes/remoteservlets.
    I have placed my jsp files in my jsp folder and classfiles in remote servlets folder.
    **my java program has compiled correctly.**
    ** my simple java application which accesses the serial port works fine.***
    *when I start tomcat I am able to access the sevlet as the servlet responds with the button name i have pressed.
    **** I have also tried the following
    Copied file comm.jar in <JAVA_HOME>\jre\lib\ext
    Copied file javax.comm.properties in <JAVA_HOME>\jre\lib
    Copied file win32com.dll in <JAVA_HOME>\lib and also in c:\windows\system32 and c:\windows\system
    ***************which helped me do away with errors.
    still I don't get any output. I dont get any errors either.
    PLEASE HELP. URGENT. i am at my wits end.
    Thank you.

    Servlet is the one which runs in the server side...if u want to comunicate with the serial port of the server in which ur servlet is running can be done but making use of Communication api available....
    U can download the Api from http://java.sun.com/products/javacomm/index.jsp
    There are three levels of classes in the Java communications API:
    High-level classes like CommPortIdentifier and CommPort manage access and ownership of communication ports.
    Low-level classes like SerialPort and ParallelPort provide an interface to physical communications ports. The current release of the Java communications API enables access to serial (RS-232) and parallel (IEEE 1284) ports.
    Driver-level classes provide an interface between the low-level classes and the underlying operating system. Driver-level classes are part of the implementation but not the Java communications API. They should not be used by application programmers.
    regards
    shanu

  • Does anyone know how to comunicate with a USB port using labview 6?

    Does anyone know how to comunicate with a USB port using labview 6?

    Unfortunately, there is no way to communicate directly with a USB port before LabVIEW 7.0 and VISA 3.0. With the new releases, there are functions called "VISA USB Control In" and "VISA USB Control Out" that give you direct access to a USB port.
    You can definitely communicate with DAQ, Serial, or GPIB devices that are connected through a USB port, though. This is done seamlessly through the NI-DAQ, NI-Serial, and NI-488.2 drivers.
    Luke S.

  • How can I do to communicate to parallel port using labview 5.0 and NT ?

    I am trying to write and read from parallel port using Labview 5.0. It does not work with NT.
    How can I do to communicate to parallel port using labview 5.0 and NT ?
    Thank you in advance.
    Regards,

    If you are trying to use In/Out port functions that come with LabVIEW they will not work with NT. I think the AccessHW file at the following link will fix that problem:
    http://zone.ni.com/devzone/explprog.nsf/6c163603265406328625682a006ed37d/49664743ded6f1da862564bc004e3a7f?OpenDocument
    Try also this link:
    http://zone.ni.com/devzone/conceptd.nsf/2d17d611efb58b22862567a9006ffe76/0989d3d9dafae64e8625680400679736?OpenDocument
    and do some searchs at NI.com for parallel port, you should find some more usefull info.
    Good luck
    Brian

  • How to create and read text file using LabVIEW 7.1 PDA module?

    How to create and read text file using LabVIEW 7.1 PDA module? I can not create a text file and read it.
    I attach my code here.
    Attachments:
    File_IO.vi ‏82 KB

    Well my acquisition code runs perfect. The problem is reading it. I can't seem to read my data no matter what I do. My data gets saved as a string using the array to string vi but I've read that the string to array vi (which I need to convert back to array to read my data) does not work on the pda. I'm using version 8.0. So I was trying to modify the program posted in this discussion so that it would save data from my DAQ. I did that but I still can't read the data after its saved. I really don't know what else to do. All I need to do is read the data on the pda itself. I can't understand why I'm having such a hard time doing that. I found a possible solution on another discussion that talks about parsing the strings because of the bug in the "string to array" vi. However, that lead me to another problem because for some reason, the array indicators or graphs don't function on the pda. When i build the program to the pda or emulator, the array indicators are faded out on the front panel as if the function is not valid. Does this kind of help give a better picture of what I'm trying to do. Simply read data back. Thanks.

  • Problems reading the serial port with labview 5.1.

    I open the example serial.vi , I select write to serial port, run the programm, I don`t have any problem. But when I select read serial port, I get the error code 16392and hex code error x4008. I need to know what can I do? Thanks a lot

    Any time you get an error in LV you can right click on the error cluster indicator and do a "Explain Error".
    If you do this for the error code you reported, the explanation says that it was a framing error.
    In serial communications, a framing error indicates that the hardware was not able to detect a start bit, data then the stop bits that comprise a frame.
    This prompts me to suggest that you check you port setting on the serial port. You want to make sure you are setting the port for the correct;
    Number of start/stop bits,
    Baud rate
    data bits
    parity (just for good measure)
    and hardware handshaking.
    I hope this helps,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Controlling XY stage connected to parallel port using labview

    Hi,
    I have a XY stage which I can control using mach3 software. I want to control a signal generator, VNA and the XY stage at the same time. I have programmed SG and VNA using Labview but I am having difficulties controlling XY stage using Labview. I have never controlled an instrument connected through parallel port using labview.
    Can anybody give me some ideas to start with? How do I use VISA to control the parallel port? I really appreciate your help. Thank you in advance.

    Hi srms,
    Since your question is related to using VISA, I would try posting your question on the Instrument Control Board. You're likely to have better luck there.

  • I want to write data into eeprom(93LC86) in parallel port using labview?

    I want to write data into eeprom(93LC86) in parallel port using labview? Also I want to read data from EEprom.

    Hi Mr. Mz,
    after having a look to 93LC86-Datasheet I do not see a problem. The self-timing programming cycle of this Chip avoids timing problems; the rest is only logical stuff.
    If you need more general info, how to use the parallel port, I recommend: http://[email protected]/ or
    in case you need an example of SPI-Interface in LabVIEW with paraport - then write to: [email protected]
    You are welcome
    regards
    wha

  • Read Serial port @100 us

    Hi guys,
    I'd like to know if Labview can read serial port @ 100 microseconds?
    Is it necessary any specific HW for  that? What HW can I use to read at that rate?
    Regards
    Kito

    Take 5-10 minutes and explain your problem much better. Like this. I have an instrument xyz. This instrument use a ZZZ communication protocol, over a YYY link. In my Labview program I want to achieve this XXX. This is what I have done so far.
    Remember good questions draw good answers.
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)

  • Communication through RS232c serial interface using labview

    i am trying to communicate with a device through RS232c serial interface using labview 6.1....i have tried to run the example "Serial communication.vi" provided in 6.1 and it doesnt work....do i need any special hardware or do i need to configure my hardware to communicate through RS232c...
    thanks in advance
    shri

    Seems like I placed a small (maybe 30ms) delay at the end of the serialcommunications.vi structure.. for some reason my PC didn't like running as fast as it tried to go. Also look into the actual serial communication.vi and open the vi's inside it - check that the port setting (0 or 1) are ok, the baud rate (probably 9600) are ok. I'm running with only three wires in my application, TX, RX and Common. The PC may need to be rebooted to enable the com port - or use device manager and see if it says the com ports 0 and 1 are both OK..
    Try buildinga loopback plug with TX to RX, RX to TX, and Common to Common and see if hyperterminal (or other serial communications program works - there is also Loopback.VI in the NI library somewhere that can be used. Good Luck!! Dave

Maybe you are looking for

  • N97 Low Battery Warning

    Is there a way to manually discharge the battery on an N97? Or alter the time between getting the first low battery warning and complete battery discharge?   From the first time I get the warning to actual discharge takes ages.Yes that can be a good

  • CDC (Change Data Capture) with 2 Tables

    Hello, i want to use the change data capture for the typical Data Warehousing progress (bring the new or updatet table from source to the staging area) So i have implemented a mapping with to tables. The source table is S_Account, the target or stagi

  • RE: code falls apart when add this to idl: string getClient1Name();

    I have a counter object that has at most two clients connected to it. I do not want the same two clients in the regClients String[]. Since restriction is that we only want two registered clients we can just check position one of array. Note array sta

  • New iPhone 5s Overheating and Losing Battery Life

    I just received the new iPhone 5s, and it's been on for all of 30 minutes, during which I restored the phone via iCloud backup and reinstalled my apps, etc. In these 30 minutes, the phone overheated and dropped down to 40% battery. Any reason as to w

  • Can multiple 1394 Controllers be switched in and out of operation and configured correctly?

    The test system I'm working on has a 'core' VXI System using a Slot-0 1394 Controller that is always powered up but also requires other systems to be switched in and out as required under the control of LabVIEW 7.1 software. The interface to all of t