L_MC2P_TappetRefFromFile

This FB reads a tappet file (*.lct) and provides the data of the application.

Cyclic call by the Lenze Cam Editor

The L_MC2P_Tappet_Ref object created automatically by the Lenze Cam Editor in the "ProfileReference" directory corresponds to an instance of the FB L_MC2P_TappetRefFromFile .

The L_MC2P_Tappet_Ref object or the instance of the FB L_MC2P_TappetRefFromFile

  • is an interface of L_MC2P_Tappet_Ref type
  • can be directly connected to an input of L_MC2P_Tappet_Ref type of another FB, e.g.
    Programming example:
    L_MC2P_TappetRegister1.TappetTable:= L_MC2P_TappetRefFromFile1

 

 

 

L_MC2P_TappetRefFromFile

 

 

 

BOOL

-

xExecute

xNewDataAvailable

-

BOOL

STRING

-

sFileName

xDone

-

BOOL

L_MC2P_ITappetData

-

itfTappetData

xBusy

-

BOOL

UDINT

-

udiTappetDataCount

xError

-

BOOL

eErrorID

-

L_IE1P_Error

 

 

 

 

 

 

 

 

Note!

The renewed reading of a file, e.g. FB L_MC2P_TappetRegister , is not possible if the same tappet file is current being processed.

Memory location of tappet data

  • After a Download or an Online Change , the tappet data are only provided in the "/Temp/ProfileData" PLC directory.
    • By switching the PLC off at this time, the tappet data are lost.
  • Only when the boot project is generated, the tappet data are copied into the
    "/IPC/PLC/ProfileData" directory and are then protected against data loss, e.g. on an SD card, even if the PLC is switched off.

Inputs

Name

Data type

Information/possible settings

xExecute

BOOL

FALSE ä TRUE

Reading of the tappet file

sFileName

STRING

Name of the tappet file to be read in

itfTappetData

L_MC2P_ITappetData

First element of an array of tappet data
(ARRAY OF L_MC2P_TappetDataPosition or ARRAY OF L_MC2P_TappetDataTime)

udiTappetDataCount

UDINT

Number of the transmitted tappet elements

xReloadable

BOOL

Reserved

Outputs

Name

Data type

Value/meaning

xNewDataAvailable

BOOL

TRUE

The connected tappet file has been updated and downloaded.

xDone

BOOL

TRUE

The read operation is completed.

xBusy

BOOL

TRUE

Processing is running.

xError

BOOL

TRUE

An error has occurred. For details see eErrorID .

eErrorID

L_IE1P_Error

If xError = TRUE: Error number for the error that has occurred.

Cyclic call by the Lenze Cam Editor

The FB has to be called cyclically if

  • a new tappet file is to be imported while the application is running or
  • the currently connected tappet file has to be updated (new download via the »PLC Designer«).

The FB does not have to be called cyclically if

  • the L_MC2P_Tappet_Ref object is only connected with one tappet file and
  • no update is carried out while the application is running.