S7NetPlus / s7netplus

S7.NET+ -- A .NET library to connect to Siemens Step7 devices
MIT License
1.3k stars 580 forks source link

S7-1200 Reading Datablocks - WrongVariableFormat #441

Closed mustafaxfe closed 2 years ago

mustafaxfe commented 2 years ago

I have been following this instruction ( https://www.youtube.com/watch?v=tYTjNG8YL-c ) to read data blocks. It works normally using PLCSIM (NetPLCSim).

But It is not working with my PLC hardware.

It returns "WrongVarFormat" exception for every Read call. I can read the value of DB2.DBX0.0 addressed with PLCSIM but it is not working with PLC(S7 1200) hardware.

I made these configurations but it didn't solve my issue.

bolt-b commented 2 years ago

hi, if you are still have challenges, could you show me a piece of the code (C#), also it would be nice to see your DB in TIA Portal that you are trying to read (make a picture of that).

mustafaxfe commented 2 years ago

I made a factory reset and this solved my issue. Everything works as intended. Thank you.