6.6 Scenario-based Examples
The Scenario-based Examples section provides examples that integrate the various API features introduced in previous tutorials.
Samples 1 to 4 set DRCF_VERSION to 2 unless the compiler defines it. To build samples 1 to 3 for a DRCF v3 controller, pass -DDRCF_VERSION=3. Sample 4 uses the welding functions, which exist only for DRCF v2, and stops the build with an error for any other value. Samples 5 and 6 build with either value; without a compiler option, DRFLEx.h sets DRCF_VERSION to 3.
Each scenario demonstrates how multiple functions such as motion control, DRL execution, welding operations, and real-time control can be combined into a cohesive workflow.