Siemens S7-1500 PLC - Cannot browse tags

Hi.

I just connected my ignition to the 1500 system, only tags i can get is the diagnostics ones.
The plc has several datablocks with tags, other defined tags in the system table.
But none shows at all.

How can i browse all tags to add them? I have a huge bunch of arrays for logging purposes that i need and dont really want to sit and define each and every single one.

I have viewed the OPC doing what this page shows inductiveautomation.com/resourc … reate-tags

The plc status is connected according to ignition gateway.

I am not sure if this is related.
But in the console page i see this error popping up several times
[ERROR] 09:30:08 ReadRequest Error reading S7ReadResponse. Error code = 8104.

In Ignition you can’t browse Siemens PLC’s for tags.
You must add them to Ignition by your self, either by ‘hand’ or by scripting.

It’s frustrating, I know, but… :angry:

When I have a lot of tags (especially for alarms), I export them from step7/TIA to csv or excel, correct the files (remove unnecessary things), save as csv, create (or correct the old one) a script in Ignition script console to read csv and import/create tags…

As stated by zxcslo, the excel/CSV + script method works. You can also import XML files with your tag definitions directly in the designer (maybe the most straightforward way), or write a module to create tags from a csv using the TagNode and TagDefinition classes in the SDK (my chosen method). You can take a look at the user manual for the correct Siemens addressing format.

Going further, some Siemens S7 series PLC’s are a bit more complicated. There are some settings that must be verified on the PLC before you can read data without permission related errors (that would be S7ReadResponse. Error code = 8104). This knowledge base article was useful:

https://support.inductiveautomation.com/index.php?/Knowledgebase/Article/View/29/2/connecting-to-siemens-s7-1200-and-s7-1500

Regarding the XML method, you can export previously created tags to XML from the designer to see the format your file should have, and the information it should contain.

Siemens announced for September in the TIA V14 new functionality:

  • for S7-1500 there will be an integrated OPC-UA Server but restricted to DA (Date Access)
  • symbolic access and access to optimized DBs will be possible
  • Security is interated

This is, what Siemens told me a few days ago.

May be there ist a chance, that we get a better driver/access and the possibilty for browsing variables?

:prayer:

[quote=“bmast”]Siemens announced for September in the TIA V14 new functionality:

  • for S7-1500 there will be an integrated OPC-UA Server but restricted to DA (Date Access)
  • symbolic access and access to optimized DBs will be possible
  • Security is interated

This is, what Siemens told me a few days ago.

May be there ist a chance, that we get a better driver/access and the possibilty for browsing variables?

:prayer:[/quote]

This probably doesn’t mean anything for us in terms of making the driver better, but once this functionality is released you can simply make a UA connection to the PLC instead of using the driver. I know some models already have this available, or have it available as an add-on card that goes in the chassis.

I’m also trying this method. Would happen to know what script was used to read the csv files and import tags?

Here is my last script for importing alarm tags and texts from Siemens S7 PLC to Ignition.

import xml.etree.ElementTree as ET
import locale

decimalPoint=locale.localeconv()['decimal_point']
thousandsSep=locale.localeconv()['thousands_sep']

#print decimalPoint
#print thousandsSep

OPCServer='Ignition OPC-UA Server'
deviceName='[s7_1500]'
alarmFolderName='Mora1/Alarms'

pathIn=system.file.openFile('csv')

if pathIn != None:
    txt = system.gui.inputBox("OPC Server:", OPCServer)
    if txt != None:
        OPCServer=txt   
    txt = system.gui.inputBox("Device Name:", deviceName)
    if txt != None:
        deviceName=txt   
    txt = system.gui.inputBox("Alarm Folder Name:", alarmFolderName)
    if txt != None:
        alarmFolderName=txt   
    fileIn=open(pathIn)
    xx = 0
    for line in fileIn:
    	xx += 1 #for numbering the alarms, so that they are sequenced
    	bitname=line[line.find(';')-7:7].strip().replace(' ','') #for adding at the end of alarm text
    	#print bitname
        bit=line[line.find(';')-7:7].strip().replace('M ','MX')
        tagnametemp=line[line.find(';')-7:7].strip().replace('.','_')
        #print tagnametemp
        tagname=tagnametemp.replace(' ','')
        #print bit
        #print tagname
        alarmtext = str(xx) + ". " + line[line.find(';')+1:].strip() + " (" + bitname + ")"
        print alarmtext
        #alarmConfig={"Alarm 1":[["name", "Value", "Alarm 1"], ["setpointA","Value", 1.0], ["ackMode", "Value", 1]]}
        system.tag.addTag(parentPath=alarmFolderName, name=tagname, tagType="OPC", dataType="Boolean", attributes={"OPCServer":OPCServer, "OPCItemPath":deviceName+bit}, alarmConfig={alarmtext:[["name", "Value", alarmtext], ["setpointA","Value", 1.0], ["ackMode", "Value", 1]]})

    fileIn.close()

I run this in Script console in Designer.
I’m sure that this script will not fit your needs but it’ll give you an idea how ‘easy’ this can be done… just change it to suit your csv file…

And this is the format of my .CSV file:

M 400.0;(M400.0) Napaka transport TR28->TR30
M 400.1;(M400.1) Napaka transport TR30->TR31
M 400.2;(M400.2) Napaka transport TR31->TR31A
M 400.3;(M400.3) Napaka transport TR31A->TR31B
M 400.4;(M400.4) Napaka transport TR31B->TR33
M 400.5;(M400.5) Napaka rezerva
M 400.6;(M400.6) Napaka transport TR33->TR34
M 400.7;(M400.7) Napaka transport TR34->TR35
M 401.0;(M401.0) Napaka transport TR35->TR36
M 401.1;(M401.1) Napaka transport TR36->TR37
M 401.2;(M401.2) Napaka transport TR37->TR38
M 401.3;(M401.3) Napaka transport TR38->TR39
M 401.4;(M401.4) Napaka transport TR39->TR40
M 401.5;(M401.5) Napaka transport TR40->TR41
M 401.6;(M401.6) Napaka transport TR41->TR42
M 401.7;(M401.7) Napaka transport TR42->TR43
M 402.0;(M402.0) Napaka transport TR43->TR44
M 402.1;(M402.1) Napaka transport TR44->TR45
M 402.2;(M402.2) Napaka transport TR45->TR46
M 402.3;(M402.3) Napaka transport TR46->TR47
M 402.4;(M402.4) Napaka transport TR47->TR48
M 402.5;(M402.5) Napaka transport TR48->TR49
M 402.6;(M402.6) Napaka transport TR49->TR50
M 402.7;(M402.7) Napaka transport TR50->TR51
M 403.0;(M403.0) Napaka transport TR51->TR52

I always prepare csv file in Excel… Now, with TIA portal you can just copy and paste from tags in TIA to Excel.

3 Likes

This was very helpful. Thank you sir!

Hello! Very new to ignition here. I just spent an hour scratching my head wondering why I can’t browse the tags like I see people do on youtube (with micrologix) with my S7-1200 then I finally find this post… Is this post still up to date? Can you still not browse tags? :frowning:

Not unless you have the newest firmware version that includes an embedded OPC UA server that you make an OPC UA connection to instead of using the S7 driver. The S7-1500's have had this embedded server for a few years now but the 1200's only recently got it.

Alternatively you can use a 3rd party OPC UA server like the one from TANI. They have done significant amounts of reverse engineering and have managed to provide tag browsing for the 1200 and 1500.

The Ignition S7 driver will not likely ever be able to browse tags.

Thanks for the fast reply. That is really helpful, I will do some investigating and find which way works best for me.

Hello. For anyone who stumbles across this post...
This video is great for anyone wanting to setup an OPC UA server on an S7 1200 and shows the correct configuration in TIA portal. It is quite long so just skip through as you need.

For the setup of the OPC client in ignition, it is really simple but here is the ignition guide:
https://docs.inductiveautomation.com/display/DOC80/OPC+UA+Client+Connection+Settings

1 Like