Online Nockenspur mit Zeitnocken erzeugen

So erzeugen Sie online eine Nockenspur mit Zeitnocken:
  1. Drei 3 Instanzen anlegen
  • L_MC2P_TappetDataTime1 :
    ARRAY[0..1] OF L_MC2P_TappetDataTime;
  • L_MC2P_TappetRefFromStruct1 :
    L_MC2P_TappetRefFromStruct;
  • L_MC2P_TappetRegister1 :
    L_MC2P_TappetRegister;
  1. Zwei Nocken mit FB L_MC2P_TappetDataTime erstellen
  • Nocke 1:
    L_MC2P_TappetDataTime1[0].lrTappetOn := 90.0;
    L_MC2P_TappetDataTime1[0]. lrTappetTime:= 10; //Millisekunden
  • Nocke 2:
    L_MC2P_TappetDataTime1[1].lrTappetOn := 270.0;
    L_MC2P_TappetDataTime1[1]. lrTappetTime:= 10; //Millisekunden
  • FB L_MC2P_TappetDataTime1 and Instanz von L_MC2P_TappetRefFromStruct1 an Eingang itfTappetData anlegen:

L_MC2P_TappetRefFromStruct1(

xExecute:= TRUE,

sName:= 'Test',

eTappetType:= L_MC2P_TappetType.PositiveTime,

udiCamDataCount:= 2,

lrXStartPos:= 0.0,

lrXEndPos:= 360.0,

itfTappetData:= L_MC2P_TappetDataTime1[0] ,

xDone=> ,

xBusy=> ,

xError=> ,

eErrorID=> );

  1. Instanz von L_MC2P_TappetRefFromStruct1 an den an den Eingang itfTappetTable des FBs L_MC2P_TappetRegister1 zuweisen:

L_MC2P_TappetRegister1(

Axis:= LM_Drive_i700,

xEnable:= ,

itfTappetTable:= L_MC2P_TappetRefFromFile1 ,

lrOffset:= ,

lrHyterese:= ,

lrReactTimeOn:= ,

lrReactTimeOff:= ,

eValueSource:= MC_SOURCE.mcSetValue,

byDigitalOutputSel:= 1,

pFastIO_Out := ADR(FastIO_OutRef),

xSwitch=> ,

xBusy=> ,

xError=> ,

eErrorID=> );