Herunterladen Inhalt Inhalt Diese Seite drucken

Bosch Rexroth IndraMotion MLC 11VRS Funktionsbeschreibung Seite 77

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

Werbung

DOK-IM*MLC-FUNC****V11-RE03-DE-P
Rexroth IndraMotion MLC 11VRS Funktionsbeschreibung
Programm:
Global variables
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 in case of an exchange of
// an 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
Bosch Rexroth AG
Inbetriebnahme und Bedienung
= TRUE AND
75/557

Quicklinks ausblenden:

Werbung

Inhaltsverzeichnis
loading

Inhaltsverzeichnis