Siemens Device String

Hi,
Siemens S7-300:
OPC-UA Server with Siemens Device

What is the correct way to address a string in a DB.
I have a DB that contains batch data (Setpoints/Actual/Type etc.)
It also has a number of strings.

One string is at address DB105.DBB12.0 and is a String[24]

How do I address this in Ignition?
I’ve tried the manual method but all I get is null: [BobyPLC01]DB105,STRING12.24
Also tried
[BobyPLC01]DB105,STRING12,24
[BobyPLC01]DB105,ISTRING12.24
[BobyPLC01]DB105,ISTRING12,24

The string reads correctly using kepware and wonderware comm servers.
I need to use the Ignition server.
All other addressing is working ok.

Tim

anybody??

When I use the addressing outlined in the manual, i.e. [BobyPLC01]DB105,STRING12.24 for a string
in DB105 at offset 12 with datatype STRING[24], I get the following error in the log:

[quote]INFO | jvm 1 | 2014/07/16 11:55:56 | ERROR [BasicExecutionEngine ] [11:55:56,603]: Task bobyplc01 requesthealthmonitor threw uncaught exception.
INFO | jvm 1 | 2014/07/16 11:55:56 | java.lang.NullPointerException
[/quote]

Also, all other tags for this device go to ‘Bad Quality’ when I use the above address.
Note that this address works correctly using other OPC servers.

Can anybody help with this?

Hi,
the address ‘DB105,STRING12.24’ works for me without problems. I tested with Ignition 7.6 and a S7-300.
Are you sure your datablock is correctly loaded to the CPU? Maybe other OPC Servers are a bit more tolerant when the DB in the CPU is to short.

1 Like

Hi! I have a similar issue. I’ve checked the web for hours and believe it or not this is the closest post to a solution I’ve come across.

I have set up a device connection between Ignition and a S7-300. Setting up a test tag in Ignition I can read things like IW0 and IX0 (although I have no idea what they are). I just wanted to test connectivity.

Now I am trying to understand the Siemens syntax, which is confusing and the documentation on both Siemens and Ignition is inadequate.

I have a binary tag in a PLC device named W30 with an address DB90.D28.2. I’ve tried the following in Ignition to address this tag:
[W30]DB90.D28.2
[W30]DB90,D28.2
[W30]DB90,BYTE28.2
[W30]DB90,BOOLEAN28.2
I get a configuration error for all of them.

I also have a 8-bit unsigned byte with an address D90.DBB36. I’ve tried:
[W30]DB90.DBB36
[W30]DB90,DBB36
[W30]DB90.BYTE36
[W30]DB90,IBB36
[W30]DB90,IB36
I also get nothing but errors.

The Siemens driver documentation has a couple of very basic addressing examples. I would suggest these need to be significantly expanded to include more realistic application such as the use of data blocks and arrays to be of any practical value.

Anyone figured out how to do this?

1 Like

I figured it out.

DB90.D28.2 -> [W30]DB90,B28.2
DB90.DBB36 -> [W30]DB90,B36

For individual bits, you must always use X (there is no B28.2 or D28.2 address in Siemens…)
For example:
in Siemens address is: DB90.DBX28.2 (DBX means DataBlock bit)
in Ignition address is: [IW30]DB90.X28.2

If you want to address let say Input 10.4 or Output 12.1:
in Siemens: I10.4, Q12.1
in Ignition: [IW30]IX10.4, [IW30]QX12.1

While I agree that documentation (Siemens Addressing) is basic, it provides you with all ‘Basic’ addressing. If you want/need more, then you need help from PLC programmer to explain to you the addressing in Siemens (if you are not familiar with) or to read some Siemens manuals about addressing and memory space in Siemens PLC.

Or just ask here, on the forum, if you have some specific question…

And another thing: Ignition Siemens driver doesn’t support arrays…

1 Like

Hi,

I have two tags
[PARI-Testbed]DB200,STRING18.0
[PARI-Testbed]DB200,STRING86.0

Both tag read from Datablock , where we created Array of data type CHAR.

I have issue that, we can read one tag "[PARI-Testbed]DB200,STRING18.0 " but second tag
[PARI-Testbed]DB200,STRING86.0
shown error " - uncertain initial value. Both tag s has same configuration , same data type then why it’s shows error for second tag only ?
Please suggest if any other way to read both tags

Keep in mind that STRING is not the same as an array of CHAR. The Siemens string type has an additional byte of length information.
Also, your address STRING86.0 makes no sense. In Ignition’s Siemens driver that means a string at address 86 with length 0.

I’m sorry ,
It’s my mistakes .my address are :

PARI-Testbed]DB200,STRING18.10
[PARI-Testbed]DB200,STRING86.10

I have attached plc data block structure. Where array of char started with 18. Which ia first tag. I want to tag which read first 10 character.

Same for second tag.which started from86.
For this I’m writing tag address which is mentioned above. Is it write or wrong. If is it wrong please suggest anathet path. (Address)

Out of 2 tag one is

PARI-Testbed]DB200,STRING18.10 which is read value correctly but another tag
PARI-Testbed]DB200,STRING86.10 which shows eror "uncertain initial value ".

If both tag have Sane configuration then why second tags show error.

Are you sure that your first tag is reading the correct value? As I have written above, the Siemens STRING type starts with 2 bytes length info. So for your first tag, the driver expects the max length at byte 18 and the actual length at byte 19. The first character read is byte 20.
If you can modify the plc program, insert those control bytes in your db. If this is not possible, you have to define 10 separate tags and use an expression tag in Ignition to build your string.
You see, the Siemens driver in Ignition has limited capabilities and does not support arrays. There are 3rd party OPC-UA servers with array support.

I think you need to use the ‘STRING’ type in the PLC?
Instead of CHAR

Hi,
Yes , first tag value & its quality also good.
I am try this solution both you are suggested.
Thanks for Suggestion.

If any other suggestion plz tell me