Posted 16 Sep 2011 Hi, a dumb question convert binary to decimal? B10:2/1 to Decimal Share this post Link to post Share on other sites
Posted 16 Sep 2011 (edited) B10:2/1 is a single bit address. You can move B10:2 ( the whole word/16 bits) to an integer file i.e. N7:0 and it will display the decimal value depending on which bits are true(set). If that is the only bit set in word B10:2 then the decimal value is "2" Edited 16 Sep 2011 by Mickey Share this post Link to post Share on other sites
Posted 16 Sep 2011 Mickey's answer is correct unless you need the actual "state" of bit B10:2/1 converted to a decimal. In that case, If B10:2/1 is OFF, MOV "0" to N7:0. If B10:2/1 is ON, MOV "1" to N7:0. What exactly are you trying to do with the result? Share this post Link to post Share on other sites
Posted 16 Sep 2011 Thank you all, I'm trying to program a RedLion HMI G308 and my tags are at Bit level and on the HMI all the tags are Decimal. I love PanelViews (AB). My alarms as example are B2:1/0;B2:1/1;B2:2, etc. And some analog data N7:0, N7:1, etc. Thanks again Share this post Link to post Share on other sites
Posted 19 Sep 2011 The G3 should support bit addressing. Which version of the software are you using? Share this post Link to post Share on other sites
Posted 20 Sep 2011 You should be using a flag tag, check to see if you are using a basic tag. Share this post Link to post Share on other sites