Is it possible to separate U32 value into four U8 values?

Hello all...
              I'm working on a project where I need to use electronic load and set it on different values..To communicate with electronic load I need to give commands in HEX format... The format I have to use is an array of U8 with 26 byte... Each byte is dedicated for some purpose... Like
1st byte - start bit
2nd byte - address
3rd byte - command
4th byte - the lowest byte of voltage value
5th byte - the lower byte of voltage value
6th byte - the higher byte of voltage value
7th byte - the highest byte of voltage value
and the manual says
"represent voltage by 4 bytes of HEX. Lower byte are in the front location, higher bytes are in the latter location. For example : voltage is 16.000V, HEX code is 0X00003E80, 4th byte 0X80, 5th byte is 0X3E, 6th byte is 0X00, 7th byte is 0X00."
in program I'm taking input voltage from user which in decimal format like 16V... Now rest work should done by software i.e. converting into HEX n separating it into 4 bytes... Enter into array...
my problem is I'm not able to separate it from U32 to U8. Can anyone please help me...?
thank you.
Solved!
Go to Solution.

Rupali wrote:
"represent voltage by 4 bytes of HEX. Lower byte are in the front location, higher bytes are in the latter location. For example : voltage is 16.000V, HEX code is 0X00003E80, 4th byte 0X80, 5th byte is 0X3E, 6th byte is 0X00, 7th byte is 0X00."
I don't know how you get from 16V to x00003E80, so most likely the manual would provide more information on the details.
If the voltage is actually 4byte SGL (16 (SGL) is however x41800000), you would simply make one small modification as shown here.
In any case, this should get you enough ideas to get started. Good luck!
Message Edited by altenbach on 07-20-2009 05:59 AM
LabVIEW Champion . Do more with less code and in less time .
Attachments:
FlattenData2.png ‏25 KB

Similar Messages

  • Is there possibility to add dimension value into hierarchy using dml or spl

    1 Is there possibility to add dimension value into hierarchy using dml or spl?
    If such possibility exists how to do that.
    2 Is it possible to sort dimension values inside one branch of the hierarchy?

    What version of OLAP are you using and how did you create your AW (e.g., AWM)?
    Assuming that you're used either AWM or the Java API for AWs in 10g, there isn't an OLAP DML for adding a dimension member to a dimension (and have all the meta data kept in sync); you must load dimension members using AWM the Java API for AWs.
    So, make your changes in the the dimension table and process that table.
    For sorting, you can add a sort attribute to the dimension. Add the sort attribute to the model, indicate that it's used for sorting, add the sort attribute to your dimension table and maintain the dimension.

  • Parameter validation failed. It is not possible to provide valid values for all parameters

    I'm trying to test passing in parameter values from the URL.    I have RS 2008 .   I created an ultrasimple report based on a stored procedure output.  There is no validation, No available values, No default values.  
    I'm trying to run the report like this:
    /Reports/Pages/Report.aspx?ItemPath=%2fProduction%2fDBA+Reports%2fTest&iTest=1
    I get:
    Parameter validation failed. It is not possible to provide valid values for all parameters. (rsParameterError)
    the one int parameter is iTestId 
    The RS log file says the following:
    processing!ReportServer_0-54!9138!01/25/2013-09:22:51:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Parameter validation failed. It is not possible to provide valid values for all parameters., ;
      Info: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Parameter validation failed. It is not possible to provide valid values for all parameters.
    What am I missing?

    Hi F-ram,
    From your description, you want to pass multiple parameters via URL, right? To pass multiple parameters through URL, we can use an ampersand (&) to separate them. For example, I have a report with two parameters p1 and p2. The report is deployed in a
    folder on the Report Server. When I navigate to the report on the Report Server, I can see the report URL is http://localhost/ReportServer_SQL2008NEW/Pages/ReportViewer.aspx?%2fFolder%2fReport&rs:Command=Render.
    If I need to pass parameters through URL, I can just add &p1=value1&p2=value2 at the end of the URL and the entire URL would be http://localhost/ReportServer_SQL2008NEW/Pages/ReportViewer.aspx?%2fFolder%2fReport&rs:Command=Render&p1=value1&p2=value2
    If you have any questions, please feel free to ask.
    Regards,
    Charlie Liao
    Charlie Liao
    TechNet Community Support

  • Is it possible to use the value of a string to reference a component in the

    I'm fairly new to Java so this may be a stupid question!
    Is it possible to use the value of a string to reference a component in the code? For example in the code below, Wall is a class holding 3 different arrays. The Robot class has an array called finishBricks. When the buildWall method is run it receives the integers width and height which are used to construct the dimensions string. I want to use this string to then load the appropriate Wall array into the finishBricks array.
    I hope this makes sense! Any help would be greatly appreciated!
    class Robot {
    public double[][] finishBricks;
    public void buildWall(int width, int height) {
    Wall w = new Wall();
    String dimensions = "Wall" width "x" +height;
    this.finishBricks = w.xxxx; // where xxxx is replaced by whatever the String dimensions is
    class Wall {
         public double[][] Wall4x2 = {
              {-30.00,-01.60,27.45},
              {-30.00,-06.75,27.45},
              {-30.00,-13.55,27.45},
              {-30.00,-20.35,27.45},
              {-30.00,-22.00,28.65},
              {-30.00,-16.85,28.65},
              {-30.00,-10.05,28.65},
              {-30.00,-03.25,28.65}
         public double[][] Wall3x3 = {
              {-30.00,-01.60,27.45},
              {-30.00,-06.75,27.45},
              {-30.00,-13.55,27.45},
              {-30.00,-15.20,28.65},
              {-30.00,-10.05,28.65},
              {-30.00,-03.25,28.65},
              {-30.00,-01.60,29.85},
              {-30.00,-06.75,29.85},
              {-30.00,-13.55,29.85},
         public double[][] Wall2x4 = {
              {-30.00,-01.60,27.45},
              {-30.00,-06.75,27.45},
              {-30.00,-08.40,28.65},
              {-30.00,-03.25,28.65},
              {-30.00,-01.60,29.85},
              {-30.00,-06.75,29.85},
              {-30.00,-08.40,31.05},
              {-30.00,-03.25,31.05},

    Map walls = new HashMap ();
    walls.put ("2x2", new double[][] {
        new double[] {
            1,
            0
        new double[] {
            0,
            1
    double[][] wall = (double[][]) walls.get ("2x2");

  • Is it possible to set valid values at run time?

    Hi,
    I'am using a BPM Presentation and I want to know if it is possible to set the values of a combo box depending of the value of other field in the same presentation ando if so how to do it? I tried to do somethin like:
    var = fiedlValidValues()
    I tried to use refreshValidValues but it says that cannot execute the action in a presentation, I don´t know wath else to do
    but it doesn´t works, any idea??
    Thanks in advance
    Marig
    Edited by: user646988 on 05-feb-2009 19:30

    Hi, thanks Anup
    I followed your advise but i didn´t success. I have question, if I'm getting the default values of a field with a method using a query. The type field is String and I'm using it into a combo box so the method I'm using returns a String[], is something like this:
    for each row in SELECT column
    FROM DataBase.SYSBPM.TABLE
    where var1 = var2
    do
    clases[] = row.clase
    end
    return clases
    But if I use a method for the onChange property if the field how to set the default values?
    I tried with
    for each row in SELECT column
    FROM DataBase.SYSBPM.TABLE
    where var1 = field1
    do
    clases[] = row.clase
    end
    clases = claseValidValues()
    But this is not working, do you have any ideas??
    Thanks
    Edited by: user646988 on 15-feb-2009 19:36

  • Merging two separate MUSE sites into a single MENU system and Paid & online BC eCommerce site

    Hi all! I am stuck trying to figure out a Process Conundrum:
    1> I have a BC site with e-commerce ready to go - paid - online with store template in place.
    2> I also Have a 2nd MUSE created web site (with the client content/pages) that needs to merge with that E-commerce BC site. 
    What is the move to merge the two separate sites into a single site with the Menus all in proper order?
    Is this simple and I can not see it? (merge the two sites in a folder and reopen in muse for new menus?
    Or do i need Dreamweaver to assist in the merge?
    In other words:
    What is the PATH/PROCESS to merge a 2nd MUSE designed web site (sans e-commerce), in order to tie into the online BC e-commerce template paid site - so the menus update together as "one" site?
    Menu Update Concern:  merging two separate MUSE sites into a single MENU system with the "Paid on line Active BC e-commerce Template". How do it do it Process wise so that the menus adjust automatically... so they are "one" menu.
    Reminds me of an old joke: Q: "What did the Buddhist say to the hot dog vendor at the ball park?"
    A: "Make me one with everything!"
    ONWARD>>>>>
    Possible paths I am about to take attempting to Solve the problem - and scale the learning curve...
    download the BC e-commerce site into Dreamweaver -
    export the 2nd muse site by publishing it to a unique folder.
    combine them by going back into dream weaver and attempting to figure out linking the menus. - perhaps they are automatic there too.
    or load them both up to BC and back down to MUSE to fix the menus?
    I appreciate Any recommendations, hits or humor that you could help on this.
    Cheers!

    Thanks, Liam... I will get it eventually...
    Sadly: I do not have a budget to hire this out...
       -  I have gone through lots of the BC and Muse training exercises. Adobe
       and BC Gurus.
    But... if the only problem is that I need to work though my partner site BC
    interface...
       - that would be fine...
       - so would using dream weaver....
    I will go back and review the BC interface and also dreamweaver
    capabilities.
    without a budget... i need to figure it out... please do point to any
    material or training you might be able to point me to.
    I don't have to use muse, if that is my sticking point. I just need to get
    the project up and BC looks perfect.
    Thanks.

  • How can I separate one column into multiple column?

    How can I separate one column into multiple column?
    This is what I have:
    BUYER_ID ATTRIBUTE_NAME ATTRIBUTE_VALUE
    0001 PHONE_NUMBER 555-555-0001
    0001 EMAIL [email protected]
    0001 CURRENCY USD
    0002 PHONE_NUMBER 555-555-0002
    0002 EMAIL [email protected]
    0002 CURRENCY USD
    0003 PHONE_NUMBER 555-555-0003
    0003 EMAIL [email protected]
    0003 CURRENCY CAD
    This is what I would like to have:
    BUYER_ID PHONE_NUMBER EMAIL CURRENCY
    0001 555-555-0001 [email protected] USD
    0002 555-555-0002 [email protected] USD
    0003 555-555-0003 [email protected] CAD
    Any help would be greatly appreciated.

    This is another solution. Suppose your actual table's name is test(which has the redundant data). create a table like this:
    CREATE TABLE test2 (BUYER_ID number(10),PHONE_NUMBER varchar2(50),EMAIL varchar2(50),CURRENCY varchar2(50));
    then you will type this procedure:
    declare
    phone_number_v varchar2(50);
    EMAIL_v varchar2(50);
    CURRENCY_v varchar2(50);
    cursor my_test is select * from test;
    begin
    for my_test_curs in my_test loop
    select ATTRIBUTE_VALUE INTO phone_number_v from test
    where person_id=my_test_curs.person_id
    and attribute_name ='PHONE_NUMBER';
    select ATTRIBUTE_VALUE INTO EMAIL_v from test
    where person_id=my_test_curs.person_id
    and attribute_name ='EMAIL';
    select ATTRIBUTE_VALUE INTO CURRENCY_v from test
    where person_id=my_test_curs.person_id
    and attribute_name ='CURRENCY';
    INSERT INTO test2
    VALUES (my_test_curs.person_id,phone_number_v,EMAIL_v,CURRENCY_v);
    END LOOP;
    END;
    Then you will create your final table like this:
    create table final_table as select * from test2 where 1=2;
    After that write this code:
    INSERT ALL
    into final_table
    SELECT DISTINCT(BUYER_ID),PHONE_NUMBER,EMAIL,CURRENCY
    FROM TEST2;
    If you have a huge amount of data in your original table this solution may take a long time to do what you need.

  • How to separate internaltable values

    how to separete internal table fields 
    i have a internal table t_table with some fields , I want to separate the values in the internal table by using semicolon and pass to a string type field
    i need something like this
    800;1000;100000456;2009;001;D....................
    HOW TO SEPARATE THE VALUES FROM INTERNALTABLE?
    Moderator message: duplicate post locked.
    Edited by: Thomas Zloch on Aug 19, 2011 4:02 PM

    I have not optimized the code (it's a bit slow).  Is this what you are looking for?
    See attachment in LV8.2
    It does not sort the arrays but splits them in the order as they are found.  The front part of the code is to generate 500 random numbers in two groups 100 to 109 & 300 to 309, to represent the numbers you have shown.
    R
    EDIT:  Question:  When you say "split in real time", are the numbers already into an array or it is prior to being in an array?
    Message Edited by JoeLabView on 09-11-2008 01:47 PM
    Attachments:
    UnsortedSplitArray.vi ‏19 KB

  • Is it possible to load audiobook cds into the audiobook section?

    The music becomes shuffled with the stories. I don't want to have to download audiobooks I've already got on cd from itunes. Is it possible to separate music from books?

    Thanks Diavonex, but that doesn't work (see my question).
    I can easily produces JPGs and load them into Photos, but the site in question can't access them ( it only accepts .doc, .docx, PDF).

  • Where it is possible to change the value separator in Custom Field?

    Hello,
    This is a question around the "Custom Fields" and "Lookup Table"
    I linked a "Custom Field" to a "Lookup Table".
    I select the option "Allow multiple values to be selected from lookup table"
    When I used this "Custom Field" in a view, the selected values are separated by a comma ",".
    Where it is possible to change this value?
    I saw another project server where the character is a semi-column ";" and I would like to test with ";".
    Thank you in advance
    Pascal Jean

    Hi,
    This will be triggered by your regional settings.
    Hope this helps,
    Guillaume Rouyre, MBA, MVP, P-Seller |
    Hello,
    Thank you for the answer.
    Do you mean the "local regional settings"?
    Because, depending on the PWA site I'm connected to I don't have the same values. I'm obviously using the same workstation.
    Regards

  • How can I combine separate pdf documents into one document with several pages

    I have been using Preview to separate pdf pages into separate pdf documents. How might I do the reverse. Preview appears to have combined the documents in the thumbnail, but will not allow saving this. It just saves the highlighted page.

    Open all the documents. Choose View > Contact Sheet. All the pages will be shown as thumbnails, separated by document. Select the pages you want in the final document and drag them into the desired order, in one document space.

  • Is it possible to convert PDF file into HTML

    Dear friends
    Is it possible to convert PDF file into HTML. I have few hundread PDF files i like to convert this files into HTML. I hope it can be done through Java but i don't know how to start this coding. anybody can give me a brief idea to go ahead.

    Why do you want to do this yourself? I quick search on Google showed several utilities to do this, some freeware, some commercial.

  • After download itunes installation began in windowx xp near the end of the installation the message says: it was not possible to write the value to the key Software / Classes / .mpg / OpenWithList / iTunes / .exe. Already reinstalled 3 times and always sa

    After download itunes installation began in windowx xp near the end of the installation the message says: it was not possible to write the value to the key Software / Classes / .mpg / OpenWithList / iTunes / .exe.
    Already reinstalled 3 times and always says the same message.
    thank you

    Only two had virus on windows XP this week and wiped them with Avast. The itunes asked me to install the update, and so I did. but it always gives me that message.

  • I'm currently using Adobe Acrobat X to create PDF portfolios for client deliverables. Within the portfolio, there is a "Files" view which can be seen below. I'm interested in knowing if it's possible to bulk import metadata into either the Description fie

    I'm currently using Adobe Acrobat X to create PDF portfolios for client deliverables. Within the portfolio, there is a "Files" view which can be seen below. I'm interested in knowing if it's possible to bulk import metadata into either the Description field or any user created field via a CSV, spreadsheet, etc. Thanks for any insight which can be given.

    I'm currently using Adobe Acrobat X to create PDF portfolios for client deliverables. Within the portfolio, there is a "Files" view which can be seen below. I'm interested in knowing if it's possible to bulk import metadata into either the Description field or any user created field via a CSV, spreadsheet, etc. Thanks for any insight which can be given.

  • How do I separate a PDF into multiple PDFs using Adobe PDF Pack?

    How do I separate a pdf into multiple pdfs using AdobePack?
    [Title edited to reflect actual product name... Mod]

    I do not find "AdobePack" when I look at the list of forums https://forums.adobe.com/welcome
    What is the exact name of the program you are using... Acrobat, or are you using the online version at Acrobat.com?
    ADDED... found Adobe PDF Pack (read only) so will move this message

Maybe you are looking for