Programming Real-Time in C

ADwinC

With the C programming language, you can develop your own real-time processes, while also efficiently implementing existing functions and algorithms. Functions are available for accessing data, inputs, outputs, and interfaces of the ADwin system. With a single click, the GNU compiler (as with ADbasic and ADsim) generates an ADwin process that runs cyclically in the ADwin system at a defined speed, absolutely precisely and predictably at up to 1,000 kHz.

ADwinC for Visual Studio is an add-on which extends the proven development environment so that you can easily and flexibly write programs for ADwin-Pro II, ADwin-Gold III and ADwin-X-A20 in C. In the ADwin-typical program structure, you use the advantages of the C language as usual and add access to the inputs, outputs, counters, and interfaces of the ADwin hardware.

The ADwin process generated from C is processed on the ADwin system either event-triggered or cyclically and handles all time-critical processes. The response time to events is only a fraction of a microsecond. The processing and output, e.g., of a correction value after receipt of a trigger event, is so fast that response times of a few hundred nanoseconds can be guaranteed. The reliably short response time offers so much performance reserve that you can integrate complex calculations into the process.

ADwinC for Visual Studio supports you in debugging and monitoring running ADwin processes. You can make improvements to the source code at any time and transfer them to the ADwin system in no time at all. Visual Studio regularly exchanges data with the running process on the ADwin system. You can display selected process data in the interface and change it online; in addition, the quickly configurable ADtools are available to you. You monitor key values online, control your real-time processes, and evaluate the process timing.

The program package ADwinC

ADwinC
Developing an ADwin process in Visual Studio

With the ADwinC program package for Visual Studio, you can access all inputs, outputs, and interfaces of the ADwin hardware. Numerous functions are available for this purpose:

  • Measuring analog inputs
  • Setting analog outputs
  • Reading and setting digital inputs and outputs
  • Starting, stopping, setting and reading counters
  • Accessing numerous buses and interfaces such as RS232, CAN, EtherCAT
  • Exchanging data between ADwin processes
  • Exchanging data with the PC

An active display in the ADwinC program package shows the current data of the system variables, the status of the ADwin processes, the current processor utilization of the ADwin system, and the available memory. The built-in timing analyzer provides reliable information about the timing behavior and response time of individual processes. Debugging functions allow runtime errors to be intercepted and debug messages to be generated in the running real-time process.

You work in Visual Studio as usual and quickly become productive. With ADtools, you can also display data graphically or numerically, visualize process sequences, make entries via potentiometers, sliders, or buttons, and control ADwin system resources.

React immediately with ADwinC
P Controller

In combination with ADtools
ADtools user interface

… or with ADwin drivers
ADwin drivers