Industrial manufacturing
Industrial Internet of Things | Industrial materials | Equipment Maintenance and Repair | Industrial programming |
home  MfgRobots >> Industrial manufacturing >  >> Manufacturing Technology >> Industrial Technology

Debugging C++ Components and Programs on PLCnext Control Devices with Visual Studio

This article describes how to debug custom C++ components and programs on a PLCnext Control device using Microsoft Visual Studio.The example in this article uses: 

Procedure

On the PLC: 

In Visual Studio: 

In PLCnext Engineer: 

In Visual Studio, perform the following one-off configuration: 

Debugging C++ Components and Programs on PLCnext Control Devices with Visual Studio

In the dialog box, enter the following details:

Host name: The IP Address of the PLCnext Control device.

Port: Unless you’re using a special SSH configuration, the port should be the default 22.

User name: root

Authentication type: If you have not set up Private Key access for the root user, then select Password and enter the password for the root user on the PLCnext Control device.Now you are ready to debug your C++ program. In Visual Studio: 

Debugging C++ Components and Programs on PLCnext Control Devices with Visual Studio

Select the Connection target that you configured earlier, and the other options as shown in the screen shot. In the Available processes frame, select the Arp.System.Application process that contains –main=true in the title.  Click the Attach button, and you will enter debug mode.  You can now debug in the usual way – set breakpoints, add variables to the Watch window etc.  To stop debugging, don’t click the “Stop” button – that will stop the PLCnext Runtime process. Instead, select Detach all from the Debug menu.


Industrial Technology

  1. Installing Dev‑C++ on Windows: Step‑by‑Step Guide
  2. Installing Visual Studio 2019 Community Edition for C# Development on Windows
  3. Exploring 6G: The Future of Ultra-Fast Connectivity
  4. Copper Brazing Explained: Techniques & Tips for Strong, Reliable Connections
  5. Build an Arduino Proximity Sensor: Step‑by‑Step Guide with Components
  6. Understanding Phone Circuits: Core Components and Their Functionality
  7. The Role of Printed Circuit Boards in Modern Electronics
  8. Optimized Titanium Machining for Automotive, Aerospace & Industrial Components
  9. Storing Process Data with SQLite in PLCnext C++ Projects
  10. Mastering Simple and Complex Data Types in C++ with PLCnext Engineer