Given a string, how do you find the numeric value in sparse ring?

Situation: I receive the string value of the sparse ring, and a control reference to the same type of control, but not the control that sourced the string. How can I convert the string, into the actual numeric value of the ring? For example:
Using the "VISA Select Event Type" ring (Functions -> Instrument I/O -> VISA -> Advanced -> Event -> Select Event Type.ctl), lets say I get the string "ServiceRequest" how do I convert that into 1073684491, the actual value of the ring?
This is a rework of an existing function that worked fine with "normal" rings.
Thanks.

Unfortunately this method will not work, its a generic routine that must be able to take any ring, so I can't hardwire the cases to known outputs. And, of course, searching the array of Strings[] will just find me a useless index.
My interm solution is this:
1) pick a small, but likely range of possible values for the ring
2) iterate through these values, assigning each one in turn to ring
3) read the RingText property to see if it matches the passed string
4) if it does, then exit. If it doesn't keep looping.
5) if no value produces a matching string, declare defeat (raise an error or produce other output that indicates a match could not be found).
The routine only runs in the UI so I am not too concerned about the time delay this method will i
mpose, but I would greatly appreciate a smoother solution.
Thanks for your suggestions.

Similar Messages

  • How do you find the average value of all the data between two points on a single channel

    I am tring to calculate the average value of all the data points on a single plot between two seperate points
    I have attahced an illustration.
    Tim
    Solved!
    Go to Solution.
    Attachments:
    plot.jpg ‏173 KB

    Hey smoothdurban,
    I've seen Brad's code, and trust me, it's worth the effort to let him help you get it up and running - it's definitely the most ideal way to solve this problem.  However, as Brad said, there are multiple ways to tackle this - both interactive and programmatic - so in the meantime, I'll take a second to detail one of the interactive and sure-fire ways to find the average of data between two points on a single channel.
    We'll use"Flags."  Set up your VIEW graph exactly as you did on your original screenshot, using Band Cursors to approximate the beginning and ending X-values representing the range you want to examine.  Next:
    1. Click the "Set Flags" button () that is a part of your 2D Axis System.  Note that you can hold down the Shift button if you ever decide you want to do this on more than a single curve at one time.
    2. Select the "Flags: Copy Data Points" button that enables after Flags are set.
    3. This creates new channel(s) in the default (bold) group in the Data Portal that contains only the Flagged data.
    4. Select DIAdem ANALYSIS.
    5. Select Statistics » Descriptive Statistics.
    6. In the Channels input, select the newly created channel containing your Flagged Y-Data.
    7. Ensure that the Arithmetic Mean parameter is set.  You can preview the data and the result in the dialog before pressing OK to execute the calculation. 
    You may have noticed that in the Descriptive Statistics calculation, one of the parameters that you can set is the range of channel rows to operate on - so, if you know the row numbers of your beginning and ending X-values, you could just simply run the Descriptive Statistics calculation and use this parameter to operate on a row subset of your original channel instead of the entire channel.
    Derrick S.
    Product Manager
    NI DIAdem
    National Instruments

  • How do you find the difference in no. of days between 2 dates?

    How do you find the difference in no. of days between 2 dates ?

    There are 2 way to solve this: using java.util.GregorianCalendar or java.util.Date (like jesper1 suggested), depending what kind of solution You need:
            GregorianCalendar gc1 = new GregorianCalendar(2001, 01, 01, 23, 00, 00);
            GregorianCalendar gc2 = new GregorianCalendar(2001, 01, 03, 10, 00, 00);
            // 1st way using GregorianCalendar
            int diff1 = gc1.get(GregorianCalendar.DATE) - gc2.get(GregorianCalendar.DATE);
            System.out.println("Differnce: " + diff1);
            // 2nd way using Date
            int diff2 = (int)(gc1.getTime().getTime() - gc2.getTime().getTime()) / (24 * 60 * 60 * 1000);
            System.out.println("Differnce: " + diff2);Note: There are 2 days between the given dates, but exactly 1 day and 11 hours.
    The first solution returns "-2", the second returns "-1".
    (... and a 4th posting also won't help ...)

  • How would you find the pitch period of a sound signal?

    Hi
    I have a few questions and i would like if somebody could help me even with the smallest comment on this.
    How would someone be successfully estimate the pitch period (fundamental frequency) of a 5 second sound file?How would you successfully distinguish the voiced from the unvoiced parts and how would you make sure you dont mix voiced/unvoiced sections? Finally how can you find the exact points where the pitch is at its peak throughout the signal?
    Any help/comment/suggesion would be much appreciated

    Hello Madgreek,
    After some thought I think I may have come up with an algorithm for what we have discussed. Basically, you are interested in knowing the time intervals over which you can observe any given frequency in your signal. As you had suggested, you can examine small windows of your signal and perform FFTs on each of the small windows to determine what frequency content is contained in that window. By examining all of the windows, you will see when particular frequencies are prevalent in the original signal. You'd want to use the smallest allowable window to give you the most resolution, but one that is large enough to cover an entire period of the lowest frequency (so that you don't miss this frequency).
    I have attached an example program that performs this operation. The example performs this analysis on an array that represents audio data. I am basically performing multiple FFTs (for each window) and stacking these FFTs in time to form a 3D plot. By examining the 3D plot, I can then see when in time my frequencies of interest are at their peaks. Rather than graphing these plots, you may work out a different algorithm for programmatically determining and logging these peaks and times. I hope this is what you were looking for!
    Attachments:
    Time Variable FFT.vi ‏250 KB

  • How do you find the iPad phone number for cellular data?

    How do you find the iPad phone number for cellular data?

    I know this post was a long time ago but people still seem to be viewing it.
    Quickest way:
    Via the iPad on 3G, go to http://m.telstra.com. The service number is then displayed and you are given the option to recharge.

  • 1.) How do you find the dictionary in Apple Mail Program?  2.) How do you add another dictionary?

    1.) How do you find the dictionary in Apple Mail Program?  2.) How do you add another dictionary?

    Hello James!
    I do not have any ABAP Instance, only the JAVA one.
    Therefore the ABAP transactions are quite useless.
    The problem tables are created by people working on the CAF layer.
    They have developed and deployed some homemade applications and this is leftovers from their development in some kind of way.
    Anyone with any ideas?
    Could it be that (yet) some special Portal Dictionary Role needs to be asigned to the Administrator?
    /Lasse

  • HT204003 How do you find the passbook enabled apps once you use passbook???

    How do you find the list of passbook enabled apps once you start using passbook???

    http://www.macrumors.com/2012/09/19/passbook-enabled-apps-start-arriving-on-app- store/

  • How do you find the phone's mac address for Droid RAZR Maxx HD?

    how do you find the phone's mac address for Droid RAZR Maxx HD?

    Ann154 wrote:
    WalrusM wrote:
    how do you find the phone's mac address for Droid RAZR Maxx HD?
    It is listed under the advanced options for the WiFi settings or About Phone > Status within the phone's settings
    Motorolas list them under About Phone > Status.
    Edit:  Oh, snap!  It is listed in both places.     Nevermind!  Please excuse! 

  • How do you find the word count on MacBook, please?

    How do you find the word count on MacBook, please?

    If you are trying to find word count in a Microsoft Word 2011 documemt, for instance, open the document and go to the Tools menu, selecting Word Count. In Apple's Pages application, open the document and look at the bottom of the page, near the left it will say "X Words" where X is the number.
    Best of luck.

  • I've formatted my PC, how do you find the album you have bought in there on my account again?I've formatted my PC, how do you find the album you have bought in there on my account again?

    I've formatted my PC, how do you find the album you have bought in there on my account again?

    If you reformatted you disk, then you music was deleted.
    Apple only allows one download and advises that purchases are backed up.
    I guess you don't have a backup?
    If not you can recover purchased music from your iPod if you have one:
    http://discussions.apple.com/thread.jspa?messageID=11857427&#11857427
    If you can't do either, try contacting customer service and explain the situation, but they are not obliged to help you.
    http://www.apple.com/support/itunes/

  • HT5312 How can you find the link to get a rescue email?

    How can you find the link to get a rescue email?
    I am not a regular user - and wonder why????
    Been at this for hours, can't remember questions, support sends you to the questions you can't answer or I would have the first time, or a promise of a link which doesn't seem to exist!!
    Now locked out!

    You need to contact Apple, either through the link in that article or by phoning them and asking for the Account Security team.
    (80167)

  • How do you find the replies to the questions I asked?

    ''locking this as a duplicate - https://support.mozilla.com/en-US/questions/822449''
    How do you find the replies to the questions I asked?

    Click the '''My Contributions''' link after you log in. See screenshot.

  • How do you tell the color value of a pixel in an image data

    Hi,
    Given a BufferedImage of type, say BufferedImage.TYPE_4BYTE_ABGR, how do you tell the color value of a pixel in the image?
    Specifically, in the following code:
    Raster imgData = image.getData();
    int x = imgData.getMinX();
    int y = imgData.getMinY();
    int width = imgData.getWidth();
    int height = imgData.getHeight();
    I want to search the raster looking for a specific color, e.g., Color.WHITE.
    According to the API, "getSample()" may be used for this purpose. But, how do you know which color band a band index parameter in getSample() refers to? Does band index of 0 always refer to the RED band? Does band index of 1 refer to the GREEN band? etc.
    I'd greatly appreciate any help you may be able to provide.
    Thanks,
    --HS                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    In the print dialog underneath the settings for number of copies and print range you should see a dropdown menu probably called Layout. If you don't see that look for a button labeled Details and click it.
    Under the Layout menu you should find an option labeled Printer where you will find Printer specific options. Look for something there. You might also find an option called Color which may have options you are looking for.
    If this doesn't help, go to the printer manufacturer's website and look for answers there.

  • How do I find the closest value to a constant in an array

    I have an array of floating numbers and I want to find a value in that array that is closest to a floating constant.     For example if I have the array 5.9, 2.8, 3.7, 5.8, 6.9, and if I have the constant 5.4, how would I find the closest value to 5.4 in the array, which in this case would be 5.8. The only approach I can think of is to subtract each value in the array from 5.8 and find the minimum value of an array which would be created from the differences. Is there a better approach?
    Thank you.

    Just be sure to take the absolute value of the difference and your proposed method is fine.

  • How do you retrieve the USR_LOCK value?

    How do you retrieve the USR_LOCK value, it cant be mapped directly on the process task right?
    You writed custom JAVA code?
    Thanks in advance.

    If by any change you want this with 11g APIs then you can use http://docs.oracle.com/cd/E14571_01/apirefs.1111/e17334/oracle/iam/identity/usermgmt/vo/User.html#getManuallyLocked__ and http://docs.oracle.com/cd/E14571_01/apirefs.1111/e17334/oracle/iam/identity/usermgmt/vo/User.html#getAccountLockedDate__
    HTH,
    Bikash

Maybe you are looking for

  • Too many time to open a session with oracle odbc

    I have to migrate an internet site in Sql Server to Oracle. When I connect Oracle Database with Oracle ODBC, it takes 2 or 3 seconds. So if i have 8 or 10 recordset to open, it takes 20 s. But when sessions are open, they live about 1 m and during th

  • Magenta cast when printing from any app in Mountain Lion

    I get a serious magenta cast when printing from any application using my Epson R3000 inkjet. I am aware of the double profile issue. For example in Photoshop I let it do the color management. ML automatically turns off printer color management. My mo

  • In Search - Only first ten name displays

    Dear All, When I search for a name,only top ten relevant names pops out,for more information please check the attachment. is it bug or Google chrome impact ?. Thanks Agasthuri PS: I was looking for name "Amit Srivastava" the search result pop out onl

  • Character set issues

    Hi, I was hoping somebody can help me out.....or at least direct me to the right forum... Our application has a JBoss server running on a Unix platorm. Apache is the webserver. My requirement is that a client user should be able to input details on t

  • Shift-Tab not working

    For some reason, using Shift-Tab to select fields in reverse does not work properly in Safari and other browsers (Chrome, Firefox). When I hit Shift-Tab, the browser window closes, or, if more than one tab is open, I am warned about closing all the t