I would like to read the spindle speed of a Siemens PLC 317-2DP with NCU 720.2.
To do that, I use the python snap 7 library.
I managed the connexion to the PLC, but I would like to read the spindle speed with the function read_area(area: Areas, dbnumber: int, start: int, size: int).
I am unable to find the parameters dbNumber, start and size for my case.
Does someone can help me please? I read that it depends of the configuration of the PLC, but where I can find this configuration?
Thanks for your help
I read the documentation from Siemens "SINUMERIK 840D sl NC variables and interface signals" but I didn't find what I needed...
In general in order to access to a variable in the plc you need to have a db block as I previously mentioned in one of my comments, but one important thing is to marked this block as not optimized:
if you have created this db an you recently added new variables a compile is needed to recalculate the offset in the variables. If you perform these steps successfully you will be able to see the offsets like in the following image:
I post this information as an answer for people that need that information in the future.
Regards
Miguel