8.3 Programming of the processing stations
TOs of S7-1500(T)
Entry ID: 109743134, V1.0, 05/2017
Siemens AG 2017 All rights reserved
//+++ Get technology objects data +++
//Get modulo settings of master axis
#tempModuloAxisMaster.Enable := #AxisMaster.Modulo.Enable;
#tempModuloAxisMaster.StartValue := #AxisMaster.Modulo.StartValue;
#tempModuloAxisMaster.Length := #AxisMaster.Modulo.Length;
Checking the read and write index from the DB "ProductPositionTable” of the joint
data management. If read and write index differ, the function is enabled. If no cam
output is currently active, the cam output is started as follows:
1. First of all the read index is determined and the position saved is read from the
table.
2. Afterwards, the start and end position of the cam output is calculated.
3. If required, the "statMasterOffset” parameter may have to be corrected again,
whilst taken the modulo settings of the master axis into account.
//+++ Control machine function +++
//Check product position table
IF ((#ProductPositionTable.ReadIndex_OutputCam <>
#ProductPositionTable.WriteIndex_MeasuringInput)
AND (#FunctionEnable = True)
AND (#statEnable = False))
THEN
//Get actual read index
#tempReadIndex := #ProductPositionTable.ReadIndex_OutputCam;
//Read saved product position
#statSavedProductPosition :=
#ProductPositionTable.PositionTable[#tempReadIndex];
//Calculate position parameter
#statOnPosition := #statSavedProductPosition +
#OUTPUTCAM_POSITION;
#statOffPosition := #statOnPosition + #OUTPUTCAM_ON_DISTANCE;
//Check modulo settings
IF (#tempModuloAxisMaster.Enable = True)
THEN
#tempModuloEndPosition := #tempModuloAxisMaster.StartValue +
#tempModuloAxisMaster.Length;
//Check OnPosition
IF (#statOnPosition > #tempModuloEndPosition)
THEN
#statOnPosition := #statOnPosition -
#tempModuloAxisMaster.Length;
END_IF;