Skip to content

PLCnext/rust-sample-runtime

Repository files navigation

PLCnext Technology - Rust Sample Runtime

Feature Requests Bugs License Web Community

Guide details

Description Value
Created 14.11.2019
Last modified 14.11.2019
Controller AXC F 2152
Firmware 2019.9.0
SDK 2019.9.0

Hardware requirements

Starter kit- AXC F 2152 STARTERKIT - (Order number 1046568), consisting of:

  1. I/O module AXL F DI8/1 DO8/1 1H (Order number 2701916).
  2. I/O module AXL F AI2 AO2 1H (Order number 2702072).
  3. Interface module UM 45-IB-DI/SIM8 (Order number 2962997).
  4. Patch cable FL CAT5 PATCH 2,0 (Order number 2832289).

Host machine software requirements:

  1. Software Development Kit (SDK) for at least one PLCnext Control target.

For steps involving the use of PLCnext Engineer:

  1. Windows 10 operating system.
  2. PLCnext Engineer version 2019.6.

Introduction

This article provides a step by step guide to building your own runtime application for PLCnext Control using Rust.

For a general introduction to runtime applications on PLCnext Control, please refer to the README file for the C++ Sample Runtime project.

Note that this guide utilises "plcnext" crates from crates.io to access PLCnext Control system functions. These "plcnext" crates are currently in the early stages of development, and should not be used for production applications. If you would like to contribute to the development of these crates, please let us know on Github.

Before getting started

Please note that the application developed in this series of articles uses:

  • Linux on the host machine, but it should be possible to adapt the Linux commands for Windows.
  • Microsoft Visual Studio Code, but any editor or IDE can be used.
  • A PLC with IP address 192.168.1.10, but any valid IP address can be used.

Getting Started

In the following series of technical articles, you will build your own runtime application for PLCnext Control. Each article builds on tasks that were completed in earlier articles, so it is recommended to follow the series in sequence.

# Topic Objectives
01 Hello PLCnext Create a simple application in Rust, and run it on a PLCnext Control.
02 PLCnext Control integration Use the PLCnext Control to start and stop the application automatically.
Create PLCnext ANSI-C component instances.
Write messages to the application log file.
03 Reading and writing Axioline I/O Read digital inputs from an Axioline I/O module, and write digital outputs.
04 Getting PLCnext Control status via callbacks Use notifications from the PLCnext Control to start and stop data exchange with Axioline I/O modules.
Read the PLC's unique hardware ID.
05 Using RSC Services Coming soon!
06 Creating real-time threads Coming soon!

How to get support

You can get support in the forum of the PLCnext Community.


Copyright © 2019 Phoenix Contact Electronics GmbH

All rights reserved. This program and the accompanying materials are made available under the terms of the MIT License which accompanies this distribution.

About

No description, website, or topics provided.

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published