Schneider Electric Exchange Community

Discuss and solve problems in energy management and automation. Join conversations and share insights on products and solutions. Co-innovate and collaborate with a global network of peers.

Register Now
Learn about the Community. Join our Core Community to Get Started
Knowledge Base
cancel
Showing results for 
Search instead for 
Did you mean: 

Defining the first Day of Week in Script or Function Block programming

Issue

When numerically evaluating in a program, what day = 1?

Is Sunday or Monday the first day of the week?

Environment

SmartStruxure site which may or may not have Function Block or Script Programming

Cause

What is the first day of the week in SmartStruxure, this may be required when using ">" or "<" logic in the program.

Resolution

One would expect that the first day of the week would be determined by the regional settings. Within SmartStruxure however, Script programs handle this differently from Function Block programs. 

The origins of Menta (Europe) use Function Block programs use Monday as the first day of the week and therefore assign a value of 1 to Monday.

Script program which were developed in the US uses Sunday as the first day of the week and therefore assigns a value of 1 to Sunday. These differences are not handled by the regional settings of the local workstation.

*Exercise caution when using Script or Function Block programming which relates to the first day of the week. 

Labels (1)
No ratings