I'm using Omron CX-Programmer for this function.
I have a number being generated using the seconds variable on the PLC RTC and adds this to the previous number generated. This is then multiplied by a factor that I can't remember as it was wrote in 2004. This number changes every PLC scan which is approx every 2ms.
1/ The code is using the date in ddmm format and XOR's with a known 4 digit number (number A as we shall call it).
2/ The result of step 1 is then XOR'ed with another known 4 digit number (number B).
3/ Number B is is then XOR'ed with another known 4 digit number (number C).
4/ The result of step 3 is then XOR'ed with the result of step 2.
5/ the result of step 4 is then OR'ed with the scrolling number from the RTC
This is done with values held in the data memory area of the PLC.
There is more to it than this but what I am trying to get my head round is what the result of 2 values would be.
So the function is converting the values to binary for the calculation to take place?
It's been a while since I worked with binary!!