Lenze ETC Motion Control Manual de usuario Pagina 410

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 428
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 409
PLC programming
Library
CAN functions (only ETCxM)
8
8.8
8.8.6
l
410
EDSTCXN EN 2.0
8.8.6 CAN functions (only ETCxM)
8.8.6.1 DefineCanMsg (only ETCxM)
FUNCTION DefineCanMsg: DINT
VAR_INPUT
CanNum_w : WORD; (* Number of the CAN interface − 1 or 2 *)
WriteCobId_w : WORD; (* CobId: ETCxM CAN node *)
ReadCobId_w : WORD; (* CobId: CAN node ETCxM *)
QueueSize_w : WORD; (* Number of messages being buffered *)
END_VAR
Creating and initialising a structure for managing CAN transfers. This allows
to receive or send any CAN messages. When the function is called it checks
whether the stated CobId are not still in use. It is also possible for the CobId
to be entered into the control configuration of CoDeSys at a CANopen
module. ReadCobId_w or WriteCobId_w equals 0 means that no Cobld is
required yet.
The function returns a handle on the administrative structure. If it returns 0
no administrative structure could be created using the stated parameters.
handle_pr : DINT;
handle_pr = DefineCanMsg(1, 1014, 1114, 32);
8.8.6.2 AddCobIdCanMsg (only ETCxM)
FUNCTION AddCobIdCanMsg: BOOL
VAR_INPUT
handle_pr : DINT; (* Handle on the management structure *)
CobId_w : WORD; (* CobId *)
Read_bit : BOOL; (* direction, TRUE for CAN nodes ETCxM *)
END_VAR
This function allows adding a CobId to the management structure (see
function DefineCanMsg()) for CAN transfers. The function returns TRUE if
the CobId has been entered successfully in the management structure. If the
Cobld is already in use or the maximum number (32) of possible Cobld has
been reached, it returns FALSE.
handle_pr : DINT;
FctReturn_bit : BOOL;
handle_pr = DefineCanMsg(1, 1014, 1114, 32);
FctReturn_bit = AddCobIdCanMsg(handle_pr, 1024, 1);
Declaration
Description
Example
Declaration
Description
Example
Vista de pagina 409
1 2 ... 405 406 407 408 409 410 411 412 413 414 415 ... 427 428

Comentarios a estos manuales

ama 11 Jan 2025 | 19:35:39

rasha