I'm using S7-317 cpu's SFC1 function, and having some questions about that area..
I need to set bit at 9.00 and reset bit 18.30.
For that, I have converted time from SFC1 (db1.dbw3 hh:mm) BCD->INT .
Also I have converted set-time and reset time BCD->INT.
Now I should be able to compare time.
But I have small problem:
When I convert BCD to INT, time 18.30 is same as 8.30.
time 18.30 = hex:1830, INT:830
time 08.30 = hex:0830, INT:830
So, my comparison does not work that way.
Any ideas what is wrong?
P.S. Any ideas why my Date and Time will not give a day of week at byte 8? It is changing rapidly between 25 and 66.
I need to set bit at 9.00 and reset bit 18.30.
For that, I have converted time from SFC1 (db1.dbw3 hh:mm) BCD->INT .
Also I have converted set-time and reset time BCD->INT.
Now I should be able to compare time.
But I have small problem:
When I convert BCD to INT, time 18.30 is same as 8.30.
time 18.30 = hex:1830, INT:830
time 08.30 = hex:0830, INT:830
So, my comparison does not work that way.
Any ideas what is wrong?
P.S. Any ideas why my Date and Time will not give a day of week at byte 8? It is changing rapidly between 25 and 66.
Last edited: