cdelareza Posted July 4, 2009 Share Posted July 4, 2009 Well I'm reading a metering value that is expected to be sometimes negative, I'm using Read Input S16 (4) to do so, and the value I'm reading is ie. -31954 should be: -814 or -31942 should be -826 I've made some calculations and found that if I subtract a constant value of -32768 I get the value I was expecting. So I wrote the event of my channel IF(L1_734_P<0) VAR.MED=(-32768)-L1_734_P ELSE VER.MED=L1_734_P ENDIF I was trying to use a CONVERSION but it does seem that I can't use IF in my FORMULA. Anyways let me know if what I'm doing is ok or I'm doing something wrong in the I/O type of my channel. Thanks Link to comment Share on other sites More sharing options...
This topic is now archived and is closed to further replies.