SIEMENS S7/SINUMERIK Plugin
[Edge Main Folder]/configs/configurations/InputPlugins/SiemensPlcC:/ProgramData/Senseforce/Luna Data/[YourServiceName]/configurations/InputPlugins/SiemensPlcSiemensPlcSettings.xml
Example configuration
<?xml version="1.0" encoding="utf-8" ?>
<SiemensPlcConfig>
<!--Specify configuration file for connection to PLC-->
<Operationsettings>
<!-- path to the Accon AGLink configuration file with connection information of PLC (to generate this config file use the AGLink40_Config.exe) -->
<AGLinkConfigFilePath>$(LunaAppDataPath)configurations/InputPlugins/SiemensPlc</AGLinkConfigFilePath>
<!-- device number which refers to the corresponding Accon AGLINK configuration file -->
<DeviceNr>0</DeviceNr>
<!--SF Edge requires two separate connections to the PLC and the NCK part of the PLC.
The following settings should be the same as defined in the config file created by AGLink40_Config.exe -->
<PLCNr>1</PLCNr>
<NCKPLCNr>0</NCKPLCNr>
<!-- RackNr of the PLC -->
<RackNr>0</RackNr>
<!-- internal Slot-Number of the PLC Module (usually Slot 2) -->
<PLCSlotNr>2</PLCSlotNr>
<!-- internal Slot-Number of the NCK Module (usually Slot 3; in special cases Slot 4) -->
<NCKSlotNr>3</NCKSlotNr>
</Operationsettings>
<!-- Definition of variables to read given their NCDDE/OPC conform item name -->
<NCDDEDataBlocks>
<!-- Definition of a bundle of variables which should be read at the same time -->
<NCDDEDataBlock>
<!-- polling interval for reading data (in milliseconds) -->
<PollingIntervalMilliseconds>500</PollingIntervalMilliseconds>
<!-- Define if only changing values should be transmitted -->
<OnlySendChanges>true</OnlySendChanges>
<!-- List of variables to read (it is not allowed to mix PLC and NCK data variables) -->
<NCDDEDataList>
<!-- Definition of one variable -->
<NCDDEData>
<!-- NCDDE/OPC conform item name of the variable to read -->
<ItemName>/Nck/Configuration/chanAssignment[1]</ItemName>
<!-- Sets if variable of data type DWORD has to be interpreted as integer or float (has no influence on other data types) -->
<IsReal>true</IsReal>
<!-- Sets the threshold a variable has to change to be considered as "changed" -->
<DeltaToIgnore>0.57</DeltaToIgnore>
<!-- Filter condition for the given variable -->
<Filter>
<!-- Relational operator to use for the condition (valid: Greater, Less, GreaterOrEqual, LessOrEqual, Equal, NotEqual) -->
<Comparer>Greater</Comparer>
<!-- Value to compare with -->
<Value>0</Value>
</Filter>
<!-- List of mathematical operations applied on the given variable -->
<!-- Valid operations on numeric variables: Add, Subtract, Multiply, Divide, Power -->
<!-- Valid operation on boolean variables: Invert -->
<MathOperations>
<MathOperation>
<Operation>Multiply</Operation>
<Value>3.5</Value>
</MathOperation>
<MathOperation>
<Operation>Add</Operation>
<Value>20</Value>
</MathOperation>
</MathOperations>
</NCDDEData>
<NCDDEData>
<ItemName>DB100.DBD4</ItemName>
</NCDDEData>
</NCDDEDataList>
</NCDDEDataBlock>
<!-- Add several more instances of NCDDEDataBlock here... -->
</NCDDEDataBlocks>
<!-- Definition of variables to read from the PLC -->
<PLCDataBlocks>
<!-- Definition of a bundle of variables which should be read at the same time -->
<PLCDataBlock>
<!-- polling interval for reading data (in milliseconds) -->
<PollingIntervalMilliseconds>500</PollingIntervalMilliseconds>
<!-- Define if only changing values should be transmitted -->
<OnlySendChanges>true</OnlySendChanges>
<!-- List of PLC data to read at once -->
<PLCDataList>
<!-- Definition of one variable -->
<PLCData>
<!-- Name of the variable -->
<Name>PLC_DB10.DBX104.7</Name>
<!-- PLC OpArea to read from (valid: AREA_IN, AREA_OUT, AREA_FLAG, AREA_DATA, AREA_TIMER, AREA_COUNTER, AREA_SFLAG_200, AREA_VAR_200, AREA_TIMER_200, AREA_COUNTER_200, AREA_PERIPHERIE, AREA_SFLAG_S5, AREA_PLCINFO_200) -->
<OpArea>AREA_DATA</OpArea>
<!-- PLC OpType of the data to read (valid: TYP_BIT, TYP_BYTE, TYP_WORD, TYP_DWORD, TYP_COUNTER, TYP_TIMER, TYP_COUNTER_200, TYP_TIMER_200, TYP_HS_COUNTER_200) -->
<OpType>TYP_BIT</OpType>
<!-- PLC DBNr to read from -->
<DBNr>10</DBNr>
<!-- Offset for the read operation -->
<Offset>104</Offset>
<!-- BitNr of the data to read from -->
<BitNr>7</BitNr>
<!-- Sets if variable of data type DWORD has to be interpreted as integer or float (has no influence on other data types) -->
<IsReal>false</IsReal>
<!-- Sets the threshold a variable has to change to be considered as "changed"
This threshold as well as the RelativeDeltaToIgnorePercent threshold both need
to be exceeded to mark this variable as "changed".-->
<DeltaToIgnore>0.57</DeltaToIgnore>
<!-- Sets the relative threshold a variable has to change to be considered as "changed"
This threshold as well as the DeltaToIgnore threshold both need
to be exceeded to mark this variable as "changed".-->
<RelativeDeltaToIgnorePercent>21</RelativeDeltaToIgnorePercent>
<!-- Filter condition for the given variable -->
<Filter>
<!-- Relational operator to use for the condition (valid: Greater, Less, GreaterOrEqual, LessOrEqual, Equal, NotEqual) -->
<Comparer>Greater</Comparer>
<!-- Value to compare with -->
<Value>0</Value>
</Filter>
</PLCData>
<!-- Add several more instances of PLCData here... -->
</PLCDataList>
</PLCDataBlock>
<!-- Add several more instances of PLCDataBlock here... -->
</PLCDataBlocks>
<!-- Definition of variables to read from the NCK part of the PLC -->
<NCKDataBlocks>
<!-- Definition of a bundle of variables which should be read at the same time -->
<NCKDataBlock>
<!-- polling interval for reading data (in milliseconds) -->
<PollingIntervalMilliseconds>500</PollingIntervalMilliseconds>
<!-- Define if only changing values should be transmitted -->
<OnlySendChanges>true</OnlySendChanges>
<NCKDataList>
<NCKData>
<!-- Name of the variable -->
<Name>NCK_Test_RParam</Name>
<!-- DDEVarType of the data to read (valid: eNCK_Unknown, eNCK_LE_Uint8, eNCK_LE_Uint16, eNCK_LE_Int32, eNCK_LE_Float32, eNCK_LE_Float64, eNCK_LE_String, eNCK_LE_Bit, eNCK_LE_Int8, eNCK_LE_Int16, eNCK_LE_Uint32, eNCK_BE_Uint8, eNCK_BE_Uint16, eNCK_BE_Int32, eNCK_BE_Float32, eNCK_BE_Float64, eNCK_BE_String, eNCK_BE_Bit, eNCK_BE_Int8, eNCK_BE_Int16, eNCK_BE_Uint32) -->
<DDEVarType>eNCK_LE_Float64</DDEVarType>
<!-- NCK data area to read from (valid: eNCK_AreaNCK, eNCK_AreaBag, eNCK_AreaChannel, eNCK_AreaAxis, eNCK_AreaTool, eNCK_AreaFeedDrive, eNCK_AreaMainDrive, eNCK_AreaMMC)-->
<Area>eNCK_AreaChannel</Area>
<!-- NCK data block to read from (valid: eNCK_BlockY, eNCK_BlockYNCFL, eNCK_BlockFU, eNCK_BlockFA, eNCK_BlockTO, eNCK_BlockRP, eNCK_BlockSE, eNCK_BlockSGUD, eNCK_BlockLUD, eNCK_BlockTC, eNCK_BlockM, eNCK_Block0x1B, eNCK_BlockWAL, eNCK_BlockTISO, eNCK_BlockDIAG, eNCK_BlockCC, eNCK_BlockFE, eNCK_BlockTD, eNCK_BlockTS, eNCK_BlockTG, eNCK_BlockTU, eNCK_BlockTUE, eNCK_BlockTV, eNCK_BlockTM, eNCK_BlockTP, eNCK_BlockTPM, eNCK_BlockTT, eNCK_BlockTMV, eNCK_BlockTMC, eNCK_BlockMGUD, eNCK_BlockUGUD, eNCK_BlockGUD4, eNCK_BlockGUD5, eNCK_BlockGUD6, eNCK_BlockGUD7, eNCK_BlockGUD8, eNCK_BlockGUD9, eNCK_BlockPA, eNCK_BlockGD1, eNCK_BlockNIB, eNCK_BlockETP, eNCK_BlockETPD, eNCK_BlockSYNACT, eNCK_BlockDIAGN, eNCK_BlockVSYN, eNCK_BlockTUS, eNCK_BlockTUM, eNCK_BlockTUP, eNCK_BlockTF, eNCK_BlockFB, eNCK_BlockSSP2, eNCK_BlockPUD, eNCK_BlockTOS, eNCK_BlockTOST, eNCK_BlockTOE, eNCK_BlockTOET, eNCK_BlockAD, eNCK_BlockTOT, eNCK_BlockAEV, eNCK_BlockYFAFL, eNCK_BlockFS, eNCK_BlockSD, eNCK_BlockTAD, eNCK_BlockTAO, eNCK_BlockTAS, eNCK_BlockTAM, eNCK_BlockTAP, eNCK_BlockMEM, eNCK_BlockSALAC, eNCK_BlockAUXFU, eNCK_BlockTDC, eNCK_BlockCP, eNCK_BlockMTV, eNCK_BlockMTD, eNCK_BlockMTP, eNCK_BlockMTUD, eNCK_BlockMTUP, eNCK_BlockMTAD, eNCK_BlockMTAP, eNCK_BlockCCS, eBCK_BlockSDME, eNCK_BlockSPARPI, eNCK_BlockSEGA, eNCK_BlockSEMA, eNCK_BlockSSP, eNCK_BlockSGA, eNCK_BlockSMA, eNCK_BlockSALAL, eNCK_BlockSALAP, eNCK_BlockSALA, eNCK_BlockSSYNAC, eNCK_BlockSPARPF, eNCK_BlockSPARPP, eNCK_BlockSNCF, eNCK_BlockSPARP, eNCK_BlockSINF, eNCK_BlockS, eNCK_Block0x80, eNCK_Block0x81, eNCK_Block0x82, eNCK_Block0x83, eNCK_Block0x84, eNCK_Block0x85, eNCK_BlockO) --> <Block>eNCK_BlockRP</Block>
<!-- NCK data unit to read from -->
<Unit>1</Unit>
<!-- The row to read from -->
<Row>22</Row>
<!-- The column to read from -->
<Column>1</Column>
<!-- Buffer length required to read the defined data -->
<BufferLength>8</BufferLength>
<!-- Sets the threshold a variable has to change to be considered as "changed" -->
<DeltaToIgnore>2</DeltaToIgnore>
</NCKData>
<!-- Add several more instances of NCKData here... -->
</NCKDataList>
</NCKDataBlock>
<!-- Add several more instances of NCKDataBlock here... -->
</NCKDataBlocks>
<!-- Define which PLC Alarms should be read -->
<PLCAlarmBlocks>
<PLCAlarmBlock>
<!-- polling interval for reading data (in milliseconds) -->
<PollingIntervalMilliseconds>2000</PollingIntervalMilliseconds>
<!-- PLCAlarmType: Symb, SFC or SFB (each type should only occur once) -->
<PLCAlarmType>SFC</PLCAlarmType>
</PLCAlarmBlock>
<!-- Add more instances of PLCAlarmBlock here... -->
</PLCAlarmBlocks>
<!-- Define if NCK Alarms should be read (otherwise delete this sections) -->
<NCKAlarmBlock>
<!-- polling interval for reading data (in milliseconds) -->
<PollingIntervalMilliseconds>1000</PollingIntervalMilliseconds>
<!-- Define if additional "Alarm Filltext" information should also be sent -->
<ExtendedInfo>true</ExtendedInfo>
</NCKAlarmBlock>
<!--Specify file for message mapping-->
<Mappings>
<FilePath>$(LunaAppDataPath)configurations/InputPlugins/SiemensPlc</FilePath>
<FileName>DataMappings.xml</FileName>
</Mappings>
<!--Specify file for logging-->
<Logger>
<FilePath>$(LunaAppDataPath)Logs</FilePath>
<FileName>SiemensPlc.log</FileName>
<!--LogLevel: Debug,Information,Warning,Error,Critical,None-->
<LogLevel>Trace</LogLevel>
</Logger>
</SiemensPlcConfig>Reading data blocks by their Item name
Using absolute address as ItemName
Reading blocks by their memory location definition
Reading PLC alarms
Reading NCK alarms
Connection State
Last updated