Skip to content

[Bug]: some asymmetry in tag-handling #2388

@DvonHolten

Description

@DvonHolten

What happened?

when you add parameters to a S7 request, you have two ways to do it:

  • builder.addTagAddress( "name", "%DB69:68:STRING(20)" )
  • builder.addTag( "name", S7Tag.of("%DB69:68:STRING(20)" )

however, in the second form we get an error, because the S7Tag.of() notation does not recognize the string-length parameter. It may be good enough when reading a string from PLC, but will make a mess when writing.
Looking into S7Tag.of() and addTagAddress() shows, that S7Tag.of() does not use the regexes which could handle the added "(20)" length parameter. addTagAddress() uses these regexes and can deal with this addresses.

Version

V0.13.1

Programming Languages

  • plc4c
  • plc4go
  • plc4j
  • plc4net
  • plc4py

Protocols

  • AB-Ethernet
  • ADS /AMS
  • BACnet/IP
  • C-Bus
  • CANopen
  • EtherNet/IP
  • Firmata
  • IEC-69870
  • KNXnet/IP
  • Modbus
  • OPC-UA
  • Profinet
  • S7
  • S7-light

Metadata

Metadata

Assignees

No one assigned

    Labels

    S7https://plc4x.apache.org/users/protocols/s7.htmljavaPull requests that update Java code

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions