Search code examples
c#plcsnap7

Variable Name read from DB instead address(offset)


Is there any way to read the DB data from its variable(Name) only in C# ? Consider SIMATIC S7 PLC 1200 E.g. I want to read a data from DB where i don't know the address(offset), i only know the DB number,symbolic name and data type. For reference please see the following picture.

enter image description here

I have already made the working connection via Sharp7(Non-Optimized DB method) but i always need a address. I have also looked for some other solutions like,

  1. "S7connector" by Rothenbacher GmbH
  2. s7.Net | S7netplus

but it doesn't seems to work for me. I also don't know if this is possible , as i heard somewhere that PLC only takes the addresses but not the variable names.

All the comments are highly appriated.


Solution

  • Use OPCUA instead. If you're using s71200 or s71500 then you have limited possibilities. Also, it uses disabled optimized DB so it is not possible to read DB variable via symbolic name.

    enter image description here