mike shaw

De-Normalize the binary Data

4 posts in this topic

Hey Guys,

I am kind of new to Omron PLC. Can someone please share details on how can we de-normalize the data in Sysmac Studio? 

  1. Denormalize: 1.10112 × 2-3 = 0.0011011.
  2. Convert:
    Exponents 20   2-1   2-2   2-3   2-4   2-5   2-6   2-7
    Place Values 1   0.5   0.25   0.125   0.0625   0.03125   0.015625   0.0078125
    Bits 0 . 0   0   1   1   0   1   1
    Value             0.125 + 0.0625     + 0.015625 + 0.0078125 = 0.2109375
  3. Sign: negative

Result: be580000 is -0.2109375.

I want to perform kind this operation in Sysmac studio. Any help would be appreciated.

Thanks

 

Share this post


Link to post
Share on other sites

I am not clear on what you are trying to do here..... is this some kind of custom number format that you are trying to use?  I think what you would need to do with a custom format like this is to create a union.  The union will allow you to look at individual bits as well as a WORD or DWORD value.

Share this post


Link to post
Share on other sites

i guess he is looking at interpreting 32-bit INT as a 32-bit REAL... 

in this case 0xBE580000 is actually -0.2109375

Share this post


Link to post
Share on other sites

As Michael has suggested, a Union would be the easiest method to view it in different Data Types.

Where is the data coming from? Maybe we can help you simplify the process. If it is part of a group of data (EtherNet/IP for example) then a Structure may be helpful.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now