Siemens SIMATIC S7-1500 Manual page 38

Hide thumbs Also See for SIMATIC S7-1500:
Table of Contents

Advertisement

8 Example Application
8.3 Programming of the processing stations
//+++ Realize machine function +++
IF (#tempLatchProductPosition = True)
THEN
//Get actual write index
#tempWriteIndex :=
//Save actual position of product belt (product position)
#ProductPositionTable.PositionTable[#tempWriteIndex] :=
//Generate next write index (write pointer)
//Incement index pointer
#tempWriteIndex := #tempWriteIndex + 1;
//Check modulo area of index pointer
IF (#tempWriteIndex > #ProductPositionTable.MaxIndex)
THEN
#tempWriteIndex := #ProductPositionTable.MinIndex;
END_IF;
//Write back index pointer
#ProductPositionTable.WriteIndex_MeasuringInput :=
END_IF;
Subsequently, the current status of the "GetPosition" input is also saved, in order to
detect a rising edge of the input in the next cycle.
//+++ Internal function +++
//Edge control
#statGetPositionOld := #GetPosition;
Changing the program code for the use of a real measuring input
In order to be able to also use a real measuring input with current program code,
the function block has to be changed as follows. The changes displayed here are
already included in the "GetMeasuringInput" function block of the project for the
SINAMICS V90 demo case and are used in interaction with the TM Timer DIDQ
technology module.
The technology function for the measuring input functionality has to be called at the
beginning of the block. To do this, the function for the one-off measuring
"MC_MeasuringInput" is used in the example application. The function is
connected with the "MeasuringInput" technology object to the positioning axis
conveyor belt. The function is always executed via a rising edge on the "Execute"
input when the function is enabled via "FunctionEnable" and no measuring value
(instMeasuringInput.Done = False) has been detected. As a result, the function
restarts independently after each measurement.
TOs of S7-1500(T)
Entry ID: 109743134,
V1.0,
#ProductPositionTable.WriteIndex_MeasuringInput;
05/2017
#AxisProductBelt.ActualPosition;
#tempWriteIndex;
38

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-1500tTia portal v14

Table of Contents