How to get real value??

Recommended Posts

I'm trying to get the real value of a soft starter. I have 128 parameters and I need to read all of them and put them in an csv file. That is Ok I click on a button and I create a file with the name I want and the value of that channel but that value is not the one I want. For example one of my parameters is country and I get the number 11331 so if I go to excel and I convert it to hex I get 2C43. so 2C in dec is 44 (this is the number I want to read) and 43 is 67. sometimes trying different things I found the way that appears on my csv file the 67 but how can I do to get the number 44??

Thanks in advance

Link to comment
Share on other sites

This is just bitwise math. You can leave it in decimal. Apply this conversion to the channel:

value >> 8

This will right shift the value by 8 (1 byte) leaving you with the high order byte. You could also do:

floor(value / 256)

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.