Search talk: go on

 
<< < 1 .. 170 171 172 173 174 175 > >> (Page 172 of 175)

Post by bschraud on Code erzeugen mit kryptischer Fehlermeldung mit GVL_Io_dd05d808 CODESYS Forge talk (Post)
Hallo, beim Codeerzeugen bekomme ich wiederholt Fehlermeldungen, bei denen nicht mit einem Klick in das betroffene Modul gewechselt werden kann. Die Fehlermeldung tritt allerdings nach "Gerät aktualisieren" nicht mehr auf. Wenn ich das Projekt speichere, Codesys schließe, anschließend Codesys wieder starte und Code erzeugen will, tritt der Fehler wieder auf: ------ Übersetzungslauf gestartet: Applikation: Device.Application ------- Code typisieren... [FEHLER] PAC: C0032: Typ 'Unbekannter Typ: 'ADR(GVL_Io_dd05d808_33e6_4f6b_ba3a_6ba1d0dcc882_HPS_7.Io_dd05d808_33e6_4f6b_ba3a_6ba1d0dcc882_HPS_7)'' kann nicht in Typ 'POINTER TO IoConfigParameter' konvertiert werden [FEHLER] PAC: C0077: Unbekannter Typ: 'GVL_Io_dd05d808_33e6_4f6b_ba3a_6ba1d0dcc882_HPS_7.Io_dd05d808_33e6_4f6b_ba3a_6ba1d0dcc882_HPS_7' [FEHLER] PAC: C0046: Bezeichner 'GVL_Io_dd05d808_33e6_4f6b_ba3a_6ba1d0dcc882_HPS_7' nicht definiert Kompilierung abgeschlossen -- 3 Fehler, 1 Warnungen Übersetzung abgeschlossen -- 3 Fehler, 1 Warnungen : Kein Download möglich Die Recherche nach der Bedeutung von "HPS_7" oder "GVL_Io_dd05d808" verlief leider ergebnislos. Ich habe nur einen ähnlich erscheinenden Thread gefunden, der aber nicht gelöst wurde: https://forge.codesys.com/forge/talk/Engineering/thread/0666dce94f/ Ich verwende Codesys 3.5 SP20 (64bit) mit CODESYS Control for Raspberry Pi MC SL 4.11.0.0. Alle anderen Geräte sowie die Projektumgebung sind frisch aktualisiert. Kennt jemand die Bedeutung dieser Fehler bzw. wie man sie beheben kann? Vielen Dank für die Hilfe
Last updated: 2024-05-16

Post by william-blandon on RecipeManCommands.ReloadRecipes CODESYS Forge talk (Post)
Hi Dave. Thanks for your answer. I still struggling with this. I have done everything according with the Codesys help even I have looked in detail at the example. I have double checked the recipe manager configuration and the use of all the methods. There are two methods that do not work as expected. I'm using Codesys 3.5.19.20 and recipe management 4.4.0.0 .CreateRecipe just create a recipe in the recipe definition but do not create the file. This have a walk around just giving a .ReadAndSaveRecipe afterwards. .ReloadRecipes do nothing but do not generate any error as well. After calling it I call the .GetRecipeCount and the number is always 0. When I create a new recipe (using the function block methods) then the number changes. Looks like this method is looking to the wrong directory finding nothing. I don't know if there is a missing configuration in the CODESYSControl.cfg file. I'm thinking in a walk around for this but I need to create a strings array with the recipe names as retentive and making all the management when deleting and adding recipes. Have had some one the same problem?
Last updated: 2024-05-23

Post by wollvieh on Display minutes as hours & minutes CODESYS Forge talk (Post)
Here a code for an Operation Counter with : days,hours,minutes,seconds as an example, maybe it points you the right direction ? FUNCTION_BLOCK OperationDayHour VAR_INPUT IN : BOOL; // Betrieb Takt : BOOL; // 1Hz Systemtakt END_VAR VAR_OUTPUT BetrTag : UDINT; // Ausgabe Betriebstage Betrstd : UDINT; // Ausgabe Betriebsstunden Betrmin : UDINT; // Ausgabe Betriebsminuten Betrsec : UDINT; // Ausgabe Betriebsekunden BetrString : STRING; // Ausgabe als String END_VAR VAR ///Erkennung Taktflanke Flanke: R_TRIG; END_VAR VAR_IN_OUT BetrsecAbsolut: UDINT; //Ein/Ausgangsvariable Betriebssekunden RETAIN !!! END_VAR Flanke(CLK:= Takt, Q=> ); (*Erkennung Taktflanke*) IF (IN AND Flanke.Q) THEN (*Sekunden hochzählen*) BetrsecAbsolut := BetrsecAbsolut + 1; END_IF Betrsec := BetrsecAbsolut MOD 60; Betrmin := ( BetrsecAbsolut / 60) MOD 60; Betrstd := ( BetrsecAbsolut / 60 / 60 ) MOD 24; BetrTag := ( BetrsecAbsolut / 60 / 60 /24 ); BetrString := RIGHT ( UDINT_TO_STRING( BetrTag + 100000),5); BetrString := CONCAT (BetrString, 'd_'); BetrString := CONCAT (BetrString,RIGHT ( UDINT_TO_STRING( Betrstd + 100000),5)); BetrString := CONCAT (BetrString, 'h_'); BetrString := CONCAT (BetrString, RIGHT ( UDINT_TO_STRING( Betrmin + 100),2)); BetrString := CONCAT (BetrString, 'm_'); BetrString := CONCAT (BetrString, RIGHT ( UDINT_TO_STRING( Betrsec + 100),2)); BetrString := CONCAT (BetrString, 's');
Last updated: 2024-05-27

Post by sigurdrb on send appliaction files to wago plc (codesys 3.5) via ssh CODESYS Forge talk (Post)
Hi, I was hoping I could send the two files "application.app" and "application.crc" directly to the directory "/home/codesys/PlcLogic/Application" instead of logging into the device with codesys, downloading the program to the controller and then do the "create boot application", so it will reboot with the correct program running. I think i also need to edit the file "eRUNTIME.cfg" located in the "/home/codesys/ folder, because when I create the boot application from the codesys IDE, these lines are added to the file: [CmpApp] Application.1 = Application [SysFileMap] /home/codesys/PlcLogic/Application/Application.app=0x212520, 0x2DBC747E, 2DBC747E.app I think the "eRUNTIME.cfg" file is the same as CODESYSControl.cfg I also dont know the purpose of the hexadecimal numbers etc. that is generated. When I tried to replicate what codesys was doing, I placed the same files in the same folder as when codesys generated the boot file. And also added the lines in the eRUNTIME.cfg file: [CmpApp] Application.1 = Application [SysFileMap] /home/codesys/PlcLogic/Application/Application.app The controller did not boot up with any program, so my method did not work at all. I guess these lines tells the controller to run an application and where to find it? Could any of you help me with the best way to get the compiled program to the controller without using codesys or wago-software?
Last updated: 2024-05-28

Post by jkessler on IoDrvModbusTCP_Diag not defined when using MODBUS CODESYS Forge talk (Post)
Hi, Same for me ! Works in Codesys 3.5.19 but not in 3.5.20. I'm currenly using with a WAGO PLC200 [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0046: Identificateur 'IoDrvModbusTCP_Diag' non défini [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0080: Le bloc fonctionnel 'IoDrvModbusTCP' doit être instancié pour permettre l’accès [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0004: 'IoDrvModbusTCP_Diag' n’est pas un composant de 'IoDrvModbusTCP' [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0046: Identificateur 'ModbusTCPSlave_Diag' non défini [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0080: Le bloc fonctionnel 'IoDrvModbusTCP' doit être instancié pour permettre l’accès [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0004: 'ModbusTCPSlave_Diag' n’est pas un composant de 'IoDrvModbusTCP' [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0046: Identificateur 'ModbusTCPSlaveUnit_Diag' non défini [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0080: Le bloc fonctionnel 'IoDrvModbusTCP' doit être instancié pour permettre l’accès [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0004: 'ModbusTCPSlaveUnit_Diag' n’est pas un composant de 'IoDrvModbusTCP' Thanks in advance
Last updated: 2024-05-29

Post by jkessler on IoDrvModbusTCP_Diag not defined when using MODBUS CODESYS Forge talk (Post)
Hi, Same for me ! Works in Codesys 3.5.19 but not in 3.5.20. I'm currenly using with a WAGO PLC200 [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0046: Identificateur 'IoDrvModbusTCP_Diag' non défini [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0080: Le bloc fonctionnel 'IoDrvModbusTCP' doit être instancié pour permettre l’accès [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0004: 'IoDrvModbusTCP_Diag' n’est pas un composant de 'IoDrvModbusTCP' [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0046: Identificateur 'ModbusTCPSlave_Diag' non défini [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0080: Le bloc fonctionnel 'IoDrvModbusTCP' doit être instancié pour permettre l’accès [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0004: 'ModbusTCPSlave_Diag' n’est pas un composant de 'IoDrvModbusTCP' [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0046: Identificateur 'ModbusTCPSlaveUnit_Diag' non défini [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0080: Le bloc fonctionnel 'IoDrvModbusTCP' doit être instancié pour permettre l’accès [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0004: 'ModbusTCPSlaveUnit_Diag' n’est pas un composant de 'IoDrvModbusTCP' Thanks in advance
Last updated: 2024-05-29

Post by jkessler on IoDrvModbusTCP_Diag not defined when using MODBUS CODESYS Forge talk (Post)
Hi, Same for me ! Works in Codesys 3.5.19 but not in 3.5.20. I'm currenly using with a WAGO PLC200 [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0046: Identificateur 'IoDrvModbusTCP_Diag' non défini [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0080: Le bloc fonctionnel 'IoDrvModbusTCP' doit être instancié pour permettre l’accès [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0004: 'IoDrvModbusTCP_Diag' n’est pas un composant de 'IoDrvModbusTCP' [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0046: Identificateur 'ModbusTCPSlave_Diag' non défini [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0080: Le bloc fonctionnel 'IoDrvModbusTCP' doit être instancié pour permettre l’accès [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0004: 'ModbusTCPSlave_Diag' n’est pas un composant de 'IoDrvModbusTCP' [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0046: Identificateur 'ModbusTCPSlaveUnit_Diag' non défini [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0080: Le bloc fonctionnel 'IoDrvModbusTCP' doit être instancié pour permettre l’accès [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0004: 'ModbusTCPSlaveUnit_Diag' n’est pas un composant de 'IoDrvModbusTCP' Thanks in advance
Last updated: 2024-05-29

Post by jkessler on IoDrvModbusTCP_Diag not defined when using MODBUS CODESYS Forge talk (Post)
Hi, Same for me ! Works in Codesys 3.5.19 but not in 3.5.20. I'm currenly using with a WAGO PLC200 [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0046: Identificateur 'IoDrvModbusTCP_Diag' non défini [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0080: Le bloc fonctionnel 'IoDrvModbusTCP' doit être instancié pour permettre l’accès [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0004: 'IoDrvModbusTCP_Diag' n’est pas un composant de 'IoDrvModbusTCP' [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0046: Identificateur 'ModbusTCPSlave_Diag' non défini [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0080: Le bloc fonctionnel 'IoDrvModbusTCP' doit être instancié pour permettre l’accès [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0004: 'ModbusTCPSlave_Diag' n’est pas un composant de 'IoDrvModbusTCP' [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0046: Identificateur 'ModbusTCPSlaveUnit_Diag' non défini [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0080: Le bloc fonctionnel 'IoDrvModbusTCP' doit être instancié pour permettre l’accès [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0004: 'ModbusTCPSlaveUnit_Diag' n’est pas un composant de 'IoDrvModbusTCP' Thanks in advance
Last updated: 2024-05-29

Post by jkessler on IoDrvModbusTCP_Diag not defined when using MODBUS CODESYS Forge talk (Post)
Hi, Same for me ! Works in Codesys 3.5.19 but not in 3.5.20. I'm currenly using with a WAGO PLC200 [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0046: Identificateur 'IoDrvModbusTCP_Diag' non défini [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0080: Le bloc fonctionnel 'IoDrvModbusTCP' doit être instancié pour permettre l’accès [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0004: 'IoDrvModbusTCP_Diag' n’est pas un composant de 'IoDrvModbusTCP' [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0046: Identificateur 'ModbusTCPSlave_Diag' non défini [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0080: Le bloc fonctionnel 'IoDrvModbusTCP' doit être instancié pour permettre l’accès [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0004: 'ModbusTCPSlave_Diag' n’est pas un composant de 'IoDrvModbusTCP' [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0046: Identificateur 'ModbusTCPSlaveUnit_Diag' non défini [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0080: Le bloc fonctionnel 'IoDrvModbusTCP' doit être instancié pour permettre l’accès [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0004: 'ModbusTCPSlaveUnit_Diag' n’est pas un composant de 'IoDrvModbusTCP' Thanks in advance
Last updated: 2024-05-29

Post by paro on Modbus Client Request Not Processed CODESYS Forge talk (Post)
Hi, Problem in your code is that you are not calling the ClientFb cyclic. Please look at the Example from CODESYS: https://forge.codesys.com/prj/codesys-example/modbus/home/Home/ Your code works if the client fb is called cyclic! IF NOT initDone THEN initDone := TRUE; // configure clientTcp clientTcp(aIPaddr:=Ethernet.IPAddress, uiPort:=502); // configure clientSerial clientSerial(iPort:=SysCom.SYS_COMPORT2, dwBaudRate:=SysCom.SYS_BR_115200, byDataBits:=8, eParity:=SysCom.SYS_EVENPARITY, eStopBits:=SysCom.SYS_ONESTOPBIT, eRtuAscii:=ModbusFB.RtuAscii.RTU); // configure clientRequestReadCoils_1 clientRequestReadCoils_1(rClient:=clientTcp, uiUnitId:=42, udiTimeout:=TO_UDINT(T#10MS)); // configure clientRequestWriteSingleRegister clientRequestWriteSingleRegister(rClient:=clientTcp, uiUnitId:=43, udiTimeout:=TO_UDINT(T#10MS)); // configure clientRequestReadCoils_2 clientRequestReadCoils_2(rClient:=clientTcp, uiUnitId:=44, udiTimeout:=TO_UDINT(T#10MS)); // configure clientRequestReadInputRegisters clientRequestReadInputRegisters(rClient:=clientTcp, uiUnitId:=44, udiTimeout:=TO_UDINT(T#10MS)); END_IF // call the client FB's clientTcp(); clientSerial(); // call client request FB's clientRequestReadCoils_1(rClient:=clientTcp, xExecute:=TRUE, uiStartItem:=2, uiQuantity:=3, pData:=ADR(aDataCoils_1[0])); // for more details see Example_TCP, especially ClientRequest control (xExecute, xDone, xError). IF clientRequestReadCoils_1.xDone THEN // get data from aDataCoils_1 ... END_IF clientRequestWriteSingleRegister(rClient:=clientTcp, xExecute:=TRUE, uiItem:=3, uiValue:=123); clientRequestReadCoils_2(rClient:=clientTcp, xExecute:=TRUE, uiStartItem:=2, uiQuantity:=3, pData:=ADR(aDataCoils_2[0])); clientRequestReadInputRegisters(rClient:=clientTcp, xExecute:=TRUE, uiStartItem:=16, uiQuantity:=3, pData:=ADR(aDataInputRegisters[0]));
Last updated: 2024-05-29

Post by greenwood on CODESYS Control Raspberry Pi mit Servotreiber T6 von StepperOnline CODESYS Forge talk (Post)
Hallo, Ich scheine den Grund gefunden zu haben, das Kabel mit dem RJ45 Stecker ist für RS232 verdrahtet (am anderen Ende des Kabels ist ein 9-poliger SUB-D Stecker, nicht wie von mir im Eingangspost behauptet ein USB Stecker). In der Anleitung des Treibers ist immer nur von RS 485 die Rede. Alerdings habe ich es gestern abend noch geschafft eine funktionierende Version der setup-software herunterzuladen, und die verbindet sich offenbar über RS232. Daraufhin habe ich mir in der Anleitung des Treibers das Pinout der RJ45 Buchse nochmal angesehen, und die hat Kontakte für RS232 und für RS485. (Die liegen jeweils ganz am Rand, so ist mir das vorher nicht aufgefallen). Ich muss also als Nächstes ein richtig verdrahtetes Kabel auftreiben, und dann sehen ob das mit dem Adapter den ich habe funktioniert. An einen Abschlusswiderstand habe ich auch schon gedacht, nur weiss ich nicht wo ich den an einem RJ45 Stecker / Buchse - Paar anbringen soll... Ich bitte um Entschuldigung für die Verwirrung, ich mache das alles zum ersten Mal und es ist ganz schön viel auf einmal für mich. Nochmal vielen Dank für die Unterstützung!
Last updated: 2024-06-01

Post by caprez95 on Trace Restart Visuelement CODESYS Forge talk (Post)
Hallo zusammen. Ich habe schon länger mit dem Problem zu kämpfen, dass ich einen Trend (Visuelement) nicht resetten (neustarten) kann. Ich habe es jetzt mit dem Beispiel hinbekommen, die Trace-Aufzeichnung über die CmpTraceMgr Bibliothek zu steuern. Aber wie bekomme ich diese Trace-Aufzeichnung in ein Visuelement? Der Code sieht wie folgt aus: // Configure trace IF xInit THEN // Create a trace packet PacketConfig.pszName := ADR('IECTraceConfiguration.Trace1'); // Name of trace PacketConfig.pszApplicationName := ADR('IECTraceConfiguration'); // Name of the application PacketConfig.pszIecTaskName := ADR('Task'); // Name of the task PacketConfig.pszComment := ADR('Demo packet'); PacketConfig.ulEveryNCycles := 1; PacketConfig.ulBufferEntries := 1000; PacketConfig.ulFlags := TRACE_PACKET_FLAGS.TRACE_PACKET_FLAGS_TIMESTAMP_MS AND TRACE_PACKET_FLAGS.TRACE_PACKET_FLAGS_AUTOSTART; IF (NOT fbTraceManager.CreatePacket(PacketConfig := PacketConfig, hPacket=>hPacket1)) THEN xError := TRUE; END_IF // Create a trace record RecordConfig.pszVariable := ADR('iSignal'); // This is the name of variable to record RecordConfig.tcClass := INT_TO_UDINT(TypeClass.TYPE_INT); // Type of the recording variable RecordConfig.ulSize := SIZEOF(iSignal); // Size of the recording variable pApp := AppFindApplicationByName('IECTraceConfiguration', 0); AppGetAreaOffsetByAddress(pApp, ADR(iSignal), ADR(RecordConfig.tvaAddress.taAddress.Area.usArea), ADR(RecordConfig.tvaAddress.taAddress.Area.ulOffset)); // Get and set area offsets RecordConfig.tvaAddress.ulAddressFlags := TRACE_VAR_ADDRESS_FLAGS_IEC OR TRACE_VAR_ADDRESS_FLAGS_AREA_OFFSET; RecordConfig.ulGraphColor := 16#FF00FF00; // green RecordConfig.ulGraphType := 1; // Line with points IF (NOT fbTraceManager.AddRecord(RecordConfig := RecordConfig, hPacket := hPacket1, hRecord => hRecord1)) THEN xError := TRUE; END_IF xInit := FALSE; END_IF // Starts the recording IF xStart THEN IF (NOT fbTraceManager.StartPacket(hPacket := hPacket1)) THEN xError := TRUE; END_IF xStart := FALSE; END_IF // Stop the recording IF xStop THEN IF (NOT fbTraceManager.StopPacket(hPacket := hPacket1)) THEN xError := TRUE; END_IF xStop := FALSE; END_IF // Reset the recording IF xReset THEN IF (NOT fbTraceManager.ResetPacket(hPacket := hPacket1)) THEN xError := TRUE; END_IF xReset := FALSE; END_IF
Last updated: 2024-06-04

Post by caprez95 on Trace Restart Visuelement CODESYS Forge talk (Post)
Hello everyone. I've been struggling with the problem for a long time that I can't reset (restart) a trend (visual element). With the example I have now managed to control the trace recording via the CmpTraceMgr library. But how do I get this trace recording into a visual element? The code looks like this: // Configure trace IF xInit THEN // Create a trace packet PacketConfig.pszName := ADR('IECTraceConfiguration.Trace1'); // Name of trace PacketConfig.pszApplicationName := ADR('IECTraceConfiguration'); // Name of the application PacketConfig.pszIecTaskName := ADR('Task'); // Name of the task PacketConfig.pszComment := ADR('Demo packet'); PacketConfig.ulEveryNCycles := 1; PacketConfig.ulBufferEntries := 1000; PacketConfig.ulFlags := TRACE_PACKET_FLAGS.TRACE_PACKET_FLAGS_TIMESTAMP_MS AND TRACE_PACKET_FLAGS.TRACE_PACKET_FLAGS_AUTOSTART; IF (NOT fbTraceManager.CreatePacket(PacketConfig := PacketConfig, hPacket=>hPacket1)) THEN xError := TRUE; END_IF // Create a trace record RecordConfig.pszVariable := ADR('iSignal'); // This is the name of variable to record RecordConfig.tcClass := INT_TO_UDINT(TypeClass.TYPE_INT); // Type of the recording variable RecordConfig.ulSize := SIZEOF(iSignal); // Size of the recording variable pApp := AppFindApplicationByName('IECTraceConfiguration', 0); AppGetAreaOffsetByAddress(pApp, ADR(iSignal), ADR(RecordConfig.tvaAddress.taAddress.Area.usArea), ADR(RecordConfig.tvaAddress.taAddress.Area.ulOffset)); // Get and set area offsets RecordConfig.tvaAddress.ulAddressFlags := TRACE_VAR_ADDRESS_FLAGS_IEC OR TRACE_VAR_ADDRESS_FLAGS_AREA_OFFSET; RecordConfig.ulGraphColor := 16#FF00FF00; // green RecordConfig.ulGraphType := 1; // Line with points IF (NOT fbTraceManager.AddRecord(RecordConfig := RecordConfig, hPacket := hPacket1, hRecord => hRecord1)) THEN xError := TRUE; END_IF xInit := FALSE; END_IF // Starts the recording IF xStart THEN IF (NOT fbTraceManager.StartPacket(hPacket := hPacket1)) THEN xError := TRUE; END_IF xStart := FALSE; END_IF // Stop the recording IF xStop THEN IF (NOT fbTraceManager.StopPacket(hPacket := hPacket1)) THEN xError := TRUE; END_IF xStop := FALSE; END_IF // Reset the recording IF xReset THEN IF (NOT fbTraceManager.ResetPacket(hPacket := hPacket1)) THEN xError := TRUE; END_IF xReset := FALSE; END_IF
Last updated: 2024-06-04

Post by paulg on RasPi CAA Serial example - unexpected behavior during debug CODESYS Forge talk (Post)
I've trimmed down the CAA Serial Codesys example to only listen on one port but, when stepping through the Case structure in debug mode, it jumps out of the structure during a specific point in every scan (I'll point it out below after describing the setup and listing the code). I'm using a Pi 4 Model B, and I have an Arduino Nano Every plugged in via USB which is streaming the following serial message at 1 Hz: Time since opening connection: 1 s Time since opening connection: 2 s ...and so on. The Pi shows the Nano at /dev/ttyACM0 so I edited CODESYSControl_User.cfg to read: Linux.Devicefile=/dev/ttyACM The code in my PLC_PRG is (ignore some of the comments, I hadn't deleted them out from the original example): PROGRAM PLC_PRG VAR xStartTest : BOOL:= TRUE; iState : INT; xTestDone : BOOL;(* True, when the test was done succesfully *) (* Settings to communicate with the COM Port *) aCom1Params : ARRAY [1..7] OF COM.PARAMETER; como1 : COM.Open; comc1 : COM.Close; comw1 : COM.Write; comr1 : COM.Read; //sWrite : STRING := 'Test String!'; sRead : STRING(25); szRead : CAA.SIZE; xCom1OpenError : BOOL; xCom1CloseError : BOOL; xCom1WriteError : BOOL; xCom1ReadError : BOOL; END_VAR //This example shows the communication of two COM Ports with each other. //The first one writes a string of characters, which is read by the second one. //After successful execution, the two COM Ports are closed and the test is done. IF xStartTest THEN CASE iState OF 0: //The parameters are set for the COM Port aCom1Params[1].udiParameterId := COM.CAA_Parameter_Constants.udiPort; aCom1Params[1].udiValue := 1; // the correct Port should be adapted aCom1Params[2].udiParameterId := COM.CAA_Parameter_Constants.udiBaudrate; aCom1Params[2].udiValue := 115200; aCom1Params[3].udiParameterId := COM.CAA_Parameter_Constants.udiParity; aCom1Params[3].udiValue := INT_TO_UDINT(COM.PARITY.NONE); aCom1Params[4].udiParameterId := COM.CAA_Parameter_Constants.udiStopBits; aCom1Params[4].udiValue := INT_TO_UDINT(COM.STOPBIT.ONESTOPBIT); aCom1Params[5].udiParameterId := COM.CAA_Parameter_Constants.udiTimeout; aCom1Params[5].udiValue := 0; aCom1Params[6].udiParameterId := COM.CAA_Parameter_Constants.udiByteSize; aCom1Params[6].udiValue := 8; aCom1Params[7].udiParameterId := COM.CAA_Parameter_Constants.udiBinary; aCom1Params[7].udiValue := 0; //The first Port is opened with the given parameters como1(xExecute := TRUE, usiListLength:=SIZEOF(aCom1Params)/SIZEOF(COM.PARAMETER),pParameterList:= ADR(aCom1Params)); IF como1.xError THEN xCom1OpenError := TRUE; iState := 1000; END_IF //After a successful opening, the next state is reached IF como1.xDone THEN iState := 15; END_IF 15: // the reading process is started comr1(xExecute := TRUE,hCom:= como1.hCom, pBuffer:= ADR(sRead), szBuffer:= SIZEOF(sRead)); IF comr1.xError THEN xCom1ReadError := TRUE; END_IF //After completion the size of the written bytes are saved IF comr1.xDone OR comr1.xError THEN szRead := comr1.szSize; iState := 20; END_IF 20: // If everything was successful the ports are closed and the handles are released comc1(xExecute := TRUE,hCom:= como1.hCom); IF comc1.xError THEN xCom1CloseError := TRUE; END_IF IF comc1.xDone OR comc1.xError THEN iState := 25; END_IF 25: // The first port is closed and the used handle released xTestDone := TRUE; xStartTest := FALSE; iState := 0; como1(xExecute := FALSE); comw1(xExecute := FALSE); comc1(xExecute := FALSE); ELSE iState := 0; END_CASE END_IF I realize as I write this that the .udiPort should be 0 and not 1, but that shouldn't be causing the issue I'm seeing. I'm forcing xStartTest:=TRUE every scan so that I can step into each line and observe what's happening. What I see is that the port parameters are set and the port is opened with no errors, but the code jumps out of the case structure to the last line every time it reaches (and I step into) the iState:=15 line (at the end of the iState:=0 block). So every scan cycle it goes through the block for iState=0 and jumps out at the same spot. I'm a little new to PLC programming so I may be misunderstanding the flow, but shouldn't this case structure keep moving down in the same scan? If it only handles one case per scan, why doesn't the value of iState persist? Thanks! Update: I restarted the Codesys control today and I was then able to see an error for como1.eError of "WRONG_PARAMETER". I tried doing some digging and another post made me think I should add another line to CODESYSControl_User.cfg, so I now have: [SysCom] Linux.Devicefile=/dev/ttyACM portnum := COM.SysCom.SYS_COMPORT1 So now when I set .udiPort to 1, I get "NO_ERROR" but I also don't read anything from the port (i.e. szRead = 0 always). If I try setting the port to 0 (which I'm confused about, because I added a COMPORT1 line but the device shows on the Pi as ACM0), I get the "WRONG_PARAMETER" error again. Is there an easier way to troubleshoot the Pi and view what ports the Codesys runtime is actually able to see while the Pi is running?
Last updated: 2024-06-06

Post by nikgind on Codesys Communication Manger - Required information model version exists in the model repository but is not found CODESYS Forge talk (Post)
Hi I am trying to import a custom information model that I created using UA Modeler. I have only added two new methods and two new object types. It is possible to add the information model to the Communication Manager and the two new object types are shown in the Information Model tab. After compiling i get the following error: Communication Manager [Device: PLC Logic: Application]: The information model http://opcfoundation.org/UA/ is required by http://yourorganisation.org/Bsp_3.1/ with a minimal publication date from 15.12.2023 but the device has only a model from 15.09.2021 installed. Probably the information model from 15.09.2021 is missing in the information model repository. The error message does not make sense to me. Should it not be “Probably the information model from 15/12/2023 is missing in the information model repository”? Anyway I have installed the information model from 15/12/2023 but not from 15/09/2021. Which makes the error message even stranger.
Last updated: 2024-06-09

Post by caprez95 on Deleting the trend recording history CODESYS Forge talk (Post)
Hallo Ich möchte eine laufende Trendaufzeichnung stoppen, den Inhalt löschen und Trend-Diagramm auf 0 zurücksetzen. Laut Codesys soll das mit dem folgenden Code möglich sein: You can insert an input element in the visualization which the operator can use to delete the previous value recording in the trend visualization at runtime. The curve displayed until then is removed and the display starts over. In the application (example: in the program PLC_PRG), implement the following code: itfTrendRecording : ITrendRecording; itfTrendStorageWriter : ITrendStorageWriter; itfTrendStorageWriter3 : ITrendStorageWriter3; sTrendRecordingName : STRING := 'TrendRecording'; itfTrendRecording := GlobalInstances.g_TrendRecordingManager.FindTrendRecording(ADR(sTrendRecordingName)); xClearHistoryTrend: BOOL; IF xClearHistoryTrend THEN itfTrendRecording := GlobalInstances.g_TrendRecordingManager.FindTrendRecording(ADR(sTrendRecordingName)); IF itfTrendRecording <> 0 THEN itfTrendStorageWriter := itfTrendRecording.GetTrendStorageWriter(); IF __QUERYINTERFACE(itfTrendStorageWriter, itfTrendStorageWriter3) THEN itfTrendStorageWriter3.ClearHistory(); END_IF END_IF In the visualization of the trend recording, add a button for deleting the previous curve. Configure its Toggle property with the variable PLC_PRG.xClearHistoryTrend. ⇒ When xClearHistoryTrend is set to TRUE, the previously recorded curve is deleted. The recording immediately starts again. Dies löscht auch die Daten vom Trend, aber das Diagramm wird nicht auf 0 zurückgesetzt, sondern läuft einfach da weiter wo man gestoppt hat. Braucht es für den Diagramm-Reset noch einen zusätzlichen Befehl? Gruss
Last updated: 2024-06-11

Post by hppatrick on Datenkonvertierung fĂĽr ein SPS-AO-Modul CODESYS Forge talk (Post)
Hi Leute , ich bin neu hier im Forum und habe seit kurzer Zeit mein eigenes SPS-Projekt. Ich stoße hin und wieder an Probleme aber habe diese auf kurz oder lang gelöst. Nun zu meinem Problem: Als Projekt habe ich eine Kühlwassersteuerung , die einen Relativdruck einließst, und anhand desssen Werte dann einen Frequenzumrichter ansteuert. Z. Bsp. 5Bar -> FU auf 70Prozent. Ich lese in Codesys den Analogwert mit der Wago A20_750_455_020 ein. Dieser Wert wird umgerechnet mit LIN_TRAFO in 0-10 (Bar)und und wird dann über einen PID Regler geregelt. (Bibliothek UTIL). Dieser Wert wird dann wieder für die Ausgangskarte Umgerechnet (LIN_TRAFO) . Nun zu meinem Problem : Die Ausgangskarte nimmt nur einen Word Datentyp und meine Bausteine haben den REAL Datentyp. Wenn ich einen Konvertierungsbaustein nehme, Schmeist mir Codesys einen Fehler und das Programm wird geschlossen. Könnt Ihr mir helfen? Vielen Dank im Voraus (Datei habe ich angehängt). Die Ausgangskarte ist eine Wago 750-555-08
Last updated: 2024-06-14

Post by joachimk on Profinet Controller IP-Adresse ändern CODESYS Forge talk (Post)
Die IP-Adresse des Profinet-Controllers soll zur Laufzeit geändert werden. Dabei handelt es sich um eine Anwendung auf einem PC mit einer Standard-Ethernetschittstelle (ControlWinV3+WinPcap). Die Datei "CODESYSControl.cfg" wurde dazu angepasst: .... Adapter.0.Name="Ethernet 4" Adapter.0.EnableSetIpAndMask=1 Die konfigurierte IP-Adresse wird zur Laufzeit an die tatsächliche IP-Adresse der Netzwerkschnittstelle mit dem folgenden Befehl angepasst (die Änderung von 192.168.2.33 auf 192.168.2.34 funktioniert auch): Ethernet.UpdateConfiguredIPSettings(IpAddress:=Ethernet.IPAddress, subnetmask:=Ethernet.Subnetmask, gateway:=Ethernet.GatewayAddress); Der Profinet-Controller geht danach auf Störung und gibt die folgende Fehlermeldung aus: "Controller-Status: currently active IP does not match the controller's configuration" Unter "Ethernet diagnostic information" kann man die geänderte IP-Adresse von 192.168.2.34. Ethernet läuft auch ohne Fehler. Unter "PROFINET IO Driver diagnostic information" -> "IPParameter" sieht man noch die alte (konfigurierte) IP-Adresse 192.168.2.33. Wie kann man die Störung beseitigen? Leider habe ich keine Methode zum Ändern der IP-Adresse auf dem Profinet-Controller gefunden? Reconfiguration des Profinet-Controllers?
Last updated: 2024-06-27

Post by wbj0t on What the right way to update TCP/COM slave device holding registers CODESYS Forge talk (Post)
Hi all :) I have an plc. This plc has option to be as slave device. There are TCP -> Serial Slave Device and COM -> Serial Slave Device. There are 4096 ModBus holding registers with mark "internal modify" for the both devices above. So, COM Slave has 4096 registers and TCP Slave has 4096 registers. And, finally, I have an ARRAY[0..4095] OF WORD. This array glued with COM Slave and TCP slave. Yes, I need plc's opportunity to be communication both TCP and COM ways for the same registers. For example, the next task structure: * TASK_0: 1. pou_READ_Registers 2. pou_0 3. pou_1 4. ... 5. pou_N 6. pou_WRITE_Registers At the first pou I read registers for the other pous, after job we have sort of state of the plc. At the last pou (6) we write modified registers. It is a good scenario: some one wrote registers for the job, after job we save these (modified) registers. But, what if registers wrote between 1 and 6 pou by operator, for example, at the 3 pou -> the last pou 'pou_WRITE' will rewrite this request from operator. What the right way to work with this logic? Thanks you.
Last updated: 2024-07-01

Post by marek71 on Ambiguous use of name - CO136 CODESYS Forge talk (Post)
My PLC is WAGO PFC200 Firmware Revision 26. target After updating WAGO_Devices_and_Libraries with newer Firmware 27, CODESYS wants to update all libraries to new versions. I will only add that I did not update the Firmware in the PLC. After compiling the program, I received the following errors: ------ Build started: Application: Device.Application ------- Typify code... [ERROR] wagosyscom_internal_pfc, 1.0.2.5 (wago): FbSerialInterface_internal: C0136: Ambiguous use of name 'RTS_IEC_HANDLE' [ERROR] wagosyscom_internal_pfc, 1.0.2.5 (wago): FbSerialInterface_internal: C0136: Ambiguous use of name 'RTS_IEC_RESULT' [ERROR] wagosyscom_internal_pfc, 1.0.2.5 (wago): Initialize [FbSerialInterface_internal]: C0032: Cannot convert type 'Unknown type: 'RTS_INVALID_HANDLE'' to type 'POINTER TO BYTE' [ERROR] wagosyscom_internal_pfc, 1.0.2.5 (wago): Initialize [FbSerialInterface_internal]: C0136: Ambiguous use of name 'RTS_INVALID_HANDLE' [ERROR] wagosyscom_internal_pfc, 1.0.2.5 (wago): Initialize [FbSerialInterface_internal]: C0046: Identifier 'RTS_INVALID_HANDLE' not defined [ERROR] wagosyscom_internal_pfc, 1.0.2.5 (wago): comextra_is_tx_empty: C0136: Ambiguous use of name 'RTS_IEC_HANDLE' [ERROR] wagosyscom_internal_pfc, 1.0.2.5 (wago): comextra_get_line_state: C0136: Ambiguous use of name 'RTS_IEC_HANDLE' [ERROR] wagosyscom_internal_pfc, 1.0.2.5 (wago): comextra_is_line_available: C0136: Ambiguous use of name 'RTS_IEC_HANDLE' [ERROR] wagosyscom_internal_pfc, 1.0.2.5 (wago): COMSW_SET_MODE: C0136: Ambiguous use of name 'RTS_IEC_HANDLE' [ERROR] wagosyscom_internal_pfc, 1.0.2.5 (wago): comextra_set_line_state: C0136: Ambiguous use of name 'RTS_IEC_HANDLE' Compile complete -- 10 errors, 0 warnings Build complete -- 10 errors, 0 warnings : No download possible The problem was caused by the WagoSysPlainMem(WAGO) library in the original version 1.5.3.0 after updating to 1.5.3.1. After returning to version 1.5.3.0, the problems disappeared. Probably the version number of this library is responsible for supporting the appropriate Firmware Revision. Can anyone confirm or deny my suspicions?
Last updated: 2024-07-06

Post by xgongx on What is the insights of IoDrvEtherCAT.DCInSyncWindow? CODESYS Forge talk (Post)
It is well known that you need to increase the value of IoDrvEtherCAT.DCInSyncWindow to solve the "Fieldbus lost synchronicity" issue. In the official document, IoDrvEtherCAT.DCInSyncWindow is explained as the toleration of a certain jitter. But the official document doesn't explain what kind of the jitter is. Is it the jitter of DC sync deviation, master timer or something else? It is very important to know the insights of IoDrvEtherCAT.DCInSyncWindow. For example, if it is the toleration of DC sync deviation, and the official recommending value is 200us for CODESYS SoftMotion. It means maximum of DC sync deviation is 200us. It is unacceptable for some high precision motion control tasks, for example high speed gear task, etc. Increasing the value of IoDrvEtherCAT.DCInSyncWindow will increase the deviation of motor rotation sync if it is the toleration of DC sync deviation. So, would anyone tell me what the insights of IoDrvEtherCAT.DCInSyncWindow is? Thanks.
Last updated: 2024-07-09

Post by dekelec on Codesys 2.3 & Peak PCAN CODESYS Forge talk (Post)
I use Peak USB adapter daily to download from CoDeSys 2.3 and 3.5 to IFM, EPEC and other controllers. The process: - First you need to install the appropriate driver. Link: https://www.peak-system.com/Drivers.523.0.html?&L=1 - Restart the computer - Start the CoDeSys application - Change the name of the adapter in Communication parameters, as mentioned in previous comment. Write the name exactly as written "Peak_USB", as it could also be case sensitive (defines which .dll file to use). If this doesn't work I would contact the vendor of the controller to find out the procedure. In the attachment I've added a FAQ document from IFM regarding using PCAN USB. P.S. I've noticed in your picture of communication parameters a channel via TCP/IP is mentioned. In this case a USB to CAN connection is not being used. First you should change the channel/gateway to connect via CANbus or connect using an Ethernet cable.
Last updated: 2024-07-09

Post by solve-it on SysFileOpenAsync CODESYS Forge talk (Post)
Just realized that it is the /dev/input/js0 file. Don't think this is a prob either. Found the ConfigFile. Where and how to add /dev/input/js0? raspberry [SysFile] FilePath.1=/etc/, 3S.dat PlcLogicPrefix=1 [SysTarget] TargetVersionMask=0 TargetVersionCompatibilityMask=0xFFFF0000 [CmpLog] Logger.0.Name=/tmp/codesyscontrol.log Logger.0.Filter=0x0000000F Logger.0.Enable=1 Logger.0.MaxEntries=1000 Logger.0.MaxFileSize=1000000 Logger.0.MaxFiles=1 Logger.0.Backend.0.ClassId=0x00000104 ;writes logger messages in a file Logger.0.Type=0x314 ;Set the timestamp to RTC [CmpSettings] FileReference.0=SysFileMap.cfg, SysFileMap FileReference.1=/etc/CODESYSControl_User.cfg [SysExcept] Linux.DisableFpuOverflowException=1 Linux.DisableFpuUnderflowException=1 Linux.DisableFpuInvalidOperationException=1 [CmpWebServer] ConnectionType=0 [CmpOpenSSL] WebServer.Cert=server.cer WebServer.PrivateKey=server.key WebServer.CipherList=HIGH [SysMem] Linux.Memlock=0 [CmpCodeMeter] InitLicenseFile.0=3SLicense.wbb [SysEthernet] Linux.ProtocolFilter=3 [CmpSchedule] ProcessorLoad.Enable=1 ProcessorLoad.Maximum=95 ProcessorLoad.Interval=5000 DisableOmittedCycleWatchdog=1 [CmpUserMgr] AsymmetricAuthKey=6873d655ac1f166f3743feea42d2f3dd1b39ae40 [CmpSecureChannel] CertificateHash=09fd8d52be4ddd45a709bc9c95e2aa093b3f5695 [SysSocket] Adapter.0.Name="eth0" Adapter.0.EnableSetIpMask=1 ;raspberry [ComponentManager] ;Component.1=CmpGateway ;Component.2=CmpGwCommDrvTcp ;Component.3=CmpGwCommDrvShm [SysCom] ;Linux.Devicefile=/dev/ttyS [CmpBlkDrvCom] ;Com.0.Name=MyCom ;Com.0.Baudrate=115200 ;Com.0.Port=3 ;Com.0.EnableAutoAddressing=1 [SysProcess] Command.0=shutdown [CmpApp] Bootproject.RetainMismatch.Init=1 ;Application.1=Application ;Application.1=Application ;Application.1=Application Application.1=Application [CmpRasPi] Architecture=armv6l [CmpRedundancyConnectionIP] [CmpRedundancy] [CmpSrv] [IoDrvEtherCAT]
Last updated: 2024-07-16

Post by faceplant on CmpDynamicText unresolved references CODESYS Forge talk (Post)
Hello! I am new to codesys so I am sorry if this is not the right place to ask this question. I am using codesys V3.5 SP20 Patch 1 + (64-bit) and a Groov EPIC PLC (GRV-EPIC-PR2). I am trying to build and deploy my application to the PLC, but when I log in I get 6 errors (codesys_error.png). It seems that the errors have to do with the CmpDynamicText system library which I have as version 3.5.20.0. I have tried to add CmpDynamicText to the ComponentManager section in the PLC's CODESYSControl.cfg file as described in this forum post and still hit the same error. I noticed that the library is grayed out in the library manager, which I think might be the issue. However I don't remember if it was grayed out before I encountered this issue. Please let me know if I can provide anymore info. Thank you!!!
Last updated: 2024-07-19

Post by timvh on How to implement an interface (IElement)? CODESYS Forge talk (Post)
See: https://forge.codesys.com/prj/codesys-example/element-collect/home/Home/ This contains an application "OnlineChangeSafeLinkedListExample". What you should do is create a new interface which has your "Priority" property. Then your FB should extend the base element function block and implement your own interface: E.g. FUNCTION_BLOCK MyElement EXTENDS COL.LinkedListElementBase IMPLEMENTS I_MyInterface Then the __QUERYINTERFACE does the magic to check if your "element" also implements your interface. Something like this: // Compares this element with itfElement. // Returns 0 if the elements are equal, < 0 if the element is less than itfElement, // > 0 if the element is greater than itfElement. // This method will be called from sorted collections (e.g. |COL.SortedList|) to sort the elements. // IMPORTANT: The underlying value to be compared with MUST NOT be changed during the lifecycle of the object. METHOD ElementCompareTo : INT VAR_INPUT (* The element to compare*) itfElement : COL.IElement; END_VAR VAR itfIntElement : I_MyInterface; xResult : BOOL; END_VAR // We use integer iInt1 for sorting. xResult := __QUERYINTERFACE(itfElement, itfIntElement); IF xResult THEN IF iInt1 < itfIntElement.Priority THEN ElementCompareTo := -1; ELSIF iInt1 > itfIntElement.Priority THEN ElementCompareTo := 1; ELSE ElementCompareTo := 0; END_IF ELSE ElementCompareTo := -1; END_IF
Last updated: 2024-07-22

<< < 1 .. 170 171 172 173 174 175 > >> (Page 172 of 175)

Showing results of 4353

Sort by relevance or date