OI SIDIR Symbolic: variables with hyphens

Hi all, I'm trying to read data from an integrator machine, and I'm facing an issue where they used hypens (-, U+002D HYPHEN-MINUS) in some of their variable names. There is around 70 I/O attributes, and all those with hypens arent working while the others are perfectly fine.

I'm not getting any errors in the DDE or in the platform logs, but given that hyphens arent allowed in attributes names, I'm quite sure they are the source of the issue.

My DDE mapping looks like this:

DB on the PLC side looks like this:

is there any way to format the Item Reference to get around this issue ? I might be able to get this integrator to modify their program accordingly, but if there's a trick I'd still like to know it !

It's on an S7 1500, put/get communications have been turned off so Legacy SIDIR wont work. System Platform 2023 R2 SP1 with the matching OI.

Parents
  • Have you tried with quotation marks?

    "P302.01-P01"

    I seem to remember from an old project that I have even seen some adresses with a space in the middle, but I might not remember that right :)

  • It is ! I did try the whole thing in quotation marks, but for some reason just the variable name in quotation marks didnt cross my mind.

    Note: in hindsight, I think the hyphen isnt the issue, it's actually the dot that made it think it was pointing inside an udt/struct

  • Hi,

    in the SIDIRECT OI-Server Manual (CDP 2023 R2 SP1.iso../Docs/OISIDIR.pdf) you find this Information:

    Tag References from Application Server and InTouch

    The symbolic tag names supports space and period characters in item syntax. For the names of the data block, tag, or member with a space or a period, write it within the double quotes as shown in the below examples.

    Data Block

    Tag

    Member

    Application Server Attribute I/O reference

    DB

    Tag

    Member

    In User Defined Object (UDO): DB.Tag.Member

    In Object Viewer: SIDir.T01.DB.Tag.Member

    In InTouch: DB.Tag.Member

    DB

    Tag

    Mem D

    In UDO: attribute(DB.Tag."Mem D")

    In Object Viewer: SIDir.T01.attribute(DB.Tag."Mem D")

    In InTouch: DB.Tag."Mem D"

    DB D2

    Tag T2

    Mem M2

    In UDO: attribute("DB D2"."Tag T2"."Mem M2")

    In Object Viewer: SIDir.T01.attribute("DB D2"."Tag T2"."Mem M2")

    In InTouch: "DB D2"."Tag T2"."Mem M2"

    DB.D2

    Tag.T2

    Mem.M2

    In UDO: attribute("DB.D2"."Tag.T2"."Mem.M2")

    In Object Viewer: SIDir.T01.attribute("DB.D2"."Tag.T2"."Mem.M2")

    In InTouch: "DB.D2"."Tag.T2"."Mem.M2"

    DB

    T2[0]

    Mem

    In UDO: attribute(DB.T2[0].Mem)

    In Object Viewer:SIDir.T01.attribute(DB.T2[0].Mem)

    In InTouch: DB.T2[0].Mem

    DB

    T1 T2[2]

    Mem

    In UDO: attribute(DB."T1 T2"[2].Mem)

    In Object Viewer: SIDir.T01.attribute(DB."T1 T2"[2].Mem)

    In InTouch: DB."T1 T2"[2].Mem

    Where:

    • SIDir - represents a DDE/SL object configured to connect SIDirect Communication Driver
    • T01 - is the topic name in the DDE/SL object

    I hope it helps.

    BR

    Uwe

    PS: If possible, activate the OPC UA Server and browse the Tags with OI-Gateway.

Reply
  • Hi,

    in the SIDIRECT OI-Server Manual (CDP 2023 R2 SP1.iso../Docs/OISIDIR.pdf) you find this Information:

    Tag References from Application Server and InTouch

    The symbolic tag names supports space and period characters in item syntax. For the names of the data block, tag, or member with a space or a period, write it within the double quotes as shown in the below examples.

    Data Block

    Tag

    Member

    Application Server Attribute I/O reference

    DB

    Tag

    Member

    In User Defined Object (UDO): DB.Tag.Member

    In Object Viewer: SIDir.T01.DB.Tag.Member

    In InTouch: DB.Tag.Member

    DB

    Tag

    Mem D

    In UDO: attribute(DB.Tag."Mem D")

    In Object Viewer: SIDir.T01.attribute(DB.Tag."Mem D")

    In InTouch: DB.Tag."Mem D"

    DB D2

    Tag T2

    Mem M2

    In UDO: attribute("DB D2"."Tag T2"."Mem M2")

    In Object Viewer: SIDir.T01.attribute("DB D2"."Tag T2"."Mem M2")

    In InTouch: "DB D2"."Tag T2"."Mem M2"

    DB.D2

    Tag.T2

    Mem.M2

    In UDO: attribute("DB.D2"."Tag.T2"."Mem.M2")

    In Object Viewer: SIDir.T01.attribute("DB.D2"."Tag.T2"."Mem.M2")

    In InTouch: "DB.D2"."Tag.T2"."Mem.M2"

    DB

    T2[0]

    Mem

    In UDO: attribute(DB.T2[0].Mem)

    In Object Viewer:SIDir.T01.attribute(DB.T2[0].Mem)

    In InTouch: DB.T2[0].Mem

    DB

    T1 T2[2]

    Mem

    In UDO: attribute(DB."T1 T2"[2].Mem)

    In Object Viewer: SIDir.T01.attribute(DB."T1 T2"[2].Mem)

    In InTouch: DB."T1 T2"[2].Mem

    Where:

    • SIDir - represents a DDE/SL object configured to connect SIDirect Communication Driver
    • T01 - is the topic name in the DDE/SL object

    I hope it helps.

    BR

    Uwe

    PS: If possible, activate the OPC UA Server and browse the Tags with OI-Gateway.

Children
No Data