Neueste Beiträge

#1
oscat.lib fuer CoDeSys 3 / Aw: Oscat and 64-bit controlle...
Letzter Beitrag von AntonZan - 11. August 2025, 11:22:35
OSCAT_NETWORK
On CoDeSys the original implementation of network and file access depends, among other things, on two libraries SysSocket23 and SysFile23. Both of these exist only for 32-bit platforms. Their counterparts SysSocket and SysFile will work on both 32 bit and 64 bit. They have similar functionality but types used and interfaces to the relevant POUs are not identical. Substantial changes seem required for POUs IP_CONTROL(), IP_CONTROL2() and FILE_SERVER().

So far we do not make extensive use of specific networking POUs. Everything that uses IP_CONTROL() and IP_CONTROL2() is for now commented out in my copy of OSCAT_NETWORK. We do use the DLOG POUs and types. So I have adapted the FILE_SERVER() function block to use SysFile rather than SysFile23. It is no rocket science, but not trivial either. So far it works for me, but lack of time may have resulted in me missing some points and taking some shortcuts. I have made extensive use of the __XWORD type. This allows for code that will run on both 32-bit and 64-bit platforms. File handles and error handling have needed some changes. It is not ideal, it does work.

As we do most logging to the file system, I did convert the POUs for that (mostly DLOG_STORE_FILE_CSV). Parts of the DLOG ecosystem that log via a network connection of the controllers would require IP_CONTROL() and IP_CONTROL2() to be reworked. I don't have time for that. For now I have excluded those parts from build in my copy of the OSCAT_NETWORK library.
#2
oscat.lib fuer CoDeSys 3 / Aw: Oscat and 64-bit controlle...
Letzter Beitrag von AntonZan - 11. August 2025, 11:12:24
OSCAT_BASIC
Mostly works fine on either 32bit or 64bit controllers. However, the POUs _BUFFER_CLEAR() and _BUFFER_INIT() have their code very specifically optimized for 32-bit alignment. They would need to be either simplified or completely rewritten to run on 64-bit controllers. Even then, I would very much prefer to have a version that can be used without modifications on both 32-bit and 64-bit targets. I'm thinking use of some combination of pragma's, SIZEOF(), types like __XWORD and __XINT.

I currently don't have time to rewrite myself, so as a workaround I have made a copy of the BASIC library where I excluded _BUFFER_CLEAR() and _BUFFER_INIT(). I actually used these in one or two places. For now I have gone back to the use of simple FOR loops instead. It works fine, although I have lost the optimizations of the original OSCAT POUs.
#3
oscat.lib fuer CoDeSys 3 / Aw: Oscat and 64-bit controlle...
Letzter Beitrag von AntonZan - 11. August 2025, 11:10:54
I have done some work on a few things that are most urgent for me. However I lack time and resources to do everything and have it properly reviewed and tested by others. What I have found and what I have done so far can be useful additional background information.
#4
oscat.lib fuer CoDeSys 3 / Oscat and 64-bit controllers
Letzter Beitrag von AntonZan - 11. August 2025, 11:08:39
I have been using the Oscat libraries BASIC and NETWORK for several years now and have always been happy with the added functionality. Recently, we have started looking into 64-bit controllers at work, programmed through CoDeSys 3.5 with 64-bit targets. Here is where I run into some issues. It seems more people have asked about this every once in a while. So far I find no consensus on how things with Oscat will progress in that direction.

My question is: will any work be done about supporting 64-bit targets for the OSCAT libraries? Either by the good people of the original Oscat libs here, or some small group of volunteers? If so, how are we to move forward on this?
#5
Modulentwicklung / Aw: Umstieg von Codesys 2.3 au...
Letzter Beitrag von mg - 07. August 2025, 17:16:24
... die "Portierung" ... betrifft das nun die 64bit Version.
Ich kann nichts finden.
#6
Codesys 2 / EATON XV100 und MQTT
Letzter Beitrag von Florian - 03. August 2025, 19:47:58
Moin Zusammen,

ich verzweifel langsam...
Ich habe vor vielen Jahren die Reste einer Versuchsanordnung meines damaligen Arbeitgebers übernehmen können. Es war eine SoftSPS (XV100, damals noch von Microinnovation, später Möller und dann EATON) mit vielen I/O-Modulen die über CAN-Bus mit der SPS kommunizieren. Auf der SoftSPS läuft WindowsCE und ich habe sie über CodeSys 2.3 in ST programmiert.
Ich steckte damals in der Kernsanierung meines Wohnhauses und habe die SPS kurzerhand ins Haus integriert (Licht-, Tor-, Belüftungssteuerung etc.)...

Seit einigen Jahren betreibe ich parallel openHAB und habe viele Geräte über MQTT mit openHAB verheiratet.
openHAB und die XV100 habe immer - mehr schlecht als recht - über MODBUS-TCP kommuniziert.
Nun habe ich aber auch noch einen PV-Wechselrichter im Haus und damit ein weiteres MOD-BUS-System und nun ist ganz vorbei.
Ein Befehl aus openHAB wird von der SPS teilweise erst nach 4-5 Stunden ausgeführt. Für ein Garagentor echt unpraktisch.

Ich möchte auf meiner SPS gerne einen MQTT-CLient einrichten der die Daten zukünftig schnell mit openHAB austauscht.
Auf openHAB (PaspberryPi 5) läuft ein und MQTT-Server der mit vielen Geräten einwandfrei und extrem schnell kommuniziert.

Bei meiner Suche habe ich zwei MQTT.lib im Netz gefunden.
Die eine Bibliothek erfordert die oscat_basic_333.lib und die WagoLibEthernet_01.lib wodurch die maximale Anzahl an Bausteinen weit über 1024 geht und das Kompilieren mit eben diesem Fehler abbricht.
Nach der erhöhen der Begrenzung kann ich zwar kompilieren und das Programm auf die SPS übertragen aber die MQTT-Verbindung rührt sich kein Stück...

Die andere Bibliothek benötigt neben den schon implementierten Bibliotheken keine weiteren.

Bei der zweite Lib werden immer folgende Fehler gemeldet:
'TCP Server Connection Timeout'
'Connecting to TCP Server failed'
'TCP Socket created'

Hat irgendjemand eine funktionierende Lib für CodeSys 2.3?
Hat jemand ein paar Beispiele?
Die nächste zu nehmende Hürde wird JSON sein, auch da würde ich mich über hilfreiche Tipps freuen.

Vielleicht gibt es ja einen passenden Baustein.

Danke und Gruß
Florian

...Ach so, eine Firewall läuft auf WindowsCE nicht und alle Ports sind offen!
#7
Codesys 2 / Aw: Zugriff von zwei MB_Client...
Letzter Beitrag von TroniGord - 03. Juli 2025, 15:52:29
Hallo,
ich habe das Problem gelöst.
Hier die Info an alle, die dasselbe Problem haben.
Die Bausteine mussten durch einen Neustart des Betriebssystems mit hochlaufen!
Dann hat alles funktioniert!

#8
Codesys 2 / Zugriff von zwei MB_Clienten a...
Letzter Beitrag von TroniGord - 01. Juli 2025, 15:16:54
Hallo,
ich möchte mit zwei MB_Clienten auf einen MB_Server zugreifen.
Im Programm (Codesys 3.5) habe ich zwei Server_Programme angelegt.
Je Server_Programm habe ich ein IP_Control_2 und ein MB_SERVER angelegt.
Da immer nur ein IP_Control_2 und ein MB_SERVER pro Client funktioniert.
Beim ersten Server_Programm nutze ich Port 502 und beim zweiten Server_Programm nutze ich Port 503.
Die IP-Adresse Localhost 127.0.0.1 habe ich bei beiden hinterlegt, da ich nur eine Schnittstelle habe.

Beide Server_Programme funktionieren einzeln perfekt und auch ohne Problem.
Nur wenn ich beide gleichzeitig nutzen möchte (also Zugriff mit zwei Clienten auf je einen Server)
funktioniert nur der, der als letztes vom Zyklus aufgerufen wurde.

Hat vieleich jemand eine Idee?
Für etwas Hilfe wäre ich dankbar!
#9
Modulentwicklung / Aw: CODESYS V3 FTP_CLIENT Verb...
Letzter Beitrag von peewit - 16. Juni 2025, 14:06:19
was sind das für dateien und wie gross sind die

probiere mal drei inhaltlich gleiche dateien (zumindest gleich gross) zu übertragen
was nicht klar ist ob das sps filesystem bremst oder der ftp server

lg peewit
#10
Modulentwicklung / Aw: Umstieg von Codesys 2.3 au...
Letzter Beitrag von peewit - 16. Juni 2025, 14:03:40
für codesys 3.x gibt es direkt im codesys store ein portierung