Signal detection on pins of parallel port

hello,
i am using the outport.vi in order to write to the parallel port of my windows 98 pc. I am writing a value to the port register. To detect that, i am trying to detect a signal change directly on the pin of the parallel port using an oscilloscope. I don´t detect anyhting although the vi ran without complaining. What am i doing wrong ?
saludos
miriam

Hi miriam,
I never used the access to parallel port from LV but from C based programs. As I know outport should do under Win 98.
Are you aware that the port nubmer is in Hex? The address can change if you have one or two parallel ports in your machine.
If you have one port it is 0x378 for LPT1.
If you have two ports it is 0x278 for LPT1 and 0x378 for LPT2.
Waldemar
Waldemar
Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions

Similar Messages

  • Setting Pins on Parallel Ports

    Ok - going crazy - am trying to run a motor via parallel port - have a basic c app that does this but need to translate it into java. The code runs fine but no data is getting to the motor. Have tried with both a PrintStream and BufferedOutputStream but neither work (if they are in fact the prob)- this is what i have for the write methods.
    public void getOutStream(){
    bos = null;
    try {
    //bos = new BufferedOutputStream(port.getOutputStream());
    pos = new PrintStream(port.getOutputStream());
    System.out.println("_GET_OUTPUT_STREAM_");
    } catch (IOException e) {
    e.printStackTrace();
    public void write(){
    int [] b = {0x19, 0x39, 0x13, 0x33, 0x16, 0x36, 0x1c, 0x3c};
    for(int i=0; i<b.length; i++){
    pos.write(b);
    //bos.write(b[i]);
    delay(500);
    Have checked out the forums and a couple of people have mentioned setting the pins on the port to set values - how and where can i do this? and will it do the trick? Maybe someone can see something wrong with the code that i've missed?
    Any help will be HUGELY appreciated - cheers

    You must to forces the buffered output bytes to be written out to the underlying output stream.
    To do this use the flush method.
    public void write(){
    int [] b = {0x19, 0x39, 0x13, 0x33, 0x16, 0x36, 0x1c, 0x3c};
    for(int i=0; i<b.length; i++){
    pos.write(b);
    //bos.write(b);
    // put here if you want to flush after write one byte.
    bos.flush();
    delay(500);
    // or here if you want to flush only after write all bytes.
    bos.flush();
    }

  • I am trying to acquire pulse signal (TTL 0 ,+5v) using parallel port (SPP 25 pins) on pin 12.

    The state register adress is 379h. When I run continuously this VI, the value diplays 78 and 58 periodycally.
    I think that 0 correponds to 58 and +5v correponds 78. Is this correct ?
    So my questions are:
    1) How can I do to read only pin 12.
    2) How can I do to display graph of a pulse signal (TTL 0 +5v) from value.
    I attached the I am using.
    Thank you in advance.

    pin 12 is bit 5(32 decimal) of the byte you read from port 379h. So actually 58 is +5V and 78 is 0V.
    in C:
    if(32 & data){
    /* pin 12 is high (+5V) */
    } else {
    /* pin 12 is low (0V) */
    graphing depends on your programming language and tools available.
    If your signal is slow enough, and you don't need very good accuarcy, use a software timer and get a measurement every x mS

  • Can we read the status of a particular pin in the Parallel port(LPT1)?

    Hi,
    I have a Camera.I'm trying to read the status of the camera by connecting it to the parallel port.The camera has a DB26 ,high-density I/O connector .A high level on pin 19 indicates that the camera power is switched on(+5v =on ,0v=off).I want to read the status of this pin by connecting it to the parallel port.Can i read the status of a particular pin in parallel port thru LABVIEW? if so how ? Any help in this regard is appreciated.

    Rajesh,
    You may find the following tutorial useful:
    http://zone.ni.com/devzone/conceptd.nsf/webmain/72C6FC6CE4AD4D1386256B1800794596?opendocument&node=DZ52058_US
    Regards,
    Khalid

  • 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?.

  • 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)

  • 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 not detected in measurement and automation explorer

    I have installed labview 2010 in windows XP.
    The problem what I am facing is I could not find "Serial & Parallel port" option in Measurement and automation explorer.
    After seeing the similar problem in forum I have installed Ni-Daqmx 9.0.2.  But still I can not see the ports in MAX.
    I think i have attached enough document .
    If the parallel port is not detected in MAX can we send digital data to parallel port.
    I have tested parallel port with LED connecting one leg in 1st data line(pin 2) and another in gnd(pin 25).
    And my program is to blink the led for every one second but I cannot see the blinking.
    Can anyone help in this regards
    thank you
    Attachments:
    max.jpg ‏90 KB
    port setting tab1.jpg ‏30 KB
    device manager resource tab.jpg ‏34 KB

    Thank you for ur reply Smercurio
    I have changed the bios setting now 
    but still i cant see the printer port in MAX
    Regarding my vi, now i changed it please see that also 
    I have given values to element of arrays as (1,2&4) 
    Now also it is not blinking instead it is glowing all the time without blinking.
    What i have to do next.
    Attachments:
    device manger.JPG ‏43 KB
    device manger2.JPG ‏165 KB
    port test.vi ‏9 KB

  • Push button signal to parallel port to trigger a process

    I just need to connect a push button to the parallel port to set it as a trigger signal for a process.
    When push button is pressed, labview executes a process.
    Kindly help me how to do this, the wiring please
    Regards
    Grugh Mike
    Success is Everything !!
    Solved!
    Go to Solution.

    Data Lines to be used as inputsSome parallel ports can be configured to use the data lines as inputs. It depends a great deal on the way the manufacturer designed the parallel port. With some models the data lines can be read the same way we read the control lines, by driving them to high logic so they will take on the value of an external signal. However, most parallel ports require that you set the direction bit for input. This is bit 5 in the Control register (base+2). If the port is capable of it, setting the direction bit high has the effect of making the lines tri-state so it can be driven externally. Sometimes it is also necessary to toggle bit 6 high or low. However, it should be noted that some manufacturers actually lock these bits so that software cannot change them. An example is shown below in Figure 7.
    To test whether your data lines can be used for input, try the following:
    Set bit 5 of the control register high (at base address+2).
    With nothing connected to the port, write a couple of values to the data port, and read each back after you write it.
    If the reads DON'T match the writes, your port is probably bidirectional. Setting C5 disabled the data outputs and you're reading the open inputs of the data-port buffer. If the reads DO match the writes, your port isn't bidirectional. The data outputs are still enabled, you're reading back what you wrote, and you won't be able to read external signals. If it is possible to use your data lines for input, then you just need to set control register bit 5 high and read from the value of the data lines at the base address.

  • 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.

  • Sending out a signal via Parallel port in interrupt mode?

    I am trying to send out a 5KHz TTL signal via parallel port. the CPU should be disturbed at most time. so we can't use loop structure. I guess I have to use interrupt mode to do this job.
    In other languages, we might be able to programm 8253, which is a timer and counter chip on mother board. can we generate a 5KHz siganl via parallel port without disturbing CPU?
    or can we call another labview program in our main labview program.by doing so, two programs are running at the same time, we may be able to solve my problem
    Thanks

    Hi Sean-
    This functionality is theoretically possible, but this might not be the best option if you are concerned about latency in operation. A few references for using the parallel port in LabVIEW are linked in this thread.
    If you are concerned about precise timing and operating system latency issues, you may want to consider a hardware-timed PCI counter/timer board instead. This utility is a good starting point for selecting such a card.
    Tom W
    National Instruments

  • How do I generate custom-made signals (impulses) from the parallel port

    I am trying to generate some simple pulses to drive an external device. I am sure this is simple, but I'm not sure how to do it in LabView. I need to generate to TTL-level (2.4 - 5v) pulses that are spaced 500ms apart and occur every 34 seconds (that's the period).
    Any suggestions?

    ilogix-
    The easiest way to write to the serial port in LabVIEW is with the Port Out.vi. You can find the help info here. You can find the address of the parallel port in the properties (located in Control Panel>>System>>Hardware Tab>>Device Manager) under the Resources tab. IT is the first number in the I/O range property (usually 0378).
    This is a digital line and the parallel port is written as a byte so your labVIEW program will need to write a byte, delay and write another byte to get a "waveform".
    Xaq

  • Is it possible to get direct access to parallel port pins under Windows NT? What can I do

    to get such an access under NT? I found Write to Parallel Port.vi but I can`t open it. The error that occurs is:
    resource not found, error occured while loading the vi, labview load error code 8: could not load vi ressources.
    This vi is from 1994. Maybe the source of trouble is that I`m using version 5.1.1 or it is a problem with NT. What do you think?

    Parallel Port.vi can only be used in DOS-Systems (like Win9x, WinME ;-). NT does not allow writing to parallel port with low level routines. It is more useful to use the digital port that is on most of the DAQ cards.
    Some more informations on parallel ports: http://www.lvr.com/parport.htm
    In general it seems to be possible. Somebody told me just to use the write port command with the address of the parallel port. Another way seems to be to tell NT to allow direct port access - but I don't know how.
    Andreas

  • Parallel Port Programming

    After series of trials and searching the forum i was able to get the commapi and install it. i want to design a simple program that can control circuits (i.e to on leds) . the problem is how to write a 1 or 0 bit to a particular pin. i saw different posts on this issue but still haven't got the real solution.
    i also got to know about parport api and have downloaded and istalled it. but when i run the SimpleIO.java that comes with the package i get this error:
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : EXCEPTION_PRIV_INSTRUCTION occurred at PC=0x10001057
    Function=[Unknown.]
    Library=C:\Program Files\Java\j2re1.4.1_02\bin\parport.dll
    NOTE: We are unable to locate the function name symbol for the error
    just occurred. Please refer to release documentation for possible
    reason and solutions.
    Current Java thread:
    at parport.ParallelPort.readOneByte(Native Method)
    at parport.ParallelPort.read(ParallelPort.java:37)
    at SimpleIO.main(SimpleIO.java:8)
    plz i want to know what's the cause of this problem, really can't go further on my own and i know nothing on native interface.
    I would be grateful if i can achieve my objective without the parport also.
    How can i write bits to the parallel port plz???????????????
    Thanx in advance

    Why not communicate with the parallel port using the COMM API 2.0?

  • 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

Maybe you are looking for