Binary String convertion.

I've question on binary string convert to array of text/number.
I'm tried to use GPIB read to retrieve a trace of Maxhold data (n number
of frequency) from ESMI Spectrum Analyzer. however, those data always
come out to binary string. So is there anyway i can convert Binary
string --> ascii (in my case, array of number/text), or to retrieve
readable data from the Spectrum Analyzer.
Very appreciate for help.
Jacky Wong

I've question on binary string convert to array of text/number.
I'm tried to use GPIB read to retrieve a trace of Maxhold data (n number
of frequency) from ESMI Spectrum Analyzer. however, those data always
come out to binary string. So is there anyway i can convert Binary
string --> ascii (in my case, array of number/text), or to retrieve
readable data from the Spectrum Analyzer.
Very appreciate for help.
Jacky Wong

Similar Messages

  • How can I convert a U32 array into binary string?

    Hi
    I would like to find an efficient way to convert an array of 8192 U32 into a single binary string!!!
    the solution below  last 550 ms on an RT target to convert 8192 U32.
    The same code running on Labview (not RT) last 100ms. I don't understand why there is such a difference.
    I've tryed to replace the inner loop and convert by a format string whith U32 on entry and %032b as parameter but it lasted same time.
    Thanks a lot

    Your picture of your code didn't come through. You can't link to a picture that's on your computer, as a server on the internet cannot access your computer to display the picture for others to see. You have to upload the picture as an attachment. Then, if you want to actually display the picture in the message you have to edit your post, insert a picture, and when it asks for the URL you enter the URL of the picture. You can get the URL when viewing the message, as the link is within the message itself.
    As for your question, can you just use the TypeCast function?

  • Converting a Hexadecimal String to a Binary String

    Hello NG,
    I would like to convert an 8 Bit Hexadecimal String (example C0034000)
    to it´s equivalent in binary (in this case---> 1100 0000 0000 0011...
    and so on), I didn´t find any possible way to do this. I´am not
    talking about the simple representation on the front pannel. Some
    Postings say that this ist possible with the "Format Value" Function
    adding an "%b" to the entring, but in my case it does not function.
    Could someone help me, thanks in advance!

    > I would like to convert an 8 Bit Hexadecimal String (example C0034000)
    > to it´s equivalent in binary (in this case---> 1100 0000 0000 0011...
    > and so on), I didn´t find any possible way to do this. I´am not
    > talking about the simple representation on the front pannel. Some
    > Postings say that this ist possible with the "Format Value" Function
    > adding an "%b" to the entring, but in my case it does not function.
    The task here is to convert a string to a different string. The easiest
    way to do this is to convert the string to a numer, then format the
    number as a binary string.
    On the string palette the Scan from String using %x can be used to
    change a hex string into a numeric integer. The Format to String with
    %b and other nodes can take a numeric i
    nteger and return a string of
    binary characters. These two nodes wired together with the correct
    constants should do what you want.
    Greg McKaskle

  • Converting a binary string to a number...

    Hi guys,
    I'm trying to convert a binary string into a decimal integer. I'm not sure if LabVIEW has a VI that does that. I haven't found one yet. Basically, say I have the string '0101'. I want to convert that to the value '5'. Or say I'm using hex, I want '10101111' to be converted to 'AF'. So that's my dilemma. I'm hoping I'm not going to have to make my own VI. Thanks a lot!
    -Mike

    LabVIEW has exactly what you want even if it can be hard to find it.
    To convert a binary text string like "0101" to a decimal value can easily be done using the Scan Value function found under the String/Number conversion section. If you provide the format %b to it (not mentioned in the manual) you will get the decimal value of your binary string.
    Also, on your front panel you can change the format of your numerical indicators by right clicking on it and selecting Format & Precision. If you have a numerical indicator you can set it do display the numbers in e.g. hexadecimal form.
    However, if you want to convert a number to a hexadecimal text string you can use the Number to Hexadecimal String function also found under the String/Number conversion section.
    I
    attached a simple example, Conversions.vi, that shows how it works. I hope this helps. /Mikael
    Attachments:
    conversions.vi ‏14 KB

  • Converting a binary string into a JPEG image in Crystal Reports 2008

    Hi Gang
    Iu2019m having problems converting a binary string into an image in Crystal Reports 2008
    I have JPEG images stored in ECC.  ECC stores the data in binary format.
    Iu2019m using the ECC function module SKWF_PHIO_CONTENT_ACCESS_GET to retrieve the data.  This function module has an export table, FILE_CONTENT_BINARY, which returns several lines of data.  Each line contains a maximum of 1,024 characters.
    When I drop the T_ FILE_CONTENT_BINARY.LINE field into my Crystal Report detail section, I wind up with a report that displays all the lines in FILE_CONTENT_BINARY table.  (in my case, 19 lines are displayed.)
    I created a formula to collect all the data into a single string.
    whileprintingrecords;
    stringvar data:= data & {SKWF_PHIO_CONTENT_ACCESS_GET.T_FILE_CONTENT_BINARY.LINE}
    I added the formula to the detail section and itu2019s doing a great job collecting the data.
    I then inserted a picture object in the report footer, opened the format editor, navigated to the u201Cpictureu201D tab, and inserted a formula for the u201Cgraphics locationu201D.
    whileprintingrecords;
    stringvar data:=data;
    data
    My clever idea turned out to be a disappointment . . . . my picture object is blank.
    Does anyone have a solution for converting a binary string into a JPEG image?

    Save the JPEG in a format CR supports. Refer to the help file for the file types.

  • How to convert binary string to ascii

    Hi,
    See i have a string like this,
    String str = "10011100110001011001110011000101";
    Now i want to find exact ascii value of the binary string.
    Thanks in advance.

    First want to convert these bits to corresponding
    characters and then have to find ascii of the same.... corresponding to what? I think converting these "bits" to the corresponding chars is the whole story. But what about the original format?
    Guessing mode on ... does this help?
    String input = "...";
    StringBuffer result = new StringBuffer();
    for (int i = 0;i < input.length();i += 8) {
      result.append((char) Integer.parseInt(input.substring(i, i + 8), 2));
    System.out.println(result);

  • Convert signal to binary string

    Hi all : I get waveform signal (square signal) from scope .. and  I want to convert this signal  to binary string …   Can I do that in labview 8.5
    thanks

    elyan a écrit:
    Hi all : I get waveform signal (square signal) from scope .. and  I want to convert this signal  to binary string …  
    Hello,
    Is that what you want to do ?
    http://img514.imageshack.us/my.php?image=scopetost​ringls7.jpg
    sage Edité par tinnitus le 12-31-2008 05:35 AM
    Message Edité par tinnitus le 12-31-2008 05:36 AM
    CLAD / Labview 2011, Win Xp
    Mission d'une semaine- à plusieurs mois laissez moi un MP...
    RP et Midi-pyrénées .Km+++ si possibilité de télétravail
    Kudos always accepted / Les petits clicks jaunes sont toujours appréciés
    Don't forget to valid a good answer / pensez à valider une réponse correcte

  • Decoding binary strings from 10 bit A/D converter

    Hi all,
    I'm working on a project for school that requires me to take data from an A/D converter ( the A/D is on a Motorola HCS12 microcontroller) and send it to a PC running LABVIEW to decode the binary string into a numerical value.  The value will be plugged into an equation.  I planned on using the serial port on the PC for the comm port.  Are there any examples available or any advice to get me started in the right direction. 
    While I have programmed with LABVIEW in the past (academically) I am not proficient.  And this type of interfacing I have not done before, only GPIB.
    The A/D is 10 bit.  How quick LABVIEW decodes the binary string and returns a value is not important. 
    If any more info. is needed let me know.    

    Be confident. That should not be a big problem, since you'll get the help of the LV community
    The most difficult part will be to establish the communication with your micro-controler. But if you can do that with Windows hyperterminal, then you are nearly done ! There are examples of serial com in the examples shipped with LV.
    The string to decimal conversion will not be a problem, whatever the string format : the conversion is done using functions also shipped with LV.
    Hope to see you soon with more specific questions.
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • Conversion of Decimal to Binary String

    Hello Labview People:
    I'm rather new to Labview, so this may be a simple-minded question . . .
    I would like to take a numeric control and have the decimal input
    converted to a binary string of 8 bits. So, for example, if I were to
    put in the number '127', I would get out (on an indicator) the string:
    01111111
    The number '128' would show on the indicator as:
    10000000
    It seems to me that this should be simple, but somehow I cannot figure
    out how to do it. Must an array be built bit by bit to accomplish this?
    (I'm afraid I don't yet know how to build arrays.)
    Thanks in advance for any help you provide!
    Sent via Deja.com http://www.deja.com/
    Before you buy.

    Or, you can go under the numeric function, and look for conversions, get
    decimal to byte array conversion.
    Then what you need to do is to get an array selection vi, and index to zero.
    I don't remember the exact name of the VI's because I don't have LabView
    here with me.
    Perhaps this complicates things
    Steven
    "Timo Miettunen" wrote in message
    news:[email protected]..
    > use format into string VI from string palette
    >
    > format string should be "%08b" for 8 bits, "%016b" for 16 bits etc.
    >
    > timo
    >
    > Ananda Dave wrote:
    > >
    > > Hello Labview People:
    > >
    > > I'm rather new to Labview, so this may be a simple-minded question . . .
    > >
    > > I would like to take a numeric control and have the decimal input
    > >
    converted to a binary string of 8 bits. So, for example, if I were to
    > > put in the number '127', I would get out (on an indicator) the string:
    > >
    > > 01111111
    > >
    > > The number '128' would show on the indicator as:
    > >
    > > 10000000
    > >
    > > It seems to me that this should be simple, but somehow I cannot figure
    > > out how to do it. Must an array be built bit by bit to accomplish this?
    > > (I'm afraid I don't yet know how to build arrays.)
    > >
    > > Thanks in advance for any help you provide!
    > >
    > > Sent via Deja.com http://www.deja.com/
    > > Before you buy.
    >
    > --
    > -------------------------------------------------
    > Timo Miettunen
    >
    > Fincitec Oy Production Department
    > e-mail: [email protected]
    > Address:
    > Lumikontie 2 Tel: +358-16-2151245
    > PO BOX 11 Fax: +358-16-221561
    > FIN-94600 KEMI Finland
    > -------------------------------------------------

  • Mail Excel as attachment with input as binary string

    Hi Experts ,
    I want to design BAPI which will have one string as import parameter.
    I will get binary data in this string.
    Now i want to mail this binary data string as excel attachment.
    Anyody knows how to convert this binary string to internal table and then send this as attachment?
    Thanks & Regards ,
    JIgar.

    check these sample programs
    BCS_EXAMPLE*

  • Addition/Substraction of Binary. Converting Binary to Integer

    Hi,
    I wanted to know how you can add or substract from a binary
    value. Lets say xyz is binary now..... I want to convert 123 to
    binary form and add or substract with xyz. Is this possible?
    Finally I should be able to convert this new xyz i.e. after
    addition or substraction to a number... please let me know what
    should be done....
    I have already looked @ ToString, tobase64,CharsetEncode,
    BinaryEncode and dont think I would be able to use them before I
    know that add/subs thing..
    Thanks in advance...

    Do you know anything about powers of 2?
    first time through you get right most and multiply by 2^0
    recurse using the binary string - right most char and an iteration value...
    Here is a partial start for you:
    public int binaryStringToInt(String bs, int i){
      //bs is binary string you with to convert
      //i is your itration variable
      int intValue = 0;
      if(bs.length=1){
        //your code here
      }else{
        binaryString(......);
      return intValue;
    }

  • Binary String to numerical binary array

    Hello,
    I initially created binary strings from numerical numbers using the
    "%03b" command on the 'Format into String' block. I then concatenated
    the various strings into one string that is now composed of 16bits.
    However, I need to convert this string that I created back to a binary
    numerical array for further processing.
    Can you help me with this?
    Thanks,
    Rajesh.

    triniboy wrote:
    I initially created binary strings from numerical numbers using the
    "%03b" command on the 'Format into String' block. I then concatenated
    the various strings into one string that is now composed of 16bits.
    In general, you are out of luck, because the number of characters for each value when formatted to binary with "%03b", will be variable. Any number greater than 7 will use more than 3 digits. (since you use "03" instead of 3", smaller numbers will have three digits with possible leading zeroes for padding).
    After you concatenated all the formatted strings, you loose all boundary information unless ALL numbers are less than 8, but in this case they result would be a multiple of 3 and would not add up to 16 bits, right?
    My best suggestion would be to NOT create a binary formatted string in this way, because it is a one-way operation and cannot be undone because you loose information in the process.
    Back to square one!
    Maybe we can backup a few steps and you can explain to us what you really want to do with your original numbers. Why would you even consider formatting them this way? Do you need to save them to a file for later retrieval, for example?
    LabVIEW Champion . Do more with less code and in less time .

  • Conversion of binary string into headecimal

    Ho will i convert binary string into hexadecimal fromat

    HI,
    Thanks but the above module is not present my system.
    I have number which needs to be converted into binary first and then into Hex.
    I have written it code for conversion of decimal number into Binary.But i am not able to convert it into Hex.
    My rough code is ....
    types : begin of t_temp,
            r1 type i,
            end of t_temp.
    data : ty_temp type standard table of t_temp ,
           wa_temp type t_temp.
    DATA : num TYPE i,
           temp1 TYPE string,
           temp2 TYPE string,
           temp3 TYPE string,
           temp4 TYPE x.
    temp1 = 0.
    temp2 = ''.
    num = 64.
    while num ne 1.
      temp1 = num MOD 2.
      num = num / 2.
      If temp1 = 1.
        num = num - 1.
      endif.
      concatenate temp1 temp2 into temp2 .
    endwhile.
      temp1 = 1.
      concatenate temp1 temp2 into temp2 .
      condense temp2 no-gaps .
      WRITE : temp2 .

  • Evaluating binary strings with "Don't care" conditions

    I frequently have to evaluate binary strings or register values for particular bits. Does anyone have a better way? And if not, perhaps this is a suggestion for NI.
    To this point I've used two methods:
    1. I turn the data into an actual string in my CVI code and inject X's in the necessary positions. I then perform a string evaluation for equivalence, the string now consisting of '1's '0's and 'x's.
    2. Bring the data into the teststep and applying an expression to the data source, masking the appropriate bits. Then evaluate as a numeric with a value that assumes the offended bits "zeroness" or "oneness" depending on how I've implemented.
    The first was one requires specialized code, but allows for a little more visibility (in the code at least) of which bits are designated as DCs. But translating a multiple byte and variable length of amount of information into a string is cumbersome. Sure the code is reusable, but I'm not convinced the translation is necessary or best.
    The second buries the mask in a window that is, seemingly, infrequently used. I've had colleagues work on a project behind me trying to figure out where the value was being manipulated because I've applied a mask via the source. My original explanation of "ninjas" wasn't well taken...
    It seems like it would be ideal for the limits window to allow the use of "X"s when defining a "binary" type comparison so that the mask is clearly defined in the limit itself, and the data as it's passed to and from teststand remains untouched. Also, if this were to be implemented I would hope the property loader would support it.
    Am I missing a much easier way to do this? Anyone have a better way?
    Thanks in advance!
    Colt.
    P.S. Why isn't "NI" and "CVI" built into the spell checker?

    So in that first case where I am using CVI to "insert" I am building a string type vector that contains ASCII '1's '0's and 'x's. Where the Xs are in the binary position for what I am considering as "don't care".
    So say for instance I was converting a piece of data that was 0xEB, with bit 0 being considered a DC for evaluation, I would build a string like "1110 101X" . This string is what I would pass back to teststand. In teststand I would then perform an equivalence test between the two strings.
    For the second question about an implementation for the limit, say I open the test step, click on "Edit Limits" then from the drop down in the bottom right I select "Binary". I could then compose a limit in a similar form as described above. Where the limit box could contain something like "0b1110101X". But as for the data I hand to teststand, it would still be just a scalar value, with no masks applied. In the code, or in teststand.
    Sorry if I'm not making any sense! I hardly ever do...
    Colt.

  • Scan arrays from binary string

    I have TCP connection that is sending a great number of fixed size arrays that I need to convert. Is there a simpler way to do that than the one I have attached?
    Attachments:
    Scan from binary string.vi ‏16 KB

    Sorry, I didn't write my question clear enough.
    I know how to do TCP data transfer. I also know how to unflatten the binary string back to data, but I was hoping there was a clearer way to do it than the way I suggested. For scalar values one can make a cluster containing the data in the binary string and only one "unflatten from string" is needed.
    However, if the binary string is composed of arrays (even though they are fixed in size) I need one unflatten string for each array. In my case I have many small arrays. The attached example with only three arrays was only to illustrate what I wanted to do.
    I have now found a way using a cluster of clusters. I don't know if this is the ideal way of doing this, but it works, and when enabling "view cluster as icon" I can make the code much more compact and easier to read
    Attachments:
    2012-07-04_120216.jpg ‏385 KB

Maybe you are looking for

  • Flex and BlazeDS Compile for Deployement

    Hi, I've been following the Flex + BlazeDS tutorial on the Message Service from adobe to start learning working with blazeds. Everything worked out great on the local server of course but I got stuck when it came to moving the files to a remote serve

  • Mov file in Keynote doesn't work in 4.0

    I've been a presenting a Keynote file that includes many imbedded animations (mov or mpeg files) I did not create. I just upgraded to Keynote 4, and now one of the slides has stopped working. This shows Lake Chad slowly drying up (from Gore's present

  • Create A Customer

    Hi, I want to create a customer from a powerbuilder program. And I want to know which BAPI should I call? I need to create with assigned customer ID and all required fields for a customer from scrap. Thanks, Vicki

  • How to import a .png as an asset file?

    Hi, I'm new to Fireworks and would appreciate some help from here. I have a .png file which collects useful icons that I may reuse, and I wonder how I can import it as an asset (or something else) that I can just drag any icon element in the .png to

  • Difference between 4.6 and 4.7 vesion in MM point of view

    Hai, can any body tell me the difference between 4.6 and 4.7 version. Please treat it as Urgent