Umrichter-FCBs über MC_SEW_SelectUserMode verwenden

Folgendes Code-Beispiel wählt den Anwendermodus aus und steuert die Bremsentestfunktion der MOVI-C®-Achse.

VAR

// Used PLCopen blocks

SelectUserMode : MC_SEW_SelectUserMode;

// Vendor specific interfaces

itfBrakeTest : SEW_IDH.IBrakeTestV3;

//local Variables

xInit : BOOL;

xStartBrakeTest : BOOL;

END_VAR

//Select user mode Axis1 is the name of the logical device

SelectUserMode(Enable := xStartBrakeTest, Axis := Axis1);

// Get the MOVI-C specific interface to brake test function

IF NOT xInit THEN

IF SelectUserMode.DeviceHandler <> 0 THEN

IF __QUERYINTERFACE(SelectUserMode.DeviceHandler, itfBrakeTest) THEN

xInit := TRUE;

END_IF;

END_IF

END_IF

//Select the brake test function

IF SelectUserMode.Done AND itfBrakeTest<>0 THEN

itfBrakeTest.StartBrakeTest();

END_IF;