wouter94

converting word

5 posts in this topic

I have a problem with converting a server word. I'm trying to put the seconds in my program trough %SW50. But this is counting like this:

0000 0111 = 7
0000 1000 = 8
0000 1001 = 9
0001 0000 = 10
0001 0001 = 11

But i forgot how this is called. How do i convert this to:

0000 0111 = 7
0000 1000 = 8
0000 1001 = 9
0000 1010 = 10
0000 1011 = 11

And is this second style integer?

Share this post


Link to post
Share on other sites

What plc and software?

 

 

Edited by cHud

Share this post


Link to post
Share on other sites

Extract from the help file. Your date and time system words are in BCD

BCD_to_Binary.JPG

Edited by cHud
1 person likes this

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