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

works on PLCSIM but only get "bad values" on a real S7-1200 #36

Closed jupiter8888 closed 5 years ago

jupiter8888 commented 5 years ago

Well, i will need a hand on this one,

every thing works o.k in simulation with PLCSIM, so i changed the ethernet adress, complied, uploaded program in a s7-1200, started everything, tested o.k with TIA portal, can see values changing in my watch table and yes, put/get is enable, block optimisation disable and no protection is checked.

I'm running Node-Red locally in the same laptop as TIA. put the plc's ethernet address in the node. Without any variable the node is connected and no errors are reported. but with a variable i get "bad data" in the debug tab and "Error S7 endpoint : xxx Error connecting to PLC [object object]" in node-red debug window. i can ping the plc. Nothing is changed, only ethernet address, same flow used for simulation. Node-red V.0..19.6 S7 node V.1.5.4

Even tried with a raspberry pi, same flow, same results, and i can ping the plc from the pi too.

any idea what can cause this?

Thanks. capture

jupiter8888 commented 5 years ago

Finally nailed it. It looks like installed firmware version 4.1 was the culprit, afler installing version 4.2 it works.

But beware, i could'nt start the cpu after because of version mismatch, you have to replace the cpu from the catalog and reupload program and redownload it in TIA to make it work.

gfcittolin commented 5 years ago

I've already heard stories about fixing connection problems by upgrading the firmware, but it wouldn't cross my mind as a suggestion for this. Great that it worked after all, and thanks for sharing the solution!