Herunterladen Inhalt Inhalt Diese Seite drucken

Bosch Rexroth IndraMotion MLC 13VRS Funktionsbeschreibung Seite 77

Vorschau ausblenden Andere Handbücher für Rexroth IndraMotion MLC 13VRS:
Inhaltsverzeichnis

Werbung

DOK-MLC***-FUNC****V13-AP06-DE-P
Rexroth IndraMotion MLC 13VRS Funktionsbeschreibung
VAR_GLOBAL RETAIN
// Configuration data of the sercos addresses
arSERCOS_Adr: ARRAY [1..99] OF UINT;
// sercos configuration
uiNoOfBytes: UINT;
// no. of SIII devices * 2 (2 bytes per device)
END_VAR
Declaration part:
// This example reads and writes the Parameter C-0-0510,
// Address configuration
PROGRAM Test_Set_SERCOS_Adr_RW
VAR_INPUT
bConfirmReadSercosConfig: BOOL;
// Start reading the sercos configuration
bConfirmWriteSercosConfig:BOOL;
// Start writing the sercos configuration
END_VAR
VAR_OUTPUT
bDoneWriteSercosConfig: BOOL;
// Successful reading of the sercos configuration
bDoneWriteSercosConfig: BOOL;
// Successful writing of the sercos configuration
END_VAR
VAR
fbReadC510: MB_ReadListParameter;
fbWriteC510: MB_WriteListParameter;
Dummy: AXIS_REF;
END_VAR
Implementation part:
// Read the sercos configuration -> read if exchange of I/O or drive...
// The user has to acknowledge this by bConfirmReadSercosConfig
IF bConfirmReadSercosConfig = TRUE THEN
// Conformation by user from HMI
// Read sercos configuration into C-0-510 "Address configuration"
fbReadC510(
Execute:=
TRUE,
ParameterNumber:= GVL_C_Param_ID.FP_C_0_0510,
NoOfBytes:=
198,
ValueAdr:=
ADR(arSERCOS_AdrConfig),
Axis:=
Dummy,
NoOfRecBytes=>
uiNoOfBytes_AdrConfig,
Done=>
bDoneReadSercosConfig);
IF fbReadC510.Done THEN
bValidSERCOS_AdrConfig := TRUE;
END_IF
// Error handling not implemented in this example
ELSE
// Nothing to do...
fbReadC510(
Execute:= FALSE,
Axis:=
Dummy);
bDoneReadSercosConfig:=FALSE;
END_IF
// Error in drive configuration -> write back in Phase 2 in case
// of an exchange of an I/O or drive...
// The user has to acknowledge this by bConfirmWriteSercosConfig
IF bConfirmWriteSercosConfig
// Conformation by user from HMI
ImcStatus.Admin.ModeStatus_P2 = TRUE AND
// Only allowed in CP2. Alternative to IMC Interface: read C-0-0452
ImcStatus.Diag.Number = 16#F0140001
// Allow only when "Error in drive configuration" is pending (C-0-0627)
bValidSERCOS_AdrConfig
// Check that the configuration was read before
// Write sercos configuration into C-0-0510 "Address configuration"
Bosch Rexroth AG
Inbetriebnahme und Bedienung
= TRUE AND
AND
THEN
75/607

Werbung

Inhaltsverzeichnis
loading

Inhaltsverzeichnis