Parallel Port Communication

any one can tell me how to change the mode of parallel port from " out put only" to input....

Apparently so (I don't have access to solaris at the
moment but looking around the net it would appear
that
a mode change is possible in solaris.
Try using the rxtx library
http://www.rxtx.org/
It apparently supports Windows now. It provides a
commapi interface and it may provide more
functionality
then suns commapi implementation. (although I would
not hold my breath)
There are also a few comercial vendors of commapi
complient libraries out there but they appear to have
problems with parallel ports also. One suggestion is
to buy a cheap serial to parallel port adapter and
use that (nasty hack though).
matfudThank so much for help. I will try to use the rxtx library and I'll inform you about it.
Further, I agree with you regarding the use of a serial/parallel adapter, it seems a last solution.
marco

Similar Messages

  • RXTX Parallel port communication with Pin Printer

    I have successfully installed and configured RXTX-2.0-7pre1 on Linux platform.
    2 printers, one Laser jet printer connected to the Serial port and the other Pin Printer connected to the Parallel port.
    I can print my files out successfully with RXTX on both my 2 printers. But, there is some problem with my Pin Printer performance. The print job is a little slow and the printing is word by word output.
    While the Laser printer received the whole string of my RXTX output and printed them out asap.
    RXTX read my data and write them to the Parallel/Serial port directly, so, for my laser jet printer, it buffered the RXTX output data and processed them all in one. No problem, laser printer works well. But to the Pin Printer, it got the RXTX output and printed them out with no buffer. I am not authorized to deal with the Pin Printer device driver.
    So, my question is that, is there someone knows how to resolve this problem on RXTX side? That is to say, how to modify the source code of RXTX and customize it?
    I wanna know how to create buffer in RXTX, for example, buffering a whole string line and then sending them to the Parallel port. Then, It supposed to be that the Pin Printer will receive once a whole line output and printing line by line in the paper! Not the problemly slowly word by word output!
    Thanks a lot!

    Simple metrics from google should suffice the SUN team from understand the need/huge requirement for supporting Serial and parallel port programming in windows. Platforms would always change and the team at SUN should remain commited in supporting new platforms.

  • Parallel port communication error with new addresses

    MD2 motors controlled by LabVIEW. I am trying to communicate with the motors through a parallel port. I plug in a PCI card which can provide another two parallel ports. I check their addresses which are 1110-1117 and 1120-1127. Then I replaced the old addresses (378), but could not communicate any more, neither writing nor reading. The parallel port setting in BIOS is bi-directional, since both writing and reading are necessary. Does this matter?
    I really have no clue why or how this could happen. Any help appreciated.

    Hai,
    I have installed a additional parallel port card (in pci slot) in my pc.  Then i installed the device driver that came along with the parallel port card.  I
    checked out the base address it was 278H (but i dint look the address before installing the device driver).   In general centronics interface ( parallel port) are placed at their respective addresses strictly.  Try reinstalling the device driver that came along with the external parallel port card or try latest updates from the manufacturer if available.
    of the card.
    With best regards,
    JK1
    With regards,
    JK
    (Certified LabVIEW Developer)
    Give Kudos for Good Answers, and Mark it a solution if your problem is solved.

  • How to use Serial/Parallel Port/DAQ card of a PC to run a SPI communication?

    Hi, dear all,
    I am looking for a method to send 10-bit word data to AD8403 Digital Potentiometer from PC’s Serial/Parallel Port or DAQ card.
    Is it possible to implement such a communication with LabVIEW?
    Are thee ready VIs for this application?
    Thank you very much for your kind help!
    Xiaogang
    [email protected]

    There are some vi's that should work for you for the parallel port. However it has been communicated that with windows after 98 it's a little bit more complex...
    I add a llb I downloaded from this forum a while ago that should perfectly fit your need (if you get it to work :-)
    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:
    AD9835 SPI.llb ‏339 KB

  • Communicating with the PC's parallel port

    How can I use java to directly communicate with the parallel port of my computer? I need to be able to turn pins on or off as if they were boolean variables or similar, for comparable programming purposes to a boolean variable (for robotics). If this is only possible by sending an entire byte of data to all the pins at once, that's fine too, but I don't know how to do either.

    Look at any JavaComm implementation, either Sun's for the 'nixes or RXTX (rxtx.org) for Windows.

  • Control parallel port (data and control lines)

    I need to control the output on the parallel port (LPT1) - Both data and control lines.  Once the data is written (Pins2-9), I then need to toggle the Sprocket signal (PIN1) - on the parallel port. The sprocket signal is also referred to as the Data Strobe Output.
    The required method is as follows:
    1. Lower the sprocket signal on PIN1
    2. Send the data (Pins2-9) and wait
    3. Raise the sprocket signal and wait.
    4. Repeat.
    I am looking for a method to control the data on LPT1 pins 2-9 and then be able to toggle PIN1 - Strobe signal - without the data falling from the other pins. What I have found is that whenever the state is changed on the strobe - the data that was written to Pin2-9 falls to zero. This will not work for my application - the strobe tells the hardware device that the data is ready. If it falls to zero when I toggle the strobe - that will not work.
    Regards,
    Guy

    Hello Adam,
    I am familiar with both references.  If you look more closely at the library reference - it allows me to communicate using VISA across the parallel port pins 2-9.  It does not permit direct communication to pin1 (the strobe signal) - property nodes don't allow the strobe to be refereced either (similar to control lines/signals for COM ports).
    Worse, I have also located examples using OUT PORT that does enable pin1 to be toggled.  The problem is, when those VIs are used, the data falls from the data pins when the strobe signal is written, even if its value is not changed.  For example, if the strobe is already high, if another high value is passed, the data falls from the data lines.  The other issue, when using VISA, as soon as the data is writen, the strobe signal automatically goes high even though I need a wait before setting the strobe high.  This is in complete contradiction to the second article you referenced which clearly discusses writing data to pins2-9 then taking the strobe high to indicate to the printer that new data is available.  It must be possible since this is the typical handshake.
    I am still looking for a more complete answer/solution.
    Regards,
    Guy

  • How to Install a parallel port printer to usb port of Pavilion dv5 Notebook

    In trying to install my HP DeskJet 610C Parallel Port printer to my HP Pavilion dv5-1235dx Notebook PC with Windows Vista Home Premium 64-bit, I followed instructions given by HP Support some two years back.
    I connected up the two units through a Parallel-to-USB ports cable. The PC loaded and confirmed suitable driver. (Following advice from sites on the Internet, I have made repeated attempts to carefully install the printer, but to no avail).
    Upon my issuing the Print instruction, the printer invariably prints two copies of what appears to be 'gibberish' in two lines at the start of the sheet. Thereafter it picks up and then ejects 6-8 sheets of blank paper.
    Any help in resolving this anomalous situation will be be most welcome and much appreciated.
    I might add that the printer works normally when connected in parallel to an older, Compaq Armada 1750 Notebook (XP OS). In this instance too, the Parrallel/USB worked as in the Pavilion PC, above.  
    This question was solved.
    View Solution.

    Hi khalidem, 
    Sounds like you have a communication problem with the printer cables. Have you tried a new parallel to USB cable or adapter?
    I am an HP employee.
    Say Thanks by clicking the Kudos Star in the post that helped you.
    Please mark the post that solves your problem as "Accepted Solution"

  • [WinXP/Lab​View7.0]Re​ading parallel port is too slow...

    Hi,
    First I would like to apologize for my English. I'm from Switzerland....
    I'm trying to read out a 16Bit A/D in 1us steps. Serial Communication over a PIC is too slow, so I was looking for a faster option. I found out there is possibility to read from the parallel port:
    I downloaded and installed the AccessHW drivers. I found 2 Vi's (see attached files) to read and write to the port. But this works only very slow. (100Hz read frequency).
    By the way I need some advice how to use 16 bits in minimum as inputs. When I set the bit 5 in Baseregister+2 I can read the Baseregister. I can read the whole byte except bit 3. This bit stays always high (3.4 VDC).
    The 5 status bits from Baseregister+1 I can
    read with no problems but the read frequency is around 100Hz too...
    The 4 control bits from Baseregister+2 I can't access. I followed the instructions in this link: http://zone.ni.com/devzone/conceptd.nsf/webmain/72​C6FC6CE4AD4D1386256B1800794596?opendocument#4 to make this 4 bits inputs, but it doesn't work. I set the Baseregister+2 00100100 (all of the 4 bits are high) and then I start to read out the Baseregister+2, but there are no changes, when I connect one of the 4 pins to ground.
    Hope there is anyone who can help me..!
    Greets
    Attachments:
    Input_Byte_From_Port.vi ‏20 KB
    Output_Byte_To_Port.vi ‏12 KB

    If you're trying to acquire a 16-bit sample at 1MS/s, using the parallel port, it will not work. In fact, many full-fledged DAQ cards do not support this high sampling-rate/resolution combination. Look at what NI has available here, in the S and E series DAQ boards--this should give you a feel for what's out there and what a professionally manufactured piece of equipment is capable of:
    http://sine.ni.com/apps/we/nioc.vp?cid=10955〈=US
    http://sine.ni.com/apps/we/nioc.vp?cid=1038〈=US
    As you noted already, a parellel port is going to be extremely slow for your needs, and likely not only be slow, but also have a pretty fair amount of timing jitter, since the timing of your read calls will be indeterminate. I would definitely recommend you look into som
    e other hardware acquisition option besides your parallel port... it won't get you very far unfortunately, because that isn't what it's really designed for.

  • How to detect signals from serial or parallel ports?

    Hi everybody!
    I'm developping a p.o.s. app, and I need to detect the printer status (serial or parallel), but I couldn't find the way to do it (I'm using Text_IO). I know about using a C program, but I want to find a simpler way.
    Is there any command or trigger in Forms 6?
    Thank you for your help

    Hi
    In your setup you have a ADAM 4250 RS232/485 repeater talking with 7 instruments in a network. Each instrument have a unique address, and you can only address 1 instrument at a time. If you need more speed you have to insert more ADAM 4250 units in your system and more RS232 ports on the PC. Identical ADAM instruments may receive commands over the same communication line, but transmit data on a unique communication line. You can not use the parallel port in your setup at all. This is not a Labview problem but a hardware problem. If speed is critical maybe the Ethernet I/O Modules: ADAM-6000 series are better for your setup 
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)

  • Programming Parallel Port

    Hi all!
    I'm new with java and I would appreciate some help!
    What I'm trying to do is to control an external device, like 8 LEDs, to turn them on and off using parallel port, data lines( pins 1....9 );
    Maybe someone of you guys already had made this and you could give me some tips or some direction to follow.
    What I already know is that I have to set one of the parallel bits to +5V and some of them to 0V in order to simulate that the device(printer) is ok.
    I know that I have to use additional library "comm.jar" but in this package there are no useful methods in order to control data lines.
    Maybe I am missing something!
    Thanks

    Try this one: [http://rxtx.qbang.org]
    It's a library for communicating with the seriell and parallel port.
    Here [http://en.wikipedia.org/wiki/IEEE_1284] you will find some helpful links about how the parallel port works.
    And if you stick to the comm.jar, have a look at ParallelPort.getOutputStream()
    Edited by: yawah on 11.12.2009 00:11

  • Controlling pins on the parallel port

    Hey
    I'm writing a program in  labview to controll a matrix card with labview. For that I'll use the parallel port. On  the datasheet it says  that only one off the pins shall send data serial into the card, and others are pins for update. clk etc.
    So I need help on how to configure the parallel port to  send different  things to the dedicated pins.
    jonas

    Hi Jonas,
    your task is a typical  SPI - communication ( like it is used for many chips - A/D  or D/A- converters; µC's etc. )
    Find attached a SPI-example-program (LV7.1.1), ( 16 Bit in this case )  - there you will see the mechanism, how to
    serialize Data @ LPT - Port and how a clock and /CS signals are added.
    I think with all my comments inside the Diagram you should understand, how it works.
    Switch the yellow light bulb "ON" and step through the program in Debug mode - every single clock and
    Data change can be observed  .............. or use a scope in "loop mode".
    If there are still open questions - let me know.
    Regards
    Werner
    P.S. Next time you should first simply type "parallel port" or "SPI"  in search line.... on this forum you will
    find a lot of threads about this issue........
    Attachments:
    project xx SPI.zip ‏92 KB

  • Parallel Port Help. Please

    Dear friends,
    Am developing an application that is to use the javax.comm package under a Linux (Fedora Core 5) system. However am quite stuck when it comes to sending a signal to a specific 'wire' off the parallel port.
    I have read about the configuration of the parport that is in such a way:
    1      Not normally used
    2-17      Data ports
    17-25     Ground
    so that if I want to send a signal to port 2 and ground I will open the port and transmit the signal 0100000000000000000000000 correspoding to the various port wires. This is, however, not working since the ports are giving me a HIGH signal through the entire time even when no signal is being trandmitted. How can I work around this or is there an easier or better way to go round this?
    This is the class I use to open/close the ports
    package controllers;
    import javax.comm.*;
    import java.io.IOException;
    import java.util.*;
    import java.io.OutputStream;
    import java.io.InputStream;
    * This class forms the base of all communication port events
    * It opens and closes ports and sends packets of data through the
    * serial and parallel ports
    public class RS232BaseClass
        private SerialPort portName;
        private ParallelPort parPort;
        private CommPortIdentifier portID;
        private OutputStream portOut = null;
        private InputStream portIn = null;
        private boolean isParallelPortOpen = false;
         * The class constructor
        public RS232BaseClass()
            portName = null;
            parPort = null;
            portID = null;
            portIn = null;
            portOut = null;
         * Method to re-init everything
        public void reInit()
            this.portName = null;
            this.parPort = null;
            this.portID = null;
            this.portIn = null;
            this.portOut = null;
         * Method to retrieve list of ports in OS
        public void getListofPorts()
            System.out.println(
                    "Getting the List of Ports configured in this server");
            Enumeration pList = CommPortIdentifier.getPortIdentifiers();
            while (pList.hasMoreElements())
                portID = (CommPortIdentifier) pList.nextElement();
                System.out.println("Port :[" + portID.getName() + "]");
         * Method to open specific port required
        public void openPorts(String toOpenPort)
            System.out.println("Process is opening port: [" + toOpenPort + "]");
            // Retrieve the port
            try
                portID = CommPortIdentifier.getPortIdentifier(toOpenPort);
            catch (NoSuchPortException e)
                System.out.println(
                        "No such port available to retrieve - Program will Exit!");
                e.printStackTrace();
                System.exit(1);
            // Open the port
            if(toOpenPort.startsWith("LP") || toOpenPort.startsWith("/dev/parport"))
                try
                    parPort = (javax.comm.ParallelPort) portID.open(toOpenPort, 30000);
                    System.out.println("Port opened successfully!");
                    this.isParallelPortOpen = true;
                    // Get Output Stream
                    portOut = parPort.getOutputStream();
                    // We do not get InputStream since Parallel port does not support input
                catch (PortInUseException e)
                    System.out.println("Port is in use - Program will Exit!");
                    System.out.println("Owner is [" + e.currentOwner + "]");
                    e.printStackTrace();
                    System.exit(1);
                catch (IOException ioe)
                    System.out.println(
                            "IO Exception during stream IO - Program will Exit!");
                    ioe.printStackTrace();
                    System.exit(1);
            else
                try
                    portName = (javax.comm.SerialPort) portID.open(toOpenPort, 30000);
                    System.out.println("Port opened successfully!");
                    // Get Input Stream
                    portIn = portName.getInputStream();
                    // Get Output Stream
                    portOut = portName.getOutputStream();
                catch (PortInUseException e)
                    System.out.println("Port is in use - Program will Exit!");
                    System.out.println("Owner is [" + e.currentOwner + "]");
                    e.printStackTrace();
                    System.exit(1);
                catch (IOException ioe)
                    System.out.println(
                            "IO Exception during stream IO - Program will Exit!");
                    ioe.printStackTrace();
                    System.exit(1);
         * Method to set the port parameters
         * @param baudrate the baud rate of communication
         * @param dataBits the data bits of communication
         * @param stopBits the data bits to signify end of message
         * @param parity the parity rate of communication
        public void setPortParameters(
                int baudrate,
                int dataBits,
                int stopBits,
                int parity)
            try
                portName.setSerialPortParams(baudrate, dataBits, stopBits, parity);
            catch (UnsupportedCommOperationException ucce)
                System.out.println(
                        "Unsupported Comms Operation - Program will Exit!");
                ucce.printStackTrace();
                System.exit(1);
         * Method to set Port Wait timing - Different for different devices
        public void setPortReceiveTimeout(int timeOut)
            try
                this.portName.enableReceiveTimeout(timeOut);
            catch (UnsupportedCommOperationException ucce)
                System.out.println(
                        "Unsupported Comms Operation - Program will Exit!");
                ucce.printStackTrace();
         * Method to Read contents from the port
        public String readPort()
            System.out.println("Reading From port...");
            StringBuffer buffer = new StringBuffer();
            int ch = 0;
            try
                while ((ch = portIn.read()) != -1)
                    buffer.append((char) ch);
                portIn.close();
            catch (IOException e)
                e.printStackTrace();
            System.out.println(
                    "String read is ["
                    + buffer.toString()
                    + "] Length is "
                    + buffer.toString().length());
            return buffer.toString();
         * Method to write contents to the port
        public void writePort(String outToPort)
            try
                portOut.write(outToPort.getBytes());
                System.out.println("Writing out [" + outToPort + "]");
    //            System.out.println("Data written out successsfully!");
            catch (IOException e)
                System.out.println("IO Exception during Writing to port");
                e.printStackTrace();
         * Method to close the port
        public void closePort()
            System.out.println("Closing Port");
            if(isParallelPortOpen)
                this.parPort.close();
            else
                this.portName.close();
            System.out.println("Port closed successfully!");
    }Thanks.

    After much googling and searching all over the web, I found out that package javax.comm is just redundant and, for a lack of more appropriate word, useless. The same goes for package rxtx. However, I came across something called parport that gives excellent output in very simple ways :)

  • Send bit to parallel port

    Hello LV community,
    I am sending bits to my parallel port to communicate with my ASIC but I have an issue to enter some test modes which require to send simultanously for example 3 bits at the same time into 3 pins  to the port, I can seen from the scope that there are some delays between them (aprox.20 us).
    My question is, this delays is it due to the PC performance or the way to send them? I am using the Out Port8.via for thi purpose. Is there any solution for this issue?
    Thx

    Hi,
    I don't really know your program but maybe you a better of with a Digital I/O board to avoid these delays. Most people use these boards to control there parallel port at high speed by directly accessing the pins. Don't forget that when you are using Port In and Port Out that you are still using software calls and you are dependant on PC performance.
    Regards.
    JorisV

  • Java and parallel port

    I don't know if this is forum I should ask this question but I didn't find any corresponding
    to java and ports control.
    I'm using Aurox 11.0 linux.
    I wonder if I could control each output (DATA pin) of parallel port separately in
    Java Communications API?. I can control outputs in Java with JNI but I need to run
    program as root. If I would want to create applet which would use parallel port
    I would have to create server with which this applet would communicate (Limitations of
    applets). But this server would have to run as root. It would affect security of system.

    Because of C++ ioperm function. This function requires root privileges. I have JNI Java
    program which can control outputs of parallel port on the level of one byte (write
    whole byte - all DATA outputs) and C++ program which can control outputs of port separately (control of each pin) and both are based on ioperm function. Both require
    root privileges. So my question is: can I control each output pin separately with Java Communications API?. Maybe if I used wholly Java code I could access port with user privileges?.

  • 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

Maybe you are looking for

  • Error: The Message Broker is not initialized

    In first step, I had created a domain with PointBase Pools. I have realized a small process with a Message Broker. Cool, it works. Second, I had created a domain with Oracle Pool and like the first step, I had realized a small application. With Oracl

  • Can't find my album on photo

    I have edited and created a new album for my pictures in photo and when I try to access it in order to add it to Dropbox it is not accessible. It's as if it's not there, but I can find it in Photo when I look for it there.

  • Acrobat X: Is there an ABBYY FineReader plugin for better OCR accuracy?

    Acrobat X's OCR capability is not very good.  Based on my testing and comparisons, ABBYY FineReader's OCR capability is much better!  Is there a FineReader plugin that can be added to Acrobat X for better OCR accuracy?  If not, can this be a possibil

  • Selection tool issues.

         So I have been working on a project in illustrator and all of a sudden, I couldnt use the selection tool to rotate and manipulate objects anymore. The arrows don't even show up to make that sort of action. Is there some way that I accidentally t

  • How to enter Non-Stock P.O. ???

    Hi Gurus, I want to enter P.O. (T.code ME21N) with out material number, i.e. non-stock P.O. eg. Only for Freight or transpot cost etc. Please give me detail procedure which filed to enter for T.code ME21N and if possible how to enter invoice for non-