Reading the current month in Step 7

NoName

Member
Join Date
Sep 2003
Location
Domžale
Posts
273
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
 

Similar Topics

Gentleman, this is not a PLC problem I think but a Drive issue. I am running Controllogix L85 connected to a Leroy Somers\ Unidrive M702 on...
Replies
8
Views
2,409
Could someone point me in the right direction for writing logic for my project at work? I want to monitor the current draw of a dc compressor...
Replies
7
Views
3,387
This worked for a year, then failed. tag = Cmpdng Room Temp 3 wire 100 ohm DIN RTD feeds into 2 wire loop powered transmitter. 4-20mA Current...
Replies
6
Views
5,764
This is my first time dealing with PLC hardware, so forgive me for a possibly simple problem. I'm trying to take a 0-50mV signal from a welder...
Replies
11
Views
21,538
hi there Iam using USS_RPM_D to read the index 1 of parameter 2019 of MM440 through USS protocol and PLC 224XP. This block (USS_RPM_D )is...
Replies
2
Views
3,084
Back
Top Bottom