Activity for andrax

  • andrax andrax modified a comment on discussion Engineering 🇬🇧

    Hi, i had the same problem. have a look here: https://forge.codesys.com/forge/talk/Runtime/thread/6b9e48d29a/

  • andrax andrax posted a comment on discussion Engineering 🇬🇧

    Hi, I think I can help you. I had the same problem on the Rasperry. After some searching, I found a working snipped in the SPS-forum. But I can't remember which page. I can upload the snipped tonight.

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Vielen Dank Für das Script.

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Hi, ich hatte heute wieder den Ausnahmefehler. Scheint wohl irgend wo in den Visuelements zu sein. Wo soll ich anfangen zu suchen?

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Ergänzung: Ich habe jetzt fopen.xExclusive:=TRUE; rausgenommen. Jetzt funktioniert es. Zusatzfrage: können 2 Schreibvorgänge in unterschiedliche Dateien parallel ausgeführt werden oder ist es besser sie gegeneinander zu verriegeln?

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Hi, ich ich möchte prüfen ob eine Datei existiert. Wenn diese nicht existiert, soll eine erstellt werden und dort hinein geschrieben werden. Die Datei wird im Programmlauf mehrfach geöffnet und Daten hinein geschrieben. Ich will hier die Funktion File.MODE.MAPPENDPLUS benutzen, das funktioniert aber nicht. fopen.xDone bleibt false. Hier der Code: fopen.sFileName:=sFileName; fopen.eFileMode:=File.MODE.MAPPENDPLUS; // Neu erstellen und anhängen fopen.xExclusive:=TRUE; fopen( xExecute:=TRUE); IF fopen.xDone...

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Also, ich habe jetzt mit Static Analysis Light einige Fehler behoben. Aktuell steht nur ein Fehler im Logbuch: "Retain restore from file failed" Sobald ich wieder diesen Absturz erlebe, melde ich mich wieder.

  • andrax andrax modified a comment on discussion Deutsch 🇩🇪

    Hallo, ich habe seid neustem ebenfalls dieses Problem auf den Raspberry. Codesys 3.5.18 Nach dem Download geht die SPS in STOP und es blinkt schwerer Ausnahmefehler. Der Fehler kommt sporadisch und ist nicht reproduzierbar. Es passiert beim kompletten Download, aber auch bei Änderungen. Wie kann ich den Fehler eingrenzen? Nachtrag: Wenn der Fehler kommt, ist die Runtime auf dem Raspberry nicht mehr ansprechbar. Der Raspberry selbst schon. Für einen neuen Download muss ich den Raspberry neu starten....

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Hallo, ich habe seid neustem ebenfalls dieses Problem auf den Raspberry. Codesys 3.5.18 Nach dem Download geht die SPS in STOP und es blinkt schwerer Ausnahmefehler. Der Fehler kommt sporadisch und ist nicht reproduzierbar. Es passiert beim kompletten Download, aber auch bei Änderungen. Wie kann ich den Fehler eingrenzen?

  • andrax andrax posted a comment on discussion Runtime 🇬🇧

    the TCA9548a does not work in Codesys. In Pyton this is only queried once and in Codesys cyclically. Of course you can also insert a terminating resistor in each port, then you should have no problems. I use this one: https://botland.de/8-bit-multiplexer/12723-qwiic-mux-breakout-8-kanal-modul-mit-i2c-multiplexer-tca9548a-sparkfun-bob-16784-5904422341428.html You can simply set the library to the latest version. You do not need Oscat. Do you need an example project for the BMP280?

  • andrax andrax posted a comment on discussion Runtime 🇬🇧

    the TCA9548a does not work in Codesys. In Pyton this is only queried once and in Codesys cyclically. Of course you can also insert a terminating resistor in each port, then you should have no problems. I use this one: https://botland.de/8-bit-multiplexer/12723-qwiic-mux-breakout-8-kanal-modul-mit-i2c-multiplexer-tca9548a-sparkfun-bob-16784-5904422341428.html You can simply set the library to the latest version. You do not need Oscat. Do you need an example project for the BMP280?

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Ein workaround wäre, auf eine ältere Version zurück zu gehen Und auf den fix warten. Die oscat Funktionen umbenennen, halte ich nicht für die Lösung

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Ein workaround wäre, auf eine ältere Version zurück zu gehen Und auf den fix warten. Die oscat Funktionen umbenennen, halte ich nicht für die Lösung

  • andrax andrax posted a comment on discussion Runtime 🇬🇧

    Take a look at my collection, which I uploaded a few days ago

  • andrax andrax posted a comment on discussion Runtime 🇬🇧

    Unfortunately not. The folder does not work. There are neither error messages nor any other indication that this may be due to missing rights. I have searched the entire forum and also tested the Codesys example. The simple recipe management generally does not work! The Raspi crashes with the extended recipe management from the example. I have now found another sample that works. https://forge.codesys.com/forge/talk/Engineering/thread/61c6a04b79/ Many thanks to mcodem. After some trial and error...

  • andrax andrax posted a comment on discussion Runtime 🇬🇧

    I have now renamed my recipe to Parameter and now use SaveRecipeAs. The correct folder is displayed in the dialogue box, but the recipe is not saved. What could be the reason for this, write permissions? Recipe manager buggy?

  • andrax andrax posted a comment on discussion Runtime 🇬🇧

    Hello, I am trying to save my settings as a recipe on the Raspberry. As target path I use /user/Documents Save: SaveRecipeAS, 'Recipes', 'Recipe' Load: ReadRecipe, 'Recipes', 'Recipe' However, no recipe is created. What could be the reason?

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Hallo zusammen, ich programmiere öfters mal kleinere Messgeräte und Datenlogger. Je nach Einsatzzweck musste ich mir ein paar Gerätetreiber selber schreiben. Da es eine recht große Sammlung ist, stelle ich die hier einfach mal ein. Die Sammlung basiert auf den Gerätetreiber TCA9548 Multiplexer von Steffen Dreyer. Codesysversion: V3.5 SP18 Patch 4 Inhalt: -4channel Dimmer (Stefan Dreyer) -BMA456 (Andre Klien) -BME280 (Stefan Dreyer) -BMP280 (Stefan Dreyer) -EEPROM_24C512 (Stefan Dreyer) -ADS1115 (Andre...

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Moin, Die Kommunikation sollte kein Problem sein. Die Struktur hast du ja schon als python vorliegen und musst sie nur nachbauen. Entweder als Programm oder als gerätetreiber. Beispiele wie die i2c Kommunikation abläuft, findest du hier jede Menge.

  • andrax andrax modified a comment on discussion Runtime 🇬🇧

    Hi, sorry I was not there for a long time. The TCA9548 needs terminating resistors, do you have them in? That's why I went to QWIIC, the muxboard already has them built in. If it still does not work, try it first without the muxboard. PS: Note the channel assignment. Muxboard 0 = I2C_Master 1,0,0,0,0,0,0,0 Muxboard 1 = I2C_Master 2,0,0,0,0,0,0,0 etc.

  • andrax andrax posted a comment on discussion Runtime 🇬🇧

    Hi, sorry I was not there for a long time. The TCA9548 needs terminating resistors, do you have them in? That's why I went to QWIIC, the muxboard already has them built in. If it still does not work, try it first without the muxboard. PS: Note the channel assignment. Muxboard 0 = I2C_Master 1,0,0,0,0,0,0,0 Muxboard 1 = I2C_Master 2,0,0,0,0,0,0 etc.

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    So wird dir niemand helfen können. zunächst solltest den code einstellen, mit dem du versuchst die Adresse zu übergeben.

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Hi, also das File wird genauso im Zielpfad angelegt wie angegeben. Passt also. Problem Timer: Da stand auf einmal eine 180 (sek) drin, möglicherweise kam TON damit nicht klar. Jetzt die gretchenfrage: Im welchen Pfad wird per default die PersistentVars Liste geschrieben? Ich glaube, ich muss genau dahin schreiben, damit es funktioniert.

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Hallo zusammen, ich habe nach einem Tutorial aus dem Automtisierungskanal, https://www.youtube.com/watch?v=W-SGX49QNH4 mir folgen Code im Projekt angelegt um wichtige Parameter zu speichern und bei einem Neustart vom Raspi wiederherzu stellen. AppGetCurrent(pResult := ADR(stResult), AppGetCurrent => stApplication); IF GVL_VisuData.xSaveSettings THEN AppStoreRetainsInFile(pApp := stApplication, pszFilname := strFilename); GVL_VisuData.xSaveSettings := FALSE; END_IF IF GVL_VisuData.xRestoreSettings...

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Hallo zusammen, ich habe nach einem Tutorial aus dem Automtisierungskanal, https://www.youtube.com/watch?v=W-SGX49QNH4 mir folgen Code im Projekt angelegt um wichtige Parameter zu speichern und bei einem Neustart vom Raspi wiederherzu stellen. AppGetCurrent(pResult := ADR(stResult), AppGetCurrent => stApplication); IF GVL_VisuData.xSaveSettings THEN AppStoreRetainsInFile(pApp := stApplication, pszFilname := strFilename); GVL_VisuData.xSaveSettings := FALSE; END_IF IF GVL_VisuData.xRestoreSettings...

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Hallo Ich bekomme ein Datenblock mit 3Byte zurück wobei das letzte Byte die Checksumme ist. [16#01,16#48,16#F1] Im Datenblatt sind folgende Werte angegeben: Name CRC-8 Width 8 bits Polynomial 0x31 (x8 + x5 + x4 + 1) Initialization 0xFF Reflect input false Reflect output false Final XOR 0x00 mein Code: CRC := oscat_basic.CRC_GEN(PT:=ADR(raw_Read_CHIP_ID), size:=SIZEOF(raw_Read_CHIP_ID)-1, PL:=8, Pn:=16#31, init:=16#FF, XOR_out:=16#00, rev_in:=0, rev_out:=0); Ich bekomme beim CRC aber 16#00000031 zurück....

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Hat sich erledigt. Nachdem ich einen Logic Analyzer angeschlossen habe, hab ich festgestellt das die Daten ganz normal über write(pbyBuffer, nBufferLen) gesendet werden können.

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Hallo zusammen, ich habe hier ein I2C Gerät welches mit 16Bit Datenwörten arbeitet. Ich muss z.B. 16#805D (0x805D) an die Adresse 16#63 senden. I2C_master.write(16#63, 16#805D,1) funktioniert leider so nicht. Wie kann ich das realisieren? Gruß Andre

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Super, Dankeschön. Ich werd mir erstmal die Dikumetation durchlesen.

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Hallöchen, Ich hab das Projekt getestet und und es funktioniert bei mir. Jetzt suche ich Informationen, wie ich die Einstellungen vom thermostat 302 auslesen, ändern und zurück schreiben kann.

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Ah Ok Danke, die Funktion MEM.PackWordsToDword... kannte ich noch gar nicht. Also mit den Pointer und dereferenzieren greift man direkt auf die Speicheradresse und hat sozusagen Zugriff auf die Rohdaten. Aber warum macht man das? Das erschließt sich mir nicht.

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Hallo zusammen, fast vergessen mich zu melden. Ich hab mittlerweile das Problem gelöst. Die Falsche Darstellung konnte ich mit OSCAT lösen So sieht mein Code jetzt aus: FUNCTION_BLOCK ModbusKonverter VAR_INPUT LowerByte : WORD; //CD UpperByte : WORD; //AB END_VAR VAR_OUTPUT Daten : REAL; END_VAR VAR rawLowerByte : DWORD; rawUpperByte : DWORD; END_VAR rawLowerByte := WORD_TO_DWORD(LowerByte); rawUpperByte := SHL(WORD_TO_DWORD(UpperByte),16); Daten := oscat_basic.DW_TO_REAL(rawLowerByte OR rawUpperByte);...

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    OK ich habs... fast. Ich muss die Register 0x7010 und 0x7011 auslesen und entsprechend zusammensetzen. AB CD >>> CDAB Hab ich über eine Funktion gelöst. Ist zwar jetzt nicht die sauberste lösung, aber funktioniert: END_VAR VAR_OUTPUT Daten : LREAL; END_VAR VAR rawLowerByte : DWORD; rawUpperByte : DWORD; END_VAR rawLowerByte := WORD_TO_DWORD(LowerByte); rawUpperByte := SHL(WORD_TO_DWORD(UpperByte),16); Daten := DWORD_TO_LREAL(rawLowerByte OR rawUpperByte); Allerdings habe ich jetzt ein Darstellungsproblem:...

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Ich brauche doch noch einmal Hilfe. Die Eingangsdaten müssen konvertiert werden. Ich hätte jetzt angenommen, dass nach little/big endian BBAA >> AABB konvertiert werden muss. Dass Messgerät zeigt auf Kanal 1 (0x7010) 1,75 bzw. 1,76 an. Meine Eingangsdaten schwanken zwischen 16#47AE bzw. 16#8F5C Aber egal wie ich die Bytes schiebe, ich bekomme kein sinnvolles Ergebnis welches mit den Messdaten korrespondiert. Wie muss ich das richtig konvertieren?

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Dankeschön

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Hallo Herr Schwellinger, sie hatten Recht. Es muss Functions Code 3 verwendet werden. Zusätzlich muss das das Register 0x7010 in Hex 16#1B62 gewandelt werden. Ich bin hier zufällig darauf gestoßen. Eine Frage noch. Da ich mich zum ersten mal mit Modbus beschäftige. Wo sehe ich die einlaufenden Daten, oder muss ich diese explizit auffrischen? Grüße

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Ja die Runtime war gestoppt, bzw. über die Console beendet. Ich habe jetzt noch 2 Ideen: Den Netzwerkverkehr über Wireshark beobachten. Den Wlanadapter deaktivieren.

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Den Function Code 3 hatte ich auch eingestellt, mit selbigen Ergebnis. Was mich wundert, dass das Testscript welches auf einem anderen Raspi läuft, bei meinem nicht funktioniert. Das Testscript benutzt Function Code 4

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Im Ausgangspost habe ich die Doku mit angehangen. Das Gerät hat 4 Kanäle. Ich will Kanal 1 auslesen. Laut Doku ist es 0x7010 mit 4 Bytes. Abfragen muss ich mit Funktionscode 4. Sollte doch richtig sein oder ? Wir haben am Freitag es noch mit der anderen Software versucht, die auf dem anderen Raspi läuft. Es ist ein Pythonscript und auch dieses funktioniert auch nicht. Die Verbindung wird aufgebaut, es kommen aber keine Daten, sondern nur ein Fehler. Wir haben nun den Raspi in Verdacht. Entweder stimmt...

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Nachtrag: wir haben jetzt das Gerät gegen ein baugleiches Gerät (ebenfalls C 310) getauscht. Dieses wird ebenfalls per ModbusTCP abgefragt, allerdings mit einer anderen Software. Das Problem bleibt bestehen. Verbindung ist da und der selbe Fehler.

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Nachtrag: wir haben jetzt das Gerät gegen ein baugleiches Gerät (ebenfalls C 310) getauscht. Dieses wird ebenfalls per ModbusTCP abgefragt, allerdings mit einer anderen Software. Das Problem bleibt bestehen. Verbindung ist da und der selbe Fehler.

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Hallo zusammen, ich habe folgendes Setup. Raspberry Pi 4 mit Codesys 3.5 SP18 Messgerät KIMO C 310 Auf dem Raspberry ist die IP Statisch vergeben 192.168.10.80 KIMO C 310 hat 192.168.10.135 Die Verbindung steht. Ich muss das Register 0x7010 mit 4 bytes auslesen. Meiner Erachtens ist das Funktionscode 4 Offset: 0x7010 Länge: 4 Ich bekomme aber den Fehler: ILLEGAL FUNKTON (Slave does not support the function code) Wo liegt mein Fehler ? Danke im voraus

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Ich glaub, das Problem liegt weniger am Codesys-installer. Hast du schon deine Systemereignisanzeige durchforstet? >> "eventvwr"

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Lampe 2 wird nur dann TRUE, wenn in Netzwerk 4 die Bedingung erfüllt ist. Netzwerk 1 - 3 wird von Netzwerk 4 überschrieben.

  • andrax andrax posted a comment on discussion Forge 🇬🇧

    Stefan scheint schon lange nicht mehr aktiv zu sein. Er gibt auch kein Support für seine MUX Bibliothek.

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Den Fehler habe ich auch des öfteren wenn ich online gehe. Ist aber nach einem Neustart weg. Aber bei deiner Beschreibung weiß niemand was du meinst?

  • andrax andrax posted a comment on discussion Runtime 🇬🇧

    Hi, I have a project with 3 sensors. I hope this helps you further.

  • andrax andrax modified a comment on discussion Deutsch 🇩🇪

    Edit: Doppelpost

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Moin, eigentlich musst du hier gar nichts machen. Der Barcodescanner verhält sich wie eine Tastatur mit der du Eingaben in einen Editor oder Textfeld machst. Das heißt, wenn du den Scanner an den Raspi stöpselt und er wird dort erkannt, dann musst du ach lokal auf den Raspi arbeiten. Raspi + Monitor + Tastatur + Scanner. Wenn du allerdings remote über das Netzwerk arbeiten willst, musst du den Scanner an deinen Remotecomputer anstöpseln. Wenn du allerdings den Scanner lokal anschließt und remote...

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Moin, eigentlich musst du hier gar nichts machen. Der Barcodescanner verhält sich wie eine Tastatur mit der du Eingaben in einen Editor oder Textfeld machst. Das heißt, wenn du den Scanner an den Raspi stöpselt und er wird dort erkannt, dann musst du ach lokal auf den Raspi arbeiten. Raspi + Monitor + Tastatur + Scanner. Wenn du allerdings remote über das Netzwerk arbeiten willst, musst du den Scanner an deinen Remotecomputer anstöpseln. Wenn du allerdings den Scanner lokal anschließt und remote...

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    interessante Anwendung

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    ok, da es eine einfache Bewegung ist und Timing keine Rolle spielt, werd ich mir eine Funktion selbst erstellen. Danke und Grüße

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Ich hab die Demonstration unverändert geladen und auf den aktuellen Stand migriert. Was mir aufgefallen ist, im Onlinebetrieb sind die Achsen gelb. Und bei den Statusinformationen steht unter SM_Drive_RaspiStepper: Die Lizenz fehlt oder ist ungültig. Die SPS läuft in Demo-modus. Anmerkung: Ich habe eine Lizenz für die Raspberry Laufzeitumgebung. Kann es sein, dass hier eine weiter Lizenz für Axis Motion benötigt wird?

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Ok, habs verstanden. Die Demo läuft über die Visu. Allerdings bekomme ich keine Signale auf den Pins raus. Der DRV8880 sollte ja auf PIN 20 das STEP Signal bringen und auf PIN 21 DIR. Mit dem Oszzi kann ich allerdings nichts messen.

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Hallo zusammen, ich hab hier ein kleines Projekt, wo ich ein Stepper ansteuern muss. Er soll einfach nur eine Drehbewegung 0-360° ausführen. Hierzu habe ich mir die Package von SM-Raspistepper installiert und mir das Beispielprojekt migriert. Allerdings ist das Projekt bis auf die Visu leer und mir ist nicht klar wie ich den Stepper ansteuern kann. Kann mir jemand einen kurzen Einstieg geben welche Bausteine benötigt werden und welche Pins? Oder sind die GPIOs hier Hartverdrahtet?

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Hi, Ich hatte letztens auch alle plugins aktualisiert. Da war auch die Runtime vom Raspi mit bei. Beim nächsten Anmelden auf dem Raspi, hat er diesen dann automatisch aktualisiert.

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Also, ich steuere über die Konsole den Hardware PWM vom Raspi. Die Befehle werden dort auch nicht angezeigt. Wenn der Befehl ausgeführt wird und du keine Rückmeldung bekommst, tippe ich auf ein Problem in deinem Programm.

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Moin, ich benutze den Befehl wie folgt: SysProcess.SysProcessExecuteCommand2(pszCommand:=Consolenausgabe, pszStdOut:=stdout, udiStdOutLen:= SIZEOF(stdout),pResult := ADR(Result)); dabei bekomme ich bei pResult := ADR(Result) eine 1 zurück. Grüße Andre

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Leider nein, ich hätte hierzu den Support angefragt.

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Hallo zusammen, ich möchte ein Array Puffer : ARRAY [1..2000,1..2] OF REAL; an eine Funktion übergeben. Die Methode: VAR_INPUT DATA : POINTER TO REAL; END_VAR geht natürlich nicht Ebenso wenig der Aufruf VAR_INPUT DATA : ARRAY [1..2000,1..2] OF REAL; END_VAR Wie müsste das korrekt umgesetzt werden? Danke schon mal im Voraus. Gruß Andre

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    ja gerne

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Wenn du das BACnet aus dem Codesysstore benutzt, ist sicherlich eine Beispielapplikation dabei.

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Moin nicht ganz. Die E/A sind nicht Kurzschlussfest und keine 24V Nachweise zu EMV Verträglichkeit sind mir keine bekannt. Und dann ist noch das Thema Ausfallsicherheit... Dies betrifft auch die Retrain Variablen, diese müssen ausfallsicher gespeichert werden, so das diese der SPS nach dem Wiederanlauf zur Verfügung stehen. Mit der SD-Karte stimmt. Wir hatten ein Raspi im Einsatz auf der eine Datenbank lief... Nach einen halben Jahr war die SD platt und der Kollege hatte keine Datensicherung erstellt....

  • andrax andrax modified a comment on discussion Deutsch 🇩🇪

    Doppelpost

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Hallo zusammen, ich konnte das Problem lösen und der Sensor läuft jetzt. Ich erreiche zwar nur eine Samplingrate von 250Hz, aber immerhin. Grüße

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Hallo zusammen, ich konnte das Problem lösen und der Sensor läuft jetzt. Ich erreiche zwar nur eine Samplingrate von 250Hz, aber immerhin. Grüße

  • andrax andrax posted a comment on discussion Engineering 🇬🇧

    Your problem is the multiple call of xExecute This leads to an overflow after some time. Have you already looked at this example? https://www.codesys-blog.com/allgemein/data-logging-csv-in-codesys-erstellen/ best regards

  • andrax andrax posted a comment on discussion Engineering 🇬🇧

    how do you write the csv file. can you show the code in question?

  • andrax andrax posted a comment on discussion Engineering 🇬🇧

    Hello, I know the problem. How do you access the .csv?

  • andrax andrax posted a comment on discussion Engineering 🇬🇧

    Hi, everyone, I asked my question in the German forum and didn't get an answer. https://forge.codesys.com/forge/talk/Deutsch/thread/8e5f2c6f5c/ That's why I'm asking the question here. How can I transfer an array of 6144 data to an address from an i2c device?

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Hallo Leute, ich muss ein Array mit 6144 Config-daten in mein I2c Device schreiben. Dazu benutze ich die Funktion _pMaster^.write Ich habe mir hierzu eine Funktion geschrieben: METHOD checkwriteregister : INT VAR_INPUT usiRegister:USINT; pbyBuffer:POINTER TO BYTE; nBufferLen:UDINT; END_VAR VAR byteswrite:DINT; END_VAR IF _pMaster^.write(usiRegister, pbyBuffer, nBufferLen) <> UDINT_TO_DINT(nBufferLen) AND NOT debugSlave THEN //write not suchsseccfull goError(ReadWrite := TRUE); checkwriteregister...

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Hallo zusammen, geschafft. Der Gerätetreiber für den SDP810 läuft. Ich hab den Treiber in Stefans Bibliothek mit eingebaut. Getestet auf Raspi 4 >> sparcfun i2c mux >> SDP810 Funktionalität: Ausgabe Temperatur und Differenzdruck. Ausgabe Massenstrom noch nicht getestet. Triggermodus parametrisiert aber noch nicht implementiert. Wer will kann es noch mit einbauen. Was mir noch nicht ganz klar ist, ist >Stage mux channel numbers< Der Sensor hängt am mux Port 2 (i2cdetect -y 23) Ich musste hier 2,0,0,0,0,0,0,0...

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Hauptsache es läuft.

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    machs über die Konsole (online) sudo apt-getUpgrade danach sudo apt-get upgrade

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Hi, ich hab nur das problem wenn ich mich per WLAN verbinde. Ansonsten deutet das eher auf ein Problem vom Webserver hin. Ist dein Pi aktuell, bzw. hast du kein Hitzeproblem?

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Ich hatte das beim BME280 wie folgt gemacht. Ist allerdings I2C. Bibliotheksquelle geöffnet und auf neusten stand gebracht, bis beim übersetzen keine Fehler mehr kamen. Dann neu installiert. Dann im Projekt geschaut ob noch etwas blau oder grau unterstrichen war und die betroffenen Bibliotheken gelöscht und neu hinzugefügt. Danach ging es. vllt. solltest das mal bei der ds18b20 3.5.8.10 so verfahren.

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Bibliothek geupdatet?

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Ich habe jetzt die Variante eingesetzt: https://stackoverflow.com/questions/61081586/how-do-i-use-system-time-as-a-trigger-in-codesys-ladder Läuft perfekt Gruß Andre

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Danke dir. Das Projekt funktioniert leider nicht. Massive Fehlermeldungen: #Systime, #Standart #Util... konnte nicht geöffnet werden.

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Tach, ich hab da mal eine ganz triviale Frage. Wie gebe ich die Aktuelle Zeit aus? Gruß Andre

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Ja, ist halt schwierig die Ursache zu finden wenn das Projekt schlecht Dokumentiert ist. Mir ist nur gestern aufgefallen, dass ich ein paar Werte von den BME280 bekommen hatte, bevor er in Störung ging. Dazu bin ich noch auf eine Seite Gestoßen wo der Mux mit Sensor und Pullup dargestellt war. Da war mir alles klar was los ist. Gruß Andre

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Guten Morgen, Problem gelöst. Es lag am MUX. ich habe jetzt den Sparkfun Qwicc Mux dran und es läuft. Es lag also an den Pullup Wiederständen. Gruß Andre

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Aktueller stand: Ich hab den MUX auf Standardeinstellungen und bei den BME280 folgendes: -Address 16#76 -Is Multiplex TRUE -Stage mux channel numbers [1,0,0,0,0,0,0,0] -Debug on TRUE Damit bekomme ich eine Verbindung (alles grün) Allerdings liefert der BME keine Werte. Kann es sein, dass mir die Pullups fehlen? Ich hab folgenden Mux: https://www.reichelt.de/de/de/entwicklerboards-platine-i2c-multiplexer-tca9548a-debo-i2c-multi2-p291436.html?PROVID=2788&gclid=EAIaIQobChMI2Ojz3oLx-AIVluJ3Ch0ODAqeEAQYAiABEgKt0fD_BwE&&r=1...

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Guten Morgen, zur Info, hatte ich nicht erwähnt. Ich verwende die Gerätetreiber von Stefan Dreyer. Fehlersuche: Ich hab den TC9548 als gerät eingefügt und dieser wurde zunächst nicht erkannt. Ich hab nun >>dtoverlay=i2c-mux,pca9548<< in /boot/config.txt deaktiviert. nun wird der Mux erkannt. Nächster schritt, ich hab den Mux rausgenommen und den BMP280 direkt angeschlossen. Ging natürlich wieder nicht. Gerätetreiber gewechselt auf BME280 und siehe da er läuft. Auf dem Board steht >>BME / BMP280 Wieder...

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Guten Morgen, zur Info, hatte ich nicht erwähnt. Ich verwende die Gerätetreiber von Stefan Dreyer. Fehlersuche: Ich hab den TC9548 als gerät eingefügt und dieser wurde zunächst nicht erkannt. Ich hab nun >>dtoverlay=i2c-mux,pca9548<< in /boot/config.txt deaktiviert. nun wird der Mux erkannt. Nächster schritt, ich hab den Mux rausgenommen und den BMP280 direkt angeschlossen. Ging natürlich wieder nicht. Gerätetreiber gewechselt auf BME280 und siehe da er läuft. Auf dem Board steht >>BME / BMP280 Wieder...

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Moment, wie verhält sich das eigentlich mit dem Mux? wird der automatisch erkannt?

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Moin, hab jetzt noch mal den Raspi neu aufgesetzt. Bin jetzt bis auf Samba, auf den gestrigen Stand. Leider keine Änderung. Die Adresse 16#76 habe ich eingetragen. Irgendwas stimmt da an den parametern nicht.

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Ja gerne, Den Code hab ich rausgehauen, bis auf den Aufruf vom BMP280.

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    I2cdetect -y 22 sagt folgendes: user@dev01raspi:~ $ i2cdetect -y 22 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: UU -- -- -- -- -- 76 -- Mein Python-testscript bringt mir...

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Moin, ein Schritt vor und ein zurück. Hab jetzt den Mux (TCA9548A) wieder dran gehangen und verwende jetzt einen BMP280, da es hier einen Gerätetreiber gibt. i2cdetect -y 22 sagt mir, dass der Sensor dort mit der Adresse 76 gefunden wurde. Erster Versuch, I2C_Master dran gehangen und den BMP280. Zunächst rotes Dreieck vom BMP280. Danach den I2C port auf '/dev/i2c-22' gesetzt und siehe da es läuft. Heute Morgen Raspi gestartet und nichts geändert, wieder rotes Dreieck. Status im Stopmodus >> kein...

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Hi, hier im Forum scheint nicht mehr viel zu laufen. Habe selber viele Fragen und wenn ich nicht bald wenigstens 1 Sensor über i2c zum laufen bekomme, ist das Projekt leider gestorben. Grüße Andre

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Guten Morgen, der SDP810 hängt normalerweise hinter einem Mux. Aktuell habe ich diesen Entfernt und er ist direkt angeschlossen. Adresse ist SMBUS 1 Gerät 0x25 Mit der Library bin ich soweit, dass ich alles erstellt habe. Problem: _istate bleibt immer auf 0: Die Library scheint nicht zu laufen Muss SMBUS irgendwie berücksichtigt werden und wie? Wie sieht das aus wenn der MUX wieder dran hängt. Dann wäre es SMBUS (23), mit seiner Adresse 0x25 Weiterhin ist mir unklar, wie ich den Gerätetreiber erstelle....

  • andrax andrax posted a comment on discussion Deutsch 🇩🇪

    Hallo zusammen, ich versuche einen Driver für den SDP810 zu erstellen. Ich habe hier einen lauffähigen Code in Python. ## --------------- consts --------------- SDP810_I2C_ADDRESS = 0x25 # Sensoradresse sdp810 = SMBus(27) # Kanal auf Multiplexer def initSdp810(): global sdp810 sdp810.write_i2c_block_data(SDP810_I2C_ADDRESS, 0x3F, [0xF9]) #Stop messunf 0x3F + 0xF9 = 0x3FF9 (Adresse,register, daten) time.sleep(0.1) sdp810.write_i2c_block_data(SDP810_I2C_ADDRESS, 0x36, [0x1E]) # setze Diferentialmessung...

1