Autor Thema: OSCAT-NETWORK-LIB 1.35 TESTVERSION  (Gelesen 76227 mal)

0 Mitglieder und 2 Gäste betrachten dieses Thema.

Offline peewit

  • Moderator
  • *****
  • Beiträge: 2 378
    • Profil anzeigen
Re: OSCAT-NETWORK-LIB 1.35 TESTVERSION
« Antwort #30 am: 22. April 2017, 19:32:14 »
ich habe die network-lib 1.35 aktualisiert

wesentliche änderung ist die wiederbelebung bzw reparatur des yahoo_weather bausteins

http://www.oscat.de/community/index.php/topic,2546.msg13223.html#msg13223

Offline AntonZan

  • Newbie
  • *
  • Beiträge: 10
    • Profil anzeigen
Re: OSCAT-NETWORK-LIB 1.35 TESTVERSION
« Antwort #31 am: 26. April 2017, 10:42:14 »
I am using the network lib v1.35 with Wago Codesys v2.3.9.49 (currently the latest version supported by Wago), and oscat basic lib v333. When building, I get error messages "Cannot pass the result of a IEC-function as string parameter to a C-function". This is related to the use of function CONCAT (2nd parameter) within blocks BASE64_DECODE_STR, BASE64_ENCODE_STR, DNS_DYN, GET_WAN_IP, IP2GEO, MD5_CRAM_AUTH, SYS_LOG, WORLD_WEATHER. And to the use of function LEN (1st parameter) within TN_INPUT_MENU_POPUP.

The error message seems to me to indicate that the result of a string function is directly passed as a parameter to some other function or function block. Just assigning the value to an intermediate variable and passing that instead of a direct function result (technically a pointer to a value rather than the value itself?) might be enough, but may come at the cost of a performance penalty (always a trade off, especially when dealing with strings).

For now I can work around this by excluding most of the blocks of the network lib from build. However, this will limit my options for using more of the network lib in the future. Am I doing something wrong, is there a version incompatibility, can I work around this error by manual tweaking of code?


Edit: one additional question
One of the applications of DLOG_STORE_FILE_CSV for me is to log some error conditions. I use triggered logging for this, rather than continuous. I log at the rising and falling edge of the error condition, so I can also tell from the logs how long an error condition was up. Some kinds of errors can last a long time, logging working fine for this. Some others can last only a fraction of a second, perhaps only one or a few cycles of the PLC program. I.e. typically communication related errors. For these short duration error conditions I only catch one edge, usually the rising edge (errorcondition = true), not the falling edge. So I cannot tell how long the error actually lasted. I see from log files that time (DLOG_DT with format #N:#R:#T:#V) is always rounded to whole seconds. Miliseconds are always zero, perhaps this is related.

Is it possible to obtain higher resolutions of the time, or is a 1 second logging interval the practical limit of logging with these components?
« Letzte Änderung: 26. April 2017, 11:17:57 von AntonZan »

Offline peewit

  • Moderator
  • *****
  • Beiträge: 2 378
    • Profil anzeigen
Re: OSCAT-NETWORK-LIB 1.35 TESTVERSION
« Antwort #32 am: 26. April 2017, 14:56:26 »
The following you can try

Column 1 = current time (date time)
Column 2 = current time (milliseconds)
Column 3 = your own values
Column 4 = your own values
etc

DLOG_STORE_FILE_CSV.TRIG_M (trigger by your application -> rising edge)

Offline AntonZan

  • Newbie
  • *
  • Beiträge: 10
    • Profil anzeigen
Re: OSCAT-NETWORK-LIB 1.35 TESTVERSION
« Antwort #33 am: 26. April 2017, 15:45:14 »
Thank you peewit, I will give that a try.


Do you have suggestions for the error messages ("Cannot pass the result of a IEC-function as string parameter to a C-function")?

Offline peewit

  • Moderator
  • *****
  • Beiträge: 2 378
    • Profil anzeigen
Re: OSCAT-NETWORK-LIB 1.35 TESTVERSION
« Antwort #34 am: 26. April 2017, 16:07:36 »
This is apparently a limitation on your sps

Offline annD

  • Newbie
  • *
  • Beiträge: 46
    • Profil anzeigen
Re: OSCAT-NETWORK-LIB 1.35 TESTVERSION
« Antwort #35 am: 19. Juli 2017, 21:50:02 »
Hallo,

ich habe die aktuelle Version der Oscat-Network-Lib (vom 22.04.2017) auf Codesys v3.5 portiert. Dabei habe ich keine funktionellen Änderungen durchführen müssen. Ich habe nur formelle Korrekturen (Namensräume, Klammern, Überlappungen im CFC, usw.) durchgeführt. Ich habe unter Codesys 3.5.11.0 auf einem PFC200 den IP_CONTROL zum Senden von DMX-Daten und den YAHOO_WEATHER getestet.

Vielleicht kann sich der eine oder andere etwas Arbeit damit sparen.

Gruß annD


« Letzte Änderung: 02. Juni 2020, 21:25:27 von annD »

Offline j_poool

  • Newbie
  • *
  • Beiträge: 47
    • Profil anzeigen
Re: OSCAT-NETWORK-LIB 1.35 TESTVERSION
« Antwort #36 am: 22. Oktober 2017, 10:48:32 »
Hallo
Ich sehe hier wird über mein Yahoo_Weather Bausstein Problem gesprochen....
Seit einiger Zeit funktioniert das Baustein nicht mehr
Error_C = 65024
Errot_T = 2

NETWORK_BUFFER_LONG_SIZE habe ich auf 8190 und
NETWORK_BUFFER_short_SIZE auf 2814 erhöht

YW_DATA liefern mir nur die LOCATION_CITY bis ASTRONOMY_SUNSET Daten
FORECAST Daten bleiben leer....

Vielen Dank für den Support


[gelöscht durch Administrator]

Offline peewit

  • Moderator
  • *****
  • Beiträge: 2 378
    • Profil anzeigen
Re: OSCAT-NETWORK-LIB 1.35 TESTVERSION
« Antwort #37 am: 22. Oktober 2017, 11:56:55 »
hallo

wenn du meine baustein version 1.6 des YAHOO_WEATHER Baustein benutzt
zu finden in der NETWORK-LIB 1.35 BETA

http://www.oscat.de/community/index.php/topic,2546.msg13223.html#msg13223


und dazu die buffer groesse hochsetzt

VAR_GLOBAL CONSTANT
   NETWORK_BUFFER_LONG_SIZE : UINT := 8192;

(ab 5000 bytes sollte es schon funktionieren)


dann funktioniert es (gerade eben nochmals ausprobiert !)


Offline david

  • Newbie
  • *
  • Beiträge: 22
    • Profil anzeigen
Re: OSCAT-NETWORK-LIB 1.35 TESTVERSION
« Antwort #38 am: 22. Oktober 2017, 18:21:43 »
Hi peewit, some time ago, I also found out that yahoo changed something, wich makes it does not work any more since 1 september.
I modified the FB to do the call in 3 times:

Offline j_poool

  • Newbie
  • *
  • Beiträge: 47
    • Profil anzeigen
Re: OSCAT-NETWORK-LIB 1.35 TESTVERSION
« Antwort #39 am: 23. Oktober 2017, 18:05:16 »
Hallo peewit

Leider habe ich jetzt diese Fehler
Error_C=65280
Error_T=1

Offline peewit

  • Moderator
  • *****
  • Beiträge: 2 378
    • Profil anzeigen
Re: OSCAT-NETWORK-LIB 1.35 TESTVERSION
« Antwort #40 am: 24. Oktober 2017, 07:24:55 »
Der Fehler kommt von der Namensauflösung (DNS) Baustein DNS-Client
Du hast also kein direktes problem mit dem Yahoo-Wetter-Dienst sondern deine sps kann den Namen nicht in eine echte IP-Adresse wandeln
Der angesprochene DNS-Server liefert keine Antwort

Überprüfe ob ein gültiger und funktionierender DNS-Server angeben ist




[gelöscht durch Administrator]

Offline j_poool

  • Newbie
  • *
  • Beiträge: 47
    • Profil anzeigen
Re: OSCAT-NETWORK-LIB 1.35 TESTVERSION
« Antwort #41 am: 24. Oktober 2017, 20:47:46 »
... ja habe ich, alles mögliche probiert...  :-[

Offline peewit

  • Moderator
  • *****
  • Beiträge: 2 378
    • Profil anzeigen
Re: OSCAT-NETWORK-LIB 1.35 TESTVERSION
« Antwort #42 am: 25. Oktober 2017, 08:22:33 »
du kannst ja mal den dns_client baustein einzeln probieren
ziemlich sicher wird dieser nicht funktionieren

solange du aber dieses problem nicht behebst wirst du nicht weiterkommen


1.hast du überhaupt schon mal erfolgreich mit dieser sps solche aufgaben gelöst oder hast du ein schon immer bestehenden problem
2. kannst du eine wireshark aufzeichnung machen ?
3. was für eine sps verwendest du ?

Offline j_poool

  • Newbie
  • *
  • Beiträge: 47
    • Profil anzeigen
Re: OSCAT-NETWORK-LIB 1.35 TESTVERSION
« Antwort #43 am: 26. Oktober 2017, 20:16:26 »
Hallo peewit
Vielen Dank für deine Antwort

Das Programm hat immer super funktioniert bis irgendwelche Probleme mit Yahooo gab, danach hab ich es mit der aktuelle network lib 135 version versucht, ohne Erfolge
Bin schon jetzt längere Zeit damit beschäftigt den wieder im gange zu bringen.....
Ich arbeite mit Beckhoff, in diesem Fall eine CX9020.

Eine Wireshark Aufzeichnung kann ich schon machen, wenn du mich erklären kannst was ich da beobahcten muss  :-X

Danke

Offline petermathis

  • Newbie
  • *
  • Beiträge: 8
    • Profil anzeigen
Re: OSCAT-NETWORK-LIB 1.35 TESTVERSION
« Antwort #44 am: 08. Dezember 2017, 20:29:45 »
Hallo zusammen,

ich beschäftige mich neu mit der NETWORK Lib und bin auf den Yahoo Baustein gestossen.

ich habe die Sache nun ausprobiert, aber so wie es aussieht kann meine PLC Beckhoff CX... keine Verbindung mit dem Baustein IP_Control aufbauen.

Den DNS Server 8.8.8.8 kann ich von der SPS aus über das Commandwindow anpingen. Wenn ich mir das ansehe habe ich im fbCreate()/FB_SocketUdpCreate ein Problem. Der bringt mir einen Error mit dem Code 6. Irrtum vorbehalten ist das laut Beckhoff Hilfe:
--> 6   target port not found   ADS Server not started   

Was heisst das nun ?? :-\  Ich hatte bis jetzt noch nie eine TCP Verbindung aufgebaut auf meiner CPU.

Kann mir jemand weiterhelfen, was muss ich noch tun um einen Schritt weiter zu kommen?

Besten Dank!
Peter