-
Notifications
You must be signed in to change notification settings - Fork 30
Getting Started
TL;DR (Debian based)
- Install
# Just press enter when prompted
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
apt install npm nodejs git
git clone https://github.com/qitechgmbh/control.git
cd control/electron
npm install- Run Front-end
cd control/electron
npm start-
Connect hardware
-
Run Back-end
cd control
# Grants permission for hardware (e.g. to use EtherCAT)
./cargo_run_linux.shQiTech control requires both the Rust toolchain as well as a working Node.js installation. Due to their low-levelness in nature and strict timing requirements of protocols like EtherCAT, only Linux based operating systems are currently supported.
Either install cargo and rustc with your package manager,
or to use rustup run
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shSee the rust installation guide for details.
Either install npm and node with your package manager,
or to use the Node Version Manager run
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvmSee NVM's installation guide for details. See also https://docs.npmjs.com/downloading-and-installing-node-js-and-npm.
Either clone the QiTech Control with
git clone https://github.com/qitechgmbh/control.git
cd controlor download the latest release source tree.
Install NPM dependencies with
cd electron
npm installMake sure all hardware you wish to interface with is connected, then run
./cargo_run_linux.shThis helper script sets up capabilities (e.g. for use of raw sockets) and runs the control server in development mode. The most minimal working hardware setup is to connect Beckhoff's ek1100 terminal via Ethernet.
If you don't have any supported hardware at hand, or simply wish to work on the front-end without hardware, you can also let the control server run with mocked machines instead.
./cargo_run_linux.sh mock-machineMachines will appear in the front-end, but requests won't interface with hardware.
Run the control server without development mode with
./cargo_run_linux.sh releaseWARNING: Release mode expects you to have configured your kernel accordingly. See details below.
You can run the front-end without the control server running, however, you will not see any machines. The following command opens the front-end in electron.
cd electron
npm startChanges to the frond-end applied via Vite.
We recommend you to use an Editor with rust-analyzer support like VSCode to speed up development and detect errors before compiling.
To achieve minimal latency when working with low-level protocols, the control server assumes that the Linux kernel has real-time preemption enabled and that certain cores are not being used by any other process. Two threads inside the control server, one for EtherCAT communication and the other for general computations regarding the machines logic, are being allocated to run isolated on the cores with ID 2 and 3 respectively.
Real-time preemption is part of the mainline Linux kernel. The following kernel parameter can be used to enable it:
preempt=full # Enable Real-Time Preemption.
pcie_aspm=off # Disable PCIe power management for NICs.
usbcore.autosuspend=-1 # Disable automatic suspend for USB connectors.
isolcpus=2,3 # Isolate cpus 2 and 3 from scheduler for better latency, 2 runs EtherCAT protocol and 3 runs control server's loop.
nohz_full=2,3 # In this mode, the periodic scheduler tick is stopped when only one task is running, reducing kernel interruptions on those CPUs.
rcu_nocbs=2,3 # Moves RCU (Read-Copy Update) callback processing away from CPUs 2 and 3.
Please refer to your boot-loader's or Linux-distro's documentation to see how these options can be passed to the kernel at boot.
If you are using NixOS (or have an nix store installed), simply use the nix develop shell defined in flake.nix.
Build control server and front-end via
nix build .#server
nix build .#electron
to nix' internal caching.
You can also install QiTech Control as a configuration.nix via
git checkout dev-on-nixos
git rebase master # or whichever branch you wan't to work on
sudo ./nixos-install.sh
and provide your favorite editor via Home Manager. This also takes care of setting up the kernel correctly. See our NixOS Guide for details.
QiTech Control | GitHub | Video Demo | Open Source Framework for Industrial Control
- Getting Started
- Adding a Machine
- Adding a minimal machine e.G. 4CH DO
- Code Style
- Performance
- Testing
- Adding Presets to Machines
- NixOS
Beckhoff:
WAGO:
- 4 Digital In (750-402)
- 8 Digital In (750-430)
- 8 Digital In + 8 Digital Out (750-1506)
- 4 Analog In (750-455)
- 2 Digital Out (750-501)
- 8 Digital Out (750-530)
- Stepper (750-671 & 750-672)
- Power Supply (2789‐9052)
- Serial Interface (750-652)
- 4-channel Analog input module Pt100 RTD (750-460)
- 8 Digital In + 8 Digital Out (750-430 + 750-530)
Elrest:
WAGO: