Boolean Array to Hex String - LabVIEW Supplementary Data Conversion Library in version 12 please

Hello,
I would like to use the Boolean Array to Hex String.vi in LabVIEW Supplementary Data Conversion Library at http://zone.ni.com/devzone/cda/epd/p/id/3727
But it is version 4. Can someone give me the library in version 12? Attached herewith.
Attachments:
cnvrsion.zip ‏38 KB

Mass compiled in 8.2.1, which you can open with 2012.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Attachments:
convrzun.llb ‏65 KB

Similar Messages

  • Converting a byte array or hex string  into DES key

    i required to covert a hex represented of DES key into key object for cryptography operation to performed ...
    can you help me to find out how to convert a hex representaion of key int DES key object

    hi friend,
    I think the key size is more than the required size. For DES algorithm, the key size is 64 bit long.But the code u have given has more than 64 bit, because of which this exception has been raised.
    Reduce the key value to 64bit and try. If it doesnt work,try the code given below .I think it might be helpful for u
    import javax.crypto.*;
    import javax.crypto.spec.*;
    public class Cryption
         public byte[] encrypt(byte[] keyData,byte[] clearMessage)
              try
                   SecretKeySpec sks = new SecretKeySpec(keyData,"DES");
                   Cipher c = Cipher.getInstance ("DES");
                   c.init(Cipher.ENCRYPT_MODE,sks);
                   byte[] encryptedMessage = c.doFinal(clearMessage);
                   return encryptedMessage;
              catch(Exception e)
                   e.printStackTrace();
              return null;
         public byte[] decrypt(byte[] keyData,byte[] cipherMessage)
              try
                   SecretKeySpec sks = new SecretKeySpec(keyData,"DES");
                   Cipher c = Cipher.getInstance ("DES");
                   c.init(Cipher.DECRYPT_MODE,sks);
                   byte[] decryptedMessage = c.doFinal(cipherMessage);
                   return decryptedMessage;
              catch(Exception e)
                   e.printStackTrace();
              return null;
         public static void main(String[] args)
              String keyString = "ABCDEF12";
              byte keyValue[] = keyString.getBytes();
              Cryption encryption = new Cryption();
              String Message = "Hello Welcome to world of Cryptography";
              System.out.println("Key Value (represented in HEX form): "+keyString);
              System.out.println("Key Value (represented in byte array form): "+keyValue);
              System.out.println("Original Message : "+Message);
              byte[] encryptedMessage = encryption.encrypt(keyValue,Message.getBytes());
              System.out.println("Encrypted Message : "+new String(encryptedMessage));
              Cryption decryption = new Cryption();
              byte[] decryptedMessage = decryption.decrypt(keyValue,encryptedMessage);
              System.out.println("Decrypted Message : "+new String(decryptedMessage));
    output :
    Key Value (represented in HEX form): ABCDEF12
    Key Value (represented in byte array form): [B@43c749
    Original Message : Hello Welcome to world of Cryptography
    Encrypted Message : "O3�?�M�,����������,�]�3�����R�?>C$
    Decrypted Message : Hello Welcome to world of Cryptography
    whenever u use any algorithm, first findout the key size or range that algorithm supports. It is very important
    regards,
    Deepa Raghuraman

  • Analog data to digital data conversion in labwindows

    Hi
    Is there any library function available in Labwindows for converting Analog data to Digital Data..
    Thank You

    shoukat,
    could you please provide some more information about the background of this question? Is there any link to motion control (this is the Motion Control forum)?
    I don't understand exactly, what you are looking for. All data that you use in a programming environment are digital data - regardless of the data type. Are you looking for a data conversion from floating point to binary (e. g. a boolean array) or are you looking for data acquisition hard- and software?
    Regards,
    Jochen Klier
    National Instruments

  • R/3 Date Conversion problem

    How to convert the R/3 Date to Array.

    If you are receiving a date field from R/3, please use <b>SimpleDateFormat</b>(class) to re-arrange your date in any fashion. Along with the method <b>format</b> you can just have your date in any format :
    DD-MM-YYYY
    MM-DD-YY
    DD-MMMMM-YYYY (Month will be spelled out as text)
    All you need to do is :
    SimpleDateFormat sf = new SimpleDateFormat("DD/MM/YYYY");
    sf.format(myDateField);
    Since R/3 date conversion is usually for this reason, I mentioned the above class.
    Regards,
    Subramanian V.

  • Hex string to hex array

    Hello,
    I have a hex string that contains the address then word:
    0 8E39
    1 60E3
    2  1B
    3  42
    4  100
    5  0
    I am trying to generate two arrays, one with the address in two bytes and the other with the word in four bytes so that I will end up:
    00 8E39
    01 60E3
    02 001B
    03 0042
    04 0100
    05 0000
    Any help will be greatly appreciated!
    Thanks,
    hiNi.
    Solved!
    Go to Solution.
    Attachments:
    hex_word_with_addr.txt ‏1 KB
    string to array.vi ‏13 KB

    You can also directly use "read from spreadsheet file" (but you need to convert to U16 later).
    hiNI wrote:
    I am trying to generate two arrays, one with the address in two bytes and the other with the word in four bytes so that I will end up:
    You said you wanted two arrays, so you still need to slice out the two columns.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    string to arrayMOD.vi ‏17 KB
    stringToArrayMOD.png ‏28 KB

  • Is the data sent to COM Hex string?

    First.I don't know who should change the data to ASCII,me or COM ?
    Second,I want to know if the data sent to COM is only Hex string?

    In Labview, the data sent to the com port is usually a string that is sent to the com port as the hex equivalent. If you want to send hex, use the \ codes for stings while displaying the string in slash codes format. The only thing being sent to the com port is hex.
    The data received on the com port is usually hex that is interpreted into ascii by LabVIEW. Sometimes the sender of the com data formats the information in another way. The programmer will have to convert data (which looks like gibberish in a string) into the proper format.
    Jeremy Braden
    National Instruments

  • How do I return a Boolean array from LabView to TestStand?

    I am trying to return a Boolean array from Labview to TestStand and have TS evaluate the results. I can do this for arrays of integers or reals but booleans do not work. I tried copying the PassFailTest step type and adding an array of Bool but I couldn't get it to evaluate the array. It simply always passed. How can this be done?
    Bob A.

    I have thought about evaluating the Boolean data in TestStand but, as you say, this is a lot of work. What I have been doing is to map the boolean data to integers in LV (very easy) and then use the multiple numeric step type to evaluate the integer array automatically. This feels kludgy and I have tried a couple of times to create a "multiple boolean" step type with little success. I'm surprised TS hasn't anticipated a test returning multiple pass/fail results. I do this all the time for production code.
    What I have tried is to copy MultipleNumericLimitsTest data type to a custom type and add a BooleanArray with a data type Array of Boolean[0..empty]. Then when I specify module, I select Step.BooleanArray as the value. The last step (that I know of) is to select Step.BooleanArray as the data source in the edit limits window. At this point if I run the test, I get the error "expect numeric, found boolean" (or something similar). When I look at the properties of my custom step type, the Substeps has DoMultiNumericMeasEvaluation as the Post-Step. I believe this is the root of my problem but I can't figure out how to change this to "DoMultiBooleanMeasEvaluation" or similar. Any Ideas?

  • Selecting specific data from an array controlled by a boolean array

    Hi!
    I am trying to select specific data from a string array. The string data should be auto indexed to a string array indicator, but I just want specific values to be placed in the new array.
    A boolean array controls when data should be auto indexed to the new string array. Every time a true appears in the for loop, the string data should be placed in the new string array, but I have a problem. I manage to pick the specific data to place in the new array, but i also get empty strings in the array when I am not supposed to write to the array. Instead of empty strings, I want my string data to be "compact". So when bool number 3 in the array is true, I want that string data to be in row 1, and not row 3.
    Can you help me sort this one out?
    Best regards
    Is my avatar the dog from the fraggle rock?
    Attachments:
    testprogram_forum.vi ‏10 KB
    Spørsmål lwforum.jpg ‏74 KB

    Here is a different version that also changes the size of the array for the indicator when the value is changed. You could do as much as you want here.
    Tim
    Johnson Controls
    Holland Michigan
    Attachments:
    testprogram_forum 2.vi ‏12 KB

  • Parsing a string to a boolean array

    I got to pase a string to a boolean array, this code works for me, but I don't like it. Here Is
    public static boolean[] NumeroToBoolArray( int Numero )
    //Here I got the number in Binary Format, then reverse it
    String temp = new StringBuffer(Integer.toBinaryString(Numero)).reverse().toString();
    //Now I create a boolean array of temp.length
    boolean[] data_bool = new boolean[temp.length()];
    for (int pp = 0; pp < data_bool.length ; pp++)
    //And now assign the value to data_bool
    data_bool[pp] = String.valueOf(Character.digit(temp.charAt(pp), 10)).equalsIgnoreCase("1");
    return data_bool;
    Any idea or replacement for this function?
    Thanks

    data_bool[pp] = String.valueOf(Character.digit(temp.charAt(pp),10)).equalsIgnoreCase("1");becomes
    data_bool[pp] = temp.charAt(pp) == '1';

  • Hex string upload as blob data to sql server

    It need to open a file and read the content and upload to sql server(2005) as blob data.
    But it seems give error as the attached screen.
    So I tried to convert the file content string to hex string, but it take quite long time.
    Is there any way to shorten the time or any other ways.
    Any suggestion, thanks.
    Attachments:
    ss.png ‏73 KB

    Try this.

  • How to assign values for boolean array in LabVIEW?

    I want assign values for boolean array.Iam not able to do that.For each boolen i want to assign each value.Plz help me......
    Please Mark the solution as accepted if your problem is solved and donate kudoes
    Solved!
    Go to Solution.

    Hi agar,
    values in an array are "assigned" by building an array (using BuildArray) or by replacing values in an existing array (ReplaceArraySubset)!
    Good starting point could be this...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • I want to communicate a RS485/2-wire device through COM1. I tried Instrument I/O Assistance to write to COM1(hex string with or without end bye:0D0A), something happened on the bus, but is not defirrential signal, and device didn't recognised them.

    I am new to LabView, so please bear with me...
    I tried to communicate with an RS485/2-wire device through COM1.  I used Instrument I/O Assistant (and Advanced/Basic Serial Write and Read examples) to write command (HEX string) to COM1,  
    tried writing HEX strings with and withour end bye (is 0D0A the correct end signal for HEX string?).  Both didn't get device's responce.  Looks like the device didn't recognize the command.
    I monitored the transmitted signals on the bus, they were not differential as supposed to be.....
    What is the possible reason to cause this? Please help...
    The hardware connection is OK, because I am able to communicate with the device through COM1 (with the same command) using different software application.

    How are you sending the hex? Is your string control set for hex display or normal? If it's set for normal, then if you send something like 'AD', then you aer sending the ASCII characters 'A' and 'D' and that's not the same thing. I don't believe the I/O assistant can send hex but you can modify the basic serial write and read to do so. Just right click on the string control and select 'Hex Display'. You can also enter the data in a numeric control (set for dex display) and use a type cast or an array of U8's and use the Byte Array to String function. Hex data usually doesn't use any kind of termination characters such as CR/LF.
    If communication is working with another app, then as you said, the hardware is okay and it's not a problem with differential signaling.

  • ASC file to 2D boolean array

    Hey guys,
    I was wondering if there is a method of uploading an *.ASC or *.DAT file to convert into a 2-D boolean array.
    For example, I would create an .asc or .dat file composed of strings using MATLAB to generate
    1 1 0 1 1 0 1 1
    0 1 0 0 1 0 0 1
    1 0 0 1 0 0 1 0
    and it would convert the string to a 2-D boolean array of
    T T F T T F T T
    F T F F T F F T
    T F F T F F T F
    so that I can ultimately use it to create a modified Digital waveform graph like this:
    The purpose is because I will be using sample rates of 0.1 second intervals that spans to 2-5 minutes.
    So to sum it up:
    1. upload a *.ASC or *.DAT file with a 2-D array strings
    2. convert the file to create a 2-D boolean array for use to create the digital waveform
    Any help will be appreciated. I know it isn't much but I've uploaded the 2-D array to waveform *.VI for testing purposes.
    Solved!
    Go to Solution.
    Attachments:
    boolean_array.vi ‏14 KB

    sdkpark wrote:
    However, when I tried that first, it doesn't know how to separate each column of the *.asc file
    1 0 0 1 0 0
    0 1 1 0 1 1
    turns out just to read the first column
    Please attach your VI instead of a meaningless picture.
    Read from spreadsheet file will read all 2D data if used correctly. The defined delimiter is separating items, and linefeed separating rows. For example if you don't wire the delimiter, it will assume "tab" and only one value will get read per line if it is actually a space character. Try a delimiter of "space".
    LabVIEW Champion . Do more with less code and in less time .

  • Boolean array

    Hello to all,
    Welcome back.
    I would like to ask you a question:
    I would like to concatenate a string array with a boolean array ...
    Is it possible?
    Thank you very much!

    All elements of an array must have the same datatype, so you cannot concatenate them directly.
    (You can e.g. make a cluster of the two arrays). Please explain why you think you need this. What is the use of the resulting data structure you want. I am sure there is a better solution.
    LabVIEW Champion . Do more with less code and in less time .

  • 1d cluster array replace value in a 1d boolean array (without using Loop)

    Hi ,
    is there a way to replace the values (string , boolean) ​​of a 1D array Cluster with value of 1D boolean array without using loop ?
    Regards
    Simone
    Attachments:
    111.png ‏75 KB

    Replace Array Subset requires that the array elements are type compatible with the elements that you want to replace. That seems not the case in your example.
    And the For Loop is anything but slow. How many billion elements do you expect your array to have to worry about performance of the for loop? With the type definition of your example even a ready made LabVIEW function would have to do internally a for loop too, since the boolean data inside the original array can not be in a continous memory area.
    Maybe if you show us what you try to do with the for loop we can understand better what your concerns are. As it is from the front panel image alone it is really hard to understand what your imagined problem might be.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

Maybe you are looking for

  • How can I create an EntityStore for a Database?  Advice on DB strategy?

    Hello All, How can I create an com.sleepycat.persist.EntityStore for a com.sleepycat.db.Database? Advice on DB strategy? I'm looking to create an application prototype that creates a database dynamically and can delete it programatically. Is openData

  • Why is a monitor more expensive than a hd lcd tv

    why is a 30 inch hd lcd monitor £1900 when you can buy a 32 inch panasonic or a sony high definition lcd tv with digitl buit in, hdmi sockets and use it for every thing for £1400? can some 1 explain this to me, you can even get samsungs for £1050 whi

  • Error when importing files

    hello, I've just installed oracle XE and now I've tryed to import a css file to my application. but when I click on upload, a page appears "page can not be found". (http://127.0.0.1:8080/htmldb/wwv_flow.accept) when I hit the reload button of my brow

  • Unknown Error - When trying to Upgrade to OS X Mavericks

    I have a MacBook Air: 1.8 Ghz, 4 GB 1600 MHz DDR3. Running OS X 10.8.5 (Mountain Lion) In the App Store, I see the free Upgrade available for OS X Mavericks. I click on the free upgrade button to the right of the upgrade notification and then it asks

  • Can't get Logic to start in new OS

    I haven't used my Logic Studio since I upgraded to Lion OS and now I can't get it to work. If I look for updates using Apple's website it can't find my serial number... Any ideas? Also when I run the ap it states "You can't use this version of the ap