Search talk: codesys box with en/eno

 
<< < 1 .. 795 796 797 798 799 > >> (Page 797 of 799)

Post by viksym on Get text from textlist CODESYS Forge talk (Post)
Does anybody know how to get a specific text from a text list within a program. Obviously it works in a visualization, but because I will have an HMI that has it's own system and I will have to send variables to this HMI via an OPC UA connection, I need to be able to get a text into a string. I tried using the VisuElems like this, but it only returns an empty "" and nothing else. IF trig THEN sText := VisuElems.cmpDynamictext.DynamicTextGetDefaultText(ADR(sTextList), ADR(sAlarmID))^; //sText := VisuElems.cmpDynamictext.DynamicTextGetText(ADR(sTextList), ADR(sAlarmID))^; trig := FALSE; END_IF Any help and idea is highly appreciated because I am getting desperate here.
Last updated: 2024-05-31

Post by kazuhiro on Problems using MySql Library and SysProcessExecuteCommand2 together CODESYS Forge talk (Post)
I use fbMsSQL_compact(FUN) of the MySQL Library to write data to the database. There is no problem when writing data using only fbMsSQL_compact(FUN). However, when I try to write data obtained using SysProcessExecuteCommand2 to the database using fbMsSQL_compact(FUN), an error message "Dest server on ip address:xxx.xxx.xxx.xxx and port:1433 is unreachable" appears and writing is not possible. From what I have researched, it seems that writing is not completed in one cycle of fbMsSQL_compact(FUN), and when SysProcessExecuteCommand2 is executed first in the second cycle, the work done in one cycle of fbMsSQL_compact(FUN) is reset. Could you please give me some advice?
Last updated: 2024-06-18

Post by kazuhiro on Problems using MySql Library and SysProcessExecuteCommand2 together CODESYS Forge talk (Post)
I use fbMsSQL_compact(FUN) of the MySQL Library to write data to the database. There is no problem when writing data using only fbMsSQL_compact(FUN). However, when I try to write data obtained using SysProcessExecuteCommand2 to the database using fbMsSQL_compact(FUN), an error message "Dest server on ip address:xxx.xxx.xxx.xxx and port:1433 is unreachable" appears and writing is not possible. From what I have researched, it seems that writing is not completed in one cycle of fbMsSQL_compact(FUN), and when SysProcessExecuteCommand2 is executed first in the second cycle, the work done in one cycle of fbMsSQL_compact(FUN) is reset. Could you please give me some advice?
Last updated: 2024-06-18

Post by mikek10 on HTTP Client TCP Init Error CODESYS Forge talk (Post)
Hi, I tried posting in the discussion for the HTTP Client example but perhaps that is not monitored? I have been using http client successfully for approximately 12 months, however in recent weeks I have begun to get TCP_INIT_ERROR when attempting to communicate. The only resolution seems to be power cycling and then the connection begins to work again for a time. I am not aware of any changes to code or libraries between working ok and now. Cold reset does not resolve, only power cycle. It seems the error from NBS.TCP_Client is 6002 which I think is invalid_addr However the address is the same when working and not working?
Last updated: 2024-07-04

Post by mubeta on parker servo and position CODESYS Forge talk (Post)
Reading between the lines of what you did not specify, it therefore seems to appear that in the programme, at the end of the movement order, there is an order to remove power and switch off the pulse modulation. if this is the case, it is obvious that the motor then remains free. If the position is to be maintained at the end of the movement, the motor current modulator, which on the PLC side is controlled via the MC_Power method, must not be interrupted. Another possibility is that in the motor drive settings, the standstill torque current is set very low or zero and without position monitoring. You have to check this via the servo motor drive.
Last updated: 2024-08-05

Post by bernhardw on Probleme mit MC_HALT_SML und MC_STOP_SML CODESYS Forge talk (Post)
Hallo … ich verwende: SoftMotionLight im Positions-Mode Ethercat-Bus Servoverstärker: Metronix BL4104-C . MC_HALT_SML funktioniert nicht zuverlässig (Achse fährt manchmal zu weit oder bis zum Softwareschalter) Ich habe festgestellt, dass intern beim Aufruf von Positions- auf Velocity-Mode umgeschaltet wird - und dann wird wahrscheinlich intern auf Drehzahl 0 abgeregelt. Kennt jemand dieses Problem? – der Wechsel der Betriebsart ja ist nicht verzögerungsfrei! MC_STOP_SML Der Baustein hat keinen Eingangsparameter "Deceleration" Die Achse stoppt und bleibt im Positions-Mode. Aber die Verzögerung ist nicht wie beschrieben: nicht "Objekt 6085h: quick_stop_deceleration" - sondern "Objekt 6084h: profile_deceleration" - aus zuvor aufgerufenem MC_MOVE_ABSOLUTE_SML Ich wäre dankbar für jeden Hinweis Gruß Bernhard
Last updated: 2024-08-05

Post by trusty-squire on parker servo and position CODESYS Forge talk (Post)
@gepert, When you say "I do not turn off power", are you saying you don't power off the drive, or you don't turn of the MC_POWER function block? I read your statement as you don't kill actual electrical power. MC_POWER should stay enabled. @Gustavo, not related to problem at all, but when you say 1.6 Nm is only enough torque to unscrew a loose bottle cap, I think that's a bit low. A quick mental math I use is 1 Nm is almost the same force as 1kG applied to a 10cm wrench. So 1.6kG applied to a 10cm wrench is still not a huge force, but more than enough to be felt if trying to turn the shaft by hand.
Last updated: 2024-08-06

Post by alimans on OPC-UA Server, Symbol Set: Raise an error: Object reference not set to an instance of an object. CODESYS Forge talk (Post)
Hi everyone, I just created a very simple library without any code and, added it to my very simple project. after adding this library, I get an error when I try to open "Symbol Set" in "OPC UA Server" in "Communication Manager". Here is the code of my POU in the library: FUNCTION_BLOCK POU VAR eCommand : (CMD_NONE:=0, CMD_RESET:=-1) INT := CMD_NONE; END_VAR Attached is the error that I get. I also noticed that by removing the enumeration variable above (eCommand), I can open the "Symbol Set" again. Anybody has any idea why this error is raised and how could I use enumeration variables without error in "OPC UA Symbol Set"?
Last updated: 2024-08-08

Post by gilbertamine on Comparing Arrays of structure CODESYS Forge talk (Post)
Hi Everybody, I'm looking for a simple way of comparing two array of a structure. My structure is define like this : TYPE Positions_T : STRUCT PosX: DINT; PosY: DINT; PosZ: DINT; END_STRUCT END_TYPE I have multiples Var : ARRAY [0..220] OF Positions_T, that I need to compare quickly. I don't really want to do a Loop that goes by every 220 points and compare each one of them so I was wondering if there is another way. I came accross the MEM.Compare function, but it require to know the size in Bytes of the memory, and I don't know how to do that... Has anybody an idea on how to do the comparing easily ? Thanks in advance
Last updated: 2024-08-22

Post by jonathan1321351 on IO-Link write parameters Ethernet/IP CODESYS Forge talk (Post)
I want to read and write parameters of an IO-Link device using acyclic messages. I have a Cube67+ in Ethernet/IP, connected to an IO-Link master. In the datasheet, I can find the parameters required for the message (Service, Class, Instance, etc.). I see the function block "Set_attribute_single" in the "EthernetIP Services" library, but I'm not sure how to correctly send the index and sub-index for the IO-Link device. The class in the datasheet is 0x80 for the IO-Link Parameter Object, but it’s not present in the CPIClass enum. Is there another function block more suitable for configuring IO-Link devices? (similar to "iol_call" in PROFINET or what’s used in EtherCAT).
Last updated: 2024-09-02

Post by jonathan1321351 on IO-Link read/write parameters Ethernet/IP CODESYS Forge talk (Post)
I want to read and write parameters of an IO-Link device using acyclic messages. I have a Cube67+ in Ethernet/IP, connected to an IO-Link master. In the datasheet, I can find the parameters required for the message (Service, Class, Instance, etc.). I see the function block "Set_attribute_single" in the "EthernetIP Services" library, but I'm not sure how to correctly send the index and sub-index for the IO-Link device. The class in the datasheet is 0x80 for the IO-Link Parameter Object, but it’s not present in the CPIClass enum. Is there another function block more suitable for configuring IO-Link devices? (similar to "iol_call" in PROFINET or what’s used in EtherCAT).
Last updated: 2024-09-04

Post by davidbo on RPI can system operation like rm in a shell have an impact on a Task cycle time CODESYS Forge talk (Post)
I have noticed that a rm file1.txt command on a shell has an impact on the cycle time for a TASK writing to file2.txt. Seen in the Monitor fane of the Task configuration Furthermore if a TASK makes a system call like rm, its cycle time increases of course but it seems to have an invisible impact on other TASKs too. I have a TASK for handling communication over the CANbus (SPI) where it stops sending "Heartbeats" for many seconds when another TASK does a system rm. Why is that not seen on the Monitor fane? Is even codesyscontrol paused when system calls are made? The CPU load is about 30-40%
Last updated: 2024-09-23

Post by andrebrandt on FB string and naming CODESYS Forge talk (Post)
Hi Tim. Not quite correct. What i'd like, is when you place the FB in prog, i choose a block NTC10k, and name this RT401. What i'm trying to do, is to get the name RT401 automaticly into the FB, so i can put this into the string i pass in a struct. So in var in POU, i saw this a place i could do this, RT401: NTC10k(Tag:='RT401'), but i can't get this to work. I shurly must have had something like this in FB: FUNCTION_BLOCK NTC10k String TAG But it's here where I'm stuck...
Last updated: 2024-09-30

Post by dakmueller on Digital Input nachrĂĽsten ohne Variablen umbenennen. CODESYS Forge talk (Post)
Hallo zusammen, ich habe ein Problem mit einer Anlage. Dort müsste eine Digital Input Karte(XNE-8DI-24VDC-P) nachgerüstet werden. Das Problem ist, dass wenn ich die Karte über die Steuerungkonfiguration einbinde, die Karte direkt hinter den Eingangskarten und vor den Analogkarten positioniert wird. Dadurch müsste ich die Variablen der Analogkarten ändern, die hinter der Digitalen Eingangskarten sind. Das wäre Mega Aufwand. Gibt es eine andere Möglichkeit? z.B hinter die Analogkarten zu Adressieren? Z.Zt. sieht es so aus: %IB0 %IB1 %IW2 %IW4 %IW6 Zwischen %IB1 und %IW2 soll die neue Karte. Dadurch wird %IW2 zu %IW4. Dadurch müssen alle Variablen nach %IW2 geändert werden. Vielleicht kann mir jemand helfen. Danke Dennis
Last updated: 2024-10-11

Post by trent on Automation server - trends stop recording - need to manually reconnect CODESYS Forge talk (Post)
Hi All, I use the analysis page in automation server to capture historical trends from my PLC - i only sample one point per hour but it does the job (for now) One issue I have is I often log on to analysis page to find the system has stopped recording trends from my PLC. To fix this, I need to choose "state information" in the "List view" under PLC and click "Reconnect" When I do this I see my variables listed under "parameters" under "PLC Details" start updating again and the trend in Data analyzer continues to update. My Question, Why do I need to manually reconnect? Is there a way to get automation server to automatically reconnect to the PLC so I continue to capture data from the PLC? Regards, Trent
Last updated: 2024-10-22

Post by lsislsis on SIGABRT Error CODESYS Forge talk (Post)
2024-11-08T13:39:07.354Z, 0x00000103, 65544, 1, 0, runtime received SIGABRT - system may be in an inconsistent state* We recommend a reboot of the controller now! 2024-11-08T13:39:07.354Z, 0x00000111, 8, 260, 3, #### Exception: More than 2 exceptions in CH_COMM_CYCLE: Stop logging 2024-11-08T14:36:33.126Z, 0x0000100d, 1, 0, 0, Demo mode expired. 2024-11-08T15:35:49.253Z, 0x00000103, 65544, 1, 0, runtime received SIGABRT - system may be in an inconsistent state We recommend a reboot of the controller now! 2024-11-08T15:42:54.664Z, 0x00000103, 65544, 1, 0, runtime received SIGABRT - system may be in an inconsistent state We recommend a reboot of the controller now! *
Last updated: 7 days ago

Post by pistola on Visualization Size - Set Layout CODESYS Forge talk (Post)
I feel like this is a setting issue and I can't seem to find the right setting. I have a new project that I'm looking to add visualizations to however when I select my template size (1280 x 800) I make sure in my properties under the visualization tab, I have "Use specified visualization size" selected and my width set at 1280 and height set at 800. Now within my visualization editor I can't see to get the size outside of my template to grey out. I've attached a PDF showing what I'd like the visualization editor to look like and what mine currently looks like. Any help would be greatly appreciated.
Last updated: 2 days ago

Post by thommy54 on CODESYSControl_User cfg richtig konfigurieren CODESYS Forge talk (Post)
Hallo, nach Erwerb eines neueren Raspberry pi 4 (V1.5) musste ich zwangsläufig von Codesys 3.5.16 hochwechseln - ich habe auf 3.5.20.1 geupdated. Da schlugen mir plötzlich ne Menge Einschränkungen entgegen, deren Behebung einige Zeit dauerte. Eine davon ist, das ein SysFile.SysFileOpen nicht mehr funktioniert. Ich habe das Problem mit Einträgen in der /etc/CODESYSControl.cfg behoben: [SysFile] FilePath.1=/etc/, 3S.dat IecFilePath.1=/proc/, cpuinfo IecFilePath.2=/proc/, iomem PlaceholderFilePath.1=/sys/devices/w1_bus_master1, $OneWire$ PlcLogicPrefix=1 ; ; ---------------------- ; selbst eingefügt PlaceholderFilePath.2=/home/root, $my_home_root$ PlaceholderFilePath.3=/etc/init.d, $my_conf$ PlaceholderFilePath.4=/var/lib/mpd, $my_music$ PlaceholderFilePath.5=/root/Rasp_SPS_Filesystem, $my_Rasp$ Ob die Einträge sich etwas überlappen, kann mir gern jemand sagen, das ist aber nicht das Problem. Ich habe bei den vielen Versuchen, das Teil zum Laufen zu bringen, bemerkt, daß die Einträge auch ganz schnell mal verschwinden. Das ist ja auch so beschrieben, wenn die nächste Version kommt, sind meine Einträge weg. Da ich ähnliche Probleme mit dem Funktionieren von "SysProcessExecuteCommand2()" hatte, die ich ebenfalls mit Einträgen in die /etc/CODESYSControl.cfg hätte beheben können, habe ich gelesen, das man "private" Einträge lieber in die Datei /etc/CODESYSControl_User.cfg machen soll. Gesagt getan und "SysProcessExecuteCommand2()" lief: [SysProcess] Command=AllowAll Command.0=shutdown Aber auch irgendwo stand, das so ein Beteichner wie [SysFile] oder [SysProcess] nur einmal in den beiden Files /etc/CODESYSControl.cfg oder(!) /etc/CODESYSControl_User.cfg vorkommen darf. Das ist nun die eigentliche Frage! Ist das so ? Bei [SysProcess] ist das kein Problem, das gibt es in /etc/CODESYSControl.cfg nicht. Aber bei [SysFile] sieht das anders aus. Da sind 5 Zeilen schon in /etc/CODESYSControl.cfg drin. Würde ich diese in die User-Datei rüberschieben, könnte beim nächsten Update was fehlen oder, oder... Lasse ich es so wie es ist, sind meine Einträge beim Update weg - das sollte ja verhindert werden. Kann da jemand genaue Auskunft geben ?? Vielen Dank Thomas
Last updated: 2024-06-28

Post by thommy54 on Raspi-Cam: CameraStream.project nicht zum Laufen zu bringen CODESYS Forge talk (Post)
Hallo, Ich bringe das CameraStream.project nicht zum Laufen. Ich sehe die Ursache darin, das das Beispielprogramm sehr sparsam mit Programm-Kommentaren umgeht (von der Hilfe gar nicht zu reden). Ich habe beide Varianten bei der zu ändernden Zielvariable getestet: //copy video.htm to the webserver; //the location of the webserver depends on the used Apache version as mentioned in online help hDirHtmlTest:=SysDirOpen( szDir:='/var/www', pDirInfo:= ADR(dirInfo), diMaxDirEntry:=iMaxDirEntry, szDirEntry:=szDirEntry, pResult:=ADR(iDirHtmlError)); IF (iDirHtmlError = 0) THEN SysDirClose(hDir:=hDirHtmlTest); SysFileCopy('/var/www/video.htm', '$$PlcLogic$$/Application/video.htm', ADR(dwCopySize)); ELSE .... als auch hDirHtmlTest:=SysDirOpen( szDir:='/var/www/html', pDirInfo:= ADR(dirInfo), diMaxDirEntry:=iMaxDirEntry, szDirEntry:=szDirEntry, pResult:=ADR(iDirHtmlError)); IF (iDirHtmlError = 0) THEN SysDirClose(hDir:=hDirHtmlTest); SysFileCopy('/var/www/html/video.htm', '$$PlcLogic$$/Application/video.htm', ADR(dwCopySize)); ELSE .... Die Url-Streams habe ich gelassen wie sie vorgegeben waren: urlStream := CONCAT('http://', CONCAT(sIPAddress, '/video.htm')); urlPicture := CONCAT('http://', CONCAT(sIPAddress, '/cam_pic.php')); In der Webvisu im Browser komme ich maximal dahin wie im Screeshot Video_Visu_1 zu sehen. Also scheint der Link zu video.htm zu klappen. Das der zu cam_pic.php nicht klappt, wundert mich nicht, denn es existiert nicht und wird auch nicht evtl. am rechten Ort angelegt. Ich bin mir vollkommen im Unklaren: muss da was auf dem Raspberry Pi im Hintergrund laufen , z.B. raspivid . Welcher Programmteil bedient die Cam ? Ich erkenne auch nicht, wo ein einzelnes picture entstehen soll. Wäre dankbar, wenn ich hier etwas Hilfe bekommen könnte. Evtl. gibt es Probleme mit der von mir verwendeten Codesys-Version 3.5.20.1 ? Ich benutze einen Raspberry 4 Rev.1.2. Grüße Thomas
Last updated: 2024-07-04

Post by derpaul on Official MQTT-Client: MAX_RECEIVE_BUFFER_SIZE_EXCEEDED CODESYS Forge talk (Post)
Here is the output Codesyscontrol.log ;**************************************************************** ;<loggername>/tmp/codesyscontrol.log</loggername> ;<logoptions> ; <enable>1</enable> ; <type>normal</type> ; <timestamp>rtc</timestamp> ; <deactivatable>0</deactivatable> ; <dump>always</dump> ; <filter>0x0000000f<filter> ; <maxentries>1000</maxentries> ; <maxfiles>1</maxfiles> ; <maxfilesize>1000000</maxfilesize> ;</logoptions> ;<entries> ;Timestamp, CmpId, ClassId, ErrorId, InfoId, InfoText ;ClassId: LOG_INFO =1 ;ClassId: LOG_WARNING =2 ;ClassId: LOG_ERROR =4 ;ClassId: LOG_EXCEPTION =8 ;ClassId: LOG_DEBUG =16 ;ClassId: LOG_PRINTF =32 ;ClassId: LOG_COM =64 ;</entries> ;**************************************************************** 2023-09-12T21:11:41Z, 0x00000013, 1, 0, 0, <logoptions> 2023-09-12T21:11:41Z, 0x00000013, 1, 0, 0, <bEnable>1</bEnable> 2023-09-12T21:11:41Z, 0x00000013, 1, 0, 0, <type>normal</type> 2023-09-12T21:11:41Z, 0x00000013, 1, 0, 0, <timestamp>rtc</timestamp> 2023-09-12T21:11:41Z, 0x00000013, 1, 0, 0, <disableable>0</disableable> 2023-09-12T21:11:41Z, 0x00000013, 1, 0, 0, <Filter>0x0000000f</Filter> 2023-09-12T21:11:41Z, 0x00000013, 1, 0, 0, <MaxEntries>1000</MaxEntries> 2023-09-12T21:11:41Z, 0x00000013, 1, 0, 0, <MaxFiles>1</MaxFiles> 2023-09-12T21:11:41Z, 0x00000013, 1, 0, 0, <MaxFileSize>1000000</MaxFileSize> 2023-09-12T21:11:41Z, 0x00000013, 1, 0, 0, </logoptions> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 4, CODESYS Control for PFC200 SL 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 4, OS=Linux, CPU=ARM, Arch=32Bit, Coding=C 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 6, <version>3.5.16.40</version> <builddate>Mar 2 2021</builddate> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 5, Copyright (c) 3S - Smart Software Solutions GmbH 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, System: <cmp>CM</cmp>, <id>0x00000001</id> <ver>3.5.16.40</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, System: <cmp>CmpMemPool</cmp>, <id>0x0000001e</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, System: <cmp>CmpLog</cmp>, <id>0x00000013</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, System: <cmp>CmpSettings</cmp>, <id>0x0000001a</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, System: <cmp>SysFile</cmp>, <id>0x00000104</id> <ver>3.5.16.40</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, System: <cmp>SysCom</cmp>, <id>0x00000100</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, System: <cmp>SysCpuHandling</cmp>, <id>0x00000101</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, System: <cmp>SysDir</cmp>, <id>0x0000011b</id> <ver>3.5.16.40</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, System: <cmp>SysEthernet</cmp>, <id>0x0000011c</id> <ver>3.5.16.10</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, System: <cmp>SysEvent</cmp>, <id>0x00000102</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, System: <cmp>SysExcept</cmp>, <id>0x00000103</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, System: <cmp>SysInternalLib</cmp>, <id>0x00000107</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, System: <cmp>SysMem</cmp>, <id>0x00000108</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, System: <cmp>SysModule</cmp>, <id>0x00000109</id> <ver>3.5.16.40</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, System: <cmp>SysMsgQ</cmp>, <id>0x0000010a</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, System: <cmp>SysMutex</cmp>, <id>0x0000013a</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, System: <cmp>SysOut</cmp>, <id>0x0000010b</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, System: <cmp>SysProcess</cmp>, <id>0x0000010e</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, System: <cmp>SysSem</cmp>, <id>0x0000010f</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, System: <cmp>SysSemCount</cmp>, <id>0x00000139</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, System: <cmp>SysSemProcess</cmp>, <id>0x00000119</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, System: <cmp>SysShm</cmp>, <id>0x00000110</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, System: <cmp>SysSocket</cmp>, <id>0x00000111</id> <ver>3.5.16.30</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, System: <cmp>SysTarget</cmp>, <id>0x00000112</id> <ver>3.5.16.40</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, System: <cmp>SysTask</cmp>, <id>0x00000114</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, System: <cmp>SysTime</cmp>, <id>0x00000115</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, System: <cmp>SysTimeRtc</cmp>, <id>0x00000127</id> <ver>3.5.16.30</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, System: <cmp>SysTimer</cmp>, <id>0x00000116</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpAlarmManager</cmp>, <id>0x0000007c</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpApp</cmp>, <id>0x00000002</id> <ver>3.5.16.30</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpAppBP</cmp>, <id>0x00000073</id> <ver>3.5.16.10</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpAppForce</cmp>, <id>0x00000074</id> <ver>3.5.16.10</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpAsyncMgr</cmp>, <id>0x0000005f</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpBinTagUtil</cmp>, <id>0x00000004</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpBinTagUtilIec</cmp>, <id>0x0000005c</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpBitmapPool</cmp>, <id>0x00000050</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpBlkDrvTcp</cmp>, <id>0x00000030</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpBlkDrvUdp</cmp>, <id>0x00000007</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpCAAAsyncMan</cmp>, <id>0x00004007</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpCAABehaviourModel</cmp>, <id>0x00004015</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpCAACallback</cmp>, <id>0x00004001</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpCAACanL2</cmp>, <id>0x00004004</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpCAADTUtil</cmp>, <id>0x00004013</id> <ver>3.5.16.10</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpCAAFile</cmp>, <id>0x00004008</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpCAAMemBlockMan</cmp>, <id>0x00004003</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpCAANetBaseServices</cmp>, <id>0x00004018</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpCAARealTimeClock</cmp>, <id>0x00004014</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpCAASdoClient</cmp>, <id>0x00004011</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpCAASdoServer</cmp>, <id>0x00004017</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpCAASegBufferMan</cmp>, <id>0x00004019</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpCAASerialCom</cmp>, <id>0x00004012</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpCAAStorage</cmp>, <id>0x0000007e</id> <ver>3.5.16.30</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpCAATick</cmp>, <id>0x00004009</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpCAATickUtil</cmp>, <id>0x00004010</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpCAATimer</cmp>, <id>0x00004016</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpCAATypes</cmp>, <id>0x00004006</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpChannelClient</cmp>, <id>0x00000008</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpChannelClientIec</cmp>, <id>0x0000005d</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpChannelMgr</cmp>, <id>0x00000009</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpChannelServer</cmp>, <id>0x0000000a</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpCharDevice</cmp>, <id>0x00000300</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpChecksum</cmp>, <id>0x0000000b</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpCodeMeter</cmp>, <id>0x0000007a</id> <ver>3.5.16.30</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpCommunicationLib</cmp>, <id>0x0000000c</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpCoreDump</cmp>, <id>0x00000083</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpCryptMD5</cmp>, <id>0x0000006a</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpDevice</cmp>, <id>0x0000000e</id> <ver>3.5.16.10</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpDynamicText</cmp>, <id>0x00000051</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpEL6751CanDrv</cmp>, <id>0x00005f0b</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpEventMgr</cmp>, <id>0x0000005b</id> <ver>3.5.16.30</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpFileTransfer</cmp>, <id>0x0000005e</id> <ver>3.5.16.10</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpIecStringUtils</cmp>, <id>0x0000007f</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpIecTask</cmp>, <id>0x00000011</id> <ver>3.5.16.40</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpIecVarAccess</cmp>, <id>0x00000060</id> <ver>3.5.16.30</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpIoDrvIec</cmp>, <id>0x0000005a</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpIoMgr</cmp>, <id>0x00000012</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpKbus</cmp>, <id>0x0000008a</id> <ver>4.0.1.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpKnxStack</cmp>, <id>0x0000004d</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpMonitor2</cmp>, <id>0x00000032</id> <ver>3.5.16.10</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpNameServiceClient</cmp>, <id>0x00000015</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpNameServiceClientIec</cmp>, <id>0x0000011d</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpNameServiceServer</cmp>, <id>0x00000016</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpOPCUAClient</cmp>, <id>0x00000096</id> <ver>3.5.16.40</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpOPCUAProviderIecVarAccess</cmp>, <id>0x00000126</id> <ver>3.5.16.40</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpOPCUAServer</cmp>, <id>0x00000124</id> <ver>3.5.16.40</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpOPCUAStack</cmp>, <id>0x0000008d</id> <ver>3.5.16.40</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpOpenSSL</cmp>, <id>0x00000033</id> <ver>3.5.16.40</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpPfcx00</cmp>, <id>0x00000088</id> <ver>4.0.1.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpPlcShell</cmp>, <id>0x00000128</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpRedundancy</cmp>, <id>0x00000129</id> <ver>3.5.16.40</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpRedundancyConnectionIP</cmp>, <id>0x0000ff03</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpRetain</cmp>, <id>0x00000017</id> <ver>3.5.16.30</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpRouter</cmp>, <id>0x00000018</id> <ver>3.5.16.10</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpSchedule</cmp>, <id>0x00000019</id> <ver>3.5.16.30</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpSecureChannel</cmp>, <id>0x00000090</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpSecurityManager</cmp>, <id>0x0000008e</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpSessionInformation</cmp>, <id>0x00000097</id> <ver>3.5.16.10</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpSocketCanDrv</cmp>, <id>0x00005f0d</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpSrv</cmp>, <id>0x0000001c</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpTraceMgr</cmp>, <id>0x00000070</id> <ver>3.5.16.10</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpUserDBFile</cmp>, <id>0x00000098</id> <ver>3.5.16.20</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpUserGroupsDBFile</cmp>, <id>0x00000099</id> <ver>3.5.16.20</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpUserMgr</cmp>, <id>0x00000061</id> <ver>3.5.16.40</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpUserObjectsDBFile</cmp>, <id>0x0000009c</id> <ver>3.5.16.20</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpVisuHandler</cmp>, <id>0x00000054</id> <ver>3.5.16.10</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpVisuServer</cmp>, <id>0x00000057</id> <ver>3.5.16.10</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpWebServer</cmp>, <id>0x00000071</id> <ver>3.5.16.0</ver> 2023-09-12T21:11:41Z, 0x00000001, 1, 0, 10, <cmp>CmpWebServerHandlerV3</cmp>, <id>0x00000072</id> <ver>3.5.16.0</ver> 2023-09-12T21:12:16Z, 0x00000007, 1, 0, 6, Network interface: <ipaddress>192.168.1.17</ipaddress>, subnetmask <subnetmask>255.255.255.0</subnetmask> 2023-09-12T21:12:16Z, 0x00000018, 1, 0, 4, Network interface <interface>ether 4</interface> at router <instance>0</instance> registered 2023-09-12T21:12:16Z, 0x00000009, 1, 0, 2, Running as network server 2023-09-12T21:12:16Z, 0x00000009, 1, 0, 1, Running as network client 2023-09-12T21:12:16Z, 0x0000000a, 1, 0, 0, <NumOfChannels>4</NumOfChannels> channels available, each of the size <BufferSize>100000</BufferSize> Bytes 2023-09-12T21:12:16Z, 0x00000129, 1, 0, 0, Debug Messages not activated 2023-09-12T21:12:16Z, 0x0000ff03, 1, 0, 0, Read connection settings... 2023-09-12T21:12:16Z, 0x00000030, 1, 0, 6, Local network address: <ipaddress>192.168.1.17</ipaddress> 2023-09-12T21:12:16Z, 0x00000018, 1, 0, 4, Network interface <interface>BlkDrvTcp</interface> at router <instance>2</instance> registered 2023-09-12T21:12:16Z, 0x00000124, 1, 0, 0, No certificate for the OPC UA server available. 2023-09-12T21:12:16Z, 0x00000124, 1, 0, 0, Security policy allows plain text communication. Secure communication is deactivated. 2023-09-12T21:12:16Z, 0x00000124, 1, 0, 0, ************************************************************** 2023-09-12T21:12:16Z, 0x00000124, 1, 0, 0, OPC UA Server Started: 2023-09-12T21:12:16Z, 0x00000124, 1, 0, 0, Hostname: PFC200, Port: 4840 2023-09-12T21:12:16Z, 0x00000124, 1, 0, 0, URL: opc.tcp://PFC200:4840 2023-09-12T21:12:16Z, 0x00000124, 1, 0, 0, Loopbackadapter activated. 2023-09-12T21:12:16Z, 0x00000124, 1, 0, 0, All available networkadapters are used. 2023-09-12T21:12:16Z, 0x00000124, 1, 0, 0, ************************************************************** 2023-09-12T21:12:16Z, 0x00000124, 1, 0, 0, Provider CODESYS_DefaultProvider with Version 0x3051028 registerd at the OPC UA server. 2023-09-12T21:12:16Z, 0x00000124, 1, 0, 0, Provider CmpOPCUAProviderIecVarAccess with Version 0x3051028 registerd at the OPC UA server. 2023-09-12T21:12:17Z, 0x00000126, 1, 0, 0, Valid license found for OPC UA IecVarAccess provider. 2023-09-12T21:12:17Z, 0x00000002, 1, 0, 7, Retains matched to bootproject of application [<app>Application</app>] 2023-09-12T21:12:17Z, 0x00000002, 1, 0, 6, Bootproject of application [<app>Application</app>] loaded 2023-09-12T21:12:17Z, 0x00000018, 1, 0, 1, Setting router <instance>0</instance> address to <address>(0011)</address> 2023-09-12T21:12:17Z, 0x00000018, 1, 16, 8, Network interface for mainnet=<mainnet>ether 5</mainnet> not found 2023-09-12T21:12:17Z, 0x00000018, 1, 0, 1, Setting router <instance>1</instance> address to <address>(0000)</address> 2023-09-12T21:12:17Z, 0x00000018, 1, 0, 1, Setting router <instance>2</instance> address to <address>(2ddc:c0a8:0111)</address> 2023-09-12T21:12:17Z, 0x00000002, 1, 0, 10, Application [<app>Application</app>] started 2023-09-12T21:12:17Z, 0x00000001, 1, 0, 34, CODESYS Control ready 2023-09-12T21:13:37Z, 0x00000001, 1, 0, 0, runtime licensed 2023-09-12T21:17:17Z, 0x00000002, 1, 0, 2, Application [<app>Application</app>] loaded via [OnlineChange] 2023-09-13T01:38:17Z, 0x00000009, 1, 418, 0, Channel timeout (<curtime>16012264</curtime>, <lasttime>15982259</lasttime>) 2023-09-13T01:38:17Z, 0x00000009, 1, 418, 0, Closing connection to <address>0329:032e</address> 2023-09-23T14:46:00Z, 0x00000002, 1, 0, 2, Application [<app>Application</app>] loaded via [OnlineChange] 2023-09-23T14:48:57Z, 0x00000002, 1, 0, 2, Application [<app>Application</app>] loaded via [OnlineChange]
Last updated: 2023-09-27

Post by ryusoup on JSONByteArrayWriter problem? CODESYS Forge talk (Post)
Hello, I am trying to implement a FB to make JSON formatted WSTRING type message using JSON Utilities 1.9.0.0 included in the IIoT library. In my case, I want to set some objects or arrays and set values to them later. But when I wrote as the sample below, // init builder builder(pJsonData:=pJsonData, diRootObj=>diRootObj); // set the 1st key to root diKey1 := builder.SetKeyWithArray(wsKey:="key1", diParentIndex:=diRootObj, eError=>eError); // set a value to the 1st key wsValue:="value01"; builder.SetValue(Value:=wsValue, diParentIndex:=diKey1, eError=>eError); // set the 2nd key to root diKey2 := builder.SetKeyWithArray(wsKey:="key2", diParentIndex:=diRootObj, eError=>eError); // set a value to the 2nd key wsValue:="value02"; builder.SetValue(Value:=wsValue, diParentIndex:=diKey2, eError=>eError); // set a value to the 1st key again wsValue:="value03"; builder.SetValue(Value:=wsValue, diParentIndex:=diKey1, eError=>eError); // set a value to the 2nd key again wsValue:="value04"; builder.SetValue(Value:=wsValue, diParentIndex:=diKey2, eError=>eError); // write build result writer(xExecute:=TRUE, pwData:=ADR(wsResult), udiSize:=SIZEOF(wsResult), xAsyncMode:=FALSE, jsonData:=pJsonData^); the result was: { "key1": ["value01"], "key2": ["value02", "value03", "value04"] } while my expection was: { "key1": ["value01", "value03"], "key2": ["value02", "value04"] } Inspecting pJsonData^, JSONData itself seems to be ok, so I believe the issue is something caused by the writer FB. Does anyone know how to fix it? Thanks,
Last updated: 2023-10-04

Post by manuknecht on Persistence Manager does not save alphabetically first value CODESYS Forge talk (Post)
After some more digging I realized that I get an error on the PLC Logger saying PersistenceChannel: 150 (invalid type in data: SimpleLibrary). I suppose the issue could be found in the ConfigData, which is automatically generated and which looks like this: 1 9##83 SimpleLibrary#GVL.aMoreZeros.[1]#0#64512#15#0 <[2]#0#64520#15#0 <[3]#0#64528#15#0 <[4]#0#64536#15#0 <#0#64544#15#0 <[6]#0#64552#15#0 <<lrVar#0#64560#15#0 <strVar#0#64428#16#80 <uiDummy#0#64370#11#0 Perhaps the fact that the variable is stored within a library confused the compiler? I tried changing the PersistenceChannel parameters to xCompressTags := FALSE which changed the entry in the data file from _xCompressTags BOOL:TRUE _xCompressTags BOOL:FALSE but the actual content of the data file and also the config data did not change.
Last updated: 2023-10-17

Post by riccardo on VisuElems.CurrentUserGroupId is not stable CODESYS Forge talk (Post)
Goodmorning TimvH, Thanks for the reply. I don't know if your solution solve my trouble yet, I am going to see the link you sent me. In the mean time I try to explane better what I need to do. I have a turbine system that get in alarm under some condition (E.g low speed of turbine) and block the itself. When the system is stoped there is no speed turbine and the system cannot start. To give to the operetor the possibility to bypass the alarms, there is an acknoledgement alarm pushbutton. This bypass must not work for everyone but only for those client that perform the login by (User Management). Furthermore, if the user perform the (manual or automatic) logout in alarm conditions, the acknowlegment must be annulled and block the system again. To do this, I need to know if an operator is logged in the page and is working to fix the problem; otherwise the syste must autoturn off again. Now I go to study your solution, if I have explaned better and you have another idea tell me please.
Last updated: 2023-11-16

Post by open on How to create a stopwatch? CODESYS Forge talk (Post)
Hi @ph0010421, I tried the program the TimeTaken is calculated when stop is triggered. I want the TimeTaken to be continuously calculated and counting when a BOOL variable is true. I tried to program this way: Declaration: PROGRAM PLC_PRG VAR bStartStop: BOOL := FALSE; // Start/Stop button bReset: BOOL := FALSE; // Reset button bRunning: BOOL := FALSE; // Flag indicating whether the stopwatch is running tStartTime: TIME; // Variable to store the start time tElapsedTime: TIME; // Variable to store the elapsed time END_VAR Implementation: // Main program logic IF bReset THEN // Reset button pressed, reset the stopwatch bRunning := FALSE; tElapsedTime := T#0s; ELSIF bStartStop THEN // Start/Stop button pressed, toggle the running state IF bRunning THEN // Stop the stopwatch bRunning := FALSE; ELSE // Start the stopwatch bRunning := TRUE; tStartTime := tElapsedTime; END_IF; END_IF // Update the elapsed time when the stopwatch is running IF bRunning THEN tElapsedTime := tElapsedTime + T#1s; // Adjust the time increment as needed END_IF However counting of the seconds is not accurate. I tried changing the main task cycle time interval to 1000ms. The counting of seconds become slower. (see attached) Please help
Last updated: 2023-12-08

Post by nz-dave on Bool turning on in case stament in wrong state? CODESYS Forge talk (Post)
I had the FB called via a for loop to call a few instances of my FB I have removed it the for loop and just called them 1 by 1. Seems to have sorted the problem. tho, i have other FB's and for loops doing the same thing but they are all fine. below is basically what was happening. var: mVibrator : ARRAY[1..GVL_Settings.Number_Of_Products] OF Main_Vibrator; end_var Controller(PRG) call: FOR v := 1 TO GVL_Settings.Number_Of_Products BY 1 DO; mVibrator[v] (); END_FOR So at state 30: the mVibrator[1].start was turning on 30: Main_Mixer.Start := TRUE; Process_State := 2; IF Main_mixer.Done THEN Main_Mixer.Start := FALSE; Control_State := 40; END_IF but its not till state 50: that it is actual in the code. 50: Main_Suction_valve.Open_Input := TRUE; mVibrator[1].Start := TRUE; Process_State := 4; IF GVL_Weigh_hopper.LoadCell_Weight = 0 THEN Main_Suction_valve.Open_Input := FALSE; mVibrator1.Start := FALSE; Control_State := 60; END_IF Thanks for your input.
Last updated: 2023-12-16

<< < 1 .. 795 796 797 798 799 > >> (Page 797 of 799)

Showing results of 19952

Sort by relevance or date