4 generated calls, Generated calls – Lenze PLC Designer PLC Designer (R2-x) CANopen for Runtime Systems User Manual

Page 47

Advertising
background image

L-force | PLC Designer - CANopen for Runtime Systems

CAN network variables

46

DMS 2.0 EN 05/2009 TD29

4.1.4 Generated calls

An implicit variable list will be created. For each PDO (sending or receiving) an array entry of type
NetVarPDO_Rx_CAN resp. NetVarPDO_Tx_CAN will be inserted.

For debug purposes a file containing the generated declarations will be created. The file is named
NetworkGlobalVars_CAN.exp and will be found in the compile files directory. (Only if »PLC Designer«
has been started with command line option “/debug”.)

Initialization code is generated, which will initialize the generated data. The initialization code will be
called by the GlobalInit POU, which in turn is called immediately after a download in order to initialize
the project data.

For each task, which uses network variables, initially:

- a receive call will be generated for each PDO.

- a (sole) instance of the POU NetVarManager_Udp_FB bzw. NetVarManager_Can_FB will be called:

NetVarManager_CAN();

At the end for each task, which uses network variables, a send call will be generated for each PDO.

The calls all in all:

CAN_Read(0);

NetVarManager_CAN();

pNetVarPDO_Rx_CAN[0]();

<application code>

MgrClearRxBuffer(wCurTask:= 1,wDrvNr := 0, dwFlags := 0, dwPara := 0);

pNetVarPDO_Tx_CAN[0]();

Advertising