APIs, concepts, guides, and more
🚀 Get started

Learn RapidCode C# with these sample applications.

C# Sample Apps

This folder contains C# sample applications demonstrating the use of the RapidCode API. These examples are designed to help you learn how to work with the API, explore its features, and run tests.

⚠️ Important Note

These sample applications are provided to help you integrate the RMP motion controller into your own projects. They are not production-ready and may lack critical logic or safety mechanisms required for your specific application.

If you are working with real hardware, we strongly recommend wiring an external hardware emergency stop (e-stop) button. This safeguard is essential to protect both people and equipment, reducing the risk of injury or damage when using these sample applications.

✅ Prerequisites

  • .NET 10 SDK - Download the latest version: Download .NET 10.0
  • RMP SDK - The RMP must be installed on your system
  • Physical hardware - Physical hardware or software-emulated controller configured

📂 Files

General
_constants.cs Common configuration file for all sample apps (RMP path, default axis index, etc)
_helpers.cs Helper functions and utilities used across sample applications
_setup.cs Get your controller/system ready for sample apps. (create controller, setup axis, etc)
Directory.Build.targets MSBuild configuration that references RapidCode .NET dll and manages build settings
Sample Apps
axis-config-settling.cs Demonstrates how to configure and verify axis settling parameters

Configuration

Before running the samples, update _constants.cs with your system settings.

🚀 Run the sample apps

  1. Verify .NET 10 is installed

    dotnet --version

    The output should show version 10.x.x

  2. Navigate to the csharp folder

    cd c:\repos\jpRapidSoftware\RapidStuff\SampleApps\csharp
  3. Run a sample app

    dotnet run axis-config-settling.cs

🐛 Debugging in VS Code

If you wish to debug the sample apps with breakpoints and step-through debugging:

  1. Install the C# Dev Kit extension
    • Open VS Code
    • Go to Extensions (Ctrl+Shift+X)
    • Search for "C# Dev Kit" and install it
    • Or install directly: C# Dev Kit
  2. Open the sample file
    • Open the .cs file you want to debug in VS Code
  3. Set breakpoints
    • Click in the left margin next to line numbers to add breakpoints
  4. Start debugging
    • Press F5 or click "Run and Debug" from the sidebar
    • The debugger will stop at your breakpoints, allowing you to inspect variables and step through code