Search talk: codesys v 3

 
<< < 1 .. 870 871 872 873 874 .. 880 > >> (Page 872 of 880)

Post by manuknecht on High Cycle Times for SoftMotion_PlanningTask when using AxisGroup CODESYS Forge talk (Post)
Hello all I am using an AxisGroup with the Gantry2 Kinematics to move a 2D-Gantry system. When creating the AxisGroup, the SoftMotion_PlanningTask is created automatically with a cycle time of 2 ms in my case. I realized that the maximum cycle time of this task can spike to very high values (up to 60 ms) at lower speeds of the motion, leading to synchronization issues and errors on the axes. The same behaviour - though not as drastic - can be observed with virtual axes too. Is this behaviour intended or to be expected? Can the cycle time or type of the SoftMotion_PlanningTask be changed to prevent these errors? Or is there another fix for this issue? I tried changing the cycle type to Freewheeling, which solved the synchronization issues, but caused an error on the AxisGroup after a while, reading SMC_CP_QUEUE_UNDERRUN. Thanks in advance and best regards Manuel
Last updated: 2024-03-07

Post by acc00 on Main Task cycle too long leading to PLC Fail CODESYS Forge talk (Post)
I have 2 Wago PFC200 PLC, running with Runtime SP19 Patch 5, with the Redundant application. The PLC communicates as Modbus Master with at this moment 15 Modbus Slaves -later there will be 28 in total- (Drives, Power management units,...). These devices are connected in 2 rings (1 ring of Drives, 1 ring of Power Management units), with 2 Managed Moxa Switches being part of the ring. Each PLC is connected to one of these switches. The issue I'm encountering is that the Cycle time of the Active PLC goes very high when I'm closing the Drive ring (simulating an issue on one Cabinet supply, resulting in that one Drive shut down, which can happen on field quite often). As a result of this long cycle, the PLC fails and goes to Exception, and the Passive PLC does not take control of the system. A normal cycle is around 30ms for the Main task, and a few ms for the Ethercat task. When I monitor with Profiler, I see that in this Maximum Cycle, the main Task is only taking 13ms, so I'm not sure where the PLC is hanging for so long. Is the remaining cycle time the Redundant management/sync or something else? Thank you in advance.
Last updated: 2024-03-08

Post by alexgooi on Modbus writing on value change CODESYS Forge talk (Post)
Hi Duvan, You could make this in 1 single object (FB), Indeed don't use a function for this beacuse you need some memory to keep the old value. For i := 0 TO 200 BY 1 DO //Check if the value has been changed IF Old_Value[i] <> Value[i] THEN //Set the trigger to TRUE Trigger[i] := TRUE; Old_Value[i] := Value[i]; END_IF END_FOR If you define the Value array as an In_Out and the Trigger as an In_Out you arn't claiming any aditional memory to your system. You ofcourse then need to add some code arround it that does something with the trigger and writes it back to FALSE again. If you want more flexability you also could use pointers instead of using the IN_OUT FOR i := 0 TO 200 BY 1 DO address := address_Input + i * SIZEOF(*Put type here); IF Address^ <> Old_Value[i] THEN Trigger[i] := TRUE; Old_Value[i] := Address^; END_IF END_FOR
Last updated: 2024-04-02

Post by duvanmoreno24 on Modbus writing on value change CODESYS Forge talk (Post)
Yes, I tried to do what you put in the first code. However, I have a problem with that and that is that the inputs must be declared with the type. I have many data types running in my code (real, int, uint, bool) and I can't put them in the same function, another thing is that I need to instantiate that function for everything I want to write to the slave. You put a for to 200 but it means that it has to be the same data type and inside the array, but I want to get them individually. I'm struggling to do it in a good and efficient way like wago's E-cockpit does. in the first screenshot you can see, you simply type in value, change the package of things you want to write in value change and it does everything by itself automatically, without comparing any old and new values and even less having the need to activate a bool. , it is perfect.
Last updated: 2024-04-03

Post by squiggleypuff on Can't Add New Version of Modbus TCP Master CODESYS Forge talk (Post)
I'm having a tough time trying to get Modbus working on a Festo CPX-E PLC; it throws these pre-compiler errors as soon as I add in my Modbus TCP Master 3.5.12.30 to my project: I'm confused about the C0046 error, as I have IODrvModbusTCP 4.3.0.0 Library installed. So I thought maybe I needed to use the newest Modbus TCP Master 4.3.0.0, which is in my device repository: However, whenever I go to add this underneath the Ethernet adapter (which is version 4.2.0.0), the only TCP Master version available is the old 3.5.12.30 one, even if I have Display all versions checked.: I even went so far as to delete the old version, but then there were no options to add a Modbus TCP Master under my Ethernet adapter. What needs to be done to use the newest Modbus TCP Master? Or are these pre-compiler errors unrelated and I'm missing something? Any help greatly appreciated.
Last updated: 2024-04-04

Post by tim-roelant on Problem mit control runtime V3 und profinet CODESYS Forge talk (Post)
Hallo Edwin, meinst du das der control-win nicht wie SPS verwendet werden kann? Das program ist klein, und realtime brauch ich gar nicht, Es gibt im bus einem Turck inselstation mit 16 ein und ausgange, und ein MTS linearencoder, womit wir teile messen und abschneiden. Die cycluszeit reist auch nicht aus. Processorleisung bleibt unter 20%. Es geht mir darum das der profinet master in fehler geht, und nicht mehr seine telnehmer erkannen kann. Es kan passieren nach 10 minuten, aber auch nach 5 tage. Nur ein kaltstart bringt die bus wieder am laufen. (kein reconnect mochlich, auch die bus scannen functioniert nicht mehr) Wann ich aber ein ipscan durchfure mit Angryip auf der rechner sind alle telnehmer da. Ich habe noch eine andere application mit die gleiche anwendung, aber wo ein raspberry pi die SPS rolle spielt, und das functioniert einwandfrei. Soll ich fielleicht das OS von Rechenr nach linux umrusten? Der operator ist im moment sehr unzufrieden mit die "upgrade" von maschine... :-( lg Tim
Last updated: 2024-04-11

Post by tim-roelant on Problem mit control runtime V3 und profinet CODESYS Forge talk (Post)
Hallo Edwin, meinst du das der control-win nicht wie SPS verwendet werden kann? Das program ist klein, und realtime brauch ich gar nicht, Es gibt im bus einem Turck inselstation mit 16 ein und ausgange, und ein MTS linearencoder, womit wir teile messen und abschneiden. Die cycluszeit reist auch nicht aus. Processorleisung bleibt unter 20%. Es geht mir darum das der profinet master in fehler geht, und nicht mehr seine telnehmer erkannen kann. Es kan passieren nach 10 minuten, aber auch nach 5 tage. Nur ein kaltstart bringt die bus wieder am laufen. (kein reconnect mochlich, auch die bus scannen functioniert nicht mehr) Wann ich aber ein ipscan durchfure mit Angryip auf der rechner sind alle telnehmer da. Ich habe noch eine andere application mit die gleiche anwendung, aber wo ein raspberry pi die SPS rolle spielt, und das functioniert einwandfrei. Soll ich fielleicht das OS von Rechenr nach linux umrusten? Der operator ist im moment sehr unzufrieden mit die "upgrade" von maschine... :-( lg Tim
Last updated: 2024-04-11

Post by salvadegianluca on How to use TON inside an FB that is instanced within a Visu page CODESYS Forge talk (Post)
Hi everyone; I'm building a project in which the drag of the mouse over some controls (or the click event) changes the background color of the control items; this change of color is made with an FB that assignes a color code to the background with MUX command based on the value of an enumerator, this part is perfectly working but, when I'm using a touchpanel instead of a web visu (controlled by a mouse) I get into some issues as it seems that the touch operations are not triggering the MouseEnter and MouseLeave properties as it's done with the mouse.... For this reason I'm trying to add a TON to my FB and, if the enum that changes color remains at the same state for more then 3s I'm automatically resetting it to it's "0" so the item gets back the not selected color. Anyhow it looks like the TON function from library is not working in these FB that are instanced in the various visualizations, as instead they do if I create some instances within the POUS. Anyone has ideas of how to make them work?
Last updated: 2024-04-15

Post by salvadegianluca on How to use TON inside an FB that is instanced within a Visu page CODESYS Forge talk (Post)
Hi everyone; I'm building a project in which the drag of the mouse over some controls (or the click event) changes the background color of the control items; this change of color is made with an FB that assignes a color code to the background with MUX command based on the value of an enumerator, this part is perfectly working but, when I'm using a touchpanel instead of a web visu (controlled by a mouse) I get into some issues as it seems that the touch operations are not triggering the MouseEnter and MouseLeave properties as it's done with the mouse.... For this reason I'm trying to add a TON to my FB and, if the enum that changes color remains at the same state for more then 3s I'm automatically resetting it to it's "0" so the item gets back the not selected color. Anyhow it looks like the TON function from library is not working in these FB that are instanced in the various visualizations, as instead they do if I create some instances within the POUS. Anyone has ideas of how to make them work?
Last updated: 2024-04-15

Post by timo on Visu: Angepasster Button mit Statusanzeige - welche Möglichkeiten gibt es? CODESYS Forge talk (Post)
Hallo, Ich gehe gerade Möglichkeiten durch, wie ich Buttons so erstellen kann, dass ich sie nachträglich möglichst einfach bearbeiten kann um z.B. die Farben des Aktiven/Inaktiven Zustandes darzustellen. Die Buttons bestehen aus einem Hintergrund als Farbverlauf, einem Text und einem Icon. Ich habe zuerst den ESC Image Button verwendet, aber auch hier müsste ich nacheinander alle Buttons bearbeiten, wenn ich z.B. die Hintergrundfarbe anpassen will. Jetzt habe ich die Buttons als einzelne Visualisierungen erstellt und in der Visu jeweils als Frames eingeblendet. Den Zustand kann ich dann durch unsichtbare Elemente in der Buttonvisu darstellen. Weil hinter jeder Buttonvisu ein Frame meines Hintergrundes liegt, kann ich die einfach anpassen. Siehe Bild- der Frame ist der graue Hintergrund, das Rechteck ist die Umrandung für den Status mit einer transparenten Füllfarbe. Gibt es da eine einfachere Möglichkeit die Elemente zu verknüpfen, sodass ich einen Button habe, den ich nachträglich möglichst einfach abändern kann? Bei den Buttons bei denen ich keine Icons einblende, kann ich direkt den Text auf den Hintergrundframe setzen. Wenn ich hier aber das farbige Randungsrechteck für den Status über das Frame liege, verdeckt es diesen natürlich. Gibt es eine Möglichkeit Elemente so einzublenden, dass dahinter liegende Elemente angeklickt werden können? Alternativ muss ich die Aktion auch noch mit dem überlagertem Element verknüfen.
Last updated: 2024-04-22

Post by phoward131 on Alarm State Icon CODESYS Forge talk (Post)
I am trying to create an icon on an overview screen that depicts if an alarm group has active alarms, active acknowledged alarms, or inactive unacknowledged alarms (waiting for confirmation). I've attempted to set up Notification Actions in the Alarm Class to set variables based on state changes but have been unable to find a clean and effective way to do this. Because an action on any alarm will trigger the variable to be set as instructed, I'm struggling to find a way to configure it for what I need (ie if two alarms activate, then one deactivates, the variable for indicating an alarm is active would be cleared after the single deactivation). I've been pointed toward the Alarm Manager example project but I'm finding it too complicated to understand how to implement it in my own project. Has anyone come up with another good way to indicate the states of alarms or a simpler usage of the Alarm Manager functions?
Last updated: 2024-04-23

Post by culius on JSON CODESYS Forge talk (Post)
Hey guys, I am trying to write a JSON. First time after login in PLC after download everthing works. But when I want to change values during runtime and try to recreate the JSON nothing happens. When forcing the xStart as an impulse i want to recreate it and see 2 as Key3 instead of 1 from the first run. Any Idea how to make this work? PROGRAM test VAR factory : JSON.JSONDataFactory; eDataFactoryError : JSON.FBF.ERROR; pJsonData : POINTER TO JSON.JSONData := factory.Create(eError => eDataFactoryError); fb_JBuilder : JSON.JSONBuilder; wsValue : WSTRING; diRootIndex, diObject1Index : DINT; iValue : INT; jsonArrayWriter : JSON.JSONByteArrayWriter; wsJsonData : WSTRING(1000); xFirst : BOOL := TRUE; END_VAR IF xFirst THEN fb_JBuilder(pJsonData := pJsonData, diRootObj => diRootIndex); wsValue := "Value1"; fb_JBuilder.SetKeyWithValue("Key1", wsValue, diParentIndex := diRootIndex); diObject1Index := fb_JBuilder.SetKeyWithObject("Key2", diParentIndex := diRootIndex); iValue := iValue + 1 ; // -----------!!! secound run should increment key3!!!!------------ fb_JBuilder.SetKeyWithValue("Key3", iValue, diParentIndex := diObject1Index); xFirst := FALSE; END_IF jsonArrayWriter(xExecute := TRUE, pwData := ADR(wsJsonData), udiSize := SIZEOF(wsJsonData), jsonData := pJsonData^, xAsyncMode := FALSE); Kind Regards
Last updated: 2024-04-30

Post by kblundy on Change the Opening Position of the Dialog using VU.FbOpenDialog CODESYS Forge talk (Post)
I hope the community can help me with this. I need to use the Visu Utils FbOpenDialog to control the opening and closing of a dialog. I have the Opening and Closing working, but I can’t get the dialogue's position to be controlled. The code looks like this: PROGRAM OPEN_DIALOG VAR xOpenLatchSettingDialog : BOOL; TopLeftDialog : VisuStructPoint ; fbOpenLatchSettingsDialog : VU.FbOpenDialog ; END_VAR IF xOpenLatchSettingDialog THEN xOpenLatchSettingDialog:= FALSE ; TopLeftDialog.iX := 100; TopLeftDialog.iY := 23; fbOpenLatchSettingsDialog(sDialogName := 'visu_AlarmLatchSettings', xExecute := xOpenLatchSettingDialog , xModal := TRUE, itfClientFilter := VU.Globals.OnlyTargetVisu, pTopLeftPosition := ADR(TopLeftDialog)); CloseVisuDialog(sDialogName:= 'visu_AlarmLatchSettings'); ELSE xOpenLatchSettingDialog:= TRUE ; IF fbOpenLatchSettingsDialog.xError THEN xOpenLatchSettingDialog := FALSE; END_IF END_IF I can't seem to work out a way to make the values in TopLeftDialog.iX and TopleftDialog.iY be passed correctly in the call and for it to change the position of the dialogue box. The code is compiled, but the position has not been changed. Any guidance or suggestions for revising this code would be incredibly valuable. Your insights could be the key to solving this issue.
Last updated: 2024-05-05

Post by mxj262 on FB having single input but initialized with Array CODESYS Forge talk (Post)
I am adding elements of an ARRAY using pointer to access each element inside a FOR loop and the FOR loop does not stop! What is the right way to use pointers in such case?? I have another loop that is not using pointer and it stops but the loop using pointer keep on adding. METHOD FB_Init: BOOL VAR_INPUT bInitRetains: BOOL; // TRUE: the retain variables are initialized (reset warm / reset cold) bInCopyCode: BOOL; // TRUE: the instance will be copied to the copy code afterward (online change) END_VAR VAR_IN_OUT // basically REFERENCE TO window_buffer: ARRAY [*] OF INT; // array of any size END_VAR THIS^.windowPtr := ADR(window_buffer[0]); THIS^.windowSize := UPPER_BOUND(window_buffer, 1) - LOWER_BOUND(window_buffer, 1) + 1; FUNCTION_BLOCK FB500 VAR_INPUT END_VAR VAR_OUTPUT END_VAR VAR windowPtr: POINTER TO INT; windowSize: DINT; currentIndex: UINT; element1:INT; element2:INT; i:INT; j:INT; sum:DINT:=0; END_VAR element1:=windowPtr[0]; // read the first element of the Array dynamic memorry element2:=windowPtr[1]; FOR i:=0 TO (TO_INT(windowSize-1)) BY 1 DO // this loop does not stop Sum:=sum + windowPtr[i]; END_FOR FOR j:=0 TO 5 BY 1 DO // this loop stops j:=j+1; END_FOR https://ibb.co/k3DhkZT
Last updated: 2024-05-06

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 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 rmaas on Strange Behavior on Raspberry Pi CODESYS Forge talk (Post)
Hello, what you are seeing is not strange behavior. The problem is that everyting is happening in the same program cycle. After the variable Stepnumber is changed from 10 to 20 for example then you want the program to wait with the next EQ until the next program cycle. Else every EQ will be be true because in every line the variable Stepnumber is increased. When the program arrives (still in the same cycle) at the line with the timer, the Stepnumber has been increased to 30 in the meantime and the timer will allway be ON because even though the variable is written to 10 in this line in the next cycle it starts with 10 and will be 30 again before reaching the timer in line 8. Not very good at explaining stuff but i hope you get the problem. See screenshot below for an example of one way you could solve this...
Last updated: 2024-06-18

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 farren on How to stay in a method until something is finished. CODESYS Forge talk (Post)
I know I'm thinking about this wrong -- too many decades of procedural and event-driven programming and only a few months of PLC ST programming...... I've created a visualization with a button that when pushed calls a method. I want the method to take a pressure reading, wait one minute and then take another pressure reading. I'm looking for leaks. I'm using TON for the delay. It seems like what is happening is that the method gets called once and it takes the first reading and starts the TON. But then execution continues, leaves that method call, and the second reading never happens. I can force the method to keep running until the whole thing is done with a While loop, but I understand that is considered BAD in PLC programming. If it push the button again to call the method again, it picks up where it left off and if the timer is complete then it runs the remaining code. How do I keep that method running until it is complete with just one call without using a while loop that ties up the PLC for a minute? Thanks! -Farren
Last updated: 2025-10-31

Post by jonasz on Deploy LicenseServer for Linux SL CODESYS Forge talk (Post)
So here's how: I manually installed the following packages: codemeter-lite_8.30.6885.501_amd64.deb codesyslicenseserver_licenseserver_4.18.0.0_all.deb codesyswbmbase_wbmbase_4.18.0.0_all.deb codesyswbmlicensing_wbmlicensing_4.18.0.0_all.deb Of course, the license server appeared immediately. Trying to install it again using Install in the Deploy tab, the same error appears. Of course, the information that such a server is already installed is also there. Configuring PLC, S_PLC, EDGE, and SAFE_TIMER_PROVIDER went smoothly, and basically everything works. I wrote a simple program for S_PLC. I'm loading the programs into PLC and S_PLC. When loading the program into S_PLC, a message appears stating that there is no connection to the S_PLC controller. Timeout error. Restart the controller, attempt to load, and see the above. After changing the cycle time for S_PLC to 50ms, the problem no longer occurs. My question, besides the difficulty of installation for a new user, is what causes the cycle time for S_PLC to be so long, and how can I fix it?
Last updated: 3 days ago

Post by falif461 on ╭⁠☞[] Temu Coupon Code $100 Off⤁ {"acq557317"} $100 Off for New and Existing users→⁠_⁠→ CODESYS Forge talk (Post)
Temu Coupon Code $100 Off Colombia ➥ {acq557317} & {acq557317} , TEMU Coupon Code "acq557317" | $100 OFF & 50% DISCOUNT, TEMU Coupon Code "acq557317" ,is an all in one opportunity, which also offers $100 Off & 50% Discount! The TEMU Coupon Code "acq557317" offers an impressive $100 discount and a 50% discount on purchases for both new and existing customers. This special offer is a fantastic opportunity to save significantly on your TEMU shopping experience. By using the Coupon Code "acq557317" in Colombia , you can unlock the $100 coupon bundle, which provides $120 worth of savings. This means that you can enjoy a $100 discount on your order, as well as access to exclusive deals and additional savings opportunities. ⇦ Exclusive Temu coupon Codes ,,,acq557317,,,,, ➤ Offers → Discounts, Student Deals & More ╰┈➤ Best Temu Coupon Codes Colombia ➤ "acq557317" ⇨ "acq557317" ➥ Up to 50% Off Retrieve ➲$100➲ TEMU Coupon Code ➥【acq557317】 or 【acq557317】⇒{Colombia } || AUG/SEP 2024 To redeem the TEMU $100 Coupon Code, simply follow these steps: Sign up for a TEMU account on their website or mobile app. Add items worth $100 or more to your shopping cart. During checkout, enter the Coupon Code "acq557317" in the designated field. The $100 discount will be automatically applied, and you can also enjoy an additional 50% off on your purchase. This Coupon Code is valid for both new and existing TEMU customers, making it a great opportunity for everyone to save on their shopping. The $100 coupon bundle can be combined with other available discounts, such as the 30% off code for fashion, home, and beauty categories, allowing you to maximize your savings. ➥ Temu Coupon Code $100 Off {acq557317} Colombia ➥ Temu Coupon Code 40 Off {acq557317} Colombia ➥ Temu Coupon Code 50 Off {acq557317} Colombia ➥ Temu Coupon Code 70 Off {acq557317} Colombia ➥ Temu Coupon Code 90 Off {acq557317} Colombia ➥ Temu Coupon Code 30 Off {acq557317} Colombia ➥ Temu Coupon Code First Order {acq557317} Colombia ➥ Temu Coupon Code Existing User {acq557317} Colombia ➥ Temu Coupon Code 90 Off {acq557317} or {acq557317} Colombia Temu Coupon Code Colombia $100 Off [acq557317] For New Users 2024 Temu has rapidly gained popularity as a go-to shopping destination, offering a vast array of trending products at unbeatable prices. To welcome new users, Temu is excited to offer the exclusive Temu coupon code $100 off [acq557317]. Alongside this, existing customers can enjoy significant savings with the acq557317coupon code. Why You Should Embrace Temu Coupon Codes Colombia Temu has revolutionized online shopping by providing an extensive range of products, from fashion and electronics to home goods and accessories. Coupled with fast delivery and free shipping to numerous countries, Temu has become a preferred choice for budget-conscious shoppers. Now, imagine enjoying these benefits with an additional $100 off your purchase! That's where our Temu coupon codes come in. <get $50="" off="" your="" first="" temu="" order!=""> Use Code {acq557317} Now! |Exclusive Offer: $50 Off Your First Temu Purchase with Code {acq557317}| <save big!="" $50="" off="" your="" first="" order="" on="" temu=""> with Code {acq557317} |Unlock $50 Savings on Temu> First Order Using {acq557317}| $50 Off Your Initial Temu Order Use Code {acq557317} Today! <get $50="" off="" temu’s="" first="" purchase=""> with Code {acq557317} |Don’t Miss Out: $50 Off Your First Temu Order| Use Code {acq557317} <$50 Discount on Your First Temu Purchase> Use {acq557317} |Amazing $50 Off on Your First Temu Order| with Code {acq557317} <start shopping="" with="" $50="" off="" on="" temu!=""> Use Code {acq557317} |First Order Special: $50 Off at Temu| Use {acq557317} 🥳 <save $50="" on="" your="" first="" temu="" purchase!=""> Apply Code {acq557317} 🥳 |Hot Deal: $50 Off Your First Order on Temu| Code {acq557317} <exclusive $50="" off="" on="" your="" first="" temu="" order!=""> Use Code {acq557317} |First-Time Shopper? Get $50 Off at Temu| Use Code {acq557317} <get $50="" off="" your="" first="" temu="" order!=""> Use Code {acq557317} Now! |Exclusive Offer: $50 Off Your First Temu Purchase with Code {acq557317}| </get></exclusive></save></start></get></save></get> Unveiling Top Temu Coupon Codes for August & September 2024 To maximize your savings, consider these exceptional Temu coupon codes: acq557317: $100 off for new users - A fantastic welcome offer. acq557317: $100 off for existing customers - A reward for loyalty. acq557317: $100 extra off - Boost your savings significantly. acq557317: Free gift for new users - A delightful surprise. acq557317: $100 coupon bundle - A comprehensive savings package. Navigating the Path to Temu Savings Redeeming your Temu coupon code is a straightforward process: Create a Temu account or log in to your existing one. Explore Temu's vast collection and add your desired items to your cart. Proceed to checkout and apply your coupon code at the designated box. Witness the magic unfold as your discount is instantly applied to your order total. Unlock Extraordinary Savings with Temu Coupon Code $100 Off [acq557317] The Temu coupon code $100 off [acq557317] is a fantastic opportunity for new users to experience the Temu shopping thrill with significant savings. Imagine purchasing your favourite items at a discounted price. This coupon empowers you to enjoy a wide range of products without breaking the bank. Unleash the Power of Temu Coupon Codes Flat $100 discount: Enjoy a substantial reduction on your entire order. $100 discount for new users: A generous welcome offer for first-time shoppers. $100 off for existing customers: A reward for your loyalty to Temu. $100 coupon for new customers: A fantastic incentive to try Temu. Temu $100 off for old users: A token of appreciation for your continued support. Elevate Your Temu Shopping Experience To optimize your savings journey on Temu, consider these expert tips: Leverage free shipping: Enjoy complimentary delivery on your orders. Explore diverse product categories: Uncover hidden gems and unexpected finds. Stay alert for daily deals and flash sales: Seize limited-time opportunities. Combine coupons with other discounts: Maximize your savings potential. Share your shopping experience: Leave reviews to help others and potentially earn rewards. Utilize social media: Follow Temu on platforms like Instagram and Facebook for exclusive deals and promotions. Join Temu's email list: Stay informed about the latest offers and product launches. Essential Temu Coupon Codes for Unmatched Savings To further enhance your shopping adventure, explore these indispensable Temu coupon codes: acq557317: Temu coupon $100 off for new users acq557317: Temu coupon code $100 off for existing customers acq557317: Temu coupon codes 100% acq557317: Temu coupon $100 off code acq557317: Temu coupon $100 off first-time user Temu Coupon Codes for August 2024: The Key to Massive Discounts This month, Temu offers several enticing Coupon codes tailored to both new and existing users, ensuring everyone can save. Here’s a quick look at the top Temu Coupon codes you can take advantage of this August: [acq557317]: Temu Coupon code $100 off for new users [acq557317]: Temu Coupon code 40% off for new customers [acq557317]: Temu Coupon code 40% extra off [acq557317]: Temu Coupon code for a free gift for new users [acq557317]: Temu $100 Coupon bundle for existing and new users These Temu Coupon codes offer a variety of benefits, from substantial discounts to free gifts and bundled savings. Whether you’re shopping for fashion, electronics, home goods, or more, these codes will ensure you get the best deal possible. Whether you're a seasoned Temu shopper or a new customer, these coupon codes offer an incredible opportunity to save on your purchases. Remember, the Temu coupon code $100 off [acq557317] is a limited-time offer. Don't miss out on this fantastic chance to enjoy significant savings! Embark on your Temu shopping spree today and experience the thrill of unbeatable prices. Temu Coupon Code France: (acq557317) or (acq557317) Temu Coupon Code Sweden : (acq557317) or (acq557317) Temu Coupon Code Australia : (acq557317) or (acq557317) Temu Coupon Code United Kingdom : (acq557317) or (acq557317) Temu Coupon Code Spain : (acq557317) or (acq557317) Temu Coupon Code Italy : (acq557317) or (acq557317) Temu Coupon Code Germany : (acq557317) or (acq557317) Temu Coupon Code Saudi Arabia : (acq557317) or (acq557317) Temu Coupon Code Austria : (acq557317) or (acq557317) Temu Coupon Code Belgium : (acq557317) or (acq557317) Temu Coupon Code Thailand : (acq557317) or (acq557317) Temu Coupon Code Kuwait : (acq557317) or (acq557317) Temu Coupon Code United Arab Emirates : (acq557317) or (acq557317) Temu Coupon Code Switzerland : (acq557317) or (acq557317) Temu Coupon Code Mexico : (acq557317) or (acq557317) Temu Coupon Code New Zealand : (acq557317) or (acq557317) Temu Coupon Code Poland : (acq557317) or (acq557317) Temu Coupon Code United States : (acq557317) or (acq557317) Temu Coupon Code Portugal : (acq557317) or (acq557317) Temu Coupon Code Netherlands : (acq557317) or (acq557317) Temu Coupon Code Brazil : (acq557317) or (acq557317) Temu Coupon Code Colombia : (acq557317) or (acq557317) Temu Coupon Code Chile : (acq557317) or (acq557317) Temu Coupon Code Israel : (acq557317) or (acq557317) Temu Coupon Code Egypt : (acq557317) or (acq557317) Temu Coupon Code Peru : (acq557317) or (acq557317) Temu Coupon Code Ireland : (acq557317) or (acq557317) Temu Coupon Code Hungary : (acq557317) or (acq557317) Temu Coupon Code Romania : (acq557317) or (acq557317) Temu Coupon Code Bulgaria : (acq557317) or (acq557317) Temu Coupon Code Colombia : (acq557317) or (acq557317) Temu Coupon Code Slovenia : (acq557317) or (acq557317) Temu Coupon Code Colombia : (acq557317) or (acq557317) Temu Coupon Code Europe : (acq557317) or (acq557317) Temu Coupon Code Malaysia : (acq557317) or (acq557317) Temu Coupon Code Oman : (acq557317) or (acq557317) Temu Coupon Code Norway : (acq557317) or (acq557317) Temu Coupon Code Switzerland : (acq557317) or (acq557317) Temu Coupon Code Czech Republic : (acq557317) or (acq557317) Temu Coupon Code Asia : (acq557317) or (acq557317) Temu Coupon Code East Asia : (acq557317) or (acq557317) Temu Coupon Code Middle East : (acq557317) or (acq557317) Temu Coupon Code Cyprus : (acq557317) or (acq557317) Temu Coupon Code Central : (acq557317) or (acq557317) Temu Coupon Code Eastern : (acq557317) or (acq557317) Temu Coupon Code Romania : (acq557317) or (acq557317) Temu Coupon Code Canada : (acq557317) or (acq557317) Temu Coupon Code Colombia : (acq557317) or (acq557317) Temu Promo Code-{acq557317} Temu Promo Code: $100 OFF{acq557317} Temu Coupon Code: Free Shipping{acq557317} Temu $100 OFF Code{acq557317} Temu 50% Discount Coupon{acq557317} Temu $120 Coupon Bundle Code{acq557317}{acq557317} Temu Student Discount Coupon Code{acq557317} temu existing user coupon code Using Temu's coupon code [{acq557317}] will get you $100 off, access to exclusive deals, and benefits for additional savings. Save 40% off with Temu coupon codes. New and existing customer offers. temu coupon code May 2024- {acq557317} temu new customer offer{acq557317} temu discount code 2024{acq557317} 100 off coupon code temu{acq557317} temu 100% off any order{acq557317} 100 dollar off temu code{acq557317} What is Temu $100 Coupon Bundle? New Temu $100 coupon bundle includes $120 worth of Temu coupon codes. The Temu $100 Coupon code "{acq557317}" can be used by new and existing Temu users to get a discount on their purchases. Enjoy $100 Off at Temu with Promo Code [acq557317] – Exclusive for August and September 2024! Looking for incredible savings on top-quality products at Temu? Whether you're new to Temu or a seasoned shopper, our special promo code [acq557317] offers you an exclusive chance to save $100 on your purchases throughout August and September 2024. Here's everything you need to know to take full advantage of this fantastic offer. For New Customers: 1. Sign Up and Save Big: • Download the Temu App: Start by downloading the Temu app from your smartphone's app store or visit the Temu website using your computer. Temu's user-friendly interface ensures a smooth shopping experience. • Create an Account: Register for a new account by providing your basic details. This process is quick and straightforward, and it unlocks your access to a $100 discount. • Browse and Add to Cart: Explore Temu's extensive range of products, from stylish fashion items to cutting-edge electronics and home essentials. Add items totaling $100 or more to your cart. This ensures that you meet the minimum purchase requirement to use the promo code. 2. Apply Your Promo Code: • Proceed to Checkout: Once you've filled your cart, go to the checkout page. Here, you'll see a field labeled "Promo Code" or "Discount Code." • Enter Code [acq557317]: Input the promo code [acq557317] into the designated field and click "Apply." The $100 discount will be automatically applied to your total. • Review and Complete Purchase: Verify that the discount has been applied to your order. Complete the payment process and enjoy your shopping spree with a $100 discount! Tip for New Customers: This exclusive offer is valid only during August and September 2024. Make sure to use the code [acq557317] within this period to maximize your savings. For Existing Customers: 1. Shop and Save with Ease: • Log Into Your Account: If you're a returning Temu shopper, simply log into your existing account on the Temu app or website. • Explore and Add Items: Browse through the extensive product catalog. From the latest gadgets to home decor, add items totaling $100 or more to your cart. • Prepare for Checkout: Proceed to the checkout page where you'll be able to apply your discount. 2. Redeem Your Promo Code: • Enter Promo Code [acq557317]: In the "Promo Code" field at checkout, enter [acq557317] and click "Apply." The $100 discount will be applied to your order total. • Check and Complete Purchase: Confirm that the discount has been applied correctly to your order. Finalize the payment details to complete your purchase. Tip for Existing Customers: This offer can be combined with other promotions available during August and September, so keep an eye out for additional savings opportunities! How to Redeem the $100 Coupon Code [acq557317]: Whether you are a new or existing customer, here's a step-by-step guide to ensure you don't miss out on this exclusive $100 discount. 1. Sign Up or Log In: • New Customers: Register for a new account on Temu by providing your details on the app or website. • Existing Customers: Log into your current Temu account. 2. Add Items to Your Cart: • Browse Temu's product offerings and add items worth at least $100 to your shopping cart. This qualifies you to use the promo code. 3. Apply the Promo Code: • At the checkout page, find the "Promo Code" box. • Enter the code [acq557317] and click "Apply." The $100 discount will be reflected in your order total. 4. Review and Complete Your Purchase: • Make sure the discount is applied to your order. Review your cart and proceed with payment. • Enjoy your savings and the products you've purchased! Additional Benefits: • Exclusive Deals: Using promo code [acq557317] not only gives you $100 off but may also unlock additional deals and promotions tailored for August and September. • Combining Discounts: You can often combine this promo code with other ongoing promotions for even greater savings. Keep an eye on Temu's website and app for additional offers. • Free Shipping: Depending on the promotion, you might also benefit from free shipping on eligible items. Important Details: • Validity: This $100 off promo code is valid only from August 1, 2024, to September 30, 2024. Make sure to use it within this time frame to take advantage of the offer. • Minimum Purchase: The offer applies to purchases of $100 or more. Ensure your cart meets this minimum before applying the promo code. • One-Time Use: The promo code [acq557317] can typically be used only once per customer. Make sure to apply it to your largest purchase to maximize savings. FAQs: Q: Can new and existing customers both use the promo code [acq557317]? • A: Yes, the promo code is available to both new and existing Temu customers. Q: Is there a minimum purchase requirement to use the promo code? • A: Yes, you need to have a minimum purchase of $100 to apply the $100 discount. Q: Can the promo code be combined with other offers? • A: Yes, in many cases, you can combine the promo code [acq557317] with other ongoing promotions and discounts. Q: What should I do if the promo code does not work? • A: Double-check that the code [acq557317] is entered correctly and that your order meets the minimum purchase requirement. If you continue to have issues, contact Temu's customer service for assistance. Take advantage of this exclusive offer today and enjoy substantial savings on your next Temu purchase. With up to $100 off, there's never been a better time to shop for high-quality products at unbeatable prices. Remember, this offer is only available for a limited time, so don't delay—start shopping and saving now! Are you looking to save big while shopping on Temu? You're in the right place! Temu is quickly becoming a favorite online marketplace, and with our exclusive Temu Coupon Codes like [acq557317], you can enjoy significant discounts, including $100 off your first order and up to 90% off selected items this October 2024. In this article, we’re diving into everything you need to know about using Temu Coupon Codes, including their legitimacy and tips on maximizing your savings. Let’s get started! What is Temu? Temu is an emerging e-commerce platform that offers a wide range of products, including electronics, clothing, accessories, home decor, and much more. Known for its affordability, Temu provides various opportunities to save even more with the right coupon codes. Whether you are a new user or an existing customer, the savings potential is substantial. Temu Coupon Code [acq557317]: What Can You Expect? Here are some of the top offers you can enjoy with the Temu Coupon Code [acq557317]: • $100 Off on your first order • Up to 90% Discount on selected items • 30% Off across various products • Free shipping for new users and first-time customers These promo codes are valid for October 2024, giving you ample time to grab your favorite items without breaking the bank. How to Apply Temu Coupon Code [acq557317]? Applying a Temu Coupon Code like [acq557317] is easy! Here’s how to do it:
Last updated: 2024-10-26

Post by mubeta on Strange problem with the ‘MC_SetPosition’ function CODESYS Forge talk (Post)
How are the servo drives controlled? EtherCAT, step/dir pulses, other? CANOpen, 1 Mb/s, bus load 35%, cycle time 2ms. Another thought is that - if it's step/dir pulse based control - the pulses from the PLC to the drive are getting missed/lost at high frequencies? If that's the case then there would be multiple troubleshooting steps/corrections that could be investigated. Here, it seems to me that we are getting completely off track with the observed problem. You could try to create a simplified program I had already written this elsewhere. The program before being brought into machines was exhaustively tested in SW emulation and the problem did not occur. However, in emulation I was interested in checking other aspects of the process, not this specific one which is for real a correction made necessary after the fact. The part of the program that does this correction with the function mentioned in the topic, came up from its origins, but I didn't know or didn't think it was really useful. A scruple that later turned out to be necessary. However, for now I do not think I will spend any more time on this verification, already lacking any to do my normal. I remain amazed, however, that a function intended to correct the axis position with the motor in motion and that it should not interfere with this, in fact instead changes behavior as the motor speed changes. Mah! When you manually control the motor directly from the servo drive software at the speeds you are calling for, does it move precisely to the target position? The drive and motor have been working fine for about 10 years. In replacing the machine control system, I opted for CoDeSys where before there was something else. But this is not the subject of the problem. What I need to resolve is the fact that a clutch specially placed at a certain point can slip and, therefore, I have the undeniable need to phase the 'prime mover' to the mechanical position of the machine, detected by a cam for each turn, in order to properly stop at its optimum point. Which for now I have ruled out doing. In fact, if I really have to say, since we have now gone brutally OT, I originally thought that this clutch should only come into action in cases of extreme necessity, as happens in most trials. But this one, the way it is made, slips more easily than I could estimate and the servo-controlled 'prime mover,' and the machine, get out of phase, maybe by a little, but frequently, and when the machine work at it's high speed, (in fact all of the time), I can't adjust properly the 'prime mover' position at fly.
Last updated: 2025-01-18

Post by ryandmg on Web Client (HMI) Disconnects from Webvisu (Weidmuller u-OS) CODESYS Forge talk (Post)
Hey Everyone, I'm having a bit of a struggle finding settings that will reliably maintain a connection between the webvisu and a touchscreen client. Every so often the HMI disconnects and will perpetually display the red spinning arrow with the "Error Happened, Will resume automatically" text. Power cycling the HMI to force a reconnect will re-establish comms. It seems to happen during periods of inactivity if that's a clue. From what I've gathered so far this seems to have something to do with the webvisu update rate, buffer size as well as the visu task scan rate. We first tried the default settings as follows: Webvisu Update Rate: 200 ms Webvisu Buffer Size: 50,000 Visu Task Scan Rate: 100 ms Priority 31 Other Tasks for Reference: Main Task Scan Rate: 100 ms Priority 1 Alarm Manager Scan Rate: 50 ms Priority 31 Ethercat Task: 4 ms Priority 1 This would disconnect some what regularly. We then made the following changes to try and stabilize: Webvisu Update Rate: 150 ms Webvisu Buffer Size: 75,000 Visu Task Scan Rate: 75 ms Kept other tasks the same. This seems to disconnect even more frequently. Also for reference the network is very small and only consists of the PLC, a small switch and the HMI. We're also not controlling frames from outside the visu program itself. The frame changes are all done natively. Any suggestions to get this to stop disconnecting? Oh and whatever the issue is the log does not record it. Figured I would ask here before opening a ticket. Thanks in advance for your help!
Last updated: 2023-09-06

Post by manuknecht on Opening a Dialog on a specific Client from ST CODESYS Forge talk (Post)
I managed to find a solution that seems to work reliably. As the VU.Globals.CurrentClient-filter accesses the CURRENTCLIENTID or at least a similar, internal variable it can only be used if called from a certain client (e.g. from a button in a visualization). My solution works by implementing a new client filter that compares the client ID of all clients to the ID of the last client that was used. The variable containing the data of the last client is defined as: G_LastClient : VU.IVisualizationClient; // Copy of last client that detected click This last client is then updated every time a button is pressed using the Execute ST-Code input configuration of the button: G_LastClient := VU.PublicVariables.Clients.Current; Next, I created a function block that implements the client filter interface as so: FUNCTION_BLOCK FB_LastClientFilter IMPLEMENTS VU.IVisualizationClientFilter VAR_INPUT END_VAR VAR_OUTPUT END_VAR VAR END_VAR Then i added a method to the FB called IsAccepted which is used to filter out the client. When creating the method, it should automatically be filled with the according variable declaration, as it is defined in the interface: (* For every client can be desided, if it is accepted. ``TRUE``: Client is accepted*) METHOD IsAccepted : BOOL VAR_INPUT (* The client, to check*) itfClient : VU.IVisualizationClient; END_VAR Now the client can be compared to the last used client as such: // check if clientID corresponds to clientID of last recorderd client IF itfCLient.ClientId = G_LastClient.ClientId THEN IsAccepted := TRUE; ELSE IsAccepted := FALSE; END_IF To make use of this custom client filter, initialize a variable with the client filter: LastClient : FB_LastClientFilter; // Client filter to find last used client Then use this client filter when opening or closing a dialog from ST: fbOpenMyDialog(itfClientFilter:=LastClient,xExecute:=TRUE,sDialogName:='VIS_MyDialog_DLG');
Last updated: 2023-09-27

<< < 1 .. 870 871 872 873 874 .. 880 > >> (Page 872 of 880)

Showing results of 21989

Sort by relevance or date