OPC Arrays in CITECT

razi57

Member
Join Date
Jan 2008
Location
Ein-Hashofet
Posts
16
Can anyone please advise me about OPC Array tags? I'm using SIMATIC NET OPC server, and CITECT OPC Client (the latest OPC Driver, V1.15.18.001). The single Tags work perfectly (much faster even then the S7NT Protocol). But not so with Array tags.I've tried to implement the instructions written in the CITECT driver help, and in KB articles, but couldn't get a result.

My definitions are:

I/O Device Protocol: OPC1 (as is advised by the "Driver Help". Since SIMATIC OPC address format contains "[")

Variable Tag: Data type – INT. Address - S7:[Connection_ID]DB450,INT768,18 (following the OPC.SimaticNET address format)

This array address was checked with SIMATIC's OPC Scout, and is communicating perfectly.
I've also tried the advised OPC parameters in my CITECT.INI file, and defined the arrays there. Again, with no success. Doe's anyone have a working example of the required proper definitions to get it going?
Thanks
 
I would be inclined to absolutely forget OPC with Siemens and Citect quite frankly. The Citect OPC implementation is not particularly good and I do not like OPC anyway.

Have you had a good look at the South African driver for Siemens PLCs that Citect are now selling? One of my clients tells me it is very good and well worth the cost.
 
Siemens/Citect OPC

Hi Bob

OPC implementation is shorter and simpler with SIMATIC NET/CITECT then S7NT protocol. It's also much faster.

You're probably speaking of the PSdirect Driver from CITECT. Yes, I've heard it's better than S7NT. But anyway, I need the SIMATIC NET's OPC for my WinAC application, so I don’t want to by two drivers.


Thanks

Razi
 
Hi Razi.

Is it not possible to "browse" the OPC tags from within Citect ?
In that case you could find the already configured array tags, and in that way get the naming right - assuming that the problem is with the naming.

Other than that, it should be answerable by Citects own support. OPC is so important that a deficiency should be cleared, not bypassed or ignored.
 
CITEC OPC Arrays

Hi Jesper


The OPC tag browser is given by Simatic Net Software (called "OPC Scout"), and I got the address format right from there. The problem arises with Array tags, since, according to CITECT, the "[" contained in the SIMATIC OPC address forbids addressing them directly, and a parameterization ([OPCArrays])is needed in the CITECT.INI file. These are the parameters I cannot get right to do the work with my Arrays. With single tags, the OPC.SimaticNET address format works perfectly well. CITECT provides a document depicting the parameters needed to do the trick. I just couldn't get it to work according to my understanding of their instructions.


Thanks

Razi
 
JesperMP said:
Hi Razi.


Other than that, it should be answerable by Citects own support. OPC is so important that a deficiency should be cleared, not bypassed or ignored.

I agree, Citect have a support structure in place (a good one at that) and should be able to give you an answer straight away

I have asked a few simple Citect questions in the past but came to the conclusion that if it is something fundamental such as driver issue and as we are paying for support through the CIP agreement then why not use it ?
 
Hi again Razi.

Many OPC clients softwares have an OPC browsing functionality. Maybe Citect has browsing functionality too.
The Siemens OPC Scout is a test client. It can be used to "browse" OPC tags as well.

If it is possible to browse OPC array tags in a test client, but not in Citect, then it is a deficiency in Citect, no matter what explanation they give for it. Thus they should fix it.
 
CITEC OPC Arrays

Thanks to all who reply.
I've posted the issue in Citect's Forum, but didn't get any answer as yet. So I thought I might try my luck with the PLCS.net. Anyway, I'm quiet sure that my target is a comma/period/space/etc. away. So I'm waiting for someone experienced with the right Array syntax to give me the clue.


Best regards

Razi

 
Just found this in the Citect KB, any use ?

Using OPC with Array Returns Error 'Array has been overrun'.

Article number: Q3614
Created on: 23/07/2001
Product: Citect for Windows Versions 5.xx

[size=+]Summary[/size]
Using OPC with array returns error 'Array has been overrun'.

Example:

The problem happened using TagRead() with the S7 string:

S7:[S7_PB_Verb1|VFD1|CP_L2_1:]DB32,40.0,1

[size=+]Solution[/size]
A new entry OPC1 has been added to protdir.txt. This option is used to support using Cicode function TagRead() and TagWrite() for tag with " [ " in their address. Details as following:

OPC:

Using Cicode function TagRead() and TagWrite() for Citect Array where " [ " is only at the end of Tag address and must be used with !A together. For example:

Variable Tag Name:Status_FlagsAddress:device(1967).analog-output(1).status-flags!A[4]
Using this option, driver supports both INI array and Citect array provided " [ " is not in tag address(device address in opc server).

OPC1:

Using Cicode function TagRead() and TagWrite() for tag with " [ " in their address. For example:

Variable Tag Name:String1 (Single tag)Address:S7:[S7_PB_Verb1|VFD1|CP_L2_1:]DB32,40.0,1
Or:

Variable Tag Name:Status1 (INI Array tag)Address:Status_Array[52] (no exclamation mark is used)
In this case, driver just supports INI array.
 


I've read this KB, as well as the whole opc_extract.pdf concerning the issue. I wouldn't have bothered you guys before reading all the available material on the subject. The problem with this explanation, as you may see, is that S7:[S7_PB_Verb1|VFD1|CP_L2_1:]DB32,40.0,1, is a valid address for a single tag. And these work just fine in my Project. However,For Array tags, Address:Status_Array[52] is the correct syntax, but the physical address must be defined elsewhere. opc_extract.pdf gives the following example for CITECT.INI parameter:


[OPCArrays]

IOServer1.IODev1.Count=2

IOServer1.IODev1.Array0=Tag1[0],L10

IOServer1.IODev1.Type0=2

IOServer1.IODev1.Array1=Tag1[0]/0,L160

IOServer1.IODev1.Type2=2


The million $$$ question is: where is the physical address of the above "Tag1[0],L10" defined? Should it be defined somehow outside CITECT? In OPC Scout maybe? So that CITCET will know what "Tag1[0],L10" refers to?


 
Forget the OPC Scout. It is just a test client.

I am betting that what you are looking for is that there shall be defined OPC symbols in Simatic Net already.
Example:
In STEP7, in a DB "My_DB" is created an ARRAY "My_array" of INTs, so that there exists variables that are addressed as "My_DB".My_array[nn].
Next, when the OPC Connection is setup in Simatic Net, it must be specied that symbols from the S7 project be included in the configuration.
The result will be that you can comfortably browse all the symbols from the S7 project in the OPC Client. And importantly, you do not adress the absolute adresses (i.e. DB12.DBW66 etc.) but the symbols.

edit.......

I dont know the formatting of that Citect INI file, but some guesses could be:

(if the array is specified by pointing to the 1st element)
IOServer1.IODev1.Array0=S7:[My_connection]My_DB.My_array[1], L 10
or
IOServer1.IODev1.Array0=S7:[My_connection]My_DB.My_array!A[1], L 10

(if the array is specified by pointing to the entire S7 array)
IOServer1.IODev1.Array0=S7:[My_connection]My_DB.My_array, L 10

Of course I can be totally off track :)
And I dont know what the "L" and the "10" does, I can guess but I cannot know.
 
Last edited:
Defining symbols for CITCET OPC

Hi Jesper


Thanks for the idea. The truth is, that I've already tried defining symbols in "OPC address space" in OPC Settings of the "Configuration Console", but didn't succeed.

However you gave me a new idea of how I should define the symbols. So I'll try it tomorrow, and let you know.


Best Regards

Razi

 
razi57 said:
The truth is, that I've already tried defining symbols in "OPC address space" in OPC Settings of the "Configuration Console", but didn't succeed.
No that is not it.

There must be a STEP7 project with both the S7 PLC project and the PC Station project that represents the Citect PC.

When you setup the OPC Server in the HW Configuration, you shall select on the "S7" tab, "Use Symbols" .. "All". As the name says - all symbols of the connected S7 projects will be included in the connection info. Thats all.

You can test it with the OPC Scout. When you add a connection to "SimaticNet" and when you start to add items there shall be a folder called "symbols". From there you shall be able to comfortably browse all symbols from the STEP7 project.
 

The "OPC Server" entry in my HW Configuration is defined exactly as you suggested. The OPC Symbols in the OPC Scout are, in my opinion, not connected to CITECT, since, as you close the "OPC Scout", the symbols remain in a file, and CITECT cannot find them. I think it's more likely that the configuration of symbols should be made in the OPC Settings of the "Configuration Console", since then, they becomes part of the PC Station. Anyway, I will try again in both locations, although I've tried it already. Only this time, I will, as you suggested, embed them in CITECT.INI.
 

Similar Topics

I am running CCW 13 trying to upload to a micro 820 vers.12 I get an output message OPC server is unable to load project controller. Please help!
Replies
5
Views
184
I know nothing about simaticnet OPC server. I do know Kepware. I would only ever scale raw to engineering in the PLC, but it is possible to scale...
Replies
5
Views
212
If anyone has a crack for IBH OPC Server, please send it to: [email protected] Urgently. Thanks in advance!
Replies
1
Views
119
Folks, I have a client with an old ABB Advant / MOD300 system (v14.4). Around y2k I installed the ABB Industrial IT MOD300 OPC Server 1.1/2...
Replies
1
Views
166
Hi good day Everyone, I have a cimplicity v10 project with 7 to 8k tags communicating with AB PLC through OPC and Rslinx classic. I have this...
Replies
3
Views
212
Back
Top Bottom