Using inverter FCBs via MC_SEW_SelectUserMode
The following code example selects the user mode and controls the brake test function of the MOVI-C® axis:
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;