Read from parallel port

I know it's possible to write some data to the parallel port using
LabVIEW, but I don'y know if it's possible to read from the parallel
port.
If someone knows, please advice.
Thanx for reading.
Paul
Sent via Deja.com http://www.deja.com/
Before you buy.

[email protected] wrote:
>I know it's possible to write some data to the parallel port using LabVIEW,
but I don't know if it's possible to read from the parallel port. If someone
knows, please advice.
Thanx for reading.
Paul
Yes, it is very easy to read from the parallel port. There have even been
some VIs floating around allowing you to use the parallel port for digital
I/O using the inport and outport VIs.
To just use it to communicate, just use the VISA VIs with the proper resource
name for the port you are using.
Bob Young - Test Engineer - Lapsed Certified LabVIEW Developer
DISTek Integration, Inc. - NI Alliance Member
mailto:[email protected]

Similar Messages

  • Aquerir from parallel port with labview

    I want to aquerir digital data from parallel port of the PC then representing them on a graph with labview.
    How can i do that ?
       finaly thnx.

    You can use the port in and port out VIs found in the Advanced>Port I/O palette.  For an example check out 'Parallel Port Read and Write Loop.vi'.
    Using LabVIEW: 7.1.1, 8.5.1 & 2013

  • Read the parallel port

    Hello,
    I am working with LabView 7.0 and with Windows 98. I want to read the
    parallel port, but I don't get it. I am using the I Saw In port.Vi but
    I don´t read anything, but however with the function Out Port.vi if
    that get
    to write in the port. Is somebody able to throw a hand?
    Thank you

    Hi,
    Hope this gives some light to your problem:
    http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/c80752c53094c296862565f3007ac765?O...
    Regards,
    Jaime Cabrera
    Ni Applications Engineering Spain
    Regards,
    Jaime Cabrera
    NI Applications Engineering Spain

  • Reading Ascii charactors from Parallel port???

    Greetings:
    I have a question about instructing a third party vender who is writing code in VB6.0. (windows XP sp2) 
    They will be sending cycle counts thru the parallel port to my computer that i will be capturing using Labview 7.1.1 (windows XP sp2)
    The format of the streaming will be Ex.   *000000324*000000325*000000326*... etc. Continuously
    I can tell him to get rid of leading zeros if need be.
     I think i can capture this using VISA serial read.
    a) But what should i tell the third party vender for him to write to the parallel port?  Also should set the printer port to RAW
        and/or bi-directional printing .
    b) What is the pinout of the parallel cable between the two computers , is there a Null modem type of cable available, or is it pin to pin?
    c) What about handshaking , such as printer not ready, buffer full, etc.etc.
    Any help would be apreciated.
     Thanks
     Forrest 
    [email protected]
    to modify thier software to a
    Parallel port. so that i could capture.
    I have a third party group that is running a process sending and receiving
     data
    > thru a USB port for control of a frequency test. They are keeping track of
    > cycle counts that
    > are important in there test. They are using Visual Basic 6.0.
    >
    > What I want to do is to send the cycle counts ( which could be up to
    > 999,999,999 cycles)
    > (on an older system I would capture the cycle counts from a RS232 port
    that
    > they were send to me on another computer[Running Labview 7.1.1])
    >
    > I need ( since RS232 ports are sort of going away on new computer system
    > nowadays) to capture a streaming cycle count from the third Party system.
    > etc which will be continuous. They can modify there Visual Basic 6.0 to
    > incorporate USB drivers for your chips. I will be capturing the Data
    either
    > RS232 or USB into Labview 7.1.1 .
    >
    > I noticed you had drives on your web site with VB and Labview.
    >
    > Could you guys give me some suggestions if possible.
    > Thanks
    >
    >

    Hi Forrest,
    Okay... that makes more sense.  You are trying to communicate beetween 2 PC's.  Something like LapLink.. And yes, it would be okay to do this with the parallel port, it may have more speed than the serial port.  However for ease of implementation, you can use the serial port communication.  It is actually quite easy to implement. 
    The first step (if you are using Windows), is to establish the communication between the PC's using Hyperterminal.  You should be able to "chat" between the 2 PC's.  Maybe I shouldn't use the word chat..  You can communicate (Tx/Rx - ASCII) between the 2 PC's.  Once you verify that this works (at the desired speed - and configuration), you can implement it in Labview. 
    RayR

  • Problems Reading/Writing Parallel Port Data, Status & control Registers Using In Port.vi and Out port.vi

    Hi,
    Can anyone there help me Please with the problem. I am trying to
    communicate with the parallel port using my program which i have
    attached to the message. I am running LabVIEW 7.0 Professional with
    application builder. All the program does is reads and writes to the
    three parallel port registers. It runs FINE!!! in my computer. But when
    i built an executable (see attached) and tried running on a different
    computer (with LabVIEW Runtime engine 7.0 installed) the program does
    not read/write to the registers. The target PC had the parallel port in
    SPP mode just like mine. I can't seem to understand whats going wrong?
    Can anyone please help me if you know the right answer.
    Thanks
    Attachments:
    Programs.zip ‏119 KB

    Hi Guys,
    I too have a problem using "Out Port.vi", but of a diferent kind. I use this VI to control the  Parallel Port which in  turn controls a small circuit. I use only two data pins, DP-2 and DP-4 for this purpouse. I use LV 7.1 Professional Development version in a Windows 2000 operating system. Now, my main problem is that my code runs fine (both is development and .exe forms) in my development computer, but when I try to run the .exe version in  other computers (Windows XP operating system), it asks for a "protocol file" while starting (look at the attached picture).
    Now, I really have no idea what kind of a protocol file it asks for and just click "ok" and proceed to work, the most interesting part is that the code works well as I expected. So, my only problem is that it asks for a protocl file which I want to avoid. As with the application building, I do all that is  required like including the sub VIs (self developed), creating an installer, enabling the port access, and creating a proper .ini fine. I also use the Out Port.vi from the AccessHW library.
    I have my doubts on two fronts,
    1) With the version conflict, since my development computer runs with Windows 2000 and my target computers all run with Windows XP
    2) With the Out Port.vi which further contains a small VI "Output Word to Port.vi" in it and that further contains Call Library Function Node, which might call soem external files, like what my problem is.(look at the attached picture)
    I don't have answers to these questions and may be my problem is in different place, but I would like to hear from anyone who could give me a helping hand. I am in a situation where I could not disclose my code.
    Thanks in advance,
    mohan
    Attachments:
    protocol file.zip ‏153 KB

  • Read/Write Parallel port

    I need to write to several different pins of the parallel port and then read back 2 different signals simultaneously.  inp and outp do not seem to give me the capability to do this.  Any help is appreciated

    Hi Clayton,
    That's NOT correct. The output pins of the parallel port are between 2(lsb) and 9(msb).
    You cannot control pin 14 as ouput and I thnik you misunderstood the connection between the data (the second parameter to the outp function) you write and the pins effected.
    The data byte is 8 bits and each bit correspond to a pin from 2 to 9. So writing 0x0D = "0000 1101" to the port will send a logic 1 to pins 9,7 and 6.
    The attached drawing may help to clarify further.
    I also recommend a little reading from the internet. You can start with: http://logix4u.net/Legacy_Ports/Parallel_Port/A_tutorial_on_Parallel_port_Interfacing.html
    Hope this helps.
    S. Eren BALCI
    www.aselsan.com.tr
    Attachments:
    parallel.gif ‏6 KB

  • Voltage out from parallel port

    Hi there,
    I want to use the parallel port to run a relay.
    I do not understand the example given by labview. I also read the forum but I did not see what I am looking for.
    I am kindly asking if some one can write a small program ( I use labview 8.5) so I can give a 5v out say to pin #2.
    Thank you in advance

    vlonjati wrote:
    I do not understand the example given by labview. I also read the forum but I did not see what I am looking for.
    I am kindly asking if some one can write a small program ( I use labview 8.5) so I can give a 5v out say to pin #2.
    Please tell us more why you struggle, this is not good enough
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)

  • Low frequency measuremen​t from Parallel Port

    Hi there...
    I need to calculate the "on" and "off" time and duty cycle in pulse form from a parallel port. By making the circuit in 5 or 0 V, I just simply put it in my parallel port. The problem comes when I need to measure a very very low frequency. In this case, I want to measure the duty cycle from my operated refrigerator. I need to know when the thermostat goes "on" and when it comes to "off". In my experience, the thermostat will be "on" in about 5-10 minutes and "off" in about 20-30 minutes. So, the pulse might be take for a long periode each.
    I've tried with Timing and Transition Measurement wizard or even by using Pulse Measurement.vi which is included in Waveform Measurement category. It only works for 2 Hz and . If I try to set it with 1 Hz or below, it comes the message :
    "Error -20308 occurred at Timing and Transition Measurements -> Untitled 1
    :4"  (waveform index 0 of 1)
    Possible reason(s):
    Analysis:  The waveform did not cross the mid reference level enough times to perform this measurement. Check the signal length, reference levels, and ref level units."
    Could someone help me please ?
    Regards,
    Ricki

    here is a quick shot to give you an idea
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'
    Attachments:
    port logger.vi ‏22 KB

  • Efficient optimized way to read from serial port and GPS data display using map

    Hi,
    I have a custom h/w which reads the data from GPS Rx and after parsing send it to PC over RS232.
    Each second it sends 201 bytes to PC. I have developed a VI to read the GPS data and display it. Project file is attached.
    Fulctionality of different loops are as following:
    1. LOOP 1: 1.1 Reads the serial data from com port.
                   1.2 Synclonize the frame using start bytes "a" and "z".
                   1.3 Reads next 4 bytes containg receiving error information.
                   1.4 Reads next 195 bytes. in which initial 80 byes are GPS data. rest are others.
    2. LOOP 2: 2.1 Extarcts the GPS information and put them in an array.
                      2.2 Extarcts the receive error infor and counts the total error by incrimenting the variable using shift reg.
    3. LOOP 3:3: 3.1 Displays the GPS data in chart and log the data in a file.
    4. FLOW : Uses the GMAP .NET based API to creat a MAP and display.
    Problem statement:
    1. Functionality acheived.
    2. However in between data set is being missed by the programm. 
    Quesitions:
    1. Is the developed VI is efficient in terms of using queue loacl variables etc.
    2. What are the improvments I can do to solve the problem.
    Any other suggestions|
    Thank you
    jayant
    jayant
    Attachments:
    Telemetry_Receiver_v2.zip ‏3075 KB

    One of the most common problems in serial communication is the need for an adequate timing: how much time is expected your device to spend before answering? Have you put and adequate pause in your code before reading from the serial port?
    Hope this helps
    Roberto
    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?

  • Plot more than one analog value to a waveform chart by reading from Serial Port

    I have 4 LDRs and I want to plot their values to a waveform chart by reading them from the serial port. I have looked around and found an example of a VI plotting one value to a waveform chart (attached below) but I am unsure about how to expand this for 4 different waveforms, mostly because I don't particularly understand the way is being read currently. If someone could either point me in the way of a relevant example or explain/show me a solution, or explain howthe current VI I have works, that would be greatly appreciated.
    Attachments:
    LDRread.vi ‏20 KB

    Since I assume each LDR (whatever that is) has its own serial connection, you will need to read from 4 different serial ports.  From there, just form an array of all the data and write to the chart.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions

  • A problem about reading from serial port

    Hi,
       I just sent '0x03' from MCU to PC continuously, and then sent  '/n' as a stop character after every '0x03'. I use labview to read the data. The problem is when it get two '03' it get a '0', another two '03' and another a '0'. I don't know where is the '0' from?
      PS: Hyper terminal can display natrually.
       Thank you! 
    帖子被hengfo在08-08-2007 10:14 PM时编辑过了
    Attachments:
    serial read.vi ‏36 KB

    I think the problem may be the loop reading the serial port is running too fast.  There is no timing delay in the loop, so you are reading it as fast as you can, and probably faster than the device is sending data.  So sometimes the buffer is empty, and then the empty string gets converted to a numeric zero.  The way to know for sure is to put an indicator on the error wire coming out of the serial port read.  I bet you will see errors about the read buffer being empty.
    Put a wait timer in the loop to slow down the execution just slightly.  This is a good idea so that LV doesn't eat up all the CPU resources.  Look at the example for Basic Serial Write and Read.  You may want to have a loop ahead of the read that waits until there are a certain number of bytes at the port before it reads the serial port.  You may want to put a loop around the serial port that waits until a valid number is read in before it exits the loop and goes to the numeric conversion.
    Message Edited by Ravens Fan on 08-09-2007 08:50 AM

  • Computer freezes while reading from serial port

    My computer freezes when i tried to read from a serial port for a longer period of time such as 10 hours. I always close the serial port after reading. please, help me solve this problem

    I too experienced a similar problem twice on my machine and I have no idea how to stop it because it is so intermittent and I cannot replicate it.
    Perhaps I can offer some clues.
    The Labview screen cannot be stopped and some parts of Windows appears frozen. Oddly enough I can switch to the block diagram but thats about all I can do. The LV stop button will indicate a mouse click on it but the VI does not stop. iT also cannot be closed.
    Even the reset button and power button on the PC does not work. I am forced to power down the PC (pull the plug) to get back control.
    I believe it is related to a visa call to my serial Balance.
    ANyway no solution but hopefully some clues.
    Dell Optiplex GX260 w/ 500MB RAM
    Win2K 500.2195 w service pak 4,
    NI
    serial Hardware and NI serial ver1.45 (16 com ports)
    Labview 6.1 and 7

  • Reading from COM port, in forms 6i.

    Hi All,
    Can anybody help me how to read COM port, capture from comport in forms 6i, we have weigh bridge system and they have supplies MS access bases application, i would like to use forms based own application instead that.
    please anybody help me..
    thanks in advance

    [http://www.java2s.com/Code/Java/Development-Class/COM-Port.htm]

  • Function for reading from serial port

    Hi experts,
    We are trying to read data from the serial port with the following function we got from internet.
    The problem is when creating the object with the sentence CREATE OBJECT o_obj '"MSCOMMLib.MSComm.1"'.
    This returns a sy-subrc = 2 and shows the exception NO_CREATE_OBJECT.
    We already copied the file MSCOMM32.OCX in c:\windows\system32 and we successfuly registered it, with regsvr32.exe.
    We tried it with Windows XP and Vista.
    Anybody has any idea?
    Thanks in advance
    FUNCTION ZSERIALCOM.
    ""Interfase local
    *"  IMPORTING
    *"     REFERENCE(MODE) TYPE  I DEFAULT 0
    *"     REFERENCE(COMMPORT) TYPE  I DEFAULT 1
    *"     REFERENCE(SETTINGS) TYPE  C DEFAULT '2400,N,8,1'
    *"     REFERENCE(OUTPUT) TYPE  C OPTIONAL
    *"  EXPORTING
    *"     REFERENCE(INPUT) TYPE  C
    *"  EXCEPTIONS
    *"      NO_CREATE_OBJECT
      TYPE-POOLS: sabc.
      INCLUDE ole2incl.
      PERFORM init.
      PERFORM open_port USING commport settings.
      IF mode = 0.
        PERFORM read_port
        CHANGING input.
      ENDIF.
      IF mode = 1.
        PERFORM write_port
        USING output
        CHANGING input.
      ENDIF.
      PERFORM final.
    ENDFUNCTION.
    DATA: o_obj TYPE ole2_object.
    *& Form Init
    text
    --> p1 text
    <-- p2 text
    FORM init.
    DATA:
    wa_repid LIKE sy-repid.
    wa_repid = sy-repid.
    CALL FUNCTION 'AUTHORITY_CHECK_OLE'
    EXPORTING
    program = wa_repid
    activity = sabc_act_call
    application = 'MSCOMMLib.MSComm.1'
    EXCEPTIONS
    no_authority = 1
    activity_unknown = 2
    OTHERS = 3.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    CREATE OBJECT o_obj '"MSCOMMLib.MSComm.1"'.
    IF sy-subrc <> 0.
    RAISE no_create_object.
    ENDIF.
    ENDFORM. " Init
    FORM open_port *
    --> COMMPORT *
    --> SETTINGS *
    FORM open_port USING commport settings.
    SET PROPERTY OF o_obj 'CommPort' = commport.
    SET PROPERTY OF o_obj 'Settings' = settings.
    SET PROPERTY OF o_obj 'InputLen' = 0.
    SET PROPERTY OF o_obj 'PortOpen' = 1.
    ENDFORM. "open_port
    FORM read_port *
    --> INPUT *
    FORM read_port
    CHANGING input.
    DATA:
    wa_buffer TYPE i.
    DO 10 TIMES.
    GET PROPERTY OF o_obj 'InBufferCount' = wa_buffer.
    IF wa_buffer > 0.
    GET PROPERTY OF o_obj 'Input' = input.
    EXIT.
    ENDIF.
    ENDDO.
    ENDFORM. " read_port
    FORM write_port *
    --> OUTPUT *
    FORM write_port
    USING output
    CHANGING input.
    DATA:
    wa_buffer TYPE i.
    SET PROPERTY OF o_obj 'Output' = output.
    DO 10 TIMES.
    GET PROPERTY OF o_obj 'InBufferCount' = wa_buffer.
    IF wa_buffer > 0.
    GET PROPERTY OF o_obj 'Input' = input.
    EXIT.
    ENDIF.
    ENDDO.
    ENDFORM.
    *& Form final
    text
    --> p1 text
    <-- p2 text
    FORM final.
    SET PROPERTY OF o_obj 'PortOpen' = 0.
    FREE OBJECT o_obj.
    ENDFORM. " finalbligw

    Hi ,
    I want to read value form weigh bridge through COMM port. I have developed the FM and done the setting as mentioned in the below link
    Read COMM port using ABAP w/o third party software 
    but while executing the FM independently I am able to get the value from the COMM port,but when I call the FM from a program I am not able to get the output value from the FM.I am calling the FM from the report program.please find the code below.
    report test.
    data : lv_input TYPE c.
    CALL FUNCTION 'ZFM_WEIGHINTERFACE'
      EXPORTING
        MODE                         = 0
        COMMPORT               = 1
        SETTINGS                  = '1200,N,8,1'
        OUTPUT                     = ''
      IMPORTING
        INPUT                        = lv_input
      EXCEPTIONS
        NO_CREATE_OBJECT       = 1
        OTHERS                 = 2
    IF SY-SUBRC <> 0.
    * Implement suitable error handling here
    ENDIF.
    if I execute the FM independently the output is getting perfectly.but while calling from a program i am facing the issue..
    any suggestion is appreciated.
    Thanks
    Vivek

  • Controlled reading from serial port

    I'm trying to establish a connection to an external device through the serial port. This is done in a while-loop which sends an association request tries to get a response if a response is not recieved a new rewuest is sent, etc. At the moment this procedure does not work. I am considering two explanations for this. The first is that the loop does not wait long enough for a response to come and simply keeps pumping out requests, the other is that there is something wrong with the reading algorithm, that doesn't let it properly take in information from the serial port.
    Solved!
    Go to Solution.
    Attachments:
    association_loop.GIF ‏5 KB
    read_visa.GIF ‏8 KB

    I made a new version of the read case. The old version was a while loop, the new version is a while loop which will go on until it encounters an EOF character. In this case it is
    0xC1 or 'Á'. I thought the old version would break before getting any message. This doesnt get any signal either. I have probed it, and it doesn't get a string from which to take the length.
    Attachments:
    read_visa2.GIF ‏10 KB

Maybe you are looking for