Skip to content

OWarneke/CSharpExamples

 
 

Repository files navigation

PLCnext Technology - C# Examples

Feature Requests Bugs License Web Community

PLCnext Technology integrates programming of different languages, and enables users to create real time components in C# using their familiar Microsoft® Visual Studio® as the integrated development environment. For More information please visit our Community.

The CSharpExamples repository is a collection of various examples for PLCnext Technology controllers. It is assumed that the reader has basic knowledge about C# programming in general and has read the User Manual and the PLCnext Technology Quick Start Guide. Each example explains one or more topics. Specific explanations can be found in the ExampleName.md file located next to the ExampleName.cs

Table of Content

# Topic Content
01 Basics Implements a basic counter. (Basics.cs)
02 Any Function and function block with "ANY" parameter. (FunWithAny.cs, FB1WithAny.cs, FB2WithAny.cs)
03 User Struct Function block with a user struct. (FBWithUserStruct.cs)
04 User Array Function block with a user array. (FBWithUserArray.cs)
05 IEC String Use type IecStringEx for strings in PLCnext Engineer. (FBWithString.cs)
06 Complex Data Types Complex data type as function's return value. (FUWithComplexDataType.cs)
07 Methods An example for providing Methods written in C# that can be used in IEC language. (FBWithMethods.cs)
08 File Handling Use "File" in namespace System.IO (WriteFile.cs, ReadFile.cs)
09 DateTime Getting UTC ticks and conversion into a string. (FBWithDateTime.cs)
10 Garbage Collection Shows how to modify garbage collection settings. (GarbageCollection.cs)
11 Programs Provides a template for programs in C#. (Program.cs)
12 Threads Functionblock to start a thread. (Threads.cs)
99 MiscAttributes Making data visible in OPC UA and when to use explicit IEC data type definition. (MiscAttributes)

Getting Started

Find all information how to start coding C# for PLCnext Technology in our Community or watch the Youtube Playlist on our Technical Support Channel

Contributing

You can participate in this project by submitting bugs and feature requests. Furthermore you can help us by discussing issues and let us know where you have problems or where others could struggle.

Feedback

You can give feedback to this project in different ways:

License

Copyright (c) Phoenix Contact Gmbh & Co KG. All rights reserved.

Licensed under the MIT License.

About

Collection of various C# sample code for PLCnext Technology controllers.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%