dbh6
Lifetime Supporting Member
PLC SLC5/04
i am doing some limit comparisons based on ranges coming from an analog input card. Thing is the analog input card will have a raw count value from 0-32767, and im scaling that to 0-10.
My limit comparasions however are decimal values like limit ranges between 5.5 & 10, 4.5 and 1.2 etc.
So what i did was use a MOV instruction to move the raw I register into a Float register ex. F8:0, then use that F8:0 to do my comparisons.
Would this be the correct way to convert signed integers to floating points basically decimals???
i am doing some limit comparisons based on ranges coming from an analog input card. Thing is the analog input card will have a raw count value from 0-32767, and im scaling that to 0-10.
My limit comparasions however are decimal values like limit ranges between 5.5 & 10, 4.5 and 1.2 etc.
So what i did was use a MOV instruction to move the raw I register into a Float register ex. F8:0, then use that F8:0 to do my comparisons.
Would this be the correct way to convert signed integers to floating points basically decimals???