Post by mmpl on Array to String
CODESYS Forge
talk
(Post)
I would like to create one large JSON string from an array of objects, where each object contains a value. My current approach involves using a for loop and string concatenation, but with 20,000 elements in the array, this method takes almost 7 seconds and negatively affects the PLC scan time. Is there a more efficient way to accomplish this?
Last updated: 2024-07-18
Post by mmpl on Array to String
CODESYS Forge
talk
(Post)
I would like to create one large JSON string from an array of objects, where each object contains a value. My current approach involves using a for loop and string concatenation, but with 20,000 elements in the array, this method takes almost 7 seconds and negatively affects the PLC scan time. Is there a more efficient way to accomplish this?
Last updated: 2024-07-18
Post by timvh on Array to String
CODESYS Forge
talk
(Post)
The string_Util_Intern is not the library I referred to. With a CONCAT function (also with the string util library) a search is done for the NULL character. If you concatenate 20000 characters to one string, then the longer the string, the longer it takes to find this NULL character.
Last updated: 2024-07-24
Post by trusty-squire on CNC - How to manipulate SMC_GeoInfo objects
CODESYS Forge
talk
(Post)
Sometimes you just need to pose a question on a forum and re-read it to get clarity. pGeoInfo := SMC_GetObj(poq:=ADR(fbCncInterpreter.poqDataOut), n:=1); This won't work, I'm providing a pointer to a pointer, as poqDataOut is already a pointer! I just need to remove the ADR() and it works. pGeoInfo := SMC_GetObj(poq:=fbCncInterpreter.poqDataOut, n:=1);
Last updated: 2024-07-26
Post by dkugler on Converting hex bytes to float
CODESYS Forge
talk
(Post)
have a look at UNIONs. With a union you are able to write single bytes to the same adress area which belongs to a float variable at the same time. I like to do a lot of convertions belonging to interfaces and fieldbus in this way, f.eg. word / byte swapping etc.
Last updated: 2024-08-06
Post by fajean on Raspberry Pi 5
CODESYS Forge
talk
(Post)
We are having issues right now, and I just stumbled on that post. It seems to me you are saying your Linux ARM control is RPi 5-compatible, but the one you sell specifically for RPi is not. The fix you are proposing requires customers to re-purchase a CODESYS licence. Is there a time frame for that to be fixed?
Last updated: 2024-08-07
Post by fless on SMC_NCDecoder very slow to decode lines
CODESYS Forge
talk
(Post)
Hi, I got good results with SMC_NCDecoder, SMC_CheckVelocities, etc. in a freewheeling task with lower priority (higher number). Still takes some time but I'm using many variables and loops in my g-code and more preprocessing like SMC_SmoothPath, SMC_LimitDynamics, SMC_CheckForLimits. PS: your buffer size seems a bit high for 34 lines of g-code
Last updated: 2024-08-23
Post by dkugler on User management
CODESYS Forge
talk
(Post)
If the PLC is equieped with a USB socket it's possible to copy the user management file via IEC code to a USB stick and restore it at the new plc. The file is located there: /PlcLogic/visu/app_visuusermgmtdb.csv I use this to reset the user management to default in case of the customer has changed passwords and lost it.
Last updated: 2024-09-04
Post by damian177 on Problem with downloading OPC UA tags by Data Source Manager
CODESYS Forge
talk
(Post)
Unfortunately , Data Source Manager from Codesys has any problem with OPC UA Server delivered with ifix SCADA. Someone can help me add manually any tag from UaExpert to codesys ? How should be was a structure for an example of one tag ? I try like in attachement, but question is , if it a good idea ?
Last updated: 2024-09-08
Post by anoori on Setting up Raspberry pi as an Opc ua Server with UaExpert as Client
CODESYS Forge
talk
(Post)
I am trying to set up my Raspberry Pi as an OPC UA server and use UaExpert on my Pc as the OPC UA client.However, Im encountering some certificate-related errors in UaExpert: 1.Unable to get local issuer certificate. 2. Unable to get certificate CRL. 3. Unable to verify the first certificate.
Last updated: 2024-09-11
Post by anoori on setting up Raspberry pi as an opc ua Server with UaExpert as Client
CODESYS Forge
talk
(Post)
I am trying to set up my Raspberry Pi as an OPC UA server and use UaExpert on my Pc as the OPC UA client.However, Im encountering some certificate-related errors in UaExpert: 1.Unable to get local issuer certificate. 2. Unable to get certificate CRL. 3. Unable to verify the first certificate.
Last updated: 2024-09-11
Post by bbm1995 on Camera RTSP Feed
CODESYS Forge
talk
(Post)
Can you provide some infos on what you did? What model is your camera and which protocols does it support? Is there a direct link to the feed? Does your camera prevent embedding of the feed (this was my issue.)? I had to use additional software (go2rtc) to be able to stream the feed from an ABUS TVIP48511...
Last updated: 2024-09-16
Post by nano on ERROR: CodeMAccess2: Used CmRuntime 2.61.2705.500 is too old
CODESYS Forge
talk
(Post)
the codemeter deb files are part of the runtime-sl-installatonfiles. so u can download the whole raspberry pi package from store-page, unzip it with a progam like 7zip, there you'll find a folder called dependencys i thing. here should the deb files placed
Last updated: 2024-09-18
Post by garmusd on Raspberry Pi 5 GPIO not working.
CODESYS Forge
talk
(Post)
Hi, Codesyscontrol 4.13.0.0 Raspberry Pi5 64bit with latest updates. Cant get working GPIO - no output and no input. SPI/I2C not tested. GPIOs B+/Pi2, Input/Output is set in the parameters, assigned variables int the Mapping. Absolutely no reaction. Do I need to configure anything else to make it work? Thanks!
Last updated: 2024-09-26
Post by bjarne-pagaard on Unable to add alarm configuration object to project
CODESYS Forge
talk
(Post)
I believe it should be available. It may be the case, that your device does not support the alarm configuration. Some smaller PLCs sometimes do not support it. You can try changing to a different device, like a Codesys Control Win, in your project, and see if then allows you to add the alarm configuration.
Last updated: 2024-09-27
Post by tehthoams on Time will not read 12
CODESYS Forge
talk
(Post)
I know this post is a bit old, but i'm having this same issue: At noon, %t[hh:mm:ss tt] is displaying 00:00:00 PM There is no text variable, just using the default functionality of the visualization for the time display. This is running on an IFM CR1102 display. has anyone solved this?
Last updated: 2024-10-10
Post by gabor-n on PNIO Connect Parameter Error
CODESYS Forge
talk
(Post)
It's a bit confusing, the two RPI is the same (board, OS, runtime, programing with Codesys V3.5 SP20 P2) but the one has a codesyscontrol.cfg file and the other has a codesyscontrol_user.cfg file. Shouldn't be the same? And because I over Codesys 3.5 SP 12 this would be the '_user.cfg' for both. Attached...
Last updated: 2024-10-11
Post by janber on REFERENCE TO in an array
CODESYS Forge
talk
(Post)
Hi all, in the online help it written, that array of reference to data type is not possible. Ok... but if I create array of struct of reference to - everything works fine - please see the screenshots: and it works this way OK. Is it intention or error in compiler 3.5.18.20 and we should avoid it? Thanks a lot, Jan.
Last updated: 2024-10-14
Post by hemuv on Open Numpad with VU.FbOpenDialogExtended
CODESYS Forge
talk
(Post)
Hello Barton, I try to log the changes in Numpad (upon Ok button pressed) that an Element name/Element text variable is changed from so to so. How to get the Element name (or text fields Text Variable) from where the Numpad is called? Numpad is Invoked from Inputconfiguration->onMouseDown->Write a variable. Thanks
Last updated: 2024-11-07
Post by ellocco on Leitungsverzweigung mit einem existierenden Block (z.B. AND-Glied) zu verbinden
CODESYS Forge
talk
(Post)
Is it possible under CODESYS V3.5 SP18, to connect a split (german Leitungsverzweigung) with an existing block (e.g. AND-module)? Or to connect the output of an existing block to the input of an existing block (e.g. OR-block)? Any ideas? P.S.: Sorry for the german title, I do not know how modify the title.
Last updated: 2024-11-07
Post by lsislsis on SIGABRT Error
CODESYS Forge
talk
(Post)
After many tests i see that problem comes when serial communication established for modbus rtu. If the slave device not connected we don't see the exception. If the slave device connected at serial port then we have exception about 1 hour after startup and every 10 or 15 minutes. Any suggestion?
Last updated: 2024-11-08
Post by timvh on Detect "Cancel" Press in FileOpenSave Dialog
CODESYS Forge
talk
(Post)
Maybe there is a better way, but a long time ago I created a test application that worked like this: With a button I opened the dialog and I added a "Input configuration - OnDialogClosed" "Execute ST-Code" action to this same button which called the following Function when the dialog was closed: F_OnFileDialogClosed(pClientData); Below this Function which handled the result: // This function is called from the visualization when the dialog is closed. FUNCTION F_OnFileDialogClosed : BOOL VAR_INPUT pClientData : POINTER TO VisuElems.VisuStructClientData; END_VAR VAR dialogMan : VisuElems.IDialogManager; FileOpenCloseDialog : VisuElems.IVisualisationDialog; result : VisuElems.Visu_DialogResult; _sFileName : STRING(255); END_VAR // the DialogManager is provided via the implicitly available VisuManager dialogMan := VisuElems.g_VisuManager.GetDialogManager(); IF dialogMan <> 0 AND pClientData <> 0 THEN FileOpenCloseDialog := dialogMan.GetDialog('VisuDialogs.FileOpenSave'); // gets the FileOpenSave dialog IF FileOpenCloseDialog <> 0 THEN result := FileOpenCloseDialog.GetResult(); // gets the result (OK, Cancel) of the dialog IF result = VisuElems.Visu_DialogResult.OK THEN // Original code gvlFile.FileListProvider(); _sFileName := CONCAT(gvlFile.FileListProvider._stDirectory, gvlFile.FileListProvider.stFile); // do something with this file name... END_IF END_IF END_IF
Last updated: 2023-09-19
Post by rcaponi on Codesys Control RTE V3. Remote Control
CODESYS Forge
talk
(Post)
Hello, I would like to have, if possible, some clarification on this function. That is, I would like to understand if it is useful for managing, fom my development PC, the RTE runtime executed on a remote control. This is what the help says: Remote PLC: Opens the Remote Configuration dialog. By enabling or disabling the Control remote PC, not local option, you determine whether a PLC is used that is on a remote or local PC. Accordingly, the menu commands Start PLC, Stop PLC, and PLC Configuration refer to the local PC or a PC reached on the network. For the remote PC, specify the Target PC address, Port number, and a Timeout value (in ms) for the connection (Remote Timeout [ms]). But does this mean that I also need to install the RTE runtime on my development PC? Is it possible to have some more information? Best regards Roberto Caponi
Last updated: 2023-09-22
Post by sturmghost on Visualization using methods and cyclic ST-calls
CODESYS Forge
talk
(Post)
Im looking for a way to implement ST-code into the visualization element without creating a helper POU or method in my device/application tree. Like visualization properties are evaluated at each VISU_TASK cycle I want to be able to create own ST code which interacts with the visualization interface variables. To be more specific I want to have a property which executes user defined ST-code at each VISU_TASK cycle exactly like its already possible for Input Configuration on various mouse and dialog events. Also a property for initialization (so only executed once) and a timed property would be nice. With the situation right now I'll have to create a POU function which handles the ST-code and misuse a property, like the text variable, to execute this POU function at each VISU_TASK cycle. Or does it exist and I don't know it?
Last updated: 2023-10-02
Post by oi18ct on ARM SL Development Board Recommendation
CODESYS Forge
talk
(Post)
Hello codesys forum, My company is looking at developing a solution with Codesys ARM SL. The requirements will not tax the capabilities of Codesys. I would like to buy an AMR 7 or 8 Dev Board for experimenting. I am looking for a recommendation as I have minimal experience with Linux. Any input from the forum would be most appreciated as the hardware requirements as provided by Codesys for ARM SL seem pretty minimal (basically a arm7 or 8 with Debian is all). Our needs are small in scale- something like 8 digital inputs, 6 digital outputs, 2 analog inputs and 1 analog output. A small gui will be published via web visualization for external display (no local display). Communications with ModbusTCP and uart/RS485. It may be necessary to access i2c and make c or python calls to some existing code that is pretty small. Something like the EMCraft STM32MP1 SOM Starter Kit or Octavo Systems OSD32MP1-RED development board? Ideally something that has a path to a SoM for production. Kontron appears to have some interesting options too. Just having a hard time deciding where to start. Thanks in advance... LC
Last updated: 2023-11-11
To search for an exact phrase, put it in quotes. Example: "getting started docs"
To exclude a word or phrase, put a dash in front of it. Example: docs -help
To search on specific fields, use these field names instead of a general text search. You can group with AND
or OR
.