QuickStart Guide
...
Siemens
Gen 2 Drivers

Siemens S7

12min
review the following information to set up and configure the siemens s7 driver litmus edge compatible series compatibility parameter compatible items driver type ethernet validated devices/series s7 300 s7 400 s7 1200 s7 1500 replaces gen 1 driver(s) siemens s7 advanced (gen1) docid\ mg oskprv0lvqduytsf8a learn more about gen1 and gen2 driver differences docid 27hyoelb0soehmysjqod5 to set up and configure this device in litmus edge, you will need to do the following step 1 set up and configure the plc device step 2 set up the plc device in litmus edge devicehub step 3 configure the list of registers step 1 set up and configure the plc device if the device is configured for ethernet access, find its network parameters otherwise, follow the steps below s7 1200 and s7 1500 devices to configure your device open your tia portal project in the project tree, right click your plc and select properties… from the popup menu the properties window opens to obtain the device’s ip address (if you do not already have it) from the left pane, select profinet interface > ethernet addresses in the right pane, go to internet protocol version 4 (ipv4) , find the ip address of the plc, and copy it aside from the left pane, select profinet interface > advanced options > port \[x1 p1] > port interconnection in the right pane, enter “any partner” in the partner port field from the left pane, select protection & security > access level in the right pane, select the full access radio button from the left pane, select protection & security > connection mechanisms in the right pane, select the permit access with put/get communication from remote partner check box click ok in the project tree, right click the data block you want to read and select properties from the popup menu the properties window opens from the left pane, select attributes in the right pane, clear the optimized block access check box click ok repeat steps 11 14 for all data blocks you want to read click the compile icon on the toolbar when the project finishes compiling, click download to device s7 300 and s7 400 devices to configure your device open your simatic manager project in the project tree, right click your plc and select object properties from the popup menu the properties window opens select the interfaces tab find and copy the ip address of the ethernet interface step 2 set up the plc device in litmus edge devicehub configure the following parameters when you connect a device docid 3eyafppweuvmblcey17sq with this driver update default values to the specific setup of your device parameter value type siemens driver siemens s7 network address the device address you defined during step 1 port 102 slot set based on your plc configuration default slot values for the s7 series controllers are as follows s7 300 2 s7 400 3 s7 1200 or s7 1500 1 step 3 configure the list of registers when you add tags docid 8se7z3pmrfwl1nmzcwalx to the connected device, refer to the following register table and tag parameters refer to the following additional resources device and tag metadata use case docid 583p fbuozem6whgrdgkq tag formula variables docid\ ifbwcou90qtfodk hrysr register table note the address format in this gen 2 driver is different from the ( siemens s7 advanced (gen1) docid\ mg oskprv0lvqduytsf8a ) for the same device learn more about gen1 and gen2 driver differences docid 27hyoelb0soehmysjqod5 name value types address format min address max address description db byte, word, dword, lword, usint, uint, udint, ulint, sint, int, dint, lint, real, lreal, date, s5time, dt, ldt, tod, ltod, time, ltime, dtl, char, wchar, string, wstring ddddd 0 65535 data block, absolute address db(bit) bool dddddd 0 655357 data block (bits), absolute address m byte, word, dword, lword, usint, uint, udint, ulint, sint, int, dint, lint, real, lreal, date, s5time, dt, ldt, tod, ltod, time, ltime, dtl, char, wchar, string, wstring ddddd 0 65535 m memory m(bit) bool dddddd 0 655357 m memory (bits) i byte, word, dword, lword, usint, uint, udint, ulint, sint, int, dint, lint, real, lreal, date, s5time, dt, ldt, tod, ltod, time, ltime, dtl, char, wchar, string, wstring ddddd 0 65535 input area i(bit) bool dddddd 0 655357 input area (bits) q byte, word, dword, lword, usint, uint, udint, ulint, sint, int, dint, lint, real, lreal, date, s5time, dt, ldt, tod, ltod, time, ltime, dtl, char, wchar, string, wstring ddddd 0 65535 output area q(bit) bool dddddd 0 655357 output area (bits) tag parameters name select a register name from the drop down list the available options depend on the names in the register table value type select a data type from the drop down list the available options depend on the register name selected polling interval enter a value in seconds this determines how often the tag should poll the register for data tag name enter a name for the tag description (optional) enter a description for the tag address enter a tag address the value must in the decimal format, within the allowed min/max range omit the leading zeros the device might use the decimal (d), hexadecimal (h), or octal (o) address format see the register table at the bottom of the dialog box for bit tags, append the bit address without the bit separator the lowercase letters in the address format indicate how many digits you should enter in the bit address count enter the number of register values to read a count higher than 1 will generate an array of values from the address value configured and respective subsequent address values db enter the data block number of the tag tag formula enter a formula for the tag to process the generated data two variables are permitted value (current tag value) and timestamp (current tag unix time in milliseconds) the following math functions are available sin cos sqrt tan power power( x ) performs the operation 10^x log log( x ) is the natural logarithm (the logarithm is in base e ) exp exp( x ) performs the operation e^x only publish on change of value select the checkbox to customize nats messages to be published only when the value parameter changes from a previous value to a new one change of value only applies to boolean, numeric (such as int or float), and simple string data types it does not apply to complex types, such as json or array poll once topics will not be affected by change of value settings these topics will still only see a single message meta data metadata summarizes basic information about data this feature allows you to define key value pair data for the device output payload later on it can then be used to find, use, and reuse particular instances of data note if you use special characters in meta data key names, the special characters are replaced with underscore characters in the payload this can cause two key names to be combined into one for example, configuring the key names a b and a&\&b will cause only one key name to be created (a b) additional considerations/configurations tag configuration based on siemens absolute addressing conventions most users of siemens plcs and tia portal are familiar with the convention for absolute addressing, which may look like this db2 dbx0 7 this address refers to data block 2, byte 0, bit 7 to add this tag to a litmus edge device using the siemens s7 driver, enter the following tag parameters name db(bit) value type bool db 2 address 07 litmus edge only allows integers in the "address" field when entering addresses of bits, delete the bit delimiter here is another example of a siemens address that a user may want to add as a dint type in litmus edge db40 dbd20 name db value type dint db 40 address 20 the last character in the absolute addressing format signifies the size of the register the following table shows some examples of data types you may want to use based on the size of the register siemens size character size (bits) data type examples x 1 bool b 8 byte char w 16 int uint word d 32 dint dword real uint (none) 64 lint lreal ulint exporting tags from tia portal you can export elements from a single plc tag table export all plc tags and constants of a cpu from the all tags table to export device tags in tia portal, open the table from which you want to export the tags (a single plc tag table or the all tags table ) in the plc tag table, click the export button the export dialog box opens click the path of export file button the save as dialog opens select the directory for the export file and enter the file name select xlsx , sdf , or xml as the file type the only human readable file type is xlsx click save select the export options export tags and/or constants export all elements of the table or just the elements that are being used in the program on the current cpu click ok the export file is generated errors and warnings generated during export appear on the info tab of the inspector window