-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathProgram.cs
36 lines (31 loc) · 950 Bytes
/
Program.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
using Iec61131.Engineering.Prototypes.Methods;
using Iec61131.Engineering.Prototypes.Ports;
using Iec61131.Engineering.Prototypes.Types;
using Iec61131.Engineering.Prototypes.Variables;
using Iec61131.Engineering.Prototypes.Common;
namespace ExampleLib
{
[Program]
public class Program
{
// Use the attributes [Global] and either [InputPort] or [OutputPort] to mark fields,
// that should exchange data with other IEC- or C#-Programs
[Global, OutputPort, DataType("DINT")]
public int a = 1;
[Global, InputPort, DataType("DINT")]
public int b = 2;
public int c = 3;
[Initialization]
public void __Init()
{
//
// TODO: Initialize the variables of the program here
//
}
[Execution]
public void __Process()
{
a = b + c;
}
}
}