-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathUserEnumeration.cs
46 lines (39 loc) · 1.14 KB
/
UserEnumeration.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#region Copyright
//
// Copyright (c) Phoenix Contact GmbH & Co. KG. All rights reserved.
// Licensed under the MIT. See LICENSE file in the project root for full license information.
//
#endregion Copyright
using Iec61131.Engineering.Prototypes.Common;
using Iec61131.Engineering.Prototypes.Methods;
using Iec61131.Engineering.Prototypes.Pragmas;
using Iec61131.Engineering.Prototypes.Types;
using Iec61131.Engineering.Prototypes.Variables;
using System;
using System.Iec61131Lib;
namespace PLCnextFirmwareLibrarySample
{
// The attribute "Enumeration" is necessary to make the enum visible in PLCnext Engineer
[Enumeration]
public enum DaysOfWeek
{
Monday,
Tuesday,
Wednesday,
Thursday,
Friday,
Saturday,
Sunday
}
[Function]
public static class IsWeekendFunction
{
[Execution]
public static bool __Process(
[Input] DaysOfWeek IN1)
{
bool IsWeekendFunction = IN1 == DaysOfWeek.Saturday || IN1 == DaysOfWeek.Sunday;
return IsWeekendFunction;
}
}
}