Closed Steff42 closed 6 years ago
Ok, then let's go one level deeper and test without the adapter:
create a file in the iobroker directly like "logotest.js" with:
var snap7 = require('node-snap7');
var s7client = new snap7.S7Client();
s7client.SetConnectionParams(<ip>, <localTsap>, <remoteTsap>); // C++
s7client.Connect(function(err) {
if(err)
return console.log(' >> Connection failed. Code #' + err + ' - ' + s7client.ErrorText(err));
// Read the first byte from PLC process outputs...
s7client.ABRead(0, 1, function(err, res) {
if(err)
return console.log(' >> ABRead failed. Code #' + err + ' - ' + s7client.ErrorText(err));
// ... and write it to stdout
console.log(res)
});
});
fill in the three parameters ... then execute with "node logotest.js" ... what happens?! Maybe also test comparable with logo8 to see differences ... ?!
Sorry for my bad english. I executed it in the /opt/iobroker directory, is this right? The answer from a 0BA7 ist <Buffer 00>
The answer from a 0BA8 ist <Buffer 00> to.
I have 2 another 0BA7 in use, and they have different answers. I get "Buffer a0" and on the other one a <Buffer 01>
Ok, dann Deutsch! :-)) interessant, sieht auf jeden Fall so aus als ob die Connection klappt. er liesst einfach das erste byte aus, also von daher kann das durchaus unterschiedlich sein.
Installier mal Adaoter bitte vom Github. Habe mal Connection Logging eingebaut. Was sagt der beim Start jetzt?
Jetzt wirds einfacher. Brauche nur einen Schubs wegen dem Installieren vom Github. Wie mache ich das? Ich tippe auf --> Adapter --> Installieren aus eigener URL --> Adapter auswählen, oder bin ich da falsch?
Korrekt
und dann aber Adapter instanz nochmal manuell restarten
OK, ist installiert, Adapter habe ich gestoppt und neu gestartet. Die Antworten sind aber bei der 0BA7 und der 0BA8 gleichgeblieben
Ahh, ich sehe gerade im Log komm jetzt eine Info mehr zu Anzeige. Bei den 8ern steht jetzt "Connect in S7 mode to 0 / 2" und bei den 7ern steht "Connect in S7 mode to 2 / 2". Ich glaube die Info wolltest Du haben. Sorry!
Interessant. Was steht denn in den "localtsap und remotetsap drin? Steht bei einem ne n0 drin?
Local 03 00 und Remote 02 00
bei der 7er habe ich vergessen zu sagen. Bei der 8er ist Local 02 00 und Remote 01 00 drin
warum diese Werte? es muss eine zahl sein. fürchte da kommt das Problem her
hex 0300 ist 768 hex 0200 ist 512 versuch mal
Hmm, habe ich versucht geht aber nicht. Nur das ich keinen Fehler gemacht habe: Die 4 Felder in der Adapterkonfig lassen jeweils 2 Zahlen pro Feld zu, also gebe ich bei Local vorne 07 und hinten 68 ein? Bei Remote dann genauso, oder?
aaahh ... ne dann war vorher alles gut. hatte ich nicht gesehen ... lass mich schauen. Ein gefallen bitte:
geh mal im Admin unter "Objekte" auf Expertenmodus und dann bei "system.adapter.s7.X" auf den Stift und dort unter "raw nur experten" brauche ich den abschnitt mit "native". will wissen was in den werten steht
Kein Ding, hier der Abschnitt native von der 7er Logo }, "native": { "params": { "ip": "192.168.0.120", "rack": "2", "slot": "2", "localTSAP": 768, "remoteTSAP": 512, "round": "2", "poll": "1000", "recon": "60000", "pulsetime": "500" },
also stehen da mal die richtigen werte drin ... gut
Bitte nochmal vom github updaten. ist jetzt noch ne logzeile am anfang mehr
OK jetzt kommt zusätzlich bei der 7er die Info LOG localTsap=undefined / remoteTsap=undefined und bei den 8ern die Info LOG localTsap=0 / remoteTsap=0. Hab vor dem Update noch was gesehen ich schicke gleich noch den Native-Teil von einer 8er Logo, da war ein unterschied.
Hier ist der Native-Teil von einer 8er, vergleiche mal ab Eintrag Pulsetime. Die Zeilen fehlen bei der 7er! }, "native": { "params": { "ip": "192.168.0.115", "rack": "0", "slot": "2", "localTSAP": 512, "remoteTSAP": 256, "round": "2", "poll": "1000", "recon": "60000", "pulsetime": "500", "localTsap": 0, "remoteTsap": 0 },
aaaahhhhhh ... wir kommen der sache näher ... ich schau nachher mal genauer, hab ne vermutung
Hast DU bei der 8er Logo auch das "s7-Logo" häckchen gesetzt? hast du auch ein native von einer nicht-logo?
Jupp, bei der 8er ist das Häckchen gesetzt. Was meinst du mit Nicht-Logo? Etwa eine "normale" S7 Steuerung? So was habe ich leider nicht.
oder kannst du mal bei einem adapter das häckchen wegnehmen, speichern und mir das native schicken ?! kannst danach wieder reinnehmen.will nur ne vermutung bestätigen :-)
Kein Problem, hier der native Teil von der 7er ohne Häckchen }, "native": { "params": { "ip": "192.168.0.120", "rack": "2", "slot": "2", "localTSAP": 0, "remoteTSAP": 0, "round": "2", "poll": "1000", "recon": "60000", "pulsetime": "500" }, und hier von der 8er Logo auch ohne Häckchen }, "native": { "params": { "ip": "192.168.0.115", "rack": "0", "slot": "2", "localTSAP": 0, "remoteTSAP": 0, "round": "2", "poll": "1000", "recon": "60000", "pulsetime": "500" },
wie vermutet ... daher hoffentöich lösung auf github :-)
neu installieren, dann bitte log checken beim starten. denke ich habs gefixt
Jackpot!! Hier der Log-Eintrag von einer 8er Connected in LOGO! mode Connect in LOGO! mode to 512 / 256 LOG localTSAP=512 / remoteTSAP=256
und hier von einer 7er Connected in LOGO! mode Connect in LOGO! mode to 768 / 512 LOG localTSAP=768 / remoteTSAP=512 Adapter Lampe ist Grün!
strike :-)) mache ein update fertig und poste im forum das es andere auch testen. remoteTsap ist halt ungleich remoteTSAP :-)
Wo, sagtest Du, steht deine Spendenkasse? ;-)
Spende einfach an ioBroker wenn Du willst :-)) Landet dann bei Bluefx und der Infrastruktur :-)
OK muß aber doch noch mal reingrätschen sobald ich einen DB aufrufe geht der Adapter auf Gelb
Das sieht dann so aus. Ich lese eine Temperatur aus über DB 1 WORD 0, dann kommen die folgenden Meldungen. Nehme ich den DB wieder raus ist alles OK s7.3 | 2018-01-05 19:09:52.044 | error | try reconnection |
---|---|---|---|
s7.3 | 2018-01-05 19:09:52.041 | warn | Poll error count: 6 code: 0xa006e |
s7.3 | 2018-01-05 19:09:52.040 | warn | DBRead error[DB 1:0 - 2]: code: 0xa006e |
s7.3 | 2018-01-05 19:09:48.034 | warn | Poll error count: 5 code: 0xa006e |
s7.3 | 2018-01-05 19:09:48.032 | warn | DBRead error[DB 1:0 - 2]: code: 0xa006e |
s7.3 | 2018-01-05 19:09:44.029 | warn | Poll error count: 4 code: 0xa006e |
s7.3 | 2018-01-05 19:09:44.028 | warn | DBRead error[DB 1:0 - 2]: code: 0xa006e |
s7.3 | 2018-01-05 19:09:40.024 | warn | Poll error count: 3 code: 0xa006e |
s7.3 | 2018-01-05 19:09:40.023 | warn | DBRead error[DB 1:0 - 2]: code: 0xa006e |
s7.3 | 2018-01-05 19:09:36.019 | warn | Poll error count: 2 code: 0xa006e |
s7.3 | 2018-01-05 19:09:36.018 | warn | DBRead error[DB 1:0 - 2]: code: 0xa006e |
s7.3 | 2018-01-05 19:09:32.014 | warn | Poll error count: 1 code: 0xa006e |
s7.3 | 2018-01-05 19:09:32.012 | warn | DBRead error[DB 1:0 - 2]: code: 0xa006e |
s7.3 | 2018-01-05 19:09:26.997 | info | Connected in LOGO! mode |
s7.3 | 2018-01-05 19:09:26.992 | info | Connect in LOGO! mode to 256 / 512 |
s7.3 | 2018-01-05 19:09:26.990 | info | LOG localTSAP=256 / remoteTSAP=512 |
Was sagt das log? Jetzt sind wir dann in anderen gefilden. Die Frage ist daher erstmal wie genau eine "Korrekte "konfig aussehen muss und ob es da auch wieder unterschiede zwischen LOGO und normal gibt ... Weisst DU da was?
Unter http://snap7.sourceforge.net/logo.html steht:
The LOGO memory that we can Read/Write is the V area that is seen by all HMI (and Snap7 too) as DB 1. Into it are mapped all LOGO resources organized by bit, byte or word.
und ganz unten ist ne Tabelle.Hilft das?
Die Tabelle kenne ich. Komisch ist nur, bei den 8er Logos schiebe ich massenweise Daten in den DB1 ohne Probleme. Auch bei den Eingängen und Ausgängen ist das bei der 8 kein Problem. Habe gerade mal einen Ausgang in der 7er parametriert, auch da geht der Adapter auf gelb und ich bekomme o.g. Log-Einträge
Schaue nach dem Abendessen später nochmal weiter.
Kein Problem ich muss auch mal einen Happen Essen
Noch eine Info, mindestens einmal bekomme ich einen Wert übertragen, der auch noch stimmt --> 850 in diesem Fall 8,50 Grad
Na super... du hast alles richtig gemacht, ich bin der Depp!! Ich hatte noch LogoControl laufen, und das greift natürlich auch auf die Logo´s zu. Das scheint aber für die 7er zuviel des Guten gewesen zu sein. Nachdem ich LC beendet habe rennt die 7er wieder. Interessant ist aber der Umstand, das die 8er da viel unempfindlicher sind als die 7er!
Ist ja auch eins höher als die 7 ;-))
Hatte schon befürchtet jetzt doch in die snap7 tiefen einsteigen zu müssen. Ich schreib das noch auf die readme als hint für die snap7
Das scheint es zu sein. Guter Vorschlag mit der readme. Eine Sache, noch die 1.1.1 wird bei mir noch nicht Adapter angezeigt, aktualisiert habe ich schon. Wo muß ich noch draufklicken?
Die 1.1.1 ist ja noch nicht gepublished. Release es später und packe es gleich ins stable.
Ah, OK ich war von einem Log, das Vumer im Forum geposted hat irritiert, da bei ihm schon die 1.1.1 drinstand. Alles OK und wieder was gelernt.
Denke er hat es auch vom github installiert
Gut möglich.
It looks like the adapter with Siemens LOGO 0BA7 will not work. See http://forum.iobroker.net/viewtopic.php?f=36&t=7209&start=40