st-one-io / node-red-contrib-s7

A Node-RED node to interact with Siemens S7 PLCs
GNU General Public License v3.0
111 stars 58 forks source link

S7-1500 - On variable read Bad Values #79

Closed b8rother closed 3 years ago

b8rother commented 3 years ago

Describe the bug

I'm trying to read variable (boolean) every 5 seconds from DB26.DBX0,0 (in node-red DB26,X0.0). This test works in PLCSim Advanced V3.0 but not using real PLC. Optimized block access is deactivated, Full access (no protection) is selected, PUT/GET is enabled.

In debug window I get "Failure (Bad values)"

Expected behavior

I expect to get variable value (true or false).

Logs

node-red log with --verbose option is attached. logs.txt

Flow

flow is attached. flows_json.txt

Environment

Additional context

I've seen similiar issue with S7-1200 resolved by updating the CPU firmware. works on PLCSIM but only get "bad values"..

b8rother commented 3 years ago

I solved a problem that, like most other problems, was caused by the user, and in this case it was me. 😄 I had to change in the project of TIA Portal the Device configuration of the PLC. The Firmware version in General -> Catalog information was wrong (in my case ver. 2.6) while the CPU had loaded firmware 2.8.2. The mismatch of versions was causing the problem. This is for future reference if anybody else is going to have similar problems.

The Full access (no protection) does not need to be enabled for this case of communication.