It is currently Tue Jul 22, 2014 1:18 am




Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next
 S7-300 send data to PC with Ignition/OPC-UA 
Author Message
Cadet
Cadet

Joined: Tue Sep 20, 2011 10:49 pm
Posts: 2
Post S7-300 send data to PC with Ignition/OPC-UA
Hi

I'm very new into this, but also very keen to learn new stuff.
I'm currently practicing on a test setup with a few DI and DO's.
I would like the plc to send data from a DB to the PC and use Ignition to create a project.
I've played around with the ignition designer and the dairy simulator and getting some basic graphics to work is the least problem right now.

I've setup the 343-1 Lean with correct IP and network. And the OPC-UA server on the PC is connected to the PLC over ethernet.

I've made an AG_Send FC5 in the PLC programme, stated that data in DB11 should be send.
Looking at the status bits in the PLC of the FC5 block I'm not sure the data is actually being sent.

And for sure, when trying to add tags in Ignition designer, the device has no tags to choose from.

What am I missing here? Anyone has the patience to help a newbie ;)


Tue Sep 20, 2011 11:04 pm
Profile
Moderator
Moderator

Joined: Mon Oct 27, 2008 4:10 pm
Posts: 1980
Location: Folsom, CA
Post Re: S7-300 send data to PC with Ignition/OPC-UA
The S7 protocol doesn't support browsing, so tags have to be added by hand in the designer.

Create a new SQLTag, and for the Item Path you would specify something like "[MyDeviceName]MyAddress", where "MyDeviceName" is whatever you named your device when you set it up in the gateway and "MyAddress" follows the address format for the kind of device you are connecting to.

The manual page for the Siemens driver describes the address formats a bit. Addressing a tag in a DataBlock would be something like:
Code:
[MyDevice]DB11,B0

which would address DataBlock 11, offset 0 as a Byte.

_________________
Kevin Herron
Software Developer
Inductive Automation


Wed Sep 21, 2011 6:31 am
Profile WWW
Cadet
Cadet

Joined: Tue Sep 20, 2011 10:49 pm
Posts: 2
Post Re: 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.


Wed Sep 21, 2011 4:35 pm
Profile
Cadet
Cadet

Joined: Tue Feb 19, 2013 7:01 am
Posts: 7
Post Re: S7-300 send data to PC with Ignition/OPC-UA
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 (http://inductiveautomation.com/support/ ... ssing2.htm )
thank you for your help
Eric


Tue Feb 19, 2013 7:34 am
Profile
Moderator
Moderator

Joined: Mon Oct 27, 2008 4:10 pm
Posts: 1980
Location: Folsom, CA
Post Re: S7-300 send data to PC with Ignition/OPC-UA
RicoCh wrote:
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 (http://inductiveautomation.com/support/ ... ssing2.htm )
thank you for your help
Eric



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

_________________
Kevin Herron
Software Developer
Inductive Automation


Tue Feb 19, 2013 7:46 am
Profile WWW
Cadet
Cadet

Joined: Tue Feb 19, 2013 7:01 am
Posts: 7
Post Re: S7-300 send data to PC with Ignition/OPC-UA
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


Tue Feb 19, 2013 8:29 am
Profile
Moderator
Moderator

Joined: Mon Oct 27, 2008 4:10 pm
Posts: 1980
Location: Folsom, CA
Post Re: S7-300 send data to PC with Ignition/OPC-UA
RicoCh wrote:
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


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.

_________________
Kevin Herron
Software Developer
Inductive Automation


Tue Feb 19, 2013 9:02 am
Profile WWW
Cadet
Cadet

Joined: Tue Feb 19, 2013 7:01 am
Posts: 7
Post Re: S7-300 send data to PC with Ignition/OPC-UA
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


Attachments:
captureUAexpert-Ignition+SIMATIC_OPCUA-servers.PNG
captureUAexpert-Ignition+SIMATIC_OPCUA-servers.PNG [ 115.15 KiB | Viewed 2768 times ]
Wed Feb 20, 2013 2:38 am
Profile
Moderator
Moderator

Joined: Mon Oct 27, 2008 4:10 pm
Posts: 1980
Location: Folsom, CA
Post Re: S7-300 send data to PC with Ignition/OPC-UA
The addressing format is going to be like it's specified in the Ignition user manual: http://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...

_________________
Kevin Herron
Software Developer
Inductive Automation


Wed Feb 20, 2013 6:52 am
Profile WWW
General
General

Joined: Tue Jan 24, 2012 10:58 am
Posts: 231
Post Re: S7-300 send data to PC with Ignition/OPC-UA
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.


Wed Feb 20, 2013 7:33 am
Profile
Cadet
Cadet

Joined: Tue Feb 19, 2013 7:01 am
Posts: 7
Post Re: S7-300 send data to PC with Ignition/OPC-UA
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 :twisted:
(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 ;) )

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 :)
Eric


Attachments:
File comment: capture of Siemens 's simple client ...
CaptureSiemensSimpleClient.PNG
CaptureSiemensSimpleClient.PNG [ 24.3 KiB | Viewed 2728 times ]
Wed Feb 20, 2013 8:40 am
Profile
General
General

Joined: Tue Jan 24, 2012 10:58 am
Posts: 231
Post Re: S7-300 send data to PC with Ignition/OPC-UA
Ah, the simple client... A very good example of how not to make an OPC-UA client. :twisted:

The namespace you are looking for is:
Code:
uri://ip.ip.ip.ip/Ignition%20OPC-UA%20Server


Attachment:
SimpleClient.png
SimpleClient.png [ 21.47 KiB | Viewed 2725 times ]


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...


Wed Feb 20, 2013 9:32 am
Profile
Cadet
Cadet

Joined: Tue Feb 19, 2013 7:01 am
Posts: 7
Post Re: S7-300 send data to PC with Ignition/OPC-UA
Hi Chi :)

thanks a lot ..; that was so obvious that URI meant "complete URI" that I totaly missed it! :oops:

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

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" ;-)
is it somehaow on IA's roadmap?

cheers
Eric


Thu Feb 21, 2013 6:25 am
Profile
Moderator
Moderator

Joined: Mon Oct 27, 2008 4:10 pm
Posts: 1980
Location: Folsom, CA
Post Re: S7-300 send data to PC with Ignition/OPC-UA
RicoCh wrote:
Hi Chi :)

thanks a lot ..; that was so obvious that URI meant "complete URI" that I totaly missed it! :oops:

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

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" ;-)
is it somehaow on IA's roadmap?

cheers
Eric


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.

_________________
Kevin Herron
Software Developer
Inductive Automation


Thu Feb 21, 2013 7:34 am
Profile WWW
Cadet
Cadet

Joined: Tue Feb 19, 2013 7:01 am
Posts: 7
Post Re: S7-300 send data to PC with Ignition/OPC-UA
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 ;-)
Eric


Thu Feb 21, 2013 7:51 am
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: