Siemens S7-1200 help, can't connect via
# umh-support
t
Siemens S7-1200 help, can't connect via node-red nodes....or umh
I first was trying to use umh, couldn't get it to work...I'll have to try again to get details... I moved to node-red to see if it was just UMH, well....doens't look like it....node red doesn't work either... I did everything in this video....except he's using a plc simulator.

https://www.youtube.com/watch?v=rTUs-_EiZ3A▾

Here is my result... https://cdn.discordapp.com/attachments/1339388234572103680/1339388773565202452/image.png?ex=67ae8a80&is=67ad3900&hm=da1676cc78db35a190e2016daf93276b8514739b86e5d251c4b0a2f970f5a521&
yes, I enabled put/get yes, I turned off optimized block access
I also tried this with multiple pcs with node-red...so it's not the pc.
It's not the slot number, if I change that, I get connection refused.
d
is the rack/slot set correctly? is get/put (s7) enabled on the plc side? is optimized block access disabled of the db you want to read?
j
@Janik
j
You can ignore the cpu information for now, could you share your input please?
t
Copy code
s7comm:
    tcpDevice: '192.168.100.61' # IP address of the Siemens S7 PLC
    rack: 0            # Rack number of the PLC. Defaults to 0
    slot: 1            # Slot number of the PLC. Defaults to 1
    disableCPUInfo: true
    addresses:         # List of addresses to read from
      - "DB2.DW0"
j
I'm assuming the addressing is somehow wrong here. Do you have access to the S7-project and are able to share some details from within the data-block and the corresponding opc-ua server interface?
t
OPCUA server? I'm using S7 protocol....
j
yeah i meant the data-block addressing within the data-block here
t
I made it exactly as the youtube video....but i'm opening up the project
j
are you able to connect within tia portal and see the values of the data-block?
oh and btw i think you will have to change that to "DB2.W0" since the data type is word here
t
Yea, I realized that, changed it...and it doesn't make a difference
j
okay I'm trying to recreate that right now (takes a while, because windows..) but were you able to go online within tia portal ?
t
I was last night...i'm working in an old windows 7 vm....having an issue....just need a moment
j
I'll check on that, need a moment too
so it does work fine with an existing plc, but i assume you're doing it with plcsim like it was shown in the video right? I'll head back to you after testing this one
t
No, I’m using an actual PLC
Do you have any idea about firmware and Tia portal version?
j
well for s7-protocol firmware shouldn't be an issue here, we're using v4.4 and also v4.6. TIA Portal is V19, but this shouldn't be an issue either
so the pdu-issue you're receiving should be due to wrong addressing / data type here. connectivity should work here, since you're able to connect within benthos
t
but it works fine on your end? did you create the DB2 and DATA array just like mine?
j
yes, let me take some screenshots for you here
d
try to disable all security in your project (it has been quite a hassle since v18)
i'm on v16
I assume the plc is accessible from within your instance? just to double check it's not a networking issue here
t
the connection adds just fine in the console with the ip address and port 102....
j
I'm sorry to ask this one, but i have to make sure if this is either a weird bug or some setup issue (e.g. tia portal). Can you share the device configuration for the "PROFINET" interface [X1] ?
I hope this thread helps someone... But I think I resolved it... I went to the diagnostic functions, and "reset to factory defaults" compiled both software and hardware (compile all) and re-downloaded to the device
Thank you everyone in the thread, for trying to help, but it looks like the good old fashioned "start over" method fixed it.
j
i'm glad that it works now, so at least it has to be something in device config although it looked fine
t
yea, I don't know what happened, for some reason everything was configured fine....but something in the controller was corrupted
why does the processing default config have content().string() as default? seems like number would be more appropriate?
j
So it doesn’t fail when a first time user also adds accidentally some strings. Better get a result than no result
d
could it be that you did some changes in the hardware settings and forget to compile and download ? I have noticed that TIA portal does not complain about mismatch for some hardware settings..
d
i think so too, could it be that you didnt download the hardware configuration of the PLC?
t
how do you not download them? I used device download at the top toolbar, and all of my comparisons came back green.
d
thats not correct
right click on your plc in the project tree, go to download and than click "download hardware"
download hardware configuration*
without this you will not permit s7
d
yes, as Diederik said you need to right click on the PLC and first compile the hardware settings and the download it to the plc..
t
OK thanks, for all the help
2 Views