Bit twiddling on Parallel port

Anybody got any idea of how to twiddle bits on the parallel port using
Laview 6i and Windows NT?
Thanks,
Alf
Email: [email protected]

Thanks Dennis,
I'm still looking. The link you sent applies to Win95 and Win98 which
have built in Inport and Outport functions in LV. These are not available
in NT. Any body achieved this functionality with LV6i & NT?
Thanks
Alf
"Dennis Knutson" wrote in message
news:[email protected]..
> There's been several recent threads about the parallel port. A link to
> one is
>
http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=5
06500000008000000E11A0000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0.
> I'd suggest doing a search for "parallel port" or just browsing
> through the recent history.

Similar Messages

  • Pre-programmed sequence for data bits on parallel port.

    I've found and made a bunch of vis that allow for interactive high/low control of the 8 data bits on the parallel port. I want to control each pin with a pre-programmed pattern of bits. Any ideas?

    A U8 is an unsigned 8 bit number. To create one place a number control down on the front panel. Right-click on it and select Representation>>U8. To create an array of U8s you place an array control down, and then drag the above numeric into the array shell. You now have an array of U8s, which you can expand and place things in it.

  • 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

  • I'd like to Pilot Parallel Port an its seperate bits

    Hi...
    I'd like to pilot 8 relays with the normal parallel-port of a PC using LabView. In this case I have to pilot 9 bits of the parallel port. How can I realise to pilot the parallel port and the seperate bits and which VI should be used?
    Message Edited by Sushi on 05-16-2006 11:05 AM
    Message Edited by Sushi on 05-16-2006 11:05 AM

    Hi Sushi,
    The first thing to investigate is whether the PC's parallel port can actually drive that many relays due to loading conditions.  Check out the specs of your PC's bus versus the loading requirements (typically mA) for a given relay. 
    As for controlling the relay using the parallel port, you can have a look at the example provided by Labview by searching within the Help menu, under "Find Examples", then search "parallel port".  Although reading & writing to the parallel port is relatively easy, the nice thing with the examples is that it provides information on each line of the port (data vs control, etc).  I also posted an attachment a few years ago on how to set up the port.  This was used to open / close relays..  I will look for the thread.
    Regards,
    JLV

  • Why does this loop used to write values to the parallel port keep going forever?

    Have a look at this VI guys. I'm trying to send a sequence of bits (used to trigger an IC). I'm interested in the last bit of the data port (D0). so I'm sending either 0 or 1 to that pin to trigger the IC. it works, but the problem is that the loop keeps going forever and i cant control it. if i send 3 to the loop count, I'm expecting to get: 1 0 1 0 1 0, but it doesnt stop and keeps going forever.
    It seems that the problem is not with the loop. because i deleted the loop and just left the flat sequence so that it executes only once, but still it keeps repeating. How can i make the flat sequence execute only once?
    I'm using a parallel port monitor (parmon.exe) and a LED connected to D0 of the parallel port to check.
    If anybody has an alternative or better method to send the bits to the parallel port, I'd be very thankful.Message Edited by krayzie on 05-14-2005 04:33 PM
    Attachments:
    pport.vi ‏24 KB

    It works just fine here. Place an indicator to the iteration terminal [i] to watch how things progress. Do the number ever increase above N-1 to what you wire to N? I don't think so!
    Also make sure you don't run the VI with the "Continuous run" button. In this case the VI would immediately restart whenever it is finished. use the "Run" button.
    LabVIEW Champion . Do more with less code and in less time .

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

  • Is it possible to control the parallel port with Lookout 5.0

    I want a simple demo setup on a PC, so I can control the 8 data bits of the parallel port. Example, to use START p/b that would toggle bit 0 and data returned on bit 1.

    It is possible to send bytes to the parallel port using the ASCII object within Lookout. However, it is presently not possible to control the state of the individual bits on the parallel port with Lookout.
    If you need to control the individual bits on a parallel port, consider using LabVIEW. It is much more powerful when programming serial and parallel ports.

  • Using Parallel Port with Outport.vi Problem

    Hello,
    I am trying to use my parallel port to control a relay network and have run into a problem. I am using the outport instead of visa because for some reason I get an error with visa and outport seems more simple. The problem I am having is that my program doesn't seem to be able to initially take control of the port. What I mean by this is that if I restart the computer and open/run my program, I get an incorrect output on the parallel port. However, if I run one of the example programs for controlling the paralle port using outport (attached) (I believe the one I use is called Reading and writing to parallel port using loops) I am able to control the output to the parallel port. Also, after the example has run, my program works correctly. However, if I restart my computer again and run my program first it can no longer control the port correctly. So the problem seems to be that my program isn't initializing the port correctly or assessing it right at the beginning of the program. However, looking at the example program I don't really see what they are doing that I am not. I have the correct port address. 
    My program takes values from a text file and displays them on the port and that works correctly. 
    Attachments:
    CircuitTopModule.vi ‏26 KB
    parallel port examples.llb ‏72 KB

    Hi Jag213, I'm glad you were able to resolve the issues you discussed on the other forum related to this issue.
    Now that you have it working, I would recommend a few things:
    1. Just try modifying one of the existing examples and see what you can get away with removing in order to keep it working the first time.
    2. Try modifying the timing on your example - 10 seconds is a long time to wait between each week, I wonder if you are getting a time out? Do the examples work when you insert that kind of timing delay?
    3. Add the In Port.vi into your code - this may be related to getting your Out Port.vi to work correctly.
    4. Your code controls 8-bits on the parallel port, while the examples control 32-bits. Do all 32 bits need to be initalized? Looking at the Parellel Port Read and Write Loop.vi Example, in the IO Connector Status, the 31st bit controls whether the target is initialized.
    Play with these settings and see if you can get yours to work the first. If all else fails, build your program to run off of one of the examples. For example, have the while loop run once, and then call yours as a SubVI.
    Good luck!
    Joey S.
    Software Product Manager
    National Instruments

  • PC parallel port access with XP

    I recently got In Port and Out Port working on XP.
    I searched the ni site for AccessHW. The CVI Run Time Engine has to be
    version 5.510 or earlier. I checked the version number of one file, i.e.
    cvirte.dll to verify.
    I directed the installer to install accesshw to the directory where the new
    In Port and Out Port and the rest of the new parallel port .vis were going
    to be, i.e. Labview\Labview 6\vi.lib\platform.
    I downloaded parallel.zip from ni.com and moved the parallelnt.llb file to
    this same directory. Parallelnt.llb has a number of parallel port vis, not
    just replacements for In Port and Out Port. I replaced the In Port.vi and
    Out Port.vis in the diagrams I was trying to make work with the new .vis.
    So, on this XP machine, with
    a monitor program, parmon.exe, running to
    display the bits on the parallel port, Labview can be seen to be using the
    new parallel port .vis, and, bits on the port are changing.

    I wonder if there's a reason why there's a javax.comm 3 series for *nix, but not for windows. Hmmm.                                                                                                                                                                                                       

  • Format of the parallel port base address

    Just wondering if someone could please help with what I'm sure is a simple question
    I'm currently trying the control the first 3 bits of the parallel port using the Out Port sub vi.
    Using the Labview examples and help I can see how to find the base address of the port. My LPT1 port is 378 like most.
    However the parallel port I'm trying to control is a added in extra PCI card and looking in the Device Manager this is LPT3 with 2 an address ranges starting at CF00 and CE00 . I understand how the address range of starting at 0378 becomes 378 for the base address. But whatabout CF00 asnd 2 ranges? What do I need to put as the base address for the Out Port for CF00?
    thanks in advance
    Nick

    duplicate post. why did you feel the need to repeat the question, especially since it has already been answered.

  • Simple parallel port control

    Hi, I am new in programing and what I need to do is to maintain 5V on 4(any 4, cause I can hook the wires to any pins I wanna to) of the 25 pins of the parallel port. and at specific time I need to press a button to let the voltage drop(a signal) to active the machine I am working on. Can any one give me a lift on what vi to use? I check the NI tutorial but it all talks about how to send and recieve 8 bits info over the parrallel port while what I really need is just a simple program to control 4 pins. I am using windows XP pro and labview 7.0
    Can a computer learn how to program?

    First of all read this arcticle about the Parallel Port
    http://zone.ni.com/devzone/conceptd.nsf/webmain/72C6FC6CE4AD4D1386256B1800794596
    After that downaload the Accesshw.zip which allows you to write and read from any computer's port under windows.
    Now if you want lets's say to write to the 1st bit of the parallel port you have to put to the parallel's port data address the value 1. In order to leave the other bits unaffected you have to keep somewhere the state of the parallel port and use the following condition [state OR 2***bit_number] if you want to turn on (1) this number. On the other hand if you want to turn it of use [state AND NOT(2***bit_number)]
    Please let me know if you need more information
    There are 10 kind of persons. Those who understand binaries and the others.

  • Parallel port use Lookout

    Does anybody know how to read/write through the parallel port with Lookout 5.0? Is there any example code for this?

    Hi,
    It is possible to send bytes to the parallel port using the ASCII object within Lookout. However, it is presently not possible to control the state of the individual bits on the parallel port with Lookout.
    If you need to control the individual bits on a parallel port, consider using LabVIEW. It is much more powerful when programming serial and parallel ports.
    Remzi A.
    National Instruments

  • Parallel Port Output

    ...doing a school project where i connect the parallel port to a bread bord which connencts to motors etc...
    i understand u use javax.comm.*; classes to access the parallel port.
    rite now i have like this...
    import javax.comm.*;
    import java.io.*;
    public class carPort {
      ParallelPort port;
      byte[] outputByte = new byte[8];
      public carPort() {
        port.setOutputBufferSize(8);
      public OutputStream getOutputStream() {
        try {
          return port.getOutputStream();
        } catch(Exception e) {
          return null;
      public void outputBit(byte bit, byte position) {
        try {
          outputByte[position] = bit;
          port.getOutputStream().write(outputByte);
        } catch(Exception e) { }
    }lets say outputByte has these value inside the array
    outputByte[0] = 1
    outputByte[1] = 0
    outputByte[2] = 1
    outputByte[3] = 0
    outputByte[4] = 1
    outputByte[5] = 0
    outputByte[6] = 1
    outputByte[7] = 0
    and i call the outputBit method...
    and this executes
    port.getOutputStream().write(outputByte);
    will the result be.
    PIN 1 = ON
    PIN 2 = OFF
    PIN 3 = ON
    PIN 4 = OFF
    PIN 5 = ON
    PIN 6 = OFF
    PIN 7 = ON
    PIN 8 = OFF
    (ps. i have an thread class that provides constant output)
    i know i know i know...i should be using c++....
    if the above isnt the output wut can i do to make that?
    just i case u dont understand wut im trying to do lolz. im trying to output indiviudal raw bits through the parallel ports 8 pins.
    thx =)

    wut i want to do is to turn leds/motors on and off through the parallel port. to do that, pin 1 would like be the right motor. and pin 2 the left motor, and like pin 3 for an led...etc...if pin 1 is on than the right motor will go if its 0 then the motor wont go....
    in other words i want the program to output raw bits not bytes to the individual pins of the parallel port.

  • Driving stepper motor via parallel port

    Hi everybody,
    I want to drive a stepper motor via the parallel port. The problem is to
    create a constant frequency on a digital line of the port. I tried to do
    so with a While-Loop with a certain delay, but the frequency varys due
    to occurrences like mouse-movement (due to the call-ups of interrupts I
    think).
    Any Ideas?
    Regards
    Martin
    Attachments:
    Martin.Eis.vcf ‏1 KB

    How about a simple NE555 timer circuit to externally create the constant
    frequency, then use a bit in the parallel port to enable and disable the
    NE555 circuit? You could probably go to Radio Shack and pick up the
    components for less than $10.
    Jim
    Martin Eis wrote in message
    news:[email protected]..
    > Hi everybody,
    >
    > I want to drive a stepper motor via the parallel port. The problem is to
    > create a constant frequency on a digital line of the port. I tried to do
    > so with a While-Loop with a certain delay, but the frequency varys due
    > to occurrences like mouse-movement (due to the call-ups of interrupts I
    > think).
    >
    > Any Ideas?
    >
    > Regards
    > Martin
    >

  • Connect parallel port printer to usb in windows 8.1 64 bit

    I am using Windows 8.1 w/ 64 bit - would like to know proper cable to hook up to parallel port printer HP LaserJet 4050.  Any help greatly appreciated.

    @PB1941 
    ‎Thank you for using HP Support Forum. I have brought your issue to the appropriate team within HP. They will likely request information from you in order to look up your case details or product serial number. Please look for a private message from an identified HP contact. Additionally, keep in mind not to publicly post ( serial numbers and case details).
    If you are unfamiliar with the Forum's private messaging please click here to learn more.
    Thank you,
    Omar
    I Work for HP

Maybe you are looking for

  • How to add a link into a bubble tip

    Hi All, I am new with OAF and I have 4 requirements with OAF page.I need help from OAF gurus. I am working on iProcurement's Checkout: Requisition Information page. Following are the requirements : 1>On that page it having a drop down list and this d

  • Printer button codes

    we need the correct placement for the java script code to print more than 1 page so we can hit the print button and it will print 2 or 3 pages of the fillable form. here is what I have right now xfa.host.print((1, "0", (xfa.host.numPages -1).toString

  • Removing Logic / Dynamic logic

    Hello all... this is something I have been thinking about for a few weeks and every once and a while I get inspired to see if I can find a simple solution to a rather annoying (but not critical) problem I am having with a bit of code... and in fact..

  • Forwarded mail has no images

    I have a new .mac account, so I am forwarding my old address email to my .mac email using rules in the OSX mail program. I have it set up to forward the mail to my new address and then delete it from the old address. This works great except my forwar

  • OutOfMemoryErrors after migrating WLS 6.1 to 8.1

    I work on a project that has been running on Weblogic 6.1 SP4, using Sun JDK 1.3.1_04 on Solaris 8 for well over a year. We recently migrated to Weblogic 8.1 SP2 using Sun JDK 1.4.1_05. We did have to make minor changes to our application (deployment