Quantcast
Channel: Siemens Latest Topics
Viewing all articles
Browse latest Browse all 698

Packing two USint into an INT

$
0
0

I am currently using TIA Portal V14 and S7-1217 Plc and I am stuck as all I get from my remote IO is USint and then I need it to pack it to the INT or DINT respectively. Is there any function where I can pack my low and high byte into an INT and be done with it.

I know one of the more unconventional way is to multiply high byte by 256 and add low byte to it but what happen when i need to convert to DINT i have to multiply and add some weird number.

Can somebody save me from myself??


Viewing all articles
Browse latest Browse all 698

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>