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
bExecuteBOOLFALSE
Rising edge: Starts the execution of the function block.
sFileNameSTRING(255)Name of the file, which contains the cam description in the defined ASCII format.
Output
bDoneBOOLFALSE
TRUE: Cam has been read in.bBusyBOOLFALSE
TRUE: Execution of the function block has not been finished.bErrorBOOLFALSE
TRUE: Error has occurred within the function block.ErrorIDSMC_ERROR0
Error identification
CAMSTRUCT(nElements := 0, nTappets := 0)
Structure: