Commands to FTDI virtual COM port via NI VISA interfere with communication with FTDI chip using D2XX drivers

Hello!  
I am trying to communicate with a DLP Design module DLP-USB1232H which uses an FTDI chip.  My program uses the D2XX drivers.  It works, but...
In another program that runs at the same time, I'm communicating with another instrument via a virtual COM port (VCP) that uses an FTDI UART.  In this program, I use the VISA Serial Port functions.  It works, too, but...
The first program has the capability of listing all the FTDI devices in the system prior to choosing the right one to communicate with.  When the VCP is plugged in, it lists it (FT232R USB UART) along with the DLP-USB1232H and communication with the latter device works.   But as soon as the second program sends a command through the VCP, the first program no longer "sees" any FTDI device.  It stops working.
I have tried 2 different FTDI VCPs; one a standalone cable and the other built in to the instrument.
I’m using Windows 7 32-bit.  My programs are both LabVIEW 8.5 executables. 
Is VISA "taking over" the channel to the DLP-USB1232H?  Does someone who understands NI's implementation of VISA have any ideas on why VISA is doing this?  Or if something else is going on?
I'm also interested in workaround ideas.  I've tried a "Prolific" VCP, but most drivers don't work and the one that doesn't give an error in Device Manager doesn't communicate with the instrument.  
Cheers
Halden
Solved!
Go to Solution.

Halden,
It really sounds like you have a resource conflict. That occurs when two programs or parts of programs try to use the same device or port at the same time.  Your Get Device Function probably tries to open a session with each port (as you increment the index). When it hits a port which is being used by the other driver, it cannot open the session and stops working? Have you examined the errors returned by each program? The VISA drivers will return an error when the port is in use.  I do not know about your program or drivers, but I would expect some kind of error.  Automatic error handling in LabVIEW will not catch errors from a driver if it does not translate them to LV error clusters. So do not count on automatic error handling, if you use it, to display all possible errors.
Lynn

Similar Messages

  • FTDI virtual com port driver (VCP) and Labview 2009 - random connection loss

    Hi,
    I am using an FTDI chip to go from USB to serial communication (FTDI Driver: 2.06.00). It seems to work at first but then after some time the connection gets lost ("connection for the given session has been lost" or "I/O error"). This happens in MAX as well as the built executable of the program I am running. Latest VISA drivers are installed - 4.6.  I have tried flushing the buffer before and after communication with both visa clear and visa buffer flush vis. The lost connection seems to happen randomly. 
    I have seen other threads about this issue but they never reach a resolution. One thing i notice is that there are two FTDI devices in this system and only one fails, however when I unplug the working device the one that fails is able to connect again.  
    To sum up here are the system specs:
    Windows XP SP3
    FTDI 2.06.00 and older 2.04.02 drivers both fail.
    2 FTDI devices on the system - they do get assigned different COM ports
    Labview 2009 run-time
    VISA 4.6 run-time
    Thanks for any help. 

    We use Targus ACH63US Super Mini USB 2.0 4-Port Hub. It doesn't require external power but if you have a high power device you will have to plug the Targus hub into two usb ports on your pc (one provides power and the other does power and data transfer). They provide the usb Y cable to do this.

  • Not enough memory error when disconnecting device on a virtual com port

    I maintain a large application that collects data from many data source channels (using coustom hardware read thru a conventional COM port) and I am adding a GPS data source on a USB port using a virtual COM port driver. The application runs 24/7/365 and works well including the GPS data, if undisturbed. However, the application needs to tolerate a physical disconnect and reconnect of the GPS device without user intervention.  When I disconnect the GPS, the application becomes unresponsive most of the time (the mouse responds and other programs that are open on the desktop work fine). I abstracted the serial code and made a separate vi (below) for testing.  When I disconnect the GPS from the COM port, I get a "Not enough memory to complete this operation" message 9 out of 10 times and the vi is unresponsive until I clear the error message (the tenth time it continues working). I built the vi this way to collect data continuously. I suspect that this is the problem with the full app but I don't see the Not enough memory message there and therefore the full app does not respond and must be terminated via Task Manager. The full app runs full screen mode.
    The LV app runs on Windows XP and LabView 7.0 (the client doesn't want to upgrade).
    I have tried probing the error message lines at all points in the vi but they don't show anything when the 'Not enough memory' message occurs (they show the expected device not found error after clearing the error message).
    Any suggestions would be greatly appreciated,
    Mel
    Still learning LV......
    Please post any code suggestions as graphics as I don't have access to any version of LabView newer than 7.0.
    Attachments:
    SerialPortRead.png ‏22 KB

    Jeff·Þ·Bohrer wrote:
    First, there likley WAS human intervention that caused the GPS device to be removed.  That wont happen when you lock the device inside a cabinet with the rest of the test system.  Physical access control first!  If someone goes and mucks with your experiment setup while its running, that's a "poor Labratory procedure" not a "new software requirement"
    I think he was meaning to say without user intervention on the software side.
    I have seen odd behavior if you disconnect from a com port whilst LV still has the port open.   There are a couple things I myself woud try, being the experimenting type that I am.  Perhaps setting up a com port check to see if it has a valid connection before polling for data. If not then a blank case or some other generic code. 
    The issue with this would be if it became disconnected while LV was polling data.  Hard to get around this condition.  Is there a way that the cause of the of the connect/disconnect (whether human or otherwise) could be set up so that a signal can be sent to the controlling system (pre-disconnect and post-connect) to trigger an event to handle the software side?  A simple signal switch or something.  Just thinking out loud. Withoug knowing all the particulars, it's hard to make detailed recommendations.
    Doug
    "My only wish is that I am capable of learning each and every day until my last breath."

  • Unable to create the bluetooth virtual COM port

    Hi all
    I install BS from Toshiba and it seems ok. Bt ir desn´t work. I see all the drivers installed, system devices, etc. No Toshiba BT ports can be seen. Local com ports only show modem port. Try to create a virtual port but get a message "unable to create a bluetooh virtual port" I have a satellite m100-145. Can anyone help on this ?
    thx

    Thx for your suport.
    I decide to reinstall windows and all software. Now it works.
    The error was due to the fact that if you have BS from Microsoft (called bluetooth monitor) and you install the BS from Toshiba after that, even if you remove the BS from MS, the BS from Tos is unable to create the virtual com ports (except modem).
    I try with the latest version of BS and the problem was not solved. So if there is a previous installation of BS fom MS the BS from Tos get the message of "unable to create the bluetooth virtual com port".
    Now i fixed reinstalling SO from beginning.

  • Problem related USB Virtual COM PORT using PDA module 8.2 on Windows CE

    Hi,
    I am working on tranferring my application developed on LV 8.2 to a Single-board computer(SBC) running Windows CE 5.0. I am using LV PDA module 8.2 to achieve this. My problem lies in finding the port number of the Virtual COM Port on the SBC. I need to connect a USB RF modem from Maxstream to this SBC and to talk to it using VISA. I have installed the required drivers from Maxstream for converting the USB port to a virtual COM PORT. What is a way to figure out the COM PORT number on a Windows CE device? For a PC, I can see the COM PORT in the device manager but I do not know how to find this in Windows CE. . Also, I have tried using "VISA Find resource" function ..it works on a PC but I do not get anything in the Win CE device.
    Any help would be much appreciated.
    -Shruti

    Shruti,
    Is there a way to verify that the Maxstream driver successfully provides you with this virtual COM port? Essentially, what I mean is that if you did not have LabVIEW on this device, how does Maxstream prove that their driver is functional? Does it come with additional software that would be used to configure the USB RF modem? In any case, we would want to try opening any terminal program (like the hyperterminal) to determine what ports are listed for communication. I hope this is useful for you. Please post back when you are able to give this a try. Thanks,
    Mike D.

  • Using USB device with Virtual Com port

    I have an actisys IR USB device that creates a virtual serial port. I can read from it using VISA, however it will not write. I have the same setup working on LV 6.1 running windows 2000. I need to make it work on my system running XP and LV 7.1.

    Hello,
    Does your Windows 2000/LabVIEW 6.1 system work correctly or do you see the same behavior?  It sounds like there may be something wrong with the termination of the command.  What termination method are you using?  Is your instrument set for that method?  You may also want to try using the NI-488.2 Interactive Control.  A tutorial on how to use it is located here if needed.  This will bypass VISA and LabVIEW.  If this works, you may want to update to the latest version of VISA (if you don't already have it) to see if that fixes the issue.
    Chris R.
    Chris R.
    Applications Engineer
    National Instruments

  • HyperTerminal sees a COM port but VISA does not

    It should not be possible that HyperTerminal sees a COM port but VISA does not. Does anyone know why or have any ideas?
    Here's some more info: I wrote a LabView (LV) program and deployed it (via the Application Builder) to some of our production department's PCs (some Windows XP and some Windows 7). We use it to set up products we design and manufacture through our device's USB serial port. The USB port is actually a virtual COM port (VCP) - a USB to Serial converter or "bridge". We have a custom driver for our device and since each device's USB bridge chip is programmed with a different serial number, every time we connect a new device to the PC the installer runs and assigns a new COM port number. This is so our customers can use multiple devices on a PC. Fine. On one of our production PC's we were close to  COM900 ports (HyperTerminal sees only up to COM256) when suddenly Win7 would not allow any more. We were able to uninstall orphaned (non-present) COM ports from DeviceManager ("DM") by starting it from a command console (DOS window) with a special command-line switch, "set devmgr_show_nonpresent_devices=1" then "start devmgmt.msc" (I have this in a batch file). In DM View menu you can "Show hidden devices" and uninstall them as if they were connected. I've also tried uninstalling them the normal way when the device was actually connected. Either way, sometimes, not always, depending on the COM port number, after reusing that port number by installing a new device which picks up that old, freed-up number, LV VISA doesn't see it. In other words, when "Refresh" is clicked in the COM port VISA list box, any new devices installed should be and normally are seen. (Refresh is not needed if the application is started after the device's driver is installed. It is only need if the LV application is open with the new device is added.) However, HyperTerminal does see it and lists it in the Properties screen, the "Connect using..." list box. And the port works with HyperTerminal. (Of course we've tried rebooting after uninstalling and/or reinstalling the device, with the same results.)
    When I've spoken to the NI Applications Engineers in the past about serial port issues (not about this problem) they have confirmed that if HyperTerminal can see the port then NI VISA should also see it. This is crazy. I am posting this in hope that someone can shed some light on this problem.
    Thank you. -Ed

    Good catch. Yes, we're using the Silicon Labs CP2102 and have created a "custom driver" installation package. Our new PCBs have a factory-programmed chip, so the PC reuses that COM port (COM3 on that PC). The problem is when we we re-program the CP2102 (setIDs exe) with our PID, and device strings (including the S/N), the PC runs our installer and assigns the next COM port number. I was hoping that maybe it would go up to 64K or something! Anyway, it surpassed COM256 but we ran into this problem when almost up to COM900.)
    There is a registry entry for each SN device, which shows the assigned port. If we delete the key with regedit, the COM port database (don't know the file name) still has the port number. That's where Device Manager comes in. It seems to allow us to manually delete the ports, but it would take quite a while to delete 900. (I was trying to make a batch file for DevCon, but couldn't get it to see the HW ID of the devices in need of deletion.) So we tried manually deleting a few. After doing that Device Manager shows that Windows (and HyperTerminal) can reuse the port number when a new device (new SN) is installed, but, as you know from this post, VISA cannot see unless I manually add it in MAX.
    I can't see how it has anything to do with the Silicon Labs driver. I might have to delete ALL of MY devices, then uninstall the driver files, reboot, then reinstall, as you suggested with the SiLabs driver. However, I don't see how VISA will now see these changes. VISA must have it's own database. That's what I thought deleting the ports in MAX would clear out, like a fresh install, but apparently not.
    I've been through Silicon Labs' tech support on other issues and they've been able to help on some. I could run this by them.
    BTW, have you noticed that Silicon Labs' chip and driver, while faster than NI's own "bridge" or serial-USB converter (I returned it because at $100 it's performance was worse than a $20 converter you can buy in Staples), is substantially slower than a real serial port? For example, our device can transmit 250 readings per second (a 12 byte string). A real serial port used with my LabView program can keep up, i.e.., graph & tabulate at that rate, but with a VCP we only get about 70 RPS. Same code. Can't figure this one out. They say the've tested the driver to 900 KB claimed. We're using 115KB here. Anyway, the VCP driver makes it look like a COM port which LV thinks it is. Why is it slower than a real port when the USB should be able to work almost 10 times faster than I'm using it (up to 1024 bytes per mSec per the full-speed USB spec, which SiLabs claims they verified)?
    Anyway, I appreciate your help. Thanks! -Ed

  • VISA "Find" not seeing COM port but Win7 sees it

    Allo.  I'm trying to communicate via virtual com ports with a device with an FTDI chip.  The device with the FTDI chip has both a USB type B port as well as a 9 pin dsub port, and I need to verify both ports work.
    I'm using a laptop with Windows 7 and my program is in LV 2010.  I have a Sabrent USB to serial cable to test the dsub port, and a standard USB cable to test the other port.  I've installed the latest FTDI drivers and when I plug in both cables and look under Windows Device Manager, I will see both of them under unique COM port settings (usually COM4 and COM 5).  So Windows sees and recognizes both virtual COM ports, and no yellow warnings.
    However when I run the "VISA Find" function in LabView, it only sees COM5 (the Sabrent serial cable) but not the COM port using the USB type B cable.  I send the results of the "VISA find" to a display and it will show other ports, like the parallel port, so I know it's seeing more than one port.
    Any ideas why Windows can see the two COM ports but the "VISA Find" function can only see one?  My guess is there's something with the FTDI driver set up.
    Amateur programmer for over 10 years!

    Yes, but its not for the faint of heart!
    You can probably do what you want by using the refresh "F5" in MAX or add this token
    [VISA-CONFIG]
    ShowRegisteredDevOnly = 0 
    to C:\ProgramData\National Instruments\NIvisa\visaconfig.ini
    Another thing to try is to recover the unused COM Port numbers each time you change the device.  By default Windows will "Save" those previously connected COM port numbers an if it sees the device again it will re-assign the old number.  This means that the COM number keeps getting larger and larger.  At some point the PC's BIOS will say that's rediculous and you will experience trouble.
    Programatically you could call
    C:\Program Files\National Instruments\NI-Serial\NiPortConfig.exe to launch the same utility.  there is probably even and unpublished switch to click just that one big button for you but I can't find it.
    It looks like you may be running into some part of this known issue
    Jeff

  • ASCII closes COM port randomly during long periods of unsolicited response monitoring

    I have lots of serial ASCII objects monitoring for unsolicited responses (every two seconds, from 20 different COM ports).  Randomly, sometimes a few times a day, sometimes no problem for 2-3 days....but the ASCII object somehow lets the COM ports close or it loses contact with the COM port occasionally.  All I have to do is go into edit mode and "touch" the properties....such as changing the "Retry Attempts" setting and the communication returns.
    There are no alarms logged when this happens!
    Ed

    Ryan,
    I currently use 6 Ascii objects from 6 ports and plan to use 2 more.  Unsolicited data arrives every two minutes (as measured by the sending end).  I have a button on the panel for each object that I can press to send a request to the sending end.  Each of the senders connects to a digi portserver II and is delivered to lookout via an ethernet connection (as a virtual com port).  The ethernet connection is routed over various paths including micowave, which could have an occasional traffic interupting fade. One or more of the Ascii objects may fail to respond at any time, but several days may pass without a problem.  When a failure is noticed, you can usually select the properties for that object and the problem clears.  If instead, you send a request to any of the other Ascii objects , Lookout may just hang (permanet hour glass).   When a failure is noticed, if Lookout is then turned off and the offending port is monitored with hyperterminal, the data from the sending port is on time and correctly formatted.  The help file has a section "Ascii alarm and error messages" with a section named "Early temination when parsing the response frame".  There are a bunch of reasons listed there as to why the Ascii object might not function properly.  I've tried everything that I can think of to make this work reliably.  Any ideas?  See the link for response format information. http://jrcamenzind.googlepages.com/lookout

  • Write among COM ports in the same PC without cables

    How can I write to the memory address(es) of a serial COM port?  I would like to send data from one serial COM port to another in a manner similar to the that of the 'Simple Data Client' and 'Simple Data Server' vi examples.  This must sound strange since this is exactly what a null modem cable will do, externally.  I would like to eliminate the cable connection between COM ports that exsit in the same PC and communicate between them, internal to the PC, somehow. 
    Currently, I am using a LabVIEW vi to read a serial message on COM1, translate it, send the trsanslation out on COM2, so that a separate windows program (no .DLLs to interface with LabVIEW) can read the message on COM 3.  COM 2 and COM 3 are connected by a null-modem cable.  This requires three COM ports, and two serial cables.  I realize that I can use a physical loop-back jumper on COM2, for instance, where I send and read the translated message on COM2, but I still wonder if there is a method for doing this in memory, or something. Is there a way to accomplish the same objective with one cable (into COM1), no loop-back jumpers, and only two serial ports?  In summary, I want to read on COM 1, translate in LabVIEW, then write directly to another COM port, internally, without using a serial cable.  Can the 'IN PORT' or 'OUT PORT' vi's apply here?  Are these tools only for parallel ports?
    Hope this is not too confusing....  It seems like I am always trying to do something with LabVIEW that was not meant to be done....
    Thanks.

    Thank you.  If I pay the price they ask, this looks like it will create and share virtual COM ports - exactly what I need.  However, I would really like to find a way to do this in LabVIEW, such that I do not have to make my application dependent on another piece of third party software.  The 'Simple Data Client.vi' and 'Simple Data Server.vi', included in the shipset examples, seem to do this for TCP/ IP ports.  I wonder why the COM ports cannot be addressed at the memory level, in a similar manner???

  • Exception while accessing com port from servlet

    I am trying to access communication port from a Servlet using java communications api's.
    But Following exception was thrown
    Caught java.lang.NullPointerException:name can't be null while loading driver com.sun.comm.Win32Driver
    The SecurityManager do not allow that opeartion.
    java.security AccessControlException:access denied (java.io.FilePermission c:\j2sdk1.4.1\jre\lib\javax.comm.properties delete)
    at java.security.AccessControlContext.java:270) at java.security.AccessController.checkPermission(SecurityManager.java)
    at java.lang.SecurityManager.checkDelete()
    at java.comm.CommPortIdentifier.getPortIdentifiers(CommportIdentifier.java)
    Please help me.Tell me what to do.how to successfully access a communication port from a Servlet.

    Hi there. I am also facing the problem accessing com port via servlet. if u have the solution, kindly forward to me at [email protected]
    many thanks

  • Satellite A300-1BZ with Vista - Com Port has disappeared

    Hi everyone.
    My first time and I'm a bit of a duffer with technical stuff, so please be gentle with me!
    A300-1BZ with Vista.
    A while ago I installed 'CarSoft V.83' (Engine diagnosis) from CD onto my laptop. It asked me to verify the com-port.
    I looked in the device manager and in the list I saw 'com-port 4'. Ok, we'll go with that then. Everything worked fine and I was happily talking away to my car.
    Yesterday I went to use it for the second time and it said there was an error with the com-port and to 'verify' the com-port.
    So, I got the device manager back up and there is no mention of any com-ports in the list! It was there the last time I looked and now it's vanished!
    I was at a loss what to do so, I uninstalled the CarSoft and then re-intsalled it again. Got the same error message.
    Went to device manager. Still no com-port 4 in the list, or anything that relates to a com-port.
    I don't know how or if I can get it back.
    Please help!

    Hi mate
    First of all there are no com ports. The com port which you could see in device manager was an virtual port created by car software.
    What to say
    I recommend removing the car software from the system firstly.
    Then download the CCleaner and clean the system and registry entries.
    Reboot the notebook and run the CCleaner again
    After that install the car software again
    Maybe it helps

  • USB TO COM port drivers in LabVIEW..

    Hi Everyone,
                      I have virtual com port equipment (hardware) from STmicroelectronics and i need to communicate it with LabVIEW through USB.
    I have done with NI-VISA Wizard which i have gone through previous posts but am not able to communicate.
    Can i get any drivers for this communication.
    In MAX, i can see it as COM4, COM5 like that but i want it as USB.
    Thanks,
         Sony.
    '' A professional is someone who can do his best work when he doesn't feel like it''...........

    To expand on Sir Dennis' point, it is not uncommon for vendors with USB widgets to sell to implement the interface to them as virtual serial ports, and the reason is simple: Nearly any environment can talk to a serial port, and you don't need any special hardware. In addition, because it is a **virtuall** serial port you don't even have to worry about cables.
    The point to remember is that when you plug in one of these devices you are in essence adding in both the device AND the port to talk to it.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • How to find COM port for a specific USB device

    I want to automatically find the COM port for a specific USB device. I use the VISA find resource function but I can't get the manufacturer's ID. VISA says the device doesn't have this information. The find resource function does narrow my search (and often finds the port depending on what other usb devices are connected). In the case where it finds multiple possible ports, can I safely send a message to each port to determine if it is the correct device? I know it will work for my purposes but I don't know if I am asking for trouble by sending messages to unidentified devices. Any thoughts on how I can identify my device port will be appreciated. Thank you - Dave F

    You can do it using WMI.  I have C# code I am supposed to convert into LabVIEW foing something similar to what you want to do.  In my case, I am testing a USB device and need to know which port on the hub is which COM port (the device creates a virtual COM port for communication).  Using WMI, you can find the hardware path to the device and know that COM10 is USB hub Port 1 for example.  Unfortunately, I cannot share the C# code.
    You can download the WMI Code Creator tool from Microsoft, which should help you tremendously find the proper method of getting your info.
    You basically want to look at all the W32_USB devices for the specific device you are looking for.  Once you have that, you can look for the COM Port associated with it.  I don't know when I will get to coding this up in LabVIEW, but will report back when I do, assuming you haven't found the solution by then.

  • Using VISA can not find the com port

    I use visa read but can't find any com port in Windows 7.
    How can i find the com port in Windows 7?? 
    由 jw2002 在 06-28-2009 09:20 AM
    上編輯的訊息
    由 jw2002 在 06-28-2009 09:20 AM
    上編輯的訊息
    Solved!
    Go to Solution.

    Windows 7 is not officially supported by National Instruments as it hasn't even been released. That means you won't get any official support from NI on this.
    That said, does your computer actually recognize a serial port? Do you have an actual serial port, or do you have some sort of virtual COM port, or are you using some sort of adapter, such as a USB to serial port box? If it's any of the latter, the most likely reason is a driver issue which needs to be written to be compatible with Windows 7. 

Maybe you are looking for

  • Silent switch, is there a way to disable it on iOS 5 ?

    Hey guys, Have both iphone 4s and iphone 3GS on iOS5. How do I disable the silent switch function. ( at the moment, only solution I think of is using a thick rubber case so the button does not accidently move the silent switch when in pocket ) Also w

  • Problem when connect to SAP

    Hi All! When i create an Addon Application I Register String to connect to SAp by: Right click in my app/properties/Debug/ and input command line Agruments. And in myclasses I call: Private Sub SetApplication()         '// Use an SboGuiApi object to

  • No extenson of saved file

    What am I doing wrongly? I've tried to save a certain set of edited photos (cropped, sharpened, enhanced, brightened, etc.) but they are not saving in proper format. I click on 'save as" choose format as 'jpg" when I go to find the photo, it's icon i

  • PO;Import procedure

    Hi Murali Thanks for the quick reply I need further help in this Actually in PO (me21N) ITEM- IMPORT-origin/destination/business Import procedure this Import procedure -001 should be determined automatically ……the user is giving it manual…but it shou

  • Can't remove photo from dashboard...

    I recently downloaded the new OS X Mav. and was playing around with it and I somehow added a photo to my dashboard. It is locked in there, which wouldn't be a problem except for it never goes away, even when my dashboard is closed, so it is blocking