Siemens SIMOTION Function Manual page 93

Motion control basic functions for modular machines
Hide thumbs Also See for SIMOTION:
Table of Contents

Advertisement

Example program
The following programming example shows:
● The identification of the required configuration in accordance with the table above
● The activation of the required configuration
Example program for the identification and activation of a required configuration
// Variable declaration
VAR
END_VAR
// Identify the required configuration
// by evaluating the connector coding
CASE plugCode OF
END_CASE;
// Activate the required configuration
retActivateConf := _activateConfiguration (
IF ( 0 <> retActivateConf.result ) THEN
END_IF;
About parameter timeOut
The timeOut parameter specifies the maximum time the SIMOTION device can require after
the restart until the RUN mode is reached. When this time is exceeded, the system performs
the following actions:
1. The system tries to activate the initial configuration (if present), and to use this to select a
2. In the event of an error, the device switches to the STOP operating mode.
Basic Functions for Modular Machines
Function Manual, 04/2014
retActivateConf
plugCode AT %IB0 : BYTE;
configId
2#001
: configId := 16#000001; // Remove
2#010
: configId := 16#000002; // Machine (PR000002.ZIP)
2#100
: configId := 16#000003; // Pack
ELSE
; // ... Error response
projectData
projectDataId := configId,
timeOut
);
// Error response
; // ...
configuration (see Selecting and activating a configuration using an initial configuration
(Page 99)).
Changing the active configuration or the active kernel
: StructRetConfiguration;
// Connector coding
: UDINT; // projectDataId of the
// required configuration
:= YES,
:= T#5m
// 5 minutes
6.1 Activating a configuration
(PR000001.ZIP)
(PR000003.ZIP)
93

Advertisement

Table of Contents
loading

Table of Contents