S7-300 send data to PC with Ignition/OPC-UA

Thanks, I didnā€™t know that about the browsing.
But I got the designer setup now, to poll data from the DB in question.

Thanks for your help.

hi,Iā€™ve another question regarding this topic :
is it possible to directly access the PLC symbols from the Ignition opc-ua server without using OPC client and SQLTags ?

I mean, Iā€™d like to develop an OPC-UA client that directly accesses the datapoints in the same manner as described in Siemens Drivers addressing page (inductiveautomation.com/support/ ā€¦ ssing2.htm )
thank you for your help
Eric

[quote=ā€œRicoChā€]hi,Iā€™ve another question regarding this topic :
is it possible to directly access the PLC symbols from the Ignition opc-ua server without using OPC client and SQLTags ?

I mean, Iā€™d like to develop an OPC-UA client that directly accesses the datapoints in the same manner as described in Siemens Drivers addressing page (inductiveautomation.com/support/ ā€¦ ssing2.htm )
thank you for your help
Eric[/quote]

You can develop your own OPC-UA client and connect it to the Ignition OPC-UA server, if thatā€™s what youā€™re asking.

hi kevin,
yes thatā€™s what I mean but the problem is not here.
when I connect to the Ignition OPC-UA via a generic OPC-UA client, I can only see ā€œ_meta:Diagnosticsā€ and no datapoints from the PLC, when I can fully see all the datapoints from another AllenBradley PLC.
ok, I saw that S7 protocol doesnā€™t allow browsing , yet I thought Iā€™d be able to access my DBs in the same way like [myPLC]address .
Eric

[quote=ā€œRicoChā€]hi kevin,
yes thatā€™s what I mean but the problem is not here.
when I connect to the Ignition OPC-UA via a generic OPC-UA client, I can only see ā€œ_meta:Diagnosticsā€ and no datapoints from the PLC, when I can fully see all the datapoints from another AllenBradley PLC.
ok, I saw that S7 protocol doesnā€™t allow browsing , yet I thought Iā€™d be able to access my DBs in the same way like [myPLC]address .
Eric[/quote]

You can, but you have to figure out how to force the UA client youā€™re using to read or subscribe to nodes with the right NodeId, which youā€™ll have to enter manually. They wonā€™t show up in a browse.

hi Kevin, thanks for your support.

the problem is exactly there : what is the nodeID format accepted by the Siemens Driver module that can be passed to S7 protocol ?

Iā€™ve attached a capture of what I see with both the Ignition server and the Simatic opc ua server.
could you give me a hint on this right nodeId thing please?
thanks again
Eric


The addressing format is going to be like itā€™s specified in the Ignition user manual: inductiveautomation.com/support/ ā€¦ ssing2.htm

Youā€™ll also have to make sure the NodeId is in namespace index 1, and you prefix the above Siemens address with ā€œ[DEVICE_NAME_IN_IGNITION]ā€.

So, for example:

[MyS7300]IB0
[MyS7300]DB1,DI8

etcā€¦

Just to make sure there are no misunderstandings:
The Siemens OPC Server supports importing symbolic addresses from a STEP7 project, so these symbols (like CPU1:MyDB.MyTag) can then be used by OPC clients instead of the address.

The Ignition OPC Server does not know the symbols, so you always have to use absolute adressses here.

thanks both for your help,
yes Chi, I totaly agree cause Siemens OPC server uses XDBs to resolve symbols names :wink:

and to answer you Kevin, I totally agree with you on namespace index (1) and NodeId format string.

I think the problem I encounter is with the "Simple OPC UA client " from Siemens in which i donā€™t see how to formalise this namespace index.
when I use Siemensā€™s OPCUA the correct string is ā€œS7:ā€, yet I canā€™t find the corresponding one for the ignition server :smiling_imp:
(yes , the name given here - LiaisonOPCUA_S300) is the one of the S7 connection bewteen the PLC and the OPCUA server and should not be used in the [S300]address string :wink: )

Iā€™m about to going back to Prosys Sample Client ā€¦ and try to find the correct method to send my ā€œns=1, NodeIdā€ reference string
keep in touch then :slight_smile:
Eric


Ah, the simple clientā€¦ A very good example of how not to make an OPC-UA client. :smiling_imp:

The namespace you are looking for is:

uri://ip.ip.ip.ip/Ignition%20OPC-UA%20Server


When using the UA-Expert client, you will see this is entry #1 in the namespace array (aka NS1). In any other client i know, you use the index instead of the valueā€¦

Hi Chi :slight_smile:

thanks a lot ā€¦; that was so obvious that URI meant ā€œcomplete URIā€ that I totaly missed it! :blush:

It went perfectly well with Prosys java sdk sample client and was dealt in 2 lines of code !

static S300nodeIdMW0 = new NodeId(1, "[S300]MW0"); read(S300nodeId1) ;

since XDBs are not very text readable, it may be interesting to be able to imports symbols and DBs into Siemens OPCUA module from some Step7 exports and be able to build internal PLCā€™s ā€œobjects namespaceā€ :wink:
is it somehaow on IAā€™s roadmap?

cheers
Eric

[quote=ā€œRicoChā€]Hi Chi :slight_smile:

thanks a lot ā€¦; that was so obvious that URI meant ā€œcomplete URIā€ that I totaly missed it! :blush:

It went perfectly well with Prosys java sdk sample client and was dealt in 2 lines of code !

static S300nodeIdMW0 = new NodeId(1, "[S300]MW0"); read(S300nodeId1) ;

since XDBs are not very text readable, it may be interesting to be able to imports symbols and DBs into Siemens OPCUA module from some Step7 exports and be able to build internal PLCā€™s ā€œobjects namespaceā€ :wink:
is it somehaow on IAā€™s roadmap?

cheers
Eric[/quote]

I had a parser for the .AWL file format about 80% ready for the initial release of the driver, but then we went ahead and launched without it. The parser has since been sent to the bit dungeon. Maybe someday Iā€™ll work on that again.

one more question for my global comprehension of the behaviour:

we see that, when discovering ignition OPCUA namespaces, the one that indexes Devices (ns=1) is only showing the ā€œtopā€ folder for each connected device.

Then, if we want to access one specific address inside the PLC, we have to prefix it with [device_name_in_ignition_module]
so my question are :
what is the orientation taken by IA for the OPCUA module to access Siemensā€™s PLC adresses?

Is it by building the namespace with ALL available NodeIds (taken from PLCā€™s DataBlocks,IOs,Flags, etc.) of the declared/connected PLCs (eg: S300)? and if so, how are managed Hardware bloc extensions (DIO,AIO, etc.)?

or is there a sort of ā€œonly oneā€ nodeID (eg: S300) that has a special parsing gateway or feature that extracts the address prior to send it to S7 channel ?

thanks in advance for any info you can share on that :wink:
Eric

[quote=ā€œRicoChā€]one more question for my global comprehension of the behaviour:

we see that, when discovering ignition OPCUA namespaces, the one that indexes Devices (ns=1) is only showing the ā€œtopā€ folder for each connected device.

Then, if we want to access one specific address inside the PLC, we have to prefix it with [device_name_in_ignition_module]
so my question are :
what is the orientation taken by IA for the OPCUA module to access Siemensā€™s PLC adresses?

Is it by building the namespace with ALL available NodeIds (taken from PLCā€™s DataBlocks,IOs,Flags, etc.) of the declared/connected PLCs (eg: S300)? and if so, how are managed Hardware bloc extensions (DIO,AIO, etc.)?

or is there a sort of ā€œonly oneā€ nodeID (eg: S300) that has a special parsing gateway or feature that extracts the address prior to send it to S7 channel ?

thanks in advance for any info you can share on that :wink:
Eric[/quote]

Our OPC-UA server/drivers will attempt to create UA Nodes ā€œon the flyā€ as they are accessed. So the Siemens nodes donā€™t actually exist in the address space until someone attempts to access them for the first time.

Thereā€™s no access to the extensions you mention.

hi, kevin,
thank you for this information,

and so they don't either after first access !
when I rebrowse the namspace afert having accessed my node , I still don't see it

I was thinking about doing some PLC nodeId initialization when launching my OPC-UA client, to get them all "under view"
do you think it's worth it ?

another point is : does the newly created Nodes have subscription, historizing, etc. available to my client ?
or, how can we set them to have so?

cheers
Eric

[quote="RicoCh"]hi, kevin,
thank you for this information,

and so they don't either after first access !
when I rebrowse the namspace afert having accessed my node , I still don't see it
[/quote]

They won't ever show up during browsing, but they should still exist. You can use the Read, Write, CreateMonitoredItem, DeleteMonitoredItem, ModifyMonitoredItem, etc... services and target these Nodes like any other node.

Hi.

I have been trying to add tags from a S7 300.

I understand that I need to add them manually, using Ignition Designer>Add OPC tag:

Name: Tag1

Data type: Bool

Enabled: Yes

Acces rights: read only

OPC Server: Ignition OPC-UA Server

OPC Item Path: [S7 300 IP 125]DB7,DBX0.0

Scan Class: Default

After apply and close the pop-up I can not find the tag or connect it with any display of my HMI.

I am sure that I am doing something wrong, but I am very new with Ignition

Thanks

[quote=ā€œadriancamposā€]Hi.

I have been trying to add tags from a S7 300.

I understand that I need to add them manually, using Ignition Designer>Add OPC tag:

OPC Item Path: [S7 300 IP 125]DB7,DBX0.0
[/quote]

Is ā€˜S7 300 IP 125ā€™ the name of the device as youā€™ve set it up in the Ignition gateway? If not, thatā€™s what is supposed to go in that section.

Additionally, DB7,DBX0.0 is not a valid address. What address are you trying to read? Have you read the user manual section on Siemens addressing? inductiveautomation.com/support/ ā€¦ ssing2.htm

Is ā€˜S7 300 IP 125ā€™ the name of the device as youā€™ve set it up in the Ignition gateway? If not, thatā€™s what is supposed to go in that section.

Additionally, DB7,DBX0.0 is not a valid address. What address are you trying to read? Have you read the user manual section on Siemens addressing? inductiveautomation.com/support/ ā€¦ ssing2.htm[/quote]

Yes that is the name in Ignition gateway.

Yes I read the user manual, I am trying to read the first bit of the DB7. It is a boolean data type. could be DB7,DBX0?

Thanks for your fast reply.

Okay, I get it, with DB7,X0.2

But I already create other tags, the same method, but they not appear on the tag tree, also if I try to create them again, a error window says that the tag is already created with this name.