COM port from VISA alias

I have a test fixture I am designing in LabVIEW that is composed of many independent instruments. For simplicity sake I gave all of these instruments a VISA alias (for instance Programmer rather than COM3) so I wouldn't have to guess at which COM port the instrument was attached to.
Now, in LabVIEW, one of my instruments does not have a driver but does have a DLL shared library that I am trying to create wrappers for. One of the inputs is the serial port in a numeric format (0 for COM1, 1 for COM2, etc). If I didn't have the alias I would just do something like this...
But....because I have these aliases I cannot make it so simple. Is there a way to get the serial (COM) port number (I can decrement it) from the VISA alias?
Edit: seems the code didn't make it in on the first pass
Solved!
Go to Solution.

Jeff·Þ·Bohrer wrote:
obviously you're not using Quick Draw correct that drop.
they are on the pallets under measurements and they show up at the lower left hand sideI believe they install with DAC MX or device drivers
and of course that's a snippet so you could have just drop it will block diagram right click instead find an outlet from the alt correction find on pallets from the help
side note: Google speak doesn't recognize everything correctly
Ah.. I see them since I have never used any sort of DAQ devices or quick-drop (never could figure that out) I guess I never saw them before.

Similar Messages

  • 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

  • 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

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

    Well, have you tried the obvious to add the following permission to your web server's policy file?
    grant "file:<wherever my servlet resides>\myservlet.jar" {
    permission java.io.FilePermission "c:\j2sdk1.4.1\jre\lib\javax.comm.properties", "write,delete";
    }

  • Exception while accessing a 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.

    Solved!!. Just make sure u r placing neccessary files (comm.jar, win32com.dll and javax.comm.properties)onto the right JVM folders. Since JVM may be installed in many different location in your PC, U might want to do some search around looking for java.exe elsewhere in the system. Good luck!

  • Accesing COM port from an applet

    Hello:
    I am trying to develop an application that retrieves data from a VR glove and then use it to simulate the movement of it in an applet using VRML, anyway, as you can imagine, the applet is giving me problems when I try to access the serial port, it throws this particular exception :
    java.lang.ExceptionInInitializerError: com/ms/security/SecurityExceptionEx
         at HandAdapter.<init>
         at HandManager.init
         at com/ms/applet/AppletPanel.securedCall0
         at com/ms/applet/AppletPanel.securedCall
         at com/ms/applet/AppletPanel.processSentEvent
         at com/ms/applet/AppletPanel.processSentEvent
         at com/ms/applet/AppletPanel.run
         at java/lang/Thread.run
    I saw a solution to this problem using a netscape library, namely netscape.security.PrivilegeManager which fixes the problem, however, I haven�t found its counterpart for Internet Explorer.
    I hope you guys know of a solution to this issue given that programmers are used to fix this kind of troubles all of the time when developing in applet technology. Thanks in advance.

    By default applets do not have access to the system... you can set your vm to, allow applets to have access completly to the system, not very secure. Also any one who is visiting your site will have to have this set in there VM... Unless it's for your own personal purposes...
    Edit the java.policy so it contains only the following:
    grant
    permission java.security.AllPermission;

  • No coms ports in VISA resource name on VISA resource name VI but I can see COM4 it in my devise manager.

    I am trying to use a USB to RS232 device. I can see COM4 it in my devise manager but nothing in VISA resource name on VISA resource name, even when I hit refresh.
    Thanks
    Dan

    If you can see the device in Windows Device Manger, that is a good sign.  The next step is to recognize the device in Measurement & Automation Explorer, then ultimately LabVIEW.  The following two knowledge base articles should point you in the right direction:
    How Can I Communicate With a Device Using NI-VISA USB RAW Mode
    USBTMC and How Can I Communicate with My USB Instrument
    Regards,
    Alexander M,
    Applications Engineer
    National Instruments.

  • Automatically detect com port

    Hello
    I would like to create a User Event that defines which method data is provided to the VI (either Serial port or Telnet). If it is Serial port then I would like the VI to automatically find the correct data port that is providing valid instrument data and then stream the data to the screen. If it is a Telnet connection then the IP addresses are pre-determined and the data will also stream to the screen.
    As you can see in the attached VI, I am chasing my tail. I can successfully configure my Serial ports to my instrument thanks to some previous help but when I try to build an automatic COM port detection loop, I make a mess of it and my clean-working VI get all gunked-up.
    Will someone please put me back on track? What are the key elements that I am missing in this logic?
    Thank you so much.
    ~Derailed
    p.s LabView 2009 on MacOSX
    p.p.s. I just found this in the forum help topics and will explore it, but I think I need additional logical sequences to accomplish my goal.
    http://forums.ni.com/t5/LabVIEW/ASRL-versus-COM-display/m-p/88100#M54017
    Attachments:
    NIMS4.vi ‏27 KB

    So I simplified. Attached is a VI using VISA Find Resource to pipe a list to a While Loop that searches the com ports for valid packets.
    When running with highlighted execution ON, I can see that the loop sees the correct com port and the logic is good but the VISA Read reads no data. I removed the Flush Buffer vi and increased the bytes to VISA Read but still have the same result - no data to screen.
    I also tried to lengthen the amount of time the Mac might need to read the com port from 50ms to 100ms but still nothing. Any ideas?
    Thanks,
    ~Almost back on one rail
    Attachments:
    ComPortDetect.vi ‏19 KB

  • How can i read an COM port ???

    Hi,
    somebody knows how can i read an COM port from Forms 4.5 ?
    Thanks in advance.
    Patricio

    Hi Patricio
    have U got any solutions?? Im also trying to send message to display panel from forms 5.
    If You got any please let me know itll help me a lot
    Thanx
    Suraj

  • Com port

    Hi,
    somebody knows how can i read an COM port from Forms 4.5 ?
    Thanks in advance.
    Patricio

    with user exit or external procedures
    regards

  • Programmatically assign com port

    Hi
    I have an applicaton that uses USB-Serial adapters (Keyspan).  This system is in an open lab situation with multiple users and multiple laptops runing the LabVIEW program.  Each computer's registry assigns different comports to the Keysapn USB-Serial converter.  I've been able to query the registry and determine what com port Windows has assigned to Keyspan.
    How do I take this info and programmatically assign a com port or Visa resource name that LabVIEW is to open?  Is there some simple Visa property node for "Resource Name" that I am not finding or is this more difficult than my awareness?
    All of the laptop computers will be using Windows XP and LabVIEW 8.6 runtime engine.
    Thanks
    Glen

    You can take the com port name as a string and wire it into the VISA functions.  It will generate a coercion dot, but it will work.
    Message Edited by Ravens Fan on 03-16-2009 10:30 AM
    Attachments:
    Example_VI_BD.png ‏1 KB

  • Can I just have one Bluetooth COM port?

    Hi,
    I have just installed the Bluetooth stack and there are now lots of BT COM ports listed. They are over-riding COM ports I already had defined previously for other non-Bluetooth devices.
    Can I just add BT COM ports as and when needed?
    Regards,
    Jonny

    Before I installed the Toshiba Bluetooth stack (on Windows 2000), I already had other non-Bluetooth devices set up from COM1 to COM6.
    After I installed The Toshiba Bluetooth Stack, it created BT COM ports from COM1 to COM40.
    The COM ports it created from COM1 to COM6 are over-riding my non-Bluetooth COM ports, so that I can no longer use them.
    I had to uninstall the Toshiba Bluetooth stack before I could use them again.
    Why does the Toshiba Bluetooth Stack create all these COM ports? I don't want it to create any until I tell it which device(s) to connect to.
    Please can you help. Thanks.
    Regards,
    Jonny

  • Why is my com port missing from my list of VISA devices

    Hello all,
    I have an Agilent E5810 ethernet to GPIB gateway. I installed Agilent IO library and chose to make Agilent my primary VISA because otherwise the devices on the gateway didn't show up in my VISA device list. Now all of my GPIB devices show up (local and via gateway) but my com port is missing. The com port is actually a USB to serial adapter. It shows up in device manager as CP2101 uart interface COM6. I reloaded NI-VISA but COM6 still oesn't show up. I reloaded Agilent IO and unchecked "make Agelent primary VISA" but that didn't fix it. It is also missing from MAX. I added COM6 ASRL6 but VISA doesn't see it
    I think the root of my problem is getting Agilent VISA and NI VISA to work together but why won't my com port show up?
    Thanks alot

    Hello,
    Can you please follow the steps outlined in the following forum post and reinstall NI-VISA and Agilent VISA?
    Problem with NI VISA and Agilent VISA
    If the problem still exists, please call 1-866-275-6964 and reference your call to your service request number (1194753).
    Thank you,
    Simran K
    National Instruments
    Applications Engineer

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

  • VISA resource name control: want to refresh list of COM ports programatically

    When the app is running, and you first click this control, it takes 2-5 seconds to respond and populate the list for the first time.
    Therefore, I want to auto populate the first time the application is loaded. Can I do this?
    Solved!
    Go to Solution.

    Hi,
    I'm joining in here since the thread addresses delay problems when using VISA resources.
    I would like to share my experience when using VISA on real-time targets.
    The hardware I use is a cRIO NI-9074 with two NI-9870 (4 x RS232 each) and one NI-9871 (4 x RS485). These modules are used in scan mode to avoid excessive port programming in FPGA.
    My first problem was that the twelve COM ports of the NI-9870/9871 modules did not show up in the list of available VISA resources when placing a VISA resource control on the front panel or a VISA resource constant on the block diagram. However, the workaround using "VISA Find Resources" seemed to work fine. When starting the real-time program from the development machine, the list was populated and by indexing the list I was able to use the port.
    BUT: When building an RT executable from this VI, deploying it to the RT target and setting it as startup, nothing happened. It took me some time to find out, that there has to be a significant delay (in my case about 10 s) before calling the VISA Find Resources function. Otherwise it will not give the correct output. By some reasons, the ports do not seem to be available when the RT startup application begins to run. I tried to play with the delay and found out that the resource list would be empty when calling the VISA Find Resources function almost immediately on startup, after a few seconds it would return the ports of the first NI-9870, after seven seconds the ports of two modules, and after about ten seconds all ports would be available.
    I would appreciate if somebody could tell me what happens since it was quite a pain in the ass to solve this issue.
    Best regards,
    Karsten

Maybe you are looking for

  • F4 help

    Hi Guys, I have a problem with F4 help for a field. There is no table in CRM to use for F4 help. In R/3 there is a function module which give values which i need to display.There are only 2 columns and both are char type with length 30. The middlewar

  • My Zoom in Gesture Doesn't Work on Safari How can i make it work?

    I just bought a mac book pro 2011 and i know that the zoom in gesture used to work on safari at first but it doesnt anymore how can i make it work again?

  • ITunes syncs even when "Manually" is selected, and it just killed all my music

    This is something I've been struggling with for YEARS. If there were another good music player on the market, I'd be long gone. I've never wanted my music to sync automatically. So I click the box to manage things manually, but still, every time I pl

  • Unknown indexes in ABAP dictionary for a BW SAP_BW 350 ?????????

    Hi all, can anyone help me with the procedure to handle unknown indexes in ABAP dictionary for a BW SAP_BW 350 Production system? The list of some of the indexes are as follows : /BI0/E0CCA_C11~P /BI0/E0FIGL_C01~P /BI0/E0OPA_C11~P /BI0/E0PS_C04~P /BI

  • How do I get light room and ps 10 on my new computer? Old computer crashed

    I have a new windows 8 computer.  I had light room and pS 10 on my old computer.  How can I get them on this new computer without repurchasing?  I have the code of my lightroom sitting here but I assuming you can only use it on one computer and I use