Writing to parallel port

i need to be able to write to the parallel port on a desktop computer
to control a stepper motor.  I need to be able to write logic high and
low
at certain pins that go to a stepper motor driver.  The writing to the
port needs to be done so many times, or so many steps that are entered
into the interface. Pins7 is the clock that that starts the stepper
motor control in the stepper motor driver.  Also, pins 9 and 10 need
to be driven low or high to tell driver wether half or full step and counter clockwise or clockwise.
Basically i need to know how to set up my parallel port on my labtop in labView 7.1?
I want to be able to use the write to digital I/O.vi to send the proper
binary or hex value of an index array  to the parallel port
to drive the motor driver.

Hi exavier,
Look here maybe someone else hase asked.
Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas
LabVIEW, programming like it should be!

Similar Messages

  • Is VISA Write VI / Out Port (need AccessHW) better for writing to parallel port?

    We have experimented with 2 methods for writing to parallel port:
    1. Using NI VISA directly by calling VISA Write vi.
    2. Using the Out Port vi, for which we had to install AccessHW.
    Does the first method have any disadvantages. It seems to be a simpler solution.
    Operating system: Windows 2000
    Labview 8.2
    NI VISA 4.0

    Hey rashadi,
    There is nothing wrong with using the VISA write.vi to write to a parallel port.  Here is a great example program of how to use the VISA vi's to write to a parallel  port. 
    I hope this helps!
    Best regards,
    Jason W
    Applications Engineering
    National Instruments

  • Reading/writing to parallel port LabVIEW 7.0 Win2000

    I'm using LabVIEW 7.0 on a Windows 2000 machine which also has the CVI runtime engine version 6.0.4.105.
    I wish to write to the parallel port, simply on/off signal to eight lines. I have previously done this with LabVIEW 5+Win98. I have downloaded the accessHW libraries and installed them but have discovered that I also need the CVI rte version 5.0 . When IT personnel try to install this run time engine "A newer version of this run time engine is currently installed"
    appears and won't install version 5 over version 6. Has anyone else come up against this and is there a way around this (without having to install an older version of LabVIEW)?

    Leeser wrote:
    > I'm using LabVIEW 7.0 on a Windows 2000 machine which also has the CVI
    > runtime engine version 6.0.4.105.
    > I wish to write to the parallel port, simply on/off signal to eight
    > lines. I have previously done this with LabVIEW 5+Win98. I have
    > downloaded the accessHW libraries and installed them but have
    > discovered that I also need the CVI rte version 5.0 . When IT
    > personnel try to install this run time engine "A newer version of this
    > run time engine is currently installed"
    > appears and won't install version 5 over version 6. Has anyone else
    > come up against this and is there a way around this (without having to
    > install an older version of LabVIEW)?
    You could also use the PortIO library from the OpenG project
    http://www.openg.org.
    It is currently only in the CVS source code
    repository on that site and not yet part of the OpenG Toolkit. Because
    it is not everybodys thing to use CVS I include that library as
    attachement here.
    I tested it myself on Win95, NT4, 2000 and XP and had no problems at all
    with it. But please consider it beta software and if you have problems
    let me know with as much details as possible.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions
    Attachments:
    portio.zip ‏195 KB

  • My parallel port cannot work on win2000 and new pc

    I was troubled by the reading/writing from parallel port on win2000 for a long time. I had made my programs work on win2000/OLD PC, but i failed with the same programs on win2000/new PC. I tried with the method from the forum, that is, install accessHW and other method from my colleagues. Allways failed. I have to return to an old pc, it work! I think not only win2000/winxp will influence parallel port work, but also pc hardware. My new PC is Dell's GX260SMT with p4 2.4G. Dell's FAE told me that i can not install win98 on the pc due to some limitation of mainboard. Who met the smae issue as mine? How to fix it? Thanks for any help.

    I typically stay away from Dell PC's. I always have problems with them..
    I'm surprised to read that a new PC doesn't support Win-98. Have you / can you try Win-NT 4?
    I can't understand why Win2K would be different with a newer PC. The OS assigns the base address of the parallel port to a typical value of 0378h. This is for LPT1.
    My question would be: Are you having problems with LPT1 or do you have a PCI-based Parallel Port (to add ports)? If so, you cannot change the base address with Win-2K or Win-XP which assigns a PCI base address to the port.
    Can you provide more details as what exactly changes between the 2 PC's. Other than the motherboard and typical hardware (of course).
    How is the parallel port configured?
    What are you doing
    with it, etc?
    Any information that can help figure out a solution.
    Regards,
    JLV

  • 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

  • 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

  • Writing a series of codes to parallel port LPT1

    Currently i'm using Labview version 5 to write a program which sets the individual pins on my LPT1, which i'm sucessful in. However, I notice that after writing an ascii to Serial Port Write.vi, it still doesnt sets the parallel port. It is only when i include close serial driver.vi after writing the string then the respective output is set.
    In my application, i need to send many ascii within a very short time frame, currently, using the above method, for 40 ascii characters that i write into the parallel port, it took the computer about 2 seconds to finish (which is too slow). How do i improve the performance of my application?

    Jared,
    I tried using Out Port.vi but when i key in 378 to the register address and key in the number for the value control and run the vi just for testing purposes, it gives a dialog "Capability not supported. VI 'Out Port.vi' was stopped at Code Interface Node 0x1BC of subVI 'Out Port.vi' . I do not have the advance analysis package and i wonder if it's that is the root of the problem for the mentioned, or have i misintepreted 0x378.
    Thanx for your attention.

  • Writing a String to the Parallel Port

    I am a new user of Labview and have very little experience. I am trying
    to write an arbitrary string (that I can input) to the parallel port.
    Basically, I need to communicate with a device that connects to it and
    will accept commands as plain strings. I have read the article "using
    the parallel port with labview" but it hasn't helped me as I am so
    inexperienced. I was hoping that someone could help to learn how to do
    this and if there's a vi that already does this. It seems like a simple
    enough task. Thanks.

    Rather than simply present an answer from which you will learn little, I will try and out line what it is that you should investigate......
    First have a look at a string control
    You might want a button and a case structure to tell the code when to start decoding the string
    Put the following code inside the case structure say on the true state
    Then, taking data from this string control get the strings length
    Then using this and a loop index through the string using the string subset VI on the string pallette, use the length of 1 and index the position in the loop
    Now figure out how to convert the character to an ASCII value
    Send this to the parallel port
    This should be a reasonable frame work to empower you to learn for yourself.
    "Give a man a fish and you feed him for a day, teach a man to fish and you feed him for life", enjoy the free meals!
    Message Edité par Conseils le 07-13-2006 09:17 PM

  • 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

  • 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

  • Parallel Port (Mac OS 9)?

    I am putting together an electronic circuit for controlling a stepper motor. The board includes an option for a parallel port as typically found on older PCs.
    Is there a product available that would give me a parallel port on my G4 tower that I could then program? I am familiar with writing Firewire and older serial port drivers and feel comfortable writing code. All I need is the hardware and an associated software library for accessing the port.
    Please note that I am using Mac OS 9.2.2. I have no tools or desire to write for X.
    Gary

    Hi Gary, look for an old USB to Parallel adapter that's Mac compatible.
    Here's one...
    http://www.antarespro.com/890523-item-LINK_DEPOT-USB-DB25--899744001363-USB-DB25+DataTransfer.aspx?sgd=330d319d318d313d316

  • Parallel port under linux

    could anybody help a linux-labview beginner?
    i'm trying to write to my parallel port. but labview is obviousely not set
    up for this. does anywone happen to have a vi which can do that?
    best of regards
    michael h. fischer
    ============================================
    cell: +43 664 1254415
    fax: +34 664 1265930
    icq: #61578912
    vienna university
    institute of geology
    geochronology laboratories
    althanstrasse 14 / 2a482
    a - 1090 vienna (austria)
    web: www.univie.ac.at/geologie/fischer/
    wap: www.univie.ac.at/geochron/wap/
    ============================================

    "michael h. fischer" writes:
    > maybe i didn't comunicate here.
    > i don't intend to print anything out but i want to set each pin of the port
    > hi or low. i'm trying to turn some electrical relay-switches on and off.
    >
    > thanks anyway, all these hints are useful to me
    Michael,
    So using an true ASCII printer or dircetly /dev/lpx is the easiest
    solution. Just "print" the ASCII charakter representing the bits to
    set.
    Johannes Nieß
    >
    > "Johannes Niess" wrote in message
    > news:[email protected]..
    > > "michael h. fischer" writes:
    > >
    > > > could anybody help a linux-labview beginner?
    > > > i'm trying to write to my parallel port. bu
    t labview is obviousely not
    > set
    > > > up for this. does anywone happen to have a vi which can do that?
    > >
    > > Michael,
    > >
    > > I'm not sure how you adress the parallel port.
    > >
    > > Writing directly to an I/O port is not allowed for security
    > > reasons. There are VI's to do the required system calls.
    > >
    > > You might be able to use the (old) serial VI's with a high serial port
    > > number. You can look up the port number on a LV version for Windows.
    > >
    > > I'd use a completely different strategy: VISA can address parallel
    > > ports. With Windows you just use ASRL10. You might need some tweaking
    > > of the VISA preferences files to do it.
    > >
    > > Printing data to a parallel port should be done with the tools
    > > designed for it: System Exec: lpr file.txt
    > >
    > > Does someone have a summary of the options for reading the parallel
    > > port and setting control lines via the described methods?
    > >
    > > Johannes Nieß

  • How can i write a vi in using parallel port for digital inputs

    Dear all,
    i am a beginner user of LabVIEW and i want to write a vi in using parallel port for digital I/O. After reading the article "Using the Parallel Port in LabVIEW
    " and download the parallel.zip, i know how to write the vi for output, but i still don't know how to write the input one.i've try to use a Inport.vi to test, but nothing change when i set pin2-9 to high. (my computer:win2K & LabVIEW 6.1)
    Can anybody teach me how to write it?
    Can anyone write the vi for me too?
    Thanks all!
    p.s.i've already install the "accessHW.exe"

    Are you using VISA or the accessHW VIs? You may need to goto the bios and set the parallel port to run in spp mode or standard mode. This is the simpliest configuration and where you should start.
    As far as writing the VI goes, just copy the diagram out of the tutorial you mentioned.

  • 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

  • Parallel port and labview

    I am trying to control a OMHT23-400 stepper motor through a 3540M motor drive using a Moschip PCI Parallel Port. I created a program to send alternatilng pulses to the motor and rotate it a desired amount of degrees. The address of the stepper motor in my computer is I/O Range BD00-BD07. The same program worked in another computer who's parallel port address was I/O Range 0378-037F. I dont know why the program is working in the first computer and the same program wont work in this one. Thank you for your help.
    PS: the program that i wrote is attached below.
    Guillermo Naranjo
    Physics/Space Science
    Florida Institute of Technology
    Phone: 768 537 6392
    e-mail: [email protected]
    Solved!
    Go to Solution.
    Attachments:
    Rotation of Camera2.vi ‏17 KB

    Dear Gant88,
     first download and unpack accesshw.zip as instructed  (you can also unpack it to the directory where your .vi files for this projet are, thugh this is not good practice).
    I attached my write_port and my read_from_port. (LV 7.1)
    In my case I wanted to write (or read) 32 bit integer from the port, for this purpose I am writing (or reading) three (data, status, control) bytes at different locations. You will figure out.
    Take care not to have any printer installed (in win xp) on parallel port, because windows will do some check-ups on printer from time to time. This will interfere with your program. 
    Try and let me know.
    regards.
    Bojan
    Attachments:
    write_to_port.vi ‏28 KB
    read_from_port.vi ‏32 KB

Maybe you are looking for

  • Selecting "Customize Toolbar" does nothing

    I'm running Snow Leopard 10.6.8 and Safari 5.1 (6534.50) on a MacBook 1,1 (Core Duo). I've been experiencing some weirdness with the toolbar. I've uninstalled Saft, all Safari extensions, reinstalled Safari a couple of times, and ran a Combo Updater

  • Drill down in Cross tabs

    Is there any possibility to drill down in Crosstabs

  • Preview sidebar location is different from every other application

    For every other application (Finder, iTunes, iCal) the sidebar is on the left. In Preview the sidebar is on the right! Apple - please be consistent (or give us the option to change the location).

  • I can't open any file

    Hi every one, GarageBand does not open any file. From starting screen if a double clic on any of my previous song i get an error message impossible to open you file .. Even if i can create it a few minutes before .. as soon as i record it .. i am una

  • Catalyst 3500, 2900, 3700s

    I need a good reference with pictures of all the GBIC types, MTRJ, SFPs available along with the type of cables needed for each - SC, LC, ST -- Very confusing....