How do I pragmmatic​ally determine what comm ports my serial instrument​s are on?

I am building a test stand that incorporates 5 serial instruments; 2 digital loads and 3 power supplies. I can use my PC's device manager to figure out which comm port each device is on and set the VISA Resource Name so everything runs as expected. All is well at this point. The problem comes in when an instrument's USB connection is unplugged and replugged, at which point the system may renumber the port assignments; the result is that my program errors out, I have to figure out what port everything is on all over again, and change the VISA Resource Name for all of my instruments. While this is a minor annoyance for me as the developer, this would make the program unusable by the user.
While "don't ever unplug an instrument" is a sensible answer, the fact is that these things happen from time to time - like for calibration - so I want the program to work regardless of instruments being unplugged.
Is there a way to have the vi automatically identify what port each instrument is on?

I've used a USB connected barcode scanner that appears as a COM port. If it is left connected to the same USB port the COM port remains constant but if it is disconnected and then put back into a different port the COM port changes. This sounds similar to your problem so I'll share how I solved things for my application.
The scanner I use accepts commands and will respond with a known string when I send a character 'I' via the serial connection. Using this I can see if the scanner is connected to the expected COM port (default port is stored in an ini file).
If this fails I create an array of possible serial ports by trying to open COM1 and checking for an error. If this does not generate an error I add it to an array. Next I try the same with COM2, COM3 up to COM16 (for example). This gives me a list of COM ports I can open.
I then iterate through the array trying for a response and stopping either when I get the expected response and continuing with the application or if the device is not found by the time I get to the end of the array I show the appropriate error condition to the operator.
If your instruments can return some kind of ID that will allow you to identify them as mentioned in another reply then this method could be used. Your 3 power supplies and 2 digital loads would need to be able to return a unique identifier otherwise you wouldn't be able to tell them apart and I think you'd possibly run in to problems.

Similar Messages

  • How can I determine what machines have Offline Sync running and are using it

    Hi everyone,
    I am working on a project where a Windows feature was rolled out but we do not know to whom exactly?
    I need to run a script that will tell me for all the machines/PCs in our estates which ones are actually using the Offline Files/Sync Center in Windows 7.
    Is there a way to do this via Reporting? I'm actually using SCCM 2012 SP1 but there was no option for this in the drop-down.
    If anyone has any samples or scripts - that I could utilise then I would appreciate this.
    Thanks

    Yes, I know this is an old post, but I’m trying to clean them up. Did you solve this problem, if so what was the solution?
    A Quick Bing search revealed several scripts that will allow you to determine offline data. I would start with one of those then, write the results to WMI. Once that is done CM12 can inventory the results and you can then create a report in this data.
    Garth Jones | My blogs: Enhansoft and
    Old Blog site | Twitter:
    @GarthMJ

  • How does ABAP client proxy determine the sender business system

    When we use ABAP client proxy to send a message in XI-SOAP format to the integration engine, how does the client proxy determine what is the sender business system, i.e. how does it know what value it should insert in the sender service field in the SOAP envelop.
    For example, at first, the business system X8A_105 corresponds to the technical system X8A_105, so when the client proxy sends out a message, the sender service is X8A_105. Then I delete the business system X8A_105 in the SLD, and create a new business system that is associated with the technical system X8A_105.when the client proxy sends out a message, the sender_service is still X8A_105, why?

    Hi Annie,
    Execute the following function module in your business system and see what name it returns..
    LCR_GET_OWN_BUSINESS_SYSTEM.
    You can always debug the code inside the above FM to find out how it gets the business system name...
    I think the issue should be related to cache. I would also suggest you to logoff from your business system and then login again.
    Regards,
    Sumit
    Message was edited by:
            Sumit Khetawat

  • Comm ports in win 8.1

    i need to know what comm port to set up my psk31 to transmit to my ft897d hf radio 
    i cannot find how to get to the proper area to set it up  in win 8.1 
    i cannot transmit without the port setup

    i need to know what comm port to set up my psk31 to transmit to my ft897d hf radio 
    i cannot find how to get to the proper area to set it up  in win 8.1 
    i cannot transmit without the port setup

  • When I upgraded from v4 to v5 my bookmarks was lost. I do have the one that is in the firefox toolbar. Apparently I had a bookmarks add-on. V5 changed my browser how can I determine what the program was and if the bookmarks are still there?

    When I upgraded from v4 to v5 my bookmarks was lost. I do have the one that is in the firefox toolbar. Apparently I had a bookmarks add-on. V5 changed my browser how can I determine what the program was and if the bookmarks are still there?

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    Websites remembering you and automatically log you in is stored in a cookie.
    *Create an allow Cookie Exception to keep such a cookie, especially for secure websites and if cookies expire when Firefox is closed.
    *Tools > Options > Privacy > Cookies: Exceptions
    In case you are using "Clear history when Firefox closes":
    *do not clear Cookies
    *do not clear Site Preferences
    *Tools > Options > Privacy > Firefox will: "Use custom settings for history": [X] "Clear history when Firefox closes" > Settings
    *https://support.mozilla.org/kb/Clear+Recent+History
    Note that clearing "Site Preferences" clears all exceptions for cookies, images, pop-up windows, software installation, and passwords.
    Clearing cookies will remove all specified (selected) cookies including cookies that have an allow exception and cookies from plugins.

  • How can I determine what computers are home sharing??

    How can I determine what computers are home sharing??

    Launch iTunes on the computers you're interested in. Check in the "Advanced" menu.
    If "Turn on Home Sharing" is listed as an option, the iTunes library that you have open is not Home Sharing.
    If "Turn off Home Sharing ([accountname]) is listed as an option, the iTunes library that you have open is Home Sharing.

  • How Do I Determine What WUDFHost.exe is Doing and What It's Associated With?

    Since around the time of the installation of Win 8.1 Update 1 I've had a couple of new WUDFHost.exe processes that run all the time.  Today I saw one of them accessing data on a backup volume, which I assume was some kind of maintenance
    activity - but I'm not sure.
    My question is this:
    How can I determine what these processes are doing, why they're here, and what they're associated with (i.e., what feature or device has caused them to be running).  I don't suspect them of causing a specific problem - my system's running fine
    - but I want to know why they're running.
    Process Explorer shows them to have been started by these two command lines:
    "C:\Windows\System32\WUDFHost.exe" -HostGUID:{193a1820-xxxx-xxxx-xxxx-be817523f6aa} -IoEventPortName:HostProcess-ae18c507-xxxx-xxxx-xxxx-ce7a84b73fb2 -SystemEventPortName:HostProcess-76f2d2b0-xxxx-xxxx-xxxx-25de41b0af65 -IoCancelEventPortName:HostProcess-52988628-xxxx-xxxx-xxxx-54018fc05bec
    -NonStateChangingEventPortName:HostProcess-c981e37e-xxxx-xxxx-xxxx-a8bd344c5791 -ServiceSID:S-1-5-80-dddddddddd-dddddddddd-dddddddddd-dddddddddd-ddddddddd -LifetimeId:8472fac1-xxxx-xxxx-xxxx-680353bbbc7f -DeviceGroupId:WpdFsGroup
    "C:\Windows\System32\WUDFHost.exe" -HostGUID:{193a1820-xxxx-xxxx-xxxx-be817523f6aa} -IoEventPortName:HostProcess-af2e6f5b-xxxx-xxxx-xxxx-39a9cc13f6d4 -SystemEventPortName:HostProcess-45e89330-xxxx-xxxx-xxxx-9e76811e37aa -IoCancelEventPortName:HostProcess-3007f65c-xxxx-xxxx-xxxx-c6cdd5617944
    -NonStateChangingEventPortName:HostProcess-efca4373-xxxx-xxxx-xxxx-cfc06fd83dee -ServiceSID:S-1-5-80-dddddddddd-dddddddddd-dddddddddd-dddddddddd-ddddddddd -LifetimeId:f4aa6ef0-xxxx-xxxx-xxxx-d16f4eefddb2 -DeviceGroupId:WudfDefaultDevicePool
    As you can see, their function isn't obvious from what's showing.
    What tools can I used to delve further into what these are and why they're here?
    Thanks for any help or wisdom you can offer.
    -Noel
    Detailed how-to in my eBooks:  
    Configure The Windows 7 "To Work" Options
    Configure The Windows 8 "To Work" Options

    seems to me that you're about to dive down a rabbit hole for this one..
    http://en.wikipedia.org/wiki/User_Mode_Driver_Framework
    http://msdn.microsoft.com/en-us/Library/Windows/Hardware/ff557565(v=vs.85).aspx
    http://blogs.msdn.com/b/iliast/archive/2009/06/09/umdf-debugging-videos.aspx
    might need to ask more in the driver dev forums?
    Don
    (Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable.
    This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!)

  • How can I determine what is the minimum SCN number I need to restore up to.

    Say if I have a full database backup, I know I have file inconsistency, but I want to know what is the minimum time or SCN number a need to roll forward to in order to be able to open the database?
    For example: I do a database restore.
    restore database ;
    RMAN> sql 'alter database open read only';
    sql statement: alter database open read only
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of sql command on default channel at 03/16/2009 15:00:04
    RMAN-11003: failure during parse/execution of SQL statement: alter database open read only
    ORA-16004: backup database requires recovery
    ORA-01194: file 1 needs more recovery to be consistent
    ORA-01110: data file 1: '/u01/oradata/p1/system01.dbf'
    I need need to apply archive log files. All references I find for ORA-00194 state the solution is to "apply more logs until the file is consistent " But "HOW MANY LOGS", or more apporaite up to what time or SCN? How does one determine what TIME or SCN is required to get all file consistent?
    I thought this query might provide the answer, but it doesn't
    select max(checkpoint_change#)
    from v$datafile_header
    MAX(CHECKPOINT_CHANGE#)
    7985876903
    --It applies a bit more redo, but not enough to make my datafiles consistent.
    recover database until SCN=7985876903 ;
    Starting recover at 03/16/09 15:04:54
    using channel ORA_DISK_1
    using channel ORA_DISK_2
    using channel ORA_DISK_3
    using channel ORA_DISK_4
    using channel ORA_DISK_5
    using channel ORA_DISK_6
    using channel ORA_DISK_7
    using channel ORA_DISK_8
    starting media recovery
    channel ORA_DISK_1: starting archive log restore to default destination
    channel ORA_DISK_1: restoring archive log
    archive log thread=1 sequence=18436
    channel ORA_DISK_1: reading from backup piece /temp-oracle/backup/hot/p1/20090315/hourly.arch_P1_47353_681538638_1
    channel ORA_DISK_1: restored backup piece 1
    piece handle=/temp-oracle/backup/hot/p1/20090315/hourly.arch_P1_47353_681538638_1 tag=TAG20090315T041716
    channel ORA_DISK_1: restore complete, elapsed time: 00:02:26
    archive log filename=/u01/app/oracle/flash_recovery_area/P1/archivelog/2009_03_16/o1_mf_1_18436_4vxd81yc_.arc thread=1 se quence=18436
    Oracle Error:
    ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
    ORA-01194: file 1 needs more recovery to be consistent
    ORA-01110: data file 1: '/u01/oradata/p1/system01.dbf'
    I've discover I need to apply archive logs until this query reports all datafiles as FUZZY=NO , but this only works by guessing at some time periord to roll forward to, then checking the FUZZY column, and try again. Is there a way to know, I have to roll forward to a specific SNC in order for all my datafiles to be consistent?
    select file#
         , status
         , checkpoint_change#
         , checkpoint_time
         , FUZZY
         , RECOVER
    ,LAST_DEALLOC_SCN
    from v$datafile_header
    order by checkpoint_time
    Thanks,
    Jason

    The minimum point in time is the time when the last backup piece for datafiles in that backup was completed.
    Your alert.log should show the redo log sequence number at that time.
    You can query V$ARCHIVED_LOG and get the FIRST_CHANGE# of the first archivedlog generated after that backup piece completed.
    A
    LIST BACKUP;in RMAN should also show you the SCNs at the time of the backups.
    You can also query SCN_TO_TIMESTAMP -- eg
    select timestamp_to_scn(to_timestamp('15-MAR-09 09:24:01','DD-MON-RR HH24:MI:SS')) from dual;will return an approximation of the SCN.
    Hemant K Chitale
    http://hemantoracledba.blogspot.com
    Edited by: Hemant K Chitale on Mar 17, 2009 9:41 AM
    added the LIST BACKUP command from RMAN.

  • How do I determine what is using the most memory.

    The hard disk memory is filling up and I was wondering what is the best way to determine what is using the most memory. Is there a way to show a graph of how the memory is used. Like on my ipod. When I am checking the memory, it will show how much is music, and how much is applications and so on.
    Also, I seemed to have lost the "all movies" in the list to the left when the hard disk is opened. It still shows the all imagess, and all documents but the all movies is gone.
    Thank you for any help
    Marco

    Try Grand Perspective or OmniDiskSweeper - CNet Downloads or MacUpdate.
    Just for future reference space on a hard drive is called, "storage," not "memory."  Memory refers to the installed RAM in your computer.
    Open Finder Preferences from its Finder menu.  Click on the Sidebar icon in the toolbar.  Check the box for your missing item.

  • How do you determine what shows are in free video on demand?

    How do you determine what to include in the free on-demand shows?  The Mentalist was always there before but is no longer.  This is especially important for shows like the Mentalist and The Good Wife which come on Sunday nights after sports events.  Even if I set my DVR to record 60 minutes over it doesn't always catch the entire episode.  Would also like to see Person of Interest  there.   And last but not least, you should have a way for people to access netflix or other services from your service.  

    If you go to BROWSE then the FREE folder you will find that everything in there is free viewing. If you go elsewhere and try to watch a paid show, you will get a prompt asking you to purchase. It also shows the amount of the movie before purchase.
    Anthony_VZ
    **If someones post has helped you, please acknowledge their assistance by clicking the red thumbs up button to give them Kudos. If you are the original poster and any response gave you your answer, please mark the post that had the answer as the solution**
    Notice: Content posted by Verizon employees is meant to be informational and does not supersede or change the Verizon Forums User Guidelines or Terms or Service, or your Customer Agreement Terms and Conditions or plan

  • How do I determine what the default font for equations is?

    In the Equation Fonts dialog box, we can set the font of Functions, Numbers, Strings, and Variables.  In those dropdown lists, there is a Default (para) Font choice.  How do I determine what font that is?  What paragraph tag is associated with an equation?
    With all the choices set to default, numbers types in the equation look similar (but not exact) to the Symbol font, but of course typing letters in the Symbol font reveal greek characters.  So is it some derivation of Symbol?

    Thanks.  That .cfg file shows Times Regular for the following characters, but none of these characters are the regular alphabet, (are they?) so there must be yet another place?
    mathchar.cfg    53      < plus        2b Times Regular>
    mathchar.cfg    54      < equal       3d Times Regular>
    mathchar.cfg    70      < gg          c8 Times Regular>
    mathchar.cfg    71      < ll          c7 Times Regular>
    mathchar.cfg    93      < fact        21 Times Regular>
    mathchar.cfg    94      < dagger      a0 Times Regular>
    mathchar.cfg    98      < minus       d0 Times Regular>
    mathchar.cfg    106      < uequal      3d Times Regular>
    mathchar.cfg    112      < diff        64 Times Regular>
    mathchar.cfg    116      < ucomma      2c Times Regular>
    mathchar.cfg    117      < semicolon   3b Times Regular>
    mathchar.cfg    118      < optotal     64 Times Regular>
    mathchar.cfg    127      < power       5e Times Regular>
    I've determined (by comparing equation string to body string visually) that Times is in fact the font being used.  I just don't see yet how that gets determined.  Any further thoughts?

  • How do I determine what element in an array was right clicked on?

    I have an array set up on my front panel. When the user right clicks on an element in that array, I would like them to be able select from 3 different options. I have the shortcut menu working, but I need to know which element in the array the user right clicked on to determine what values to change. How can I get the index of the element?
    Thanks for any help!
    Solved!
    Go to Solution.

    Couldn't you get index values from the array property node?
    Also this doesn't account for if scrollbars are seen or not.  And I usually like to know if my range is valid, because again I could be clicking on a scrollbar, or label and still get the Mouse Down event.
    Here is one I posted a while ago.
    http://forums.ni.com/t5/LabVIEW/Interesting-way-to-detect-array-index-from-mouse-position/m-p/286841...
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • How do I determine what xtras are needed?

    From the searching I have done it appears that xtras equired are mostly trial-and-error.
    Is there an efficient way to determine what xtras are needed for each lindividual movie?
    My programs are divided into a series of sequential movies.  At the end of each movie
    there is a goto statement to launch the next movie.  Does that require me to determine
    xtras for each separate movie? 
    In a perfect world there would be a way for Director to search a  folder for and present an aggregate list of all xtras required for that set of movies.
    If no such method exists, what is the recommended hunt and peck system?

    Thanks for the response, rduane.  But I refer to the procedures as a bit random for the reasons you mentioned in your explanation.  For example, you stated that, "Director will normally add all of the Xtras that you need to each movie as you build it".  And, yes, I know that it does add some automatically.  But, if Director really does "add all of the xtras that you need to each movie as it is built", how could I ever jump to one that is missing a needed xtra?  If it needs it, why wasn't it added when it was built?
    So, that's the reason I mentioned "trial and error", and "hunt and peck".  The system is not reliable in its handling of xtras, or which ones are needed where.  I am familiar with workarounds such as going to each movie and selecting Modify>Movies>Xtras to see which ones Director has added,  But that is all it tells you.  It does not tell you if it has added all the xtras "needed".  And when the error message comes up, it does name the missing xtra, but not which movie needs it.  So, one has to go find the named xtra and copy it over to the Xtras folder. 
    At least, that's what I do to fix it.  But I asked the question because I wanted to know if Xtras handling itself is unreliable, or if I'm doing something incorrectly.
    Dewey-+

  • How do I determine what URL to use when launching to display a RH10 .htm page?

    Hello,
    We are implementing RoboHelp 10 for our online documentation and are sourcing it from Framemaker 11. I am trying to determine exactly what URL information the developers need to build for the launch to the specific IBM System i screen. Is anyone launching RoboHelp from a backend ERP system? If so, how did you determine what level to use when building the URL for that page?  Thanks for any assistance you can provide.

    It depends on whether you just want to open the help at the default topic or open context sensitive topics.
    Both methods are described in Calling Help on my site and there is more good information at http://www.wvanweelden.eu
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • How do i determine what the "other" usage is on my iPad (3.5 gig)

    how do i determine what the "other" usage is on my iPad (3.5 gig)

    Hey there, I seem to have an issue with the 'other' usage thing.
    On my computer and ipod, it shows like this:
    when I dont even have more than 2+GB in music and less than 1gb in apps and pictures.
    I am on iOS5.1.1 because I had many problems with the Wi-Fi bug for iOS6 (no, it didnt fix for me with 6.0.1)
    I am very frustatred because I cant even sync music anymore. AndI dont want to do a reset because it takes me 3+ hours to transfer my music.
    any help}?

Maybe you are looking for