Search talk: opc client

 
<< < 1 .. 26 27 28 29 > >> (Page 28 of 29)

Post by timvh on Stack overflow with really simple function CODESYS Forge talk (Post)
You have declared the function block in a function and call the instance also from a function. This is not correct, because a function is initialised with every call. The http client function block should be declared as Global Variable if you want to cal it from a Function, but probably it is better to declare it in a Program and also call the instance of the http function block from the same Program.... The variables of a Program are not initialised with each call.
Last updated: 2024-09-20

Post by winki on Modbus TCP & RTU with Control for Linux SL CODESYS Forge talk (Post)
Hello, Today I am able to test ma industrial computer in my test bench. I am able to do all the configuration throught my VPN, 100% remote. I can see the gateway & the Virtual PLC. Now I would like to do some Modbus TCP Client & Modbus RS485. But I am lost due to docker ! When I go to modbus TCP it only gave me the docker network, but not my eth0 & eth01 When I go to modbus rtu, how can I create the link between Com number & my /dev/ttyRS485 Loic,
Last updated: 2024-10-23

Post by winki on Modbus TCP Client CODESYS Forge talk (Post)
Hello, I am new on CODESYS env. I would like to do some Modbus TCP, but I am wondering If using codesys you must use the device "Modbus_TCP_Client" & "Modbus_TCP_Server". I would like to do it without device, only using ST. Is that possible ? I try the example : MODBUS_master_example, but it is not working. If it is possible to dot it without any Device I will show my code. Thx a lot
Last updated: 2024-10-25

Post by pixsys on Webvisu cliënt responsiveness CODESYS Forge talk (Post)
Hi, please check if "Support client animations and overlay of native elements" option is enabled. This option is very heavy to manage for the Webclients. I'm using the Pixsys srl "TC series" HMI with the code "P3" (so a 4+4 cores CPU) that runs very well also with this option active. The same CPU is mounted also in their WebPanel "WP" series, so you can try one of them if you want.
Last updated: 2024-11-06

Post by mm-sceg on Runtime geht sporadisch in Störung -> RaspiPi4 reagiert nicht mehr CODESYS Forge talk (Post)
Guten Tag, ich hab seit längerem das Problem, dass mein Raspberry Pi4 durch die PLC in Störung geht. Auf dem Raspi läuft eine einfache Software mit OPC UA server, InfluxDB und ein NodeRed-Server. (Und MQTT-Server) Daten werden von der PLC über OPC-UA an NodeRed übergeben. Es kann sein, dass der Raspi 2 Wochen läuft, dann geht die PLC in Stopp. Manchmal nur 2-3 Tage. Ein Neustart über Spannung aus & wieder an schafft Abhilfe. NodeRed wirft extrem viele Fehlermeldungen in kurzer Zeit. Wenn die PLC in Störung ist, kann man sich nicht mal mehr über SSH beim Raspi einloggen. Der Raspi ist aktiv gekühlt und im Normalbetrieb nicht überlastet. Ich hab einige logfiles mit vielen Einträgen die mir nichts sagen, eventuell hat hier jemand eine Idee wie ich dem Problem Herr werden kann :) Der letzte Datenbankeintrag von der SPS war am 11.11.2023 um 5:55:50 Uhr. D.h. danach muss die SPS gestorben sein. Siehe Raspi-Log im Anhang. Das LogFile von Codesys startet leider erst um 11 Uhr, weshalb weiß ich leider nicht. Vielen Dank schonmal
Last updated: 2023-11-11

Post by khaledkhalil on OPC UA informationsmodell zu Codesys CODESYS Forge talk (Post)
Ich habe Modelle in SiOME hinzugefügt, eine Software zum Entwerfen von Knoten und zum Hinzufügen von Instanzen. und erstellte eine resultierende XML-Datei. Ich habe versucht, die XML-Datei über das OPC UA-Informationsmodell-Repository in Codesys zu importieren. Das Problem besteht darin, dass ich nicht weiß, wie ich meine von mir entworfenen Objekte anzeigen soll. und ordne es meiner SPS zu, um es auf meinem Server UaExpert sichtbar zu machen. Ich habe mir das Tutorial-Video https://youtu.be/aJhzN3Uk-Do?feature=shared angesehen. Aber es zeigt Ihnen nur, wie Sie das Informationsmodell hinzufügen, und mein resultierendes Modell hat keinen Informationstyp. Wie kann ich also in Codesys ein Modell anzeigen, das ich in SiOME entworfen und meine Instanzen (Objekte, Variablen oder Methoden) meinen Variablen in der SPS zugeordnet habe? Ich habe Leute gesehen, die es in Tia Portal oder einer anderen Software gemacht haben, aber ich habe keine Ahnung, wie man es auf CODESYS macht
Last updated: 2024-03-12

Post by anlebr on Codesys Communication Manger - Required information model version exists in the model repository but is not found CODESYS Forge talk (Post)
Hi I am trying use the Codesys Communication Manager to set up an Opc ua server with a custom information model. As a start I am using the Boiler model available on Opc foundations github page. I am testing with a Wago CC100 and using Codesys V3.5 SP19 Patch 6. I get the following error: Communication Manager [Device: PLC Logic: Application]: The information model http://opcfoundation.org/UA/ is required by http://opcfoundation.org/UA/Boiler/ with a minimal publication date from 15/12/2023 but the device has only a model from 15/09/2021 installed. Probably the information model from 15/09/2021 is missing in the information model repository. The error message does not make sense to me. Should it not be “Probably the information model from 15/12/2023 is missing in the information model repository”? Anyway, both versions are available in the repository. How can I solve this?
Last updated: 2024-03-13

Post by user0815 on Kommunikation zwischen ROS2 und CODESYS über Web Sockets CODESYS Forge talk (Post)
Hallo zusammen, ich hoffe ihr könnt mir weiterhelfen. Meine CODESYS Version ist die V3.5 SP19 Patch 4 und die Zielsystemversion ist die 4.10.0.0 . Ich verwende CODESYS ohne Lizenz. Ich probiere eine Verbindung über Web Sockets zwischen ROS und CODESYS aufzubauen. Der Client von CODESYS verbindet sich mit dem Ros Bridge Server aber ich weiß nicht wie ich dem Ros Server sage welches Topic er publishen soll. Über Node-Red habe ich eine Verbindung aufbauen können. Dafür habe ich "node-red-contrib-flowake-ros-nodes" verwendet. Den Daten Austausch habe ich mit mit Wireshark angeschaut und nun probiere ich den mithilfe von CODESYS nachzubauen. NAch dem sich der Client verbunden hat muss folgende Nachricht übermittelt werden:"{"op":"call_service","id":"call_service:/rosapi/topic_type:1","type":"rosapi/TopicType","args":{"topic":"/cmd_vel"}}." Ich vermute es funktioniert über Frames aber ich weiß nicht wie ich es umsetzten soll. Besten Dank für die Hilfe und schöne Grüße
Last updated: 2024-01-03

Post by brell on Automatic xExecute NBS.TCP_write CODESYS Forge talk (Post)
I've recently started experimenting with CODESYS for a project and am fairly new to it. I'm currently working with Function Block Diagrams (FBD) to set up TCP communication between a server and a client, where the client is implemented as a Python script. Once the communication is established, my connection status changes to True, which is the expected behavior. My challenge arises with the TCP write module, which requires the xEnable_write flag to toggle between True and False. If xEnable_write remains True, the module only performs a single write operation. To address this, I introduced a falling edge trigger (F_TRIG), expecting it to help in toggling xEnable_write and it does, However, I've encountered an issue where in the beginning after connxion established I need to manually set xEnable_write to True for the system to work as intended. I'm looking for a way to automate this process so that xEnable_write becomes True automatically upon establishing a connection . Initially, I tried setting xEnable_write to True from the start, but this approach didn't work well since it left the flag permanently True, preventing further toggling. I also experimented with using a TON timer, but I faced similar issues. I am seeking a solution that automatically toggles xEnable_write between True and False after a connection is established, ensuring continuous write operations without manual intervention. Any advice or guidance on how to achieve this would be greatly appreciated."
Last updated: 2024-03-05

Post by lsislsis on SIGABRT Error CODESYS Forge talk (Post)
Please help us. Why we take this errors. We try different versions like 4.12.0 and 4.13.0 with same results. ;*********;<loggername>codesyscontrol.log</loggername>;<logoptions>; <enable>1</enable>; <type>normal</type>; <timestamp>rtc high resolution</timestamp>; <deactivatable>0</deactivatable>; <dump>always</dump>; <filter>0x0000000f<filter>; <maxentries>100000</maxentries>; <maxfiles>1</maxfiles>; <maxfilesize>1000000</maxfilesize>;</filter></filter></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>;*********2024-11-05T08:23:59.728Z, 0x0000100c, 1, 0, 0, VisuFctCheckForUnusedClients: Removing Client with IEC-ID: 1 Time delta: T#33s1ms Locks: Paintbuffer: TRUE 2024-11-05T08:23:59.728Z, 0x0000100c, 1, 0, 0, VisuFctCheckForUnusedClients: Successfully Removed Client at Address: 547195449944, IEC-ID was: 1, EXT-ID: 431000373 2024-11-05T08:28:57.913Z, 0x0000100c, 1, 0, 0, Visu_PRG: Creating Client for Extern-ID: 347055752 2024-11-05T08:28:57.926Z, 0x0000100c, 1, 0, 0, Visu_PRG: Creating Client successful for Extern-ID: 347055752 Returned IEC-ID: 1 2024-11-05T08:30:51.103Z, 0x0000100c, 1, 0, 0, Visu_PRG: Successfully Removed Client with IEC-ID: 1, Extern-ID: 347055752 2024-11-05T08:37:36.517Z, 0x00000103, 65544, 1, 0, runtime received SIGABRT - system may be in an inconsistent state* We recommend a reboot of the controller now! 2024-11-05T08:37:36.517Z, 0x00000111, 8, 260, 3, #### Exception: HANDLED EXCPT <excpt>NonContinuable</excpt> in CH_COMM_CYCLE 2024-11-05T08:47:42.117Z, 0x00000103, 65544, 1, 0, runtime received SIGABRT - system may be in an inconsistent state We recommend a reboot of the controller now! 2024-11-05T08:47:42.117Z, 0x00000111, 8, 260, 3, #### Exception: HANDLED EXCPT <excpt>NonContinuable</excpt> in CH_COMM_CYCLE 2024-11-05T09:14:41.316Z, 0x00000071, 1, 0, 13, Webserver stopped 2024-11-05T09:14:44.485Z, 0x0000013d, 1, 0, 4, Number of licensed cores for IEC-tasks: 1 from 4 2024-11-05T09:14:44.487Z, 0x0000013d, 1, 0, 4, Number of licensed cores for IEC-tasks: 4 from 4 2024-11-05T09:14:44.540Z, 0x00000002, 1, 0, 2, Application [<app>Application</app>] loaded via [Download] 2024-11-05T09:14:55.894Z, 0x00001012, 1, 0, 0, Opened alarm storage file, version: 6 2024-11-05T09:14:55.951Z, 0x0000100c, 1, 0, 0, Visuinitialization starting. 2024-11-05T09:14:55.983Z, 0x0000100c, 1, 0, 0, Visuinitialization done. 2024-11-05T09:14:55.995Z, 0x00000071, 1, 0, 12, Webserver started 2024-11-05T09:15:01.753Z, 0x0000100c, 1, 0, 0, Visu_PRG: Creating Client for Extern-ID: 2279884529 2024-11-05T09:15:01.753Z, 0x0000100c, 1, 0, 0, Visu_PRG: Creating Client successful for Extern-ID: 2279884529 Returned IEC-ID: 0 2024-11-05T09:34:44.667Z, 0x00000103, 65544, 1, 0, runtime received SIGABRT - system may be in an inconsistent state We recommend a reboot of the controller now! 2024-11-05T09:34:44.667Z, 0x00000111, 8, 260, 3, #### Exception: More than 2 exceptions in CH_COMM_CYCLE: Stop logging 2024-11-05T10:13:26.867Z, 0x00000103, 65544, 1, 0, runtime received SIGABRT - system may be in an inconsistent state We recommend a reboot of the controller now! 2024-11-05T10:15:21.966Z, 0x00000103, 65544, 1, 0, runtime received SIGABRT - system may be in an inconsistent state We recommend a reboot of the controller now! 2024-11-05T10:19:12.167Z, 0x00000103, 65544, 1, 0, runtime received SIGABRT - system may be in an inconsistent state We recommend a reboot of the controller now! 2024-11-05T10:26:02.566Z, 0x00000103, 65544, 1, 0, runtime received SIGABRT - system may be in an inconsistent state We recommend a reboot of the controller now! 2024-11-05T10:31:42.866Z, 0x00000103, 65544, 1, 0, runtime received SIGABRT - system may be in an inconsistent state We recommend a reboot of the controller now! 2024-11-05T11:01:54.468Z, 0x00000103, 65544, 1, 0, runtime received SIGABRT - system may be in an inconsistent state We recommend a reboot of the controller now! 2024-11-05T11:09:29.868Z, 0x00000103, 65544, 1, 0, runtime received SIGABRT - system may be in an inconsistent state We recommend a reboot of the controller now! 2024-11-05T11:14:44.540Z, 0x0000100d, 1, 0, 0, Demo mode expired. 2024-11-05T11:27:20.868Z, 0x00000103, 65544, 1, 0, runtime received SIGABRT - system may be in an inconsistent state We recommend a reboot of the controller now! * Regards
Last updated: 2024-11-05

Post by rossanoparis on How to configure CODESYSControl_User.cfg in order to use a specific network card for OPCUA Server CODESYS Forge talk (Post)
Hello at all I'd like to know how to configure CODESYSControl_User.cfg in order to use a specific network card for OPCUA Server. In the past, I tried to ask in "Forge" about this topic, but I could find neither help nor document informations about it. Reading the file "codesyscontrol.log" I see these logs OPC UA Server Started: Hostname: NTLRPICTRL01, Port: 4840 URL: opc.tcp://NTLRPICTRL01:4840 Loopbackadapter activated. **All available networkadapters are used.** Multithreading activated. 3 workers used. My controller, which is a Linux PC, has got two network cards eth0 and eth1 I whant to use the card with name "eth0" as a server for OPCUA and keep the "eth1" free for other stuffs. Is it possible ? Best regards Rossano
Last updated: 2023-08-25

Post by sachem on Problem retain values Weidmuller UC20-WL2000 CODESYS Forge talk (Post)
Good afternoon. I am working with a weidmuller uc20-wl2000 controller, using a codesys license. We made a ladder code to control a process, and it works well, but we want some variables to remain stored even when the controller is turned off. We tried to use retain variables, but at the time of loading the program, when we went offline from the controller, the program was deleted, it did not remain in the controller, and in the same way if we turned off the controller. In addition to this, when we tried to program it again, the program would not stay loaded and began to present errors with the opc-ua communication. What could be causing this problem? How can we maintain the values of the variables without damaging the program or affecting the controller? thank you
Last updated: 2024-04-10

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 khaledkhalil on Question about the hairaichy of UaExpert CODESYS Forge talk (Post)
Hello, I am Examining this Example from Codesys Tutorial about OPC-UA server here https://www.youtube.com/watch?v=aJhzN3Uk-Do&list=PLWtD08CpmZcSV26aWh1axCAef5c5HxX-3&index=1&t=1167s. Now i am running to problem, when i create instances and i want them to appear directly under the object directory, However, it always appear with me under Objects >> Device set >> Device Name in CODESYS. I need to know how i can change the directory of my instances 'inst_3' and so on. So they can be under objects directly. I tried to modify the settings, but couldn't find any leads till now. Thanks in advance for helping
Last updated: 2024-09-12

Post by shabroz-gill on Exception when OPCUA datasource disconnects from Server CODESYS Forge talk (Post)
If i loose the network and the opcua data source suddenly looses connection with the server, i get an exception and my application stops working. I am using the latest version of the communication add v4.5.2.0 Is this a known issue? This makes the datasource unusable because it is inevitable that we will loose connectivity at some point, and the datasource crashing everything due to that seems to be a deal breaker. I can provide more details is someone from codesys is reading this. You can recreate is by just shutting off the Opc server after the codesys data source is connected and reading data from it. The codesys app does not crash everytime and sometimes it is able to reconnect without crashing, so you may have to try this a few times to see the exception. Best regards
Last updated: 2024-09-16

Post by timvh on Communication between applications on same device/controller/runtime (Win RTE 3.5.20.20) CODESYS Forge talk (Post)
If you have a Windows system (RTE), then why not run the CODESYS HMI as separate controller. This could easily be moved to another PC if required. In the HMI you could also still use the Symbolic Var access as part of the Data Source Manager, although maybe OPC is the preferred way to make it more future proof. Or what about the Remote Target Visu. Then you can reduce the load of the main controller, while still only having to create one application including Visualization. This is now also supported for Linux systems. See: https://content.helpme-codesys.com/en/CODESYS%20Control/_rtsl_target_visu_for_linux.html https://content.helpme-codesys.com/en/CODESYS%20Visualization/_visu_execute_remote_target_visu.html
Last updated: 2024-09-28

Post by tvm on Web Client (HMI) Disconnects from Webvisu (Weidmuller u-OS) CODESYS Forge talk (Post)
ok, that's different than our issue then. We're using Schneider Electric M262 PLCs, and we've had it where certain web browsers cause the web server to only allow https connections, but it's not recoverable with a refresh. It usually requires a power cycle or even a full firmware flash. Your issue might have more to do with the timing. I don't know if it helps you, but we normally run our visu task at 200mS, with an update rate of 200mS. Seems to work. I went through this: https://faq.codesys.com/pages/viewpage.action?pageId=112525371 but it really seems like trial and error.
Last updated: 2023-09-06

Post by pazderai on CanOpen write issue CODESYS Forge talk (Post)
Thank you for an answer. Unfortunatelly, it doesn't work. The slave needs command byte as follows 0x22. It means expedited transfer where s-bit is not set, therefore data length is not specified. If I use segmented mode by CiA405.SDO_WRITE_DATA it produce command byte as follows 0x21 which is unfortunately supported by the slave and it returns with error 0x05040001 - SDO Abort Code -Client/server command specifier not valid or unknown. I can use CAN API low level to overcome this problem where it is possible to set 0x22 as a command byte, but than I can use user interface to set the communication probably, because I thing that machine expert uses library CiA405.SDO_WRITE for setting the slave. Or am I wrong?
Last updated: 2024-07-16

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 ofey on Testing of Codesys program CODESYS Forge talk (Post)
Hi! I thought to hear what you guys think is the best way to test the program in my scenario. I have some PLC programs that have been made and deployed on different PLC's. The program has added the specific devices and IO that is applicable. I have made a test environment for everything outside of the PLC, ie. the same SCADA system that is talking to the PLC, and a program running locally is simulating the plant (level regulation of different tanks). Pr. now I have had to manually change the variables that are reading/writing values from the IO so they read/write via OPC instead. I also have to change the device tree from the specific PLC rack, to the soft PLC. So I kind of end up with two different programs that I have to maintain. I was just wondering if you believe there is an easier way to do this. So I can have the exactly same program and kind of switch between the soft mode, and the "real" mode.
Last updated: 2023-12-07

Post by bjarne-pagaard on Communication between applications on same device/controller/runtime (Win RTE 3.5.20.20) CODESYS Forge talk (Post)
Hi, I would like to divide a project into multiple applications - as a minimum: one handling visualization and Alarm Manager, one handling I/O and plant control logic. But how to exchange variables between the applications? What have you done to get such a solution? In versions 3.5.19 and earlier, you can have Child applications, where the children can access a GVL in the Parent application. Children apps is no longer possible in 3.5.20 - but you can have 'sibling' apps - Several apps directly under PLC Logic, that is. But how do they best communicate? The Communication Manager / Data Sources Manager is sort of possible via OPC UA, but it seems like overkill and with some limitations - for example no ARRAY OF STRUCT possible this way. If you have separate devices in your project, you can exchange data via 'CODESYS ApplicationV3', but not other applications in the same device (see attachment Datasources.png). You can do it via 'Select the project type'->'Other Project' and select the same project file, but this leads to crashing the Development system when working with the variables afterwards. It would be great to hear your thoughts / experiences on this topic - Bjarne
Last updated: 2024-09-27

Post by ryandmg on Web Client (HMI) Disconnects from Webvisu (Weidmuller u-OS) CODESYS Forge talk (Post)
Thanks So Much for the reply! Were using the Weidmuller UV66-ADV-10-CAP-W The HMI is pointed to the URL which is assigned through u-OS. Basically when you log into the controller's webserver via browser you can view the installed apps. One of which is the Codesys runtime. When you click on that it takes you to the visualization. That corresponding url is what the HMI is looking for. I apologize I don't have that on hand as I'm in the office right now. I don't think I tried connecting using the port you mentioned and https in lieu of the u_OS URL. I can certainly try. Out of the box the u-OS is set for HTTP. Since we're isolated I havent changed that yet. When this has happened while logged on via chrome on my laptop, simply refreshing brings the visualization right back. In the case of the HMI in kiosk mode, we power cycle the HMI to force a reconnect, log back in u-OS and the visualization is back.
Last updated: 2023-09-06

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 dominggus on when going online, stuck on "Syncing file "visuelemsdatetime.tl_datetime.txt" CODESYS Forge talk (Post)
Hi, We are currently using a Raspberry Pi 4 CM4 module in a EdgeBox RPI 200 - Industrial Edge Controller running the latest CODESYS Runtime Package 4.11.0.0. On the PC (actually an Intel Macbook Pro running Windows 10 in Parallels) we run CODESYS V3.5.19.50. Yesterday end of day when I was about to logoff and head home, I wanted to send the latest build to the Raspberry I clicked the Login button to compile a new version and then sync the application and all the files, it get's stuck on the last file to sync (see attached screenshot). This takes eternally, although sometimes, when I use my SFTP client (Cyberduck) and go into the raspberry and refresh the directory /var/opt/codesys/PlcLogic/visu/, or when I open the actual file visuelemsdatetime.tl_datetime.txt, it gets un-stuck (forcing a refresh, which might fix the syncing issue) and CODESYS continues and I can click the Start button to start the application. But this SFTP force refresh trick does not always help either... What could be the issue here? network connectivity? Can someone please help me out?
Last updated: 2024-03-02

Post by joshskellig on Publish a JSON payload via MQTT Publish (using IIot Libraries) CODESYS Forge talk (Post)
I am trying to figure out how to get a JSON payload to properly publish to my MQTT Broker. I am able to generate JSON using the examples from Codesys, but when I send that payload via MQTT there are characters that are extra or not recognized by my MQTT client. Any idea what could be causing it? PROGRAM PLC_PRG VAR hostname: STRING := 'localhost'; port: UINT := 1883; topic: WSTRING(1024) := "testing/"; payload: BYTE; factory : JSON.JSONDataFactory; eDataFactoryError : FBF.ERROR; pJsonData : POINTER TO JSON.JSONData := factory.Create(eError => eDataFactoryError); fb_JBuilder : JSON.JSONBuilder; wsValue : WSTRING := "Value1"; diRootIndex, diObject1Index : DINT; iValue : INT := 1234; jsonArrayWriter : JSON.JSONByteArrayWriter; wsJsonData : WSTRING(1000); xFirst : BOOL := TRUE; mqttClient: MQTT.MQTTClient; mqttPublish: MQTT.MQTTPublish; mqttPublishProperties: MQTT.MQTTPublishProperties := (bPayloadFormatIndicator := 1, wsContentType := "application/json"); END_VAR // Json Functionality IF xFirst THEN fb_JBuilder(pJsonData := pJsonData, diRootObj => diRootIndex); fb_JBuilder.SetKeyWithValue("Key1", wsValue, diParentIndex := diRootIndex); diObject1Index := fb_JBuilder.SetKeyWithObject("Key2", diParentIndex := diRootIndex); fb_JBuilder.SetKeyWithValue("Key3", iValue, diParentIndex := diObject1Index); xFirst := FALSE; END_IF jsonArrayWriter(pwData := ADR(wsJsonData), udiSize := SIZEOF(wsJsonData), jsonData := pJsonData^, xAsyncMode := FALSE); MSU.StrTrimW(pString:= ADR(wsJsonData)); // MQTT Functionality mqttClient( sHostname:=hostname, uiPort:=port, eMQTTVersion:=MQTT.MQTT_VERSION.V5 ); mqttPublish( mqttClient:=mqttClient, pbPayload:=ADR(wsJsonData), udiPayloadSize:=SIZEOF(wsJsonData), wsTopicName:=topic, mQTTPublishProperties:=mqttPublishProperties );
Last updated: 2024-04-10

<< < 1 .. 26 27 28 29 > >> (Page 28 of 29)

Showing results of 707

Sort by relevance or date