You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Good day,
I want to connect Python with my S7 PLC machine, but I have received some (security) errors when I enter some of the default codes.
This is the error:
b'CPU: Item not available'
This happens for at least: read_area, get_protection & get_plc_datetime
I found out this Issue is a security issue with this discussion and followed it: #323 and turned on "Permit acces with PUT/GET communication from remote partner" with Tia portal (which I'm not an expert on) and downloaded it to my device. Still this didn't help. Though I'm not sure if the "Permit Access" setting is truly on the PLC. I have compiled and downloaded it on the device and more, I dont know.
Any ideas what to do next? Or is this the final answer? #323 (reply in thread)
What have to be configured and what is supported is shown here. These configs have to be done and loaded on the PLC.
It seems that snap7 was installed and loaded correctly, since you received an error message from snap7 and it isn't a Pythonerror which shows up (that would be our fault then).
"The DB was wrongly configured" is probably the fault.
because if "read_area should work on all devices." then my command:
`
client.read_area(snap7.types.Areas.DB, 1, 10, 4)
`
is because of the DB. Is there a command for read_area that doesnt involve db that I can use?
And the "DB" is that the database implemented in the PLC siemens machine or something else?
Because my goal is to read a value from the PLC with their PLC address like: "M0" or "DB24.20" and get the current value of it.
But I cant figure out the correct command to receive such data.
Repository owner locked and limited conversation to collaborators on Mar 22, 2022
Activity
[-]function refused by CPU (Unknown error)[/-][+]Item not available[/+][-]Item not available[/-][+]Item not available (Still)[/+]swamper123 commentedon Mar 22, 2022
Hey Ho :)
b'CPU: Item not available'can be caused either:or
What have to be configured and what is supported is shown here. These configs have to be done and loaded on the PLC.
It seems that snap7 was installed and loaded correctly, since you received an error message from snap7 and it isn't a Pythonerror which shows up (that would be our fault then).
read_areashould work on all devices.GameModes commentedon Mar 22, 2022
Hey,
"The DB was wrongly configured" is probably the fault.
because if "read_area should work on all devices." then my command:
`
client.read_area(snap7.types.Areas.DB, 1, 10, 4)
`
is because of the DB. Is there a command for read_area that doesnt involve db that I can use?
And the "DB" is that the database implemented in the PLC siemens machine or something else?
Because my goal is to read a value from the PLC with their PLC address like: "M0" or "DB24.20" and get the current value of it.
But I cant figure out the correct command to receive such data.