Hello i hope a get some help here. Is´s possible to convert float into integrer in S7?
B Thread Starter Berra Nov 25, 2007 #1 Hello i hope a get some help here. Is´s possible to convert float into integrer in S7?
B Thread Starter Berra Nov 25, 2007 #3 i know but if a use these function i get it in 32 bits, My partner say i whant it in 16 bits
D daveswerld Nov 28, 2007 #5 Real to Integer: DBD/MD (Real) to DBW/MW (Int): A( L Real RND t MD 3400 (you select) an OV save clr a br ) jnb MW3402 t INT Depending on the processor, you may not have MD up to 3400, that is based on what you have. I use this as a basic FC that I call everywhere.
Real to Integer: DBD/MD (Real) to DBW/MW (Int): A( L Real RND t MD 3400 (you select) an OV save clr a br ) jnb MW3402 t INT Depending on the processor, you may not have MD up to 3400, that is based on what you have. I use this as a basic FC that I call everywhere.
M manmeetvirdi Nov 28, 2007 #6 l db1.dbd0//real_value TRUNC//32-bit integer in acc-1 T mw30//acc-1 value to 16 bit memory location