# V700 , Float to Integer , Integer to Float

## Recommended Posts

Hi , it's my first post,  sorry if i didn't post at the good place.

I'm working on Visilogics , V700 PLC , and i want to communicate with a VAR to pick up Real Value , i recieve 2 Words of 16 Bits , the first for MSW and second for LSW. this is my parameter's value.

I need to interpret this value , but the function in Visilogics to convert Integer to Real are for FIXED point , not FLOATTING point , it means it doesn't work in my case , so i came here to ask you guys if there is something i can do , to avoid having to dissect my both words into mantisse and exosant , and use a formula.

And if there is no function to do it , can you explain to me how to make it simple with this example:  110,1 parameters give me  17 116 for MSW and 13 107 LSW.

This is my first automatician job (that will make me validate my graduate) and i'm still learning , this is the first time i encounter that case , where i have to do it manually so i really need your help please.

##### Share on other sites

14 hours ago, Gaylord Williams said:

Hi , it's my first post,  sorry if i didn't post at the good place.

I'm working on Visilogics , V700 PLC , and i want to communicate with a VAR to pick up Real Value , i recieve 2 Words of 16 Bits , the first for MSW and second for LSW. this is my parameter's value.

I need to interpret this value , but the function in Visilogics to convert Integer to Real are for FIXED point , not FLOATTING point , it means it doesn't work in my case , so i came here to ask you guys if there is something i can do , to avoid having to dissect my both words into mantisse and exosant , and use a formula.

And if there is no function to do it , can you explain to me how to make it simple with this example:  110,1 parameters give me  17 116 for MSW and 13 107 LSW.

This is my first automatician job (that will make me validate my graduate) and i'm still learning , this is the first time i encounter that case , where i have to do it manually so i really need your help please.

I answered something like that a couple weegs ago.

If I understood correctly you have 1 32 bit  float stored in 2 16 bit MI, you can use the structure function to "Copy" those 2MI on a 1MF. Being the standar Float type AND assuming byte order is the same it will work, if byte order is different you can use swap bytes before structure

##### Share on other sites

yes that's ,  it thank you Fernando

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×