SMC_ReadCAM (FB)¶
FUNCTION_BLOCK SMC_ReadCAM
This function block is designed for loading a cam at runtime and making it available
for the modules MC_CamTableSelect
and MC_CamIn
.
The cam to be loaded has to be created within the cam editor before and saved in a “*.CAM” file (see SMC_WriteCAM).
The size of a loadable cam is limited by the library parameters LibParams.gc_SMC_FILE_MAXCAMEL (number of elements)
and LibParams.gc_SMC_FILE_MAXCAMTAP (number of cam switch actions).
- InOut:
Scope
Name
Type
Initial
Comment
Input
bExecute
BOOL
FALSE
Rising edge: Starts the execution of the function block.
sFileName
STRING(255)
Name of the file, which contains the cam description in the defined ASCII format.
Output
bDone
BOOL
FALSE
TRUE
: Cam has been read in.bBusy
BOOL
FALSE
TRUE
: Execution of the function block has not been finished.bError
BOOL
FALSE
TRUE
: Error has occurred within the function block.ErrorID
SMC_ERROR
0
Error identification
CAM
STRUCT(nElements := 0, nTappets := 0)
Structure: