Sign in to follow this  
Followers 0
lui

Decimal

6 posts in this topic

Hi, a dumb question convert binary to decimal? B10:2/1 to Decimal

Share this post


Link to post
Share on other sites
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 by Mickey

Share this post


Link to post
Share on other sites
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
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
The G3 should support bit addressing. Which version of the software are you using?

Share this post


Link to post
Share on other sites
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0