Hi guys!
Im trying to make a program in STL in UNITY PRO.
I want to move a value each month and store it in a array for 2 years, so i got 2x arrays one for each year, and at new years eve i want to overwrite the old year so i only store 2 years at the same time.
Ive been googling och searching to find a way to make my plc store a value at the start of a new month.
And found this variabel that exsist in schneider's plcs.
SW52, system variabel thats shows month and day. (IN BCD)
Feb 29 = 0229 = 0000 0010 0010 1001
Mar 29 = 0329 = 0000 0011 0010 1001
0629 = 0000 0110 0010 1001
1029 = 0001 0000 0010 1001
1229 = 0001 0010 0010 1001
And from this variabel i hope i can tell the plc when to store the value.
Im new at Unity, done most work in S7 and dont know how to read the BYTE with the month and ignore the day byte in the word.
Hope someone understand what i mean and got a quick answear.
Im trying to make a program in STL in UNITY PRO.
I want to move a value each month and store it in a array for 2 years, so i got 2x arrays one for each year, and at new years eve i want to overwrite the old year so i only store 2 years at the same time.
Ive been googling och searching to find a way to make my plc store a value at the start of a new month.
And found this variabel that exsist in schneider's plcs.
SW52, system variabel thats shows month and day. (IN BCD)
Feb 29 = 0229 = 0000 0010 0010 1001
Mar 29 = 0329 = 0000 0011 0010 1001
0629 = 0000 0110 0010 1001
1029 = 0001 0000 0010 1001
1229 = 0001 0010 0010 1001
And from this variabel i hope i can tell the plc when to store the value.
Im new at Unity, done most work in S7 and dont know how to read the BYTE with the month and ignore the day byte in the word.
Hope someone understand what i mean and got a quick answear.