New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how read the IP address for PLC from Hardware? #18
Comments
I'm found number Rack and Slot for CP and CPU (3xx and 4xx) |
Have you also find out where the IP is stored? |
I am looking for. But it's not easy. Ich bin für. Aber es ist nicht einfach. |
Ich glaube die sind eher im Ordner CONN... also nicht bei der Hardware! |
I've also tried again. I used Winmerge, and compared two projects after changeing a IP, but I had no success |
No. |
The Byte before the IP Adress String is the Length of the String. |
Pascal? |
Pascal? what do you mean? |
Pascal has string as: first byte is length, the rest up to 255 bytes is text. |
I'm disassembled file S7NONFGX.DLL, but that does not found. |
What do you mean? |
File S7NONFGX.DLL is the only file that has a string of "S7Netze", then it reads the file "\S7Netze\S7NONFGX.tab", but in this file I could not find how to read this structure with IP, mask and MAC. |
here is also little bit info: |
so einfach? bravo! |
I found for the CP: IP address, MAC, mask and router, but only for simple CP. |
I'm a little confused. |
I will modifie your changes a little bit, because for Example a CPU or PG can have more than one Network Interface... |
Good. |
I need the code of "IndexOfByteArray" |
ups. sorry.
|
more:
always is TRUE.
|
|
in my test project every cp is added twice (lean 340) so i looked in the hrelatio file and se, i have two entrys for every cp. but i will overwoek it, i also see in the hobject dbf in this folder also the ports seem to be in that file... |
Today I downloaded the new version, in my project, he showed the CPFolder.Count = 0, I removed the condition "if (x.TobjTyp == 1314972)", the CP appeared, but without Network. Corrected as I sent yesterday, appeared Network. Add "pull Requests" with my changes? |
I can send the project on which I am trying to |
why is your network info missing? i changed nothing on your reading code! |
i mean nothing functional! |
in "//Get The CP Folders" i'm add code:
you do not have this |
I sent the file Step7ProjectV5.cs
they help to find small changes, but in the release are not needed. |
hello I hope these thoughts as they will help. |
I now checked my code for 30 different projects, always determine the correct IP address. |
Which code you use for reading the IP address?? I get the cpufolder but the property NetworkInterfaces is always null. Should I run some code before to parse the addresses? |
Yes SvenMag, can you create a Git Pull Request, with the changes yu have to the current Master Branch? I've now reverted my changes to reading from the hrelatio.dbf. I will add your Code that works for your Projects, still I've no time at the moment to look into this. |
I'm change my project (https://github.com/SevenMag/DotNetSiemensPLCToolBoxLibrary) for read IP. |
I send you a Project wich does not work. There are read now 4 CP's (it only has two), in my Tree in the Toolbox, only the two are shon, but the other two get the IPs. I think we have two combine this two CP entrys in any way! |
I'm add to CPFolder one more CPFolder as SubModul, see it. |
may be a little to alter the reading of the DB-files. In each folder, you first need to read HOBJECT1.DBF and then HRELATI1.DBF. |
When HW Config shows two CP, but raed 4 this is may be because the 2 Ethernet CP and 2 CP Profibus. |
Can I send you a Example Project? (I thought I did, but I don't find your EMail adress, i replied to github...) |
Yes. send to berlyakov.ev@npoa.mmk.ru |
I have not received anything. |
We have found for the networkInterface: IP, MAC, Router, Name; |
I send it to you now... |
If there are more options you read out, feel free to create Properties and fill them... |
I know that there are so many options (I found the tags difference), but I do not know what it is. |
Project Test1 has 54 IP address, but only 3 for controller (1 in CPU and 2 CP), right? Need to create interfaces for profibas and MPI, which would seek options for them.. Make them please: as you know, that would not alter my. |
I don't understand what you are trying to say? |
OK. |
I think they Both could be nearly the same, since it's physicaly the same Bus and maybe have the same Properties... |
It's already read? |
No, it's not read. I only wnated to say you can maybe use the same class for both... |
wie Sie die IP-Adresse der PLC von Hardware lesen?
The text was updated successfully, but these errors were encountered: