Led glow through parallel port.

Hi,
My status port of parallel port goes to default when no action is performed i have put that in a while loop..  how to solve that in Labview. I need to access status port S3,s4,s6,s7,s5 and the out put is connected to the data port of parallel port. when i press s3, the LED of data port glow's for a while and then when i release the s3 button it goes to default value,which i don't want it to happen.
I basically want to glow a led through parallel port and it should remain on even if i try to glow another led through parallel port. the staus port of parallel port will give input to the pc and data port receives the output(data port has 7 leds).
Can anyone help me out with this.
Thanks.

Basically need to modify the last part..
Attachments:
Copy of Fantansy House3.vi ‏693 KB

Similar Messages

  • Sending trigger through parallel port, C++, Visual Studio 2010, Windows 7

    Hi, I have a problem that I am really stuck with, and I am novice to the task so any help would be extremely helpful.
    I an trying to write to parallel port on my PC in order to send a trigger to EEG recording machine every time the new goal appears in a Virtual Reality game that I wrote in C++ (I want to record EEG brain signals while subjects are playing the game).
    I tried to follow the instructions from here: http://msdn.microsoft.com/en-us/library/ff802693.aspx
    I wrote the following code:
    BOOL FileExists(LPCTSTR szPath)
    DWORD dwAttrib = GetFileAttributes(szPath);
    return (dwAttrib != INVALID_FILE_ATTRIBUTES && 
    !(dwAttrib & FILE_ATTRIBUTE_DIRECTORY));
    BOOL WriteABuffer(char * lpBuf, DWORD dwToWrite)
    OVERLAPPED osWrite = {0};
    DWORD dwWritten;
    DWORD dwRes;
    BOOL fRes;
    // Create this write operation's OVERLAPPED structure's hEvent.
    osWrite.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
    if (osWrite.hEvent == NULL)
    // error creating overlapped event handle
    return FALSE;
    // Issue write.
    if (!WriteFile(ghComm, lpBuf, dwToWrite, &dwWritten, &osWrite)) {
    if (GetLastError() != ERROR_IO_PENDING) {
    // WriteFile failed, but isn't delayed. Report error and abort.
    fRes = FALSE;
    else
    // Write is pending.
    dwRes = WaitForSingleObject(osWrite.hEvent, INFINITE);
    switch(dwRes)
    // OVERLAPPED structure's event has been signaled.
    case WAIT_OBJECT_0:
    if (!GetOverlappedResult(ghComm, &osWrite, &dwWritten, FALSE))
    fRes = FALSE;
    else
    // Write operation completed successfully.
    fRes = TRUE;
    break;
    default:
    // An error has occurred in WaitForSingleObject.
    // This usually indicates a problem with the
    // OVERLAPPED structure's event handle.
    fRes = FALSE;
    break;
    else
    // WriteFile completed immediately.
    fRes = TRUE;
    CloseHandle(osWrite.hEvent);
    return fRes;
    I get none of the specified errors, but game fails to start and it seems nothing gets written to parallel port. Any suggestions on how to proceed from here would be more than appreciated.
    Thank you, Joanna

    Hi, I have a problem that I am really stuck with, and I am novice to the task so any help would be extremely helpful.
    I an trying to write to parallel port on my PC in order to send a trigger to EEG recording machine every time the new goal appears in a Virtual Reality game that I wrote in C++ (I want to record EEG brain signals while subjects are playing the game).
    I tried to follow the instructions from here: http://msdn.microsoft.com/en-us/library/ff802693.aspx
    I wrote the following code:
    BOOL FileExists(LPCTSTR szPath)
    DWORD dwAttrib = GetFileAttributes(szPath);
    return (dwAttrib != INVALID_FILE_ATTRIBUTES && 
    !(dwAttrib & FILE_ATTRIBUTE_DIRECTORY));
    BOOL WriteABuffer(char * lpBuf, DWORD dwToWrite)
    OVERLAPPED osWrite = {0};
    DWORD dwWritten;
    DWORD dwRes;
    BOOL fRes;
    // Create this write operation's OVERLAPPED structure's hEvent.
    osWrite.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
    if (osWrite.hEvent == NULL)
    // error creating overlapped event handle
    return FALSE;
    // Issue write.
    if (!WriteFile(ghComm, lpBuf, dwToWrite, &dwWritten, &osWrite)) {
    if (GetLastError() != ERROR_IO_PENDING) {
    // WriteFile failed, but isn't delayed. Report error and abort.
    fRes = FALSE;
    else
    // Write is pending.
    dwRes = WaitForSingleObject(osWrite.hEvent, INFINITE);
    switch(dwRes)
    // OVERLAPPED structure's event has been signaled.
    case WAIT_OBJECT_0:
    if (!GetOverlappedResult(ghComm, &osWrite, &dwWritten, FALSE))
    fRes = FALSE;
    else
    // Write operation completed successfully.
    fRes = TRUE;
    break;
    default:
    // An error has occurred in WaitForSingleObject.
    // This usually indicates a problem with the
    // OVERLAPPED structure's event handle.
    fRes = FALSE;
    break;
    else
    // WriteFile completed immediately.
    fRes = TRUE;
    CloseHandle(osWrite.hEvent);
    return fRes;
    I get none of the specified errors, but game fails to start and it seems nothing gets written to parallel port. Any suggestions on how to proceed from here would be more than appreciated.
    Thank you, Joanna

  • How to send/recei​ve digital pulses through parallel port?

    Hi, im working on a project to send/receive digital pulses through parallel connection. I need to control the frequency of the pulse sent as my device communicates through negative triggering of the digital pulse. How to use LabVIEW send and capture these waveforms?

    Here's a good place to start:
    http://zone.ni.com/devzone/conceptd.nsf/webmain/72​C6FC6CE4AD4D1386256B1800794596?opendocument
    2006 Ultimate LabVIEW G-eek.

  • Controlling the ouput of my parallel port to control a simple LED display

    I am trying to produce a running light (using 8 LEDs) from my parallel port. How should I start if I want to program using Java. Can I anyone give me a simple program to start with?

    I am trying to produce a running light (using 8 LEDs) from my parallel port. How should I start if I want to program using Java. Can I anyone give me a simple program to start with?

  • How should I develop Level Controller using Parallel port(Printer port)

    I need to develop a level controller using parallel port of my computer with a third party Data Acquisition Device.  Is it possible to do it with In and out port vi in labView 7.1. Please guide me how can should I configure these Vis to write control data and then receive level transmitteed data through parallel Port(Printer port). My third party DAQ has two analog input channel and one analog output channel.  

    Dennis Knuston
    I have uploded the details of that  third party daq in another thread please see that and tell wether this type of daq requires driver software
    http://forums.ni.com/t5/Multifunction-DAQ/Parallel-port-based-daq-and-drivers/m-p/1819997

  • Controlling XY stage connected to parallel port using labview

    Hi,
    I have a XY stage which I can control using mach3 software. I want to control a signal generator, VNA and the XY stage at the same time. I have programmed SG and VNA using Labview but I am having difficulties controlling XY stage using Labview. I have never controlled an instrument connected through parallel port using labview.
    Can anybody give me some ideas to start with? How do I use VISA to control the parallel port? I really appreciate your help. Thank you in advance.

    Hi srms,
    Since your question is related to using VISA, I would try posting your question on the Instrument Control Board. You're likely to have better luck there.

  • I want to transmit a square pulse through USB port, is it possible?? if not then what is the best way to do that, preferable is with serial then parallel, and its compatibility with vista,XP,and @))7 windows

    hi froends
    i want to transmit a square pulse using lab-view, please help how to do that, the preference  will be USB,SERIAL, Parallel ports, it it must be compatible with all the os versions, like 2007 windows, vista,XP and other.
    please help..................

    sanghi wrote:
    OK I WANT TO DRIVE A RELAY.
    SUGGEST SOMETHING 
    Calm down!
    People can't read your mind.  If you want help, repsect those who contribute their time for free to try to help you.
    Put yourself in our shoes.  If I tell you I want to build a rocket, what information would you give me?  You would need to know if it's for a hobby, something bigger, carries a payload, carries living organism, how far does it go, where does it land (if at all), etc...  
    First of all, we still don't know what you want to do with this relay.  Using a computer to generate is series of pulses is not usually the best way.  What is the frequency of the pulses that you want to transmit?  And why do you want to use a relay?  What are you driving?  Can the relay that you are using fast enough to follow the pulse train that you'll be sending?
    Provide information, ask questions politely and people will help you.

  • Windows XP connecting Peer-to-Peer to Windows 7 with HP LJ 4000 through USB-2-Parallel port

    I am running a Peer-to-Peer network and cannot connect my Windows XP computer over the network the 'quasi-server' running Windows 7 that has a connected HP LaserJet 4000 printer connected via a USB-2-Parallel port.  The HP LJ4000 works just fine from the Windows 7 box (and serves ONLY as a backup printer) but connecting from either Windows XP PRO boxes will not work.  
    I have tried opening the Windows 7 Printers window and then updating the printer drivers, like it says it will, and that fails as well.
    ANY suggestions would be appreciated!
    Thank you, 
    Brett W. Sabio
    Regards,
    Brett W. Sabio, CPA-PFA

    Hi,
    You need something like this:
      http://www.shopbot.com.au/pp-belkin-usb-parallel-printer-adapter-f5u002-price-106075.html
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • Parallel port switcher

    Hi all,
    I have attached a parallel port switcher that I downloaded but I keep getting the error "manager call not supported" as attached.
    How can I run/ use the attached vi? I have Labview 7 and Labview 8.5 installed, in my Windows XP and Windows 2000.
    Attachments:
    untitled.JPG ‏11 KB
    parallelportswitcher7.vi ‏112 KB

    Hi all,
    I've soldered 3 LEDs to pin 2, pin 6 and pin 9 and pin 25 to ground. I need to control the on off of the 3 pins through Labview. I've modified an example I found in Labview as attached but there are things that I don't understand:
    1. Why is it when I clicked both LED 18 and 22 on Labview, all my 3 LED on breadboard (connectted to pin 2,6,9) turned on?
    2. Why is the "register write value" in Labview consists of 32 LEDs? How can I change it to may be 8 or 3 LED?
    3. If I change the "register write value" to constant, what value or number should I insert to on/ off my LED?
    Please advice.
    Kim
    Attachments:
    Untitled 3.vi ‏25 KB

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

  • 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

  • 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

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

  • Parallel port printer connection

    I have an HP 6122 parallel port printer which I've attached to my MacBook Pro running on OSX 10.4.11 through a connecting cable to the USB port (I've tried both the left and right USB port). I've downloaded driver from HP, but computer doesn't see the printer. Suggestions?

    Hi urdog, and a warm welcome to the forums!
    In System Profiler>Hardware>USB, is anything shown for it there?
    Have you tried another PCL/hp printer in Printer Setup Utility? Have you got any hp drivers installed?
    PCL 3 is quite old, but what happens if you try setting it up with an older hp driver?

  • Parallel Port

    I have an application that uses the parallel port. It works fine on Win2K using the AccessHW stuff. However, the piece of hardware I have hanging off the parallel port requires the parallel port to be put in SPP or AT mode. I change the mode in the computers BIOS. However, I have a computer that does not have that option in the BIOS. Is there a way of programatically changing the mode through LabVIEW or through Win2K?

    I would think that if there is no BIOS support, there's no hardware support on the motherboard. You might want to check with the manufacturer of the motherboard. I suppose it's possible that the motherboard was newer than the BIOS that they used. If that's the case, a BIOS upgrade would be the solution to using the port on the motherboard. You could also look for an add-on board with a newer parallel port.

Maybe you are looking for