Solutions

Litmus LE_ISO_on_TCP library for TIA portal V16

20min
overview how to add the le iso on tcp library to tia portal v16 this section will provide instructions on how to add the le iso on tcp tia portal library to the tia portal v16 project requirements the library is provided as a compressed library of the type “ zal16” and does require tia portal v16 step by step guide to import the library this guide will provide instructions on how to import the library into a project in tia portal v16 step 1 open the tia portal v16 project the library is to be used in step 2 import the library through the options >global libraries >open library menu step 3 for “look in ” select the folder the file was saved into \[1] for “files of type ” select the option “compressed libraries ( zal16 ) \[2] select the file \[3] press the open button \[4] step 4 as the library is shared as a compressed file, tia portal v16 does require the user to specify the location \[1] where the uncompressed library will be stored to uncompress the file into the selected folder, press the select folder button \[2] step 5 once the compressed file has been unpacked, the library does appear now under the global libraries section with this, the library is now available to be used in the plc code how to add and configure the le iso on tcp library to tia portal plc program this section will provide an overview about what an automation engineer needs to consider and add when deploying the le iso on tcp library to a plc program note this guide will not provide instructions on how to write a siemens plc program requirements the le iso on tcp library is added to tia portal for the project knowledge prerequisits to successfully to use this component, the user is expected to know about writing siemens plc programs using tia v16 note the guide will use a siemens s7 1500 for the example the library is also available for the s7 300/400 step by step guide to configure a network using the library step 1 expand the s7 1500 type within the le iso on tco from global library ​ step 2 add the library "le iso on tcp" into the program blocks step 3 the function block will appear as part of the program blocks now ​ step 4 add a new a new data block (db) to hold the connection parameters using the tcon ip rfc structure step 5 configure the required start values for the following parameters which are used for a communication with le note the tcon ip rfc structure is a predefined structure in tia portal details about this structure can be found tia portal's help type value description interfaceid hw any 64 hw identifier of ie interface submodule (specific to a certain configuration) id conn ouc 12 connection reference / identifier (specific to a certain configuration) connectiontype byte 12 type of connection 12 = iso on tcp (18=iso on tcp) activeestablished bool 0 active/passive connection establishment remoteaddress ip v4 ​ remote ip address (ipv4) > leave empty as le will establish connection remotetselector tselector ​ remote transport selector > leave empty localtselector tselector ​ local transport selector > required example of a localtselector setting this can be set according to individual needs localtselector tsellength uint 5 length of the following tsap > example uses a tsap of the length of 5 localtselector tsel{1] byte 16#54 't' localtselector tsel{2] byte 16#43 'c' localtselector tsel{3] byte 16#50 'p' localtselector tsel{4] byte 16#2d ' ' localtselector tsel{5] byte 16#32 '2' ​ step 6 the le iso on tcp library requires a single db (data block) which holds all the data to be send via the library the litmus edge driver communicating with the library can only return the data types \ bytes \ word \ dwordsiemens allows that some data types can be easily translated into other data types such as word this does make it possible to use existing configurations if they are in such a data type more information can be found in the siemens help example this db uses an array of uint step 7 add a new network to your program and add a new empty box step 8 select for the box the le iso on tcp library ​ step 9 the library will add a data block either accept the default settings or modify them according to your needs ​ step 10 configure the function block with the respective inputs and optional outputs example of a configuration input parameters input parameter (en) value description enable m0 4 (connect) a memory address used to set if the function block is enabled or disabled could be used to turn communication off at runtime paramts rtc rtc link to the rtc parameter in the data block rtc from step 5 data db30dbx0 0 (db1 var 1) the datablock which does hold the values to be send from step 6 send req m0 5 (send) a memory address used to initiate the sending of the data this can be set to true at every cycle or based on specific conditions this needs to be reset to false after a send output parameters output parameter (eno) value description error ​ is left at the default, which only shows the status within the le iso on tcp data block this could be set to a tag and be shown on a hmi sent ​ is left at the default, which only shows the status withhin the le iso on tcp data block this could be set to a tag and be shown on a hmi step 11 compile the porgram and download it to your plc how to read data send by the le iso on tcp library with litmus edge this section will provide an overview on how to read the data send by the implemented le iso on tcp library note this guide will not provide instructions on how to write a siemens plc program requirements the le iso on tcp library has been added to a siemens plc program and that program is downloaded onto the plc and running knowledge prerequisites to successfully to use this component, the user is expected to know about adding devices in litmus edge adding tags in litmus edge note the guide will use a siemens s7 1500 for the example the library is also available for the s7 300/400 step by step guide to read data into litmus edge step 1 open the litmus ede user ui with your browser step 2 navigate to devicehub to add a new device step 3 add a new device and select "siemens" for the device type step 4 select as driver "siemens iso on tcp" step 5 configure the driver mandatory are \ name > this will be the name of the device in litmus edge \ network address > this is the ip address of the siemens plc \ local tsap > this is the value set in step 5 of the previous chapter under the rtc data block \ remote tsap > this is the value set in step 5 of the previous chapter under the rtc data blockoptional but recommended \ enable alias topic > this will build the topics in litmus edge using the devicename and tagname step 6 after configuring the device, use the add device button to create the device in litmus edge step 7 the device will automatically connect to the plc step 8 to be able to collect the data, open the tags panel under devicehub step 9 select the siemens device you jsut added and press the add tag icon step 10 select the add a tag ​ step 11 add the new tag by providing the relevant parameters mandatory are \ value type > this is the value type used by devicehub the available options are the siemens data types siemens is able to transform some data types into other data type in the example used by this guide, on the plc the data are in uint but this is possible to be also handled as word or dword \ tag name > this is the name the tag will have in litmus edge tag names have to be unique on a device to device base \ address > this is the offset from the data block which is used to send the data step 12 add the tag with the add tag button the address used is taken from the db in tia portal step 13 it is possible to verify that data are read using the topic and flows