How to read data after using the PRINT function in visual basic

I know the benchlink can capture the spectrum analyzer screen for me, but I want to integrate it into my application. I use NI spy to detect the communications from the benchlink and put it into my application. After sending the "PRINT 0" command, my "ilrd SpectrumAnalyzer, temp, 500" command doesn't work, giving me EARG error. Does anyone knows if it is because I can not define the temp to be string or some other problem?
b.t.w, the communications I get from NI Spy actually read some unknown characters from the instrument, what kind of data it is? Any idea how to use it?
thanks.

Hello elm,
This is completely dependent on your instrument; if you are getting the data then you are halfway there. Look in your instrument's programmer's reference manual to see if they mention how the picture is encoded in bytes. There are so many different ways to encode a picture in binary that speculating and guessing would probably never yield the true result. If there is no mention in the manual, contact the instrument manufacturer.
Sorry I could not be of more help.
Scott B.
Applications Engineer
National Instruments

Similar Messages

  • How to read data after select multiple record by checkbox,

    hi experts
    i  m using simple report with check box , and itab whcih contain records
    how to read data after select multiple record by checkbox,
    thanks

    Hi Prashant,
       Try using this logic.This Code displays the list with check boxes. When you check a checkbox and press a button say 'Select All' or 'De Select all' or 'Display'. It will read the data of those records.
    DATA :
      fs_flight TYPE type_s_flight,
      fs_flight1 TYPE type_s_flight1.
    * Internal tables to hold Flight  Details                             *
    DATA :
      t_flight LIKE
      STANDARD TABLE
            OF fs_flight,
      t_flight1 LIKE
       STANDARD TABLE
             OF fs_flight1.
    SET PF-STATUS 'SELECT' .
    PERFORM selection.
    PERFORM displaybasic .
    *                      AT USER COMMAND EVENT                          *
    AT USER-COMMAND.
      PERFORM selectall .
    *&      Form  SELECTION
    *      Select query to reteive data from SPFLI table
    *  There are no interface parameters to be passed to this subroutine.
    FORM selection .
      SELECT  carrid                       " Airline Code
              connid                       " Flight Connection Number                  
        FROM  spfli
        INTO TABLE t_flight.
      DESCRIBE TABLE t_flight LINES w_lines .
    ENDFORM.                               " SELECTION
    *&      Form  DISPLAYBASIC
    *      Display the basic list with SPFLI data
    *  There are no interface parameters to be passed to this subroutine.
    FORM displaybasic .
      LOOP AT t_flight INTO fs_flight.
        WRITE :
             w_check AS CHECKBOX,
             w_mark,
             fs_flight-carrid UNDER text-001,
             fs_flight-connid UNDER text-002.
      ENDLOOP.                             " LOOP AT T_FLIGHT..
      CLEAR fs_flight-carrid .
      CLEAR fs_flight-connid.
    ENDFORM.                               " DISPLAYBASIC
    *&      Form  SELECTALL
    *      To check all the checkboxes with a 'selectall' push button
    *  There are no interface parameters to be passed to this subroutine.
    FORM selectall .
      CASE sy-ucomm.
        WHEN 'SELECT_ALL'.
          w_check = 'X'.
          w_line = 4 .
          DO w_lines TIMES.
            READ LINE w_line .
            MODIFY LINE w_line FIELD VALUE w_check .
            ADD 1 TO w_line .
          ENDDO.                           " DO W_LINES TIMES
          CLEAR w_line.
        WHEN 'DESELECTAL'.
          w_check = space.
          w_line = 4 .
          DO w_lines TIMES.
            READ LINE w_line FIELD VALUE w_mark .
            IF w_mark = space .
              MODIFY LINE w_line FIELD VALUE w_check .
            ENDIF.                         " IF W_MARK = SPACE
            ADD 1 TO w_line .
          ENDDO.                           " DO W_LINES TIMES
        WHEN 'DISPLAY'.
    IF sy-lilli BETWEEN 4 AND w_lines .
        DO w_lines TIMES.
          READ LINE w_num FIELD VALUE w_check INTO w_check
                                     fs_flight-carrid INTO fs_flight-carrid
                                     fs_flight-connid INTO fs_flight-connid.
          IF sy-subrc = 0.
            IF w_check = 'X'
              SELECT  carrid
                      connid
                      fldate               " Flight date
                      seatsmax             " Maximum capacity in economy
                      seatsocc             " Occupied seats in economy class
                FROM  sflight
                INTO  TABLE t_flight1
               WHERE  carrid = fs_flight-carrid
                 AND  connid = fs_flight-connid.
              LOOP AT t_flight1 INTO fs_flight1.
                WRITE :
                  / fs_flight-carrid UNDER text-001,
                    fs_flight-connid UNDER text-002,
                    fs_flight1-fldate UNDER text-007,
                    fs_flight1-seatsmax UNDER text-008,
                    fs_flight1-seatsocc UNDER text-009.
              ENDLOOP.
            ENDIF.                         " IF SY-SUBRC = 0
          ENDIF.                           " IF W_CHECK = 'X'.
          ADD 1 TO w_num.
        ENDDO.                             " DO W_LINES TIMES
        CLEAR w_check.
        w_num = 0.
      ELSE .
        MESSAGE 'INVALID CURSOR POSITION ' TYPE 'E' .
      ENDIF.                               " IF SY-LILLI BETWEEN..
    ENDCASE.                             " CASE SY-UCOMM
    ENDFORM.                               " SELECTALL
    Much Regards,
    Amuktha.

  • How do I use the print function to output a numeric variable with a fixed amount of leading zeroes

    I need to create an output from a T-SQL query that picks a numeric variable and uses the print function to output with leading zeroes if it is less than three characters long when converted to string.  For example if the variable is 12 the output should
    be 012 and if the variable is 3 the output should be 003.
    Presently the syntax I am using is PRINT STR(@CLUSTER,3) .  But if @CLUSTER which is numeric is less than three characters I get spaces in front.
    Please help!

    >> I need to create an output from a T-SQL query .. <<
    NO! NO! In RDBMS, we have a presentation layer that handles displays. We do not ever do it in the database. This is fundamental. But more than that, the purpose of PRINT is for debugging in T-SQL and never for output.
    You are still writing 1960's COBOL or BASIC, but you want to to it in SQL.  You probably picked the wrong data type (a numeric that should be a string) and are trying to repair your design error.  
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Do i need to upgrade from OS X 10.5.8 to a new version to be allowed to be able to use the print function of Iphoto 08 ?

    Do i need to upgrade from OS X 10.5.8 to a new version to be allowed to be able to use the print function of Iphoto 08 ?

    You can upgrade to iPhoto '09 with a purchaed iLife '09 DVD - or yu can upgrade your OS and purchase an iLife '11 DVD
    Eitehr shuld be aviailable from amazon, eBay an dother places
    LN

  • How to read data/fields of the pdf form

    Hi,
    i want to orchestrate a process where input is interactive forma and output is xml data.
    i mean i want to read data/fields of the pdf form.
    Which activity do i use on workbench.
    Regards
    Sunil

    Dieter,
    I am talking about 3rd senario, where we create one process on workbench, and pass filled pdf as input and then output of process is xml file.
    What is the process name here (Like renderPDF process) which extract data from pdf.
    regards
    Sunil

  • Actionscript 3 Class Not Running More Than Once After Using The GoToAndStop function

    I'm having a strange issue, and I am sure it's due to my lack of knowledge about how classes fully work in Adobe AIR (Flash CC). I've created a login button that is connected to a function, and based on a set of conditions it will take you to a different frame with the GoToAndStop function. I've created a logout button that is suppose to take you "back" to the login frame (that has the login button) if you click the logout button using the GoToAndStop function. Up to this point, everything works until I try to click the Login button again, it does not do anything. It's like it does not even try to execute my class file anymore.
    Does the class file only run at startup and never runs again, and if so, how can I create a section of code that is constantly monitoring what the user is doing no matter what frame you are on and no matter if I use the GoToAndStop function or not?
    Thanks

    Based on your qyestion, I think I was wrong with my second guess.
    When I want to create a button, what I do is draw a bitmap that looks like a button and then use a mouse event listener that looks for any part of the stage that is clicked.  You would use the same code for touch as well.  As3 will return the x.y. coordinate of the area that was clicked or touched.  When the xy coordinate is known, if it corrseponds to the area where the button is, I code the appropriate response.  Hence, I only use one event listener for all my buttons, as long as thet involve simple clicks or taps of the screen.
    Good luck, Justin

  • Breaking Links to and External Data Connection using the cubevalue() function

    I have spreadsheets that connect to an MSAS cube successfully and pull data in the cells using the CUBEVALUE function.
    Is there a way to perform the equivalent of 'breaking links' to the external database so that the spreadsheet can be distibuted to others that will not have the external database connection set up on their computer/excel environment.
    I find that if i email a spreadsheet with data retreived using cubevalue functions to someone without the external database connection they do not see the values preserved with the spreadsheet and end up with blank or zero cells, etc.
    I have unchecked the box related to 'refresh data when opening file'.
    In a perfect world i would like to remove the db connection and be left with pasted values, similar to breaking links to an external workbook but I am not sure if that is possible.
    I am desperate to find a way to distribute these spreadsheets and be confident that Excel won't be unsuccessfully trying to refresh a connection that isn't on other peoples computer.
    Thanks for any guidance

    Maybe you can upload a sample file to a file sharing site and then share the link with us.
    As you said you have already unchecked the option 'Refresh data when opening the file' within Connection Properties.
    When you send the Excel file to someone without this data connection, they should get the correctly data unless they click the button 'Refresh All'.
    Wind Zhang
    TechNet Community Support

  • How to create Geniric data source using the SAP FUNCTION MODULE

    Hi,
    I want to create genric data source using function module
    MD_STOCK_REQUIREMENTS_LIST_API (delivered by sap)
    for this function module where I can find  Extract Structer
    or I have to create ?
    How can i use this ?
    Thanks in Advance

    Hi Shilpa,
                  Check here..........
    Using function module as the generic extractor
    Generic Delta Update using Function Module
    Document regarding R/3 extractors using function module/user exits
    Generic extractors using FM

  • Adobe Reader X - after using the spell checker words run together

    Hi,
    I am using Adove LiveCycle Designer ES 8.2 to design electronic forms that are filled out in Aobe Reader X. However, when the spell checker is used in Adobe Reader X, all the words that were corrected by the spell checker become one word. For example "Together is better" becomes "togetheris better." This is preventing my company from using electronic forms and I really want to convert my company to electronic forms. Does anyone know when the next version of reader will be available and if this will be fixed? Is there a workaround?
    Thanks

    Hi,
    This is the exact issue I am having. It would open then self terminate within seconds. I was suggested to un-install the program. Now I cant get any visual, and there is an error message. AAARRRGH! So frustrated.

  • How to bee able to use the anchor functionality as is used in APEX develop

    Hi
    First of all APEX is great !
    I have been using APEX to do some small applications in Norway. Now i am in a position to make a sales presentation for Norwegian Civil Aviation authority department. I hope we winn the contract and then we are going to use APEX for building the system.
    I need to bee able to navigate between many regions on an effective way. We would have the pages with 3-8 regions on each page and it would bee very suitable do have the functionality which is used in APEX Application builder where it is possible to show all regions on the page and then bee able to scroll through all regions on the page.
    But also bee able to user #ANCHOR_NAME at the end of the URL and then just switch to one of the regions (show just one region on the page).
    I have made a test page with use of #ANCHOR_NAME and this is ok, but i don't know how to just hide all other regions when you navigate to the anchor name. In application builder it is very nice when you navigate between regions and when you hit the "Show All" link, all regions is displayed on the same page.
    I also need to have each region the same size in width as in Application Builder, and the theme used in Application builder would also bee nice to used (in another color) is it possible to have a copy of the theme and make some adjustments to it ?.
    I would bee very greatfull for any feed back about this subject. I am going to make a demonstration 19 Descember.
    jon.

    The Builder links you mention at the top of the Component Definition pages use markup like
    < a href="#N" onclick="qF(this,'#N');return false;" ... >Name< /a >That "qF" function is a slick piece of Javascript. You can review it at http://htmldb.oracle.com/i/javascript/htmldb_html_elements.js. The DOM nodes that the function uses are specific to the Builder page template, but the code is fairly generic enough that you can adapt it to meet your needs. [Not sure what your comfort and experience level with Javascript is]
    That function also saves the selected region/section in a client-side cookie so that it persists the next time you visit the page.
    Hope this helps.
    Carl: The following line in the "uR" function seems mighty strange!
    if(gThis == $x('ALL')){gThis = $x('ALL');}

  • How to add leading zero using the toString() function?

    Hi,
    I've looked in the user manual and I can't find any reference to toString() for syntax information.  Isn't there a parameter for me to use to specify the string lenght?  And whether to add leading zeros or not?
    Here's the code I need to add leading zeros:
    playbutt.addEventListener(MouseEvent.CLICK, playSound);
    function playSound(e:Event)
    SoundMixer.stopAll();
    var num:Number = Math.ceil(Math.random()*43);
    bigNum.text = num.toString();
    var path:String = "Track No" + bigNum.text + ".mp3";
    trace(path);
    var s:Sound = new Sound(new URLRequest(path));
    s.play();
    The files I'm trying to open starts at "Track No01".
    Any ideas?
    Ron

    Thank you for the code replacement.
    By the way, instead of having the user click a button to start a random music file (MP3), I'd like to get the music going as soon as one loads a webpage and once the first tune is finished playing jump to another randomly selected music file (MP3).
    I've search via Google for ideas but couldn't find anything that came close to what I need done.
    Any ideas?
    Regards,
    Ronald

  • Not possible to print a SWF in a PDF document using the Print command in Ad

    Have a PDF with 3 pages, page 1 and 3 contains text and the 2nd page contains a SWF animation made with Xcelsius 2008. When printing the document using the Print function in Adobe the 2nd page is always empty, the SWF is never printed.  To be able to print the 2nd page containing the SWF animation I must use the print function in the Flash player (right click on the SWF animation).
    This problem should, according to Business Objects, be solved with the new version of Adobe Reader 9, but the problem still appear.

    I have seen this.  Adobe 9 cannot print embedded flash objects.  Xcelsius Engage/2008 includes a print button you can include on your dashboards to allow you to print them from your pdf files.

  • Using the IF function with a range of numbers

    I am working with the IF function and trying to get it to work "if" the number I'm examining is within a range of numbers.
    Example:
    If a wigit costs between $1000 and $1999, then a discount of $100 is given
    If a wigit costs between $2000 and $2999, then a discount of $150 is given
    If a wigit costs between $3000 and $3999, then a discount of $225 is given
    And so on.
    If cell A1 always holds the current cost of the wigit being sold.
    cell B1,B2,B3 holds the value of the discount values respectively.
    In cell C1 I would like to return what the current discount value is to be given for the wigit price in cell A1?
    How do I do this using the IF function or is there another way?
    Thanks,
    Ryan

    HI Ryan,
    In this post you have, except for the issue noted by Badunit, the basis for the discount table described by Wayne:
    I'm trying to devise a way of knowing what Cash Card a customer will receive depending on the amount of the purchase, based on the following table:
    $0         to $999 purchase         =      $50 Cash Card
    $1,000 to $1,999 purchase     =     $100 Cash Card
    $2,000 to $2,999 purchase      =     $200 Cash Card
    $3,000 to $3,999 purchase      =      $300 Cash Card
    $4,000 to $4,999 purchase      =      $400 Cash Card
    $5,000 to $5,999 purchase      =     $550 Cash Card
    $6,000 to $6,999 purchase     =      $700 Cash Card
    $7,000 to $7,999 purchase      =     $850 Cash Card
    $8,000 to $8,999 purchase     =      $1,000 Cash Card
    $9,000 to $9,999 purchase     =     $1,200 Cash Card
    $10,000 to   UP   purchase     =     $1,500 Cash Card 
    To take care of the issue noted by Badunit, you need to revise the top line to state the minimum purchase necessary to earn a cash card, then add a line above that to handle purchases under that amount. I've arbitrarily chosen a $500 minimum, which results in these two lines:
    $0             to $499 purchase        =      $0 Cash Card
    $500         to $999 purchase         =      $50 Cash Card
    To write this as Wayne's table, you need to remove all of the text (including the $ currency markers), the top end of each range, and the = sign. What you're left with is two columns of numbers: The bottom number of each range of values, and the number telling the dollar amount of the cash card for that range. Here's your table, edited to make it work with LOOKUP:
    Here is a second table (Main), containing only the labels and the two cells involved in the calculation of the cash card amount. The Purchase amount is the amount used in your example. The Cash Card amount is produced by the LOOKUP formula below the image.
    Purchase price is in cell B1 of the table "Main". The LOOKUP formula is in B2:
    B2: =LOOKUP(B1,CC Amt :: A,CC Amt :: B)
    LOOKUP acts essentially as you request in your post containing the iPad image with the time shown as 1:46. But it takes a much simpler approach.
    Here's the syntax:
    LOOKUP(search-for,search-where,return-from)
    LOOKUP gets the search-for value (2535) from cell B1.
    It looks in column A of the table "CC Amt" for the largest value less than or equal to the search-for value, and finds 2000.
    It returns the value from the same line of column B (200).
    Below are two more examples. Main-2 and Main-3 are copies of the Main table. Both contain exactly the same formula as Main, but have had a different Purchase price amount entered. LOOKUP uses the same CC Amt table as is used above, and returns the appropriate Cash Card value for each of the two new amounts:
    You may, as implied in your 1:46 post, use a pair of cells to calculate the Cash Card amount for each widget in the purchase, then total the Cash Card amounts, or you may use a single pair of cells, one containing the total purchase amount, the other containing the Cash Card amount due for that total. That choice is yours. The formula is the same for either case.
    Regards,
    Barry

  • What replaced the LOAD command in Visual Basic 6?

    VB6 died with XP. I'm trying to re-write a VB6 app in Visual Studio Community. The VB6 project used the LOAD and UNLOAD commands to create and delete copies of text boxes on the form. How do I accomplish that with the latest version of Visual Basic under
    Visual Studio?
    Thanks,
    VBhobbist
    VBHobbyist

    Frank,
    [snip]
    I'm sure it can be done, but how can I learn without coming back to this forum with every little question?
    [snip]
    Hey, I will gladly be here for any questions.
    Public Class Form1
    'the new .NET manual is online now:
    ' - go to https://google.com
    ' - type 'msdn [keyword]' (i.e: 'msdn list')
    ' - the first result is almost what is desired
    ' - if not enough information is given that is what the forumns are for!
    'declaring array for textbox
    ' also note that -1 is the size, this is desirable so that textBoxes is initialized as an empty array so that when properties such as '.length' is used an exception wont be thrown saying the array is nothing
    ' note that some people prefer List(Of T) T means any type -> List is one of the most useful things in .NET and HIGHLY optimized. I did not use it here because it is an entirely new concept
    ' to learn more about list: http://msdn.microsoft.com/en-us/library/6sh2ey19(v=vs.110).aspx
    Private textBoxes(-1) As TextBox
    Private Sub setupTextBoxes()
    'setup the amount of textboxes you want
    ReDim textBoxes(14)
    'initialize an integer and loop thru the length of the array
    For delta As Integer = 0 To textBoxes.Length - 1
    'set current array position to a new object (note that the [TextBox class].New function will be called)
    textBoxes(delta) = New TextBox()
    'setup gui properties, note that as you are coding, the type will show up
    ' also note that when coding:
    ' x = New [type]
    ' it is similar to
    ' x = 0
    ' ^New Integer/String/Double/etc.
    textBoxes(delta).Size = New Size(100, 21)
    textBoxes(delta).Location = New Point(1, delta * 21)
    textBoxes(delta).Visible = True
    'note that all form objects that have a container can hold other form objects
    ' we add to the form
    Me.Controls.Add(textBoxes(delta))
    Next delta
    End Sub
    Private Sub getTextBoxStuff()
    'note that all variables can be initialized uppon declaration
    Dim strAllTextBoxes As String = ""
    'initialize an integer and loop thru the length of the array
    For delta As Integer = 0 To textBoxes.Length - 1
    'note that there are new operators (+=, -=, &=, etc.)
    'also, controlchars is the new way to use certain chars, and messagebox.show is the new msgbox
    strAllTextBoxes &= "TextBox " & delta.ToString & " = '" & textBoxes(delta).Text & "'" & ControlChars.CrLf
    'note: there are way more ways to concatenate strings now, for production you can benchmark each one for different purposes
    Next delta
    MessageBox.Show(strAllTextBoxes, "Form1", MessageBoxButtons.OK, MessageBoxIcon.Information)
    End Sub
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load '< Note that this is how subs are linked to gui elements now with the 'Handles' keyword
    'define a new button
    Dim btnGather As New Button
    'setup gui properties
    btnGather.Size = New Size(100, 21)
    btnGather.Location = New Point(110, 0)
    btnGather.Text = "Click Me"
    'add control to form, note that anywhere else, the button can be gathered again thru Me.Controls()
    Me.Controls.Add(btnGather)
    'add a handler, note that when typeing this, you can see what parameter types the handler needs
    AddHandler btnGather.Click, AddressOf btnGather_Click
    setupTextBoxes()
    End Sub
    Private Sub btnGather_Click(ByVal sender As Object, ByVal e As EventArgs)
    getTextBoxStuff()
    End Sub
    End Class
    Create a new Windows Form project and paste this, press play.
    Enjoy.
    EDIT:
    If you post blocks of code here, I will personally convert it to .NET, although I highly recommend a creating new project when converting from VB6. If you post your entire project and it's not too big I will convert the entire thing (any complex concepts
    will have to have provided comments).
    If your project is not secure or personal you can copy it to your online cloud OneDrive and I can download the whole thing from there - let me know.

  • How can I use the print module to print different size images on one large "canvas"?

    How can I use the print module to print different size images on one large "canvas"? An example would be in Photoshop, go to file>new, and create the size paper I want, and move images of different sizes onto it.
    I was thinking the print module would do this automatically for me.

    You can't, at present. It's been a requested feature, so we'll see if it shows up in a future version, but it's not there at present.

Maybe you are looking for

  • Power view in SharePoint - Required fields not working!!!

    Hi, We have SharePoint 2013 and SQL Server 2014 and SSRS in SharePoint integrated mode. We have a "Microsoft BI Semantic Model for Power View"-data connection in a document library and by clicking it users can create their own Power View reports. We

  • Family sharing & two Apple IDs

    I have two AppleIDs - one for my iCloud (email etc) and a second for all Store purchases. I share the Store AppleID with my kids' iPads so that we can share purchases as per this recommendation ( Using your Apple ID for Apple services ). And that has

  • Connection between 2 fact tables

    Hello guys! Suppose the following situation (it's a simplified one, of course): 1) I have a dimension table d_contract with a list of contracts (and some attributes of a contract like its term and type). The primary key is ID_CONTRACT 2) I have a fac

  • Safari quit unexpectedly / Yosemite

    Dear All, My Safari was working fine then suddenly I could not open it anymore. It always show me this message "Safari quit unexpectedly" on opening. Any clue was is going on ? Any help is very appreciate !!! Happy new years 2015 by the way ! Hopeful

  • How can i get the list of DB02's Table spaces-overview?

    Dear Experts,        Could you help me about how can i get the list of DB02's Table spaces-overview? which function module can do it? Thanks a lot