Hello.
I'm trying to sort some data in my step 7 project. I have 12 data blocks. 1 for each month wich will store some operational data of the plant.
I've tryed to write a script in WinCC flex, so that it would read the curent month ( numerical value from 1 to 12 ) and would move it to the PLC in a integer word.
I defined the script(name of the script is DisplayMonth) as a function. The paramter is set to Month(Tag for the month is a word in one of the data block on the PLC)
I've writen this code:
---------
DisplayMonth = month(now)
---------
Thers a similar script in the help file of Wincc, for converting farenheit to celsius. This that I have writen doesn't work unfortunatley.
Is there any other way to write this script, or is there a possibility to read the actual month from the PLC directly?
Regards
Ales
I'm trying to sort some data in my step 7 project. I have 12 data blocks. 1 for each month wich will store some operational data of the plant.
I've tryed to write a script in WinCC flex, so that it would read the curent month ( numerical value from 1 to 12 ) and would move it to the PLC in a integer word.
I defined the script(name of the script is DisplayMonth) as a function. The paramter is set to Month(Tag for the month is a word in one of the data block on the PLC)
I've writen this code:
---------
DisplayMonth = month(now)
---------
Thers a similar script in the help file of Wincc, for converting farenheit to celsius. This that I have writen doesn't work unfortunatley.
Is there any other way to write this script, or is there a possibility to read the actual month from the PLC directly?
Regards
Ales