L_MC2P_CamRefFromFile
This FB automatically reads an existing cam file (*.lcp) after the program download and provides the data for the application.
Cyclic call by the Lenze Cam Editor
The CamRef object created by the Lenze Cam Editor in the "ProfileReference" directory corresponds to an instance of the FB L_MC2P_CamRefFromFile .
The CamRef object or the instance of the FB L_MC2P_CamRefFromFile
- is an interface of MC_CAM_REF type
- can directly be connected to an input of MC_CAM_REF type of another FB, e.g.
- CamTable input of the FB MC_CamIn
- CamTable1 input of the TM L_TT1P_FlexCamBase
MC_CamIn1.CamTable:= L_MC2P_CamRefFromFile1
|
|
|
|
L_MC2P_CamRefFromFile |
|
|
|
|
|---|---|---|---|---|---|---|---|
|
BOOL |
- |
|
xExecute |
xNewDataAvailable |
|
- |
BOOL |
|
STRING |
- |
|
sFileName |
xDone |
|
- |
BOOL |
|
L_MC2P_IMotionData |
- |
|
itfCamData |
xBusy |
|
- |
BOOL |
|
UDINT |
- |
|
udiCamDataCount |
xError |
|
- |
BOOL |
|
BOOL |
- |
|
xReloadable |
eErrorID |
|
- |
L_IE1P_Error |
|
|
|
|
|
|
|
|
|
|
Note!
The renewed reading of a file, e.g. FB MC_CamIn , is not possible if the same cam file is currently being processed.
Restriction for
Controller c300 / p300
:
Memory location of cam data
|
Inputs
|
Name Data type |
Information/possible settings |
|
|---|---|---|
|
xExecute BOOL |
FALSE ä TRUE |
Execute reading of the cam file |
|
sFileName STRING |
Name of the cam file (e.g. "Kurve1.lcp") |
|
|
itfCamData L_MC2P_IMotionData |
Interface on data area for saving the read-in cam data |
|
|
udiCamDataCount UDINT |
Number of the transmitted profile elements |
|
|
xReloadable BOOL |
Reserved |
|
Outputs
|
Name Data type |
Value/meaning |
|
|---|---|---|
|
xNewDataAvailable BOOL |
TRUE |
The connected cam 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 |
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 cam file is to be imported while the application is running or
- the currently connected cam file has to be updated (new download via the »PLC Designer«).
The FB does not have to be called cyclically if
- the CamRef object is only connected with one cam file and
- no update is carried out while the application is running.