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 global constants gc_SMC_FILE_MAXCAMEL (number of elements) and 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

MC_CAM_REF

STRUCT(nElements := 0, nTappets := 0)