LBP_Powerride aufrufen
Das Beispiel zeigt den Aufruf des "LBP_Powerride". Die Versorgung des Ein- und Ausgangsabbilds
von der MCP muss zuvor im Startup erfolgen und ist im Beispiel "Powerride über eine MCP im
Startup einbinden (Seite 663)" beschrieben. Der globale Datenbaustein "ModularMcpData"
enthält im Beispiel das Ein- und Ausgangsabbild. Informationen dazu finden Sie auch im
Bedienkomponenten Handbuch Modulare MCPs.
Der folgende Code zeigt den Aufruf von "LBP_Powerride" in "Main [OB1]":
// #tempEnable: Bool;
// #tempPreset: Bool;
// #tempForceSwitchPos1: Bool;
// #tempPushButtonLED: USInt;
// #tempPresetValue: USInt;
// #tempValid: Bool;
// #tempError: Bool;
// #tempPushBotton: Bool;
// #tempOvrFactor: USInt;
// #tempGrayCode: USInt;
// #tempSwitchPos: USInt;
// #tempStatus: Word;
// "ModularMcpData".in.powerride_1: LBP_typePowerrideInput;
// "ModularMcpData".out.powerride_1: LBP_typePowerrideOutput;
"LBP_Powerride" (
PLC
Funktionshandbuch, 10/2020, A5E48053808A AD
enable := #tempEnable,
preset := #tempPreset,
forceSwitchPos1 := #tempForceSwitchPos1,
pushButtonLED := #tempPushButtonLED,
presetValue := #tempPresetValue,
valid => #tempValid,
error => #tempError,
pushButton => #tempPushButton,
ovrFactor => #tempOvrFactor,
grayCode => #tempGrayCode,
switchPos => #tempSwitchPos,
status => #tempStatus,
deviceIn := "ModularMcpData".in.powerride_1,
deviceOut := "ModularMcpData".out.powerride_1,
configuration := "LBP_PowerrideConfig".configFeed);
Referenz zum PLC-Grundprogramm
10.6 Funktionsbausteine (FB)
665