Lenze PLC Designer PLC Designer (R2-x) CANopen for Runti Manual de usuario Pagina 20

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 56
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 19
L-force | PLC Designer - CANopen for Runtime Systems
CANopen-Master library
DMS 2.0 EN 05/2009 TD29 19
2.4.3.4 Evaluation of the responses of the slaves on the configuration SDOs
The application can log the complete configuration
phase of a node, thus can „see“ each response.
The responses on the configuration SDOs appear in sdoConfig of the node structure: for example in
pCanOpenNode[0].sdoConfig.ucAnswerBytes[0..7] (see also: description of function block
CanOpenSendSDO.)
The master sends one SDO after the other as soon as a response from the slave has been received.
Therefore the application must detect the change of the response in order to determine when a new
SDO response has come in:
VAR
ucOldAnwer : array[0..7] of BYTE;
i : INT;
END_VAR
FOR i := 0 to 7 DO
IF pCanOpenNode[0].sdoConfig.ucAnswerBytes[i] <> ucOldAnswer[i] THEN
ucOldAnswer := pCanOpenNode[0].sdoConfig.ucAnswerBytes;
(* Here the new response can be evaluated, if desired by the application.*)
(* Information on the abort codes see in the description of CanOpenSendSDO.*)
EXIT; (* Leave loop at first change.*)
END_IF
END_FOR
Vista de pagina 19
1 2 ... 15 16 17 18 19 20 21 22 23 24 25 ... 55 56

Comentarios a estos manuales

Sin comentarios