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

Similar Messages

  • 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

  • Asking pins at the parallel port (ecpp)

    Dear all,
    since I am new to solaris (version 2.8) it may be
    possible that I didn't find the resources (faqs etc) that solve my problem
    so here is my question (Any pointers to more information regarding my topic
    are welcome).
    I would like to know if someone has used the
    ioctl calls ECPPIOC_GETREGS and ECPPIOC_SETREGS with an ecpp device
    successfully. If so, please give me some advice why mine doesn't work.
    The follwoing short program lets return ioctl an
    "Invalid argument" (errno is set appropriately).
    Someone out there who can help me, even with some pointers to useful
    resources (Information, example programs etc.)?
    Thanks in advance
    Greetings kai
    Heres my example program, it should compile under solaris
    #include <sys/types.h>
    #include <stdio.h>
    #include <unistd.h>
    #include <string.h>
    #include <stdlib.h>
    #include <fcntl.h>
    #include <sys/ioctl.h>
    #include <sys/ecppio.h>
    #include <sys/bpp_io.h>
    int main() {
    struct ecpp_transfer_parms tparms;
    struct ecpp_regs ifregs;
    int s = open("/dev/ecpp0",1);
    tparms.mode= ECPP_CENTRONICS;
    tparms.write_timeout=1;
    if(ioctl(s, ECPPIOC_SETPARMS, &tparms) == -1)
    exit(-1);
    if(ioctl(s,ECPPIOC_GETREGS,&ifregs) == -1)
    perror("+++++ GETREGS returned error +++++");
    return(0);

    According to the ecpp.c code, the EINVAL is returned if the
    ECPP_DIAG_MODE is not set first.
    hope this helps.
    hae
    Sun Developer Technical Support

  • How can i us the parallel port of the printer to control a frequenz-generator?

    Hello all !
    I like to  control with LabVIEW 8 student-version, the Frequenz-generator gadget . For this challenge i like to us the parallel port of the printer. I need for data flow only 2 cable. The frequenz-generator gadget need two signal : Low and High.How  can i  us the parallel port of the printer to control a frequenz-generator gadget? I have us  the VIs-Visa  (Visa-Serial, write, Close ), but i dont no what command i have to write on the Visa-Write so that the Signal can be in the low or high position.
    Thanks

    Hi Jeanjac,
    first, look here:
    http://en.wikipedia.org/wiki/Parallel_port
    to get the port numbering. also, be sure not to leave pin unconected, sometimes you might get an error message otherwise (i remember pin11 has to be always connected or so for windows...)
    second, just run the test panel in MAX and write something to your device to check if it works.
    then in LV, you have to decide to which pin is connected your instrument. in any case you have to address all 8 output pins together! this is a parallel...
    if you prefere to use only one pin, then you can use the serial port, with just pin 2 and 3 connected. it would work easier for you, since you address only one bit.
    Gabriel
    ... And here's where I keep assorted lengths of wires...

  • How to use the Control lines of a parallel port as Input lines to be read using Labview ?

    The details are :
    NI Software : LabVIEW
    Version : 5.0
    OS : Windows 95
    NI Hardware : N/A
    Drivers : N/A
    CPU : Pentium
    RAM : 48
    Vendor : darcom
    Customer Information :
    SPEL TESTING
    SPEL, INDIA
    [email protected]
    Ph: (91) 4114 53818
    We do not have any DAQ cards within the PC. We have the parallel port which is EPP and ECP compatible having the address 278h on LPT2 and we are trying use this port for reading 8bit data from an external circuit. We developed a vi program in Labview 5.0 to control the parallel port.We tried with the Data lines to send signals from PC to external device through this parallel port with the addr
    ess 278h (which
    is Data lines) and it works fine. We also tried using reading 4bit data from external
    device to PC through this port with the address 279h (which is Status lines) and it
    is also working fine.
    But it was not possible for us to read through Control lines whose address is 27Ah. Whereas when line printer (dot matrix printer) was
    connected, it was possible for us to take print out. Thus printer was working. This
    informed us that the control lines are all OK!
    Can you please clarify, how to use both control lines and status lines to read 8 bit data through this parallel port using the Labview software.

    There are several Knowledge Base entries about this on the NI site, but probably the most detailed document is on the Advanced Measurements (www.advmeas.com) website. Try looking at this page, I think you will find it useful.
    http://www.advmeas.com/goodies/parallelport.html

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

  • Could you help me to control a DC motor with the parallel port and windows 2000?

    I have labview 5.1 and i want to control my application throught the internet

    I would recommend upgrading to LabVIEW 7.0 for a couple of reasons. First, LabVIEW 6.1 introduced remote front panels which allows you to control a VI through a web browser. Setting up remote front panels is very simple and that alone is worth the upgrade. As far a using the parallel port you can use VISA to send/receive commands via the parellel port if you are using a motor controller with a parellel interface. If you are talking about using the port on a bit level to control the motor, LabVIEW 7.0 ships which an example of how to do basic digital input output with the parallel port.
    Regards,
    JR A.
    Application Engineer
    National Instruments

  • Is it possible to use the parallel port to control a stepper motor (compumotor s6-drive)?

    I'm using a compumotor S6 drive and I was wondering if I could somehow use Labview to program the parallel port to send the required step and forward backward signal to the controller and motor. All I need it to do is go back and forth at a user defined rate. Considering I know very little about Labview this is a daunting task indeed.

    Hello Tiano!
    I found an example on the www.ni.com website named "Reading from the Bi-directional Parallel Port."
    Here is the link: http://sine.ni.com/apps/we/niepd_web_display.DISPLAY_EPD4?p_guid=B123AE0CBA4C111EE034080020E74861&p_node=DZ52058&p_submitted=N&p_rank=&p_answer=&p_source=External
    Hope this and the other documents help you along your way!
    BB_Phil

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

  • 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

  • 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

  • Using stand alone executables to send data to the parallel port

    I have a executable that uses the parallel port to activate an alarm. The program works well on the base machine which is running windows XP. However when I try to run the stand alone executable on a windows NT machine there is nothing sent to the parallel port. I have updated the Cvirt file on all machines. I don't get any error messages when running the stand alone executable.

    I have the same situation using parallel port to control a hot swap PCI extender card and no error showed.  I can turn on/off and read correct voltages from the card in base machine.  After creating executables, I can turn on/off the card, but got wrong voltages in target machine.
    I've installed AccessHW in both machines and copied AccessHW.dll and cvirte.dll to system32 folder and the folder same with executables.  I also tried installer with port support and serial support checked. 
    Windows XP is in both machines and LV 7 in base machine.  I use "Output Byte to Port.vi" and "Input Byte from Port.vi" in AccessHW lib.
    One thing I observe is initiation.  The card manufacturer provides a program with same functions.  After running their program, the voltage readings from the executables become correct.  The readings remain good after closing their program.  I close the executables and run the executables again and still see good results unless restarting the target machine.
    Any solution for the problem? Thanks in advance!

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

  • How can I write to the parallel port using LabVIEW 6.0.2

    I have tried updating the labview.ini file and also using the parallel.llb available on the site. When I execute the program it gives me error 37 saying,"device not found". I am running this code on windows 98. I tried to use VISA write,serial port write (using port 10) but nothing seems to work. I also tried to develop a sample code using inPort and outPort, but no success, it is not able to read the data back from the parallel port, even if it seems (????i don't know any way to cross-check it though????) to write.
    Does anybody know the problem here?
    THanks.
    Pari.

    Thanks Brian.
    Well here is the next problem. I got a VI (attatched) off ni.com and it works fine on a windows98 platform. But quits working on NT.
    I can write perfectly (which i checked by hooking an LED display unit at the other end of the parallel port cable). I observed that the LEDs respond to the toggling of individual bits (data bits). But the error occures at the "out port.vi", when I try to run it on a NT machine (where I actually wanna use it). Are you aware of any changes to be made in order to run a VI on NT that works on 98?
    Thanks again.
    Pari.
    Attachments:
    parallelPortSwitcher.vi ‏124 KB

  • Errors with the parallel port

    I am trying to communicate with a robotic arm which is attached to the parallel port.

    and... ?
    See:
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=205&HUSERSHADE=0&HOID=5065000000110000006D070000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0
    2006 Ultimate LabVIEW G-eek.

Maybe you are looking for

  • ITunes 7.6.1 serious problem- MP3s refuse to play!

    I'm having a problem with iTunes I have never seen before, it seems that random albums of MP3s just refuse to play. Double click them right click them they will NEVER play. The only solution is to delete them and re-rip them from CD. This is annoying

  • GMA 950 vs GMA X3100

    I am trying to decide on which MacBook to get (new for referb). How does the GMA 950 differ from the GMA X3100? I know the GMA X3100 using more memory (not a problem I plan maxing out the memory on the machine. Just wondering if the GMA X3100 is fast

  • Block based on view ,enter query

    Hi, I have a block based on a view.One column of the view is substr(f_gt_marks(tcs23.idu_nr_dossr),1,128). When I enter 'PAPER%' for the above column and press execute query i get: PAPER PAPER1PAPER2 When the form is in enter query mode and when I en

  • Maximum encrypted message size

    Hi all, What is the largest size message that can be encrypted by the IronPort ESA PXE engine?  Is this a configurable parameter? Thanks very much, - Steve

  • Zen Touch serious problem

    Hello everyone, I have been browsing these forums for about 4 hours trying to uncover the error of my ways and discover what is actually wrong with my MP3 player. My intentions today were to update the player with the latest firmware so that i could