Siemens SIMATIC S7-1500 Manual page 59

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

Advertisement

9 "SINAMICS V90 PN" Demo Case
9.3 Operating the application example
position of the positioning axis of the material line is transferred as product position
to the data logger of the user program.
The following code section from the "GetMeasuringInput" function block shows the
real data logging via the "MC_MeasuringInput" instruction.
//+++ Call function block +++
#instMeasuringInput(MeasuringInput:=#MeasuringInput,
//+++ Realize machine function +++
IF (#instMeasuringInput.Done = True)
THEN
//Get actual write index
#tempWriteIndex :=
//Save measured position of product on product belt
#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;
//+++ Output singals +++
#NewProductDetected := #instMeasuringInput.Done;
Note
Due to the real measurement via the TM Timer technology module, it has to be
done without a display of the products on the material line in front of the
measuring input in the example application of the "SINAMICS V90 PN" demo
case.
As soon as the measurement of the product position is triggered via the S15
toggle switch, can the product be displayed on the user interface.
TOs of S7-1500(T)
Entry ID: 109743134,
V1.0,
Execute:=(#FunctionEnable AND
Mode:=0);
#ProductPositionTable.WriteIndex_MeasuringInput;
05/2017
NOT(#instMeasuringInput.Done)),
#instMeasuringInput.MeasuredValue1;
#tempWriteIndex;
59

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-1500tTia portal v14

Table of Contents