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

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

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

  • Question: serial/parallel port

    Hi, I am trying to control a simple digital switch using labview and either
    my serial- or parallel port. I want to control each individual pin on the
    port: to turn on/off +5V on the output pins. Does anybody now how? Is it
    possible? I am running labview 6.1 on W2k.
    Thanks in advance

    Hi Luca, JS & Pawel,
    in general everything is correct, but I would suggest to use the "Out Port" and "In Port" functions from LabVIEW. Have a look to the simple printer_port_test.vi. This also needs the accesshw as already explained.
    In addition I recommend to use buffer-circuits in between LPT and an application in order not to destroy the motherboard-Chips by accident !!
    Regards
    wha
    Attachments:
    printer_port_test.llb ‏52 KB

  • 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

  • I swtiched from LabView7 to LabView8.2, and now my parallel port on LPT1 is not more recognised (I am not able to use VISA to write on it). Why?

    I switched from LabView7 to LabView8.2, and now my parallel port on LPT1 is not more recognised (I am not able to use VISA to write on it). Why?

    Hi,
    Sorry for the delay,
    I need to know more informations about your problem. Have you check the configuration of LPT in MAX? Can you open a VISA session? Do you receive a timeout error when you try to write on that port?
    You can find same importants informations about parallel port configuration for different versions of LabVIEW at this link: 
    http://digital.ni.com/public.nsf/websearch/E6415E8A8376F63D86256C46007592E8?OpenDocument
    Let's me know.
    Riccardo

  • Parallels Desktop 5 or Parallels Desktop Switch to Mac ?

    I recently bought my first Mac (Macbook Pro 7,1 and plan to port some of my Windows applications into a Parallels virtual machine. The Mac specialist who sold me the package included Parallels Desktop 5 for Mac. Upon reading the installation instructions I learn that there is a different program, Parallels Desktop Switch to Mac. Would that be better for my needs? Should I exchange the one I have for a Switch to Mac?

    Welcome to Apple Discussions
    Parallels Desktop 5 will allow you to install a virtual machine for Windows onto your mac provided you have a copy of Windows and a serial number available. You will be starting from scratch so will have to install your applications again and move any data folders/files across to the new locations.
    If you want Tutorials on how Mac's work and some extra migration tools then Switch to Mac might suit you better (but IMHO it's not worth it)

  • 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

  • Unable to change logic on parallel port

    I am using Outport from accesshw with LV6.1 to control logic staes of parallel port. The port LPT1 does not repond to the program. On changing the address to LPT2 and switching the device to this port (additional PCI parallel port on the comp.) everything seems fine. Just the LPT1 wont work.. Any ideas why this might be?

    Thank you for your response. It is certainly one of the things i checked, but finally this is how the problem was solved, which i would like to share for anyone else who might have the same experience..
    The BIOS setting for LPT1 was set to bidirectional, since i was successfully using this program on a previous computer i checked the BIOS setting on that PC and it was ECP, changing the LPT1 to ECP in the BIOS did the trick although i am not sure why!
    I would welcome if anybody can explain the details...
    Thanks

  • K9A plantinum and Parallel Port. [closed]

    Greetings,
    I'm wondering bout the parallel port settings in the bios.   
    What settings are recommended for Vista 64.  I've tried most "common" settings without luck. :(
    I've been trying to get my hp2100 to function under vista and linux, but just cant get it to operate.
    I'm starting to fear a defective MB.   In fact vista has been terribly unstable on this system.
    I've verified the RAM with memtest.
    I've had the printer functioning perfectly on a prior computer.  Normally windows auto detects the hp 2100.  I get nothing from vista.... thought the hardware manager does say the LPT for is operational.
    comments?  Suggestions? 
    Thanks

    Any answers to those?:
    Quote from: Bas on 16-December-07, 09:39:26
    What HP 1200 might this be?
    LaserJet, DeskJet, what???
    HP has hundreds of devices that have the number 1200...
    What you have tried from those and what are the results?:
    Quote from: BOSSKILLER on 16-December-07, 07:02:54
    "Next I tried ECP DMA 1  This also did not detect the 2100 but I was able to finish the wizard, but alas I was still unable to print.  Testing the printer stated that the test sheet was sent, but the printer never responds."
    Check printer cable connections, try change printer port, switch to EPP+ECP.
    Pickup latest drivers from HP for your Printer:
    http://h20000.www2.hp.com/bizsupport/TechSupport/ProductList.jsp?lang=en&cc=us&prodTypeId=18972&prodSeriesId=25469&taskId=135

  • Linux parallel port

    Dear All,
    is it posible to read and write registers in the io address space under linux. I want to use  the  parallel port to  turn on/off some LEDs and check the state of several switches. I have done this with windows 2000, but i cannot find any solution for linux.
    cheers,
    Frank

    There are several solutions for your problem. The most simple is to create a shell script that control the state of the parallel port and call "execute" from LabVIEW. 
    Using http://parashell.sourceforge.net/ is simple: (http://parashell.sourceforge.net/docs/parallel.txt)
    ----- How to use the program -----
    parashell is a very easy to use program. The program takes two parameters, the Parallel port to send the data to and
    the data value to send. That value must be integer in decimal format (for example 255). Hexadecimal
    numbers can also be used, but they must be preceded by 0x (for example 0xFF). The program uses very little error
    checking to keep it simple.
    Example how to use parashell.
    parashell 0x378 0
    Set all datapins to low level.
    parashell 0x378 255
    Set all datapins to high level.
    parashell 0x378 1
    Set datapin D0 to high level and all other datapins to low level.

  • How can I clear the parallel port?

    I'm sending image-files to a custom made printing unit via VISA through the parallel port.
    Sometimes the unit doesn't accept the file.
    Therefore I need to clear the parrallel port completely and send the file again.
    (Right now I'm switching off the unit and waiting for the error message from WindowsNT).
    How can I clear the parrallel port via LabVIEW?
    (VISA clear.vi doesn't work, the data is still on the port).

    Rainer,
    Maybe you can try the "VISA Flush I/O Buffer" vi (VISA - VISA Advanced -
    Interface Specific). It worked on a serial port, but I have no idea if it
    works
    also on a parallel port. It is worth trying it.
    Good Luck.
    "rainer" schreef in bericht
    news:[email protected]..
    > I'm sending image-files to a custom made printing unit via VISA
    > through the parallel port.
    > Sometimes the unit doesn't accept the file.
    > Therefore I need to clear the parrallel port completely and send the
    > file again.
    > (Right now I'm switching off the unit and waiting for the error
    > message from WindowsNT).
    > How can I clear the parrallel port via LabVIEW?
    > (VISA clear.vi doesn't work, the data is still on the port).

  • Start event immediately after reading parallel port status

    Hello,
    I have a spectrometer for acquiring triggered pulses spectra, it works fine with labview, but I need to make it start the acquisition immediately after an event read by the parallel port in order to distinguish odd and even pulses after this event (wich have different properties). I used a flat sequence: in the first frame I wait until the pin number 12 becomes 1, and in the other frame I start the acquisition of N triggered spectra (nothing else, all the initialization of the spectrometer is done before). 
    What I saw is that it doesn't work: sometimes is takes 1 ms to jump to the second frame and I miss a pulse (pulses @ 1 kHz).
    Is there a way to make it more efficient? To launch the triggered acquisition process immediately after the pin status switch?
    Thank you very much,
    Daniele

    Hi daniele,
          While it's not clear what is connected to the parallel port or what the trigger-options are on the spectrometer, in general it would be best to physically wire a trigger signal from source to destination.  Can the spectrometer be configured to acquire based on an external trigger?  Can pin 12 of the parallel port (via break-out board) be wired to spectrometer trigger-in?
    Considering the 1KHz trigger rate, I wouldn't rely on a multi-tasking OS to implement a software trigger "Immediately". 
    If aquisition must be triggered via software, event-based logic is desireable - I'm not sure whether that's possible here.  By Event-based, I mean use of LabVIEW Event functions.  There are some serial-port-pin (CTS,DSR,etc) event options available via "VISA Enable Event".  The logic would configure the event then wait on the event before invoking the data-aquisition, that is, IF it's even possible to get pin 12 to trigger an Event.
    Luck/Cheers!

  • Problem with JNI and Parallel Port dll

    Hi. I'm doing some testes with JNI. Firs i followed the netbeans tutorial for doing a C programa that prints somthing for java.. like.. "Hello java from C".
    So i tried to load a dll from my dll. Like, I have this dll to use the parallel port on windows Xp. So i created a dll to access it an comunicates eoth java.
    I did everything just fine.
    When I start my Java app, the first thing it does is to load this parallel port dll and configure the functions of it.
    After that .. I get this error
    EXCEPTION_FLT_STACK_CHECK (0xc0000092) at pc=0x0093d269, pid=2284, tid=3000
    Can someone explain why ?
    (Sorry if i wasn't clear enough, english is not my native language, so ask if you don't understand something.. )

    hi ,
    I met the same problem this morning, and searched the www.google.com in order to solve it, as a result, your article was shown on my screen. :)
    Till now I have read some technical information and solved my problems. Maybe the solution be useful to you:
    ==============================
    error message : (Environment : Tomcat 5, Windows 2003, Mysql5)
    2006-3-29 11:53:48 org.apache.catalina.core.StandardWrapper unload
    message: Waiting for 2 instance(s) to be deallocated
    ==============================
    cause: the number of connection to database exceeded.another word,too many connections.
    ==============================
    solution: close the connection when it becomes useless for your program. :)
    ==============================
    ps. Sorry for my weak English . hehe ....

  • 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

  • Error Creating HFM 9.3.1 Application

    I am having problem with workspace. Each time I tried to open an applicaation that is already registered in SharedServices, I receceived this error "Please make sure the application you are trying to lauch is registered with SharedServices. Also, I r

  • Frozen during installing updates unresponsive to any commands any ideas?

    Screen frozen whilst installing updates unresponsive to any commands any ideas how to come out?

  • Help - how to Eject DVD/CD in mini?

    Hi all I got my new mini last week I use it as HTPC only with the apple remote (no keyboard or mouse). I need help with - how to eject DVD/CD in mini? Thx for the help Benzi

  • Tomcat doesn't send all data while Jetty does

    I am using the following code in a servlet to send data back to a J2ME application:         data = myResp.serialize();         response.setStatus(response.SC_OK);         response.setContentLength(data.length);         response.setContentType("applic

  • Seach help of WBS element in CAT2

    Hi All Is there any way to change the seach help of Receiver WBS element in the CAT2 worklist . I need to get only the WBS elements which are assigned to the relevant person. (standard progam is displaying all the WBS elements) Thanks.