Post by umdee on Error when monitoring LAD programs
CODESYS Forge
talk
(Post)
System Information from the computer being used: OS Name Microsoft Windows 11 Pro Version 10.0.22631 Build 22631 Other OS Description Not Available OS Manufacturer Microsoft Corporation System Manufacturer Dell Inc. System Model Latitude 5500 System Type x64-based PC System SKU 08B9 Processor Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz, 2112 Mhz, 4 Core(s), 8 Logical Processor(s) BIOS Version/Date Dell Inc. 1.3.11, 6/11/2019 SMBIOS Version 3.2 Embedded Controller Version 255.255 BIOS Mode UEFI BaseBoard Manufacturer Dell Inc. BaseBoard Product 0M14W7 BaseBoard Version A00 Platform Role Mobile Secure Boot State On PCR7 Configuration Elevation Required to View Windows Directory C:\WINDOWS System Directory C:\WINDOWS\system32 Boot Device \Device\HarddiskVolume1 Locale United States Hardware Abstraction Layer Version = "10.0.22621.2506" User Name CARDASSIA-IX\Engineer Time Zone Eastern Daylight Time Installed Physical Memory (RAM) 16.0 GB Total Physical Memory 15.8 GB Available Physical Memory 4.67 GB Total Virtual Memory 18.5 GB Available Virtual Memory 2.52 GB Page File Space 2.63 GB Page File C:\pagefile.sys Kernel DMA Protection Off Virtualization-based security Not enabled Windows Defender Application Control policy Enforced Windows Defender Application Control user mode policy Off Device Encryption Support Elevation Required to View Hyper-V - VM Monitor Mode Extensions Yes Hyper-V - Second Level Address Translation Extensions Yes Hyper-V - Virtualization Enabled in Firmware Yes Hyper-V - Data Execution Protection Yes
Last updated: 2024-03-19
Post by william-blandon on RecipeManCommands.ReloadRecipes
CODESYS Forge
talk
(Post)
Hi Dave. Thanks for your answer. I still struggling with this. I have done everything according with the Codesys help even I have looked in detail at the example. I have double checked the recipe manager configuration and the use of all the methods. There are two methods that do not work as expected. I'm using Codesys 3.5.19.20 and recipe management 4.4.0.0 .CreateRecipe just create a recipe in the recipe definition but do not create the file. This have a walk around just giving a .ReadAndSaveRecipe afterwards. .ReloadRecipes do nothing but do not generate any error as well. After calling it I call the .GetRecipeCount and the number is always 0. When I create a new recipe (using the function block methods) then the number changes. Looks like this method is looking to the wrong directory finding nothing. I don't know if there is a missing configuration in the CODESYSControl.cfg file. I'm thinking in a walk around for this but I need to create a strings array with the recipe names as retentive and making all the management when deleting and adding recipes. Have had some one the same problem?
Last updated: 2024-05-23
Post by 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 caprez95 on Deleting the trend recording history
CODESYS Forge
talk
(Post)
Hallo Ich möchte eine laufende Trendaufzeichnung stoppen, den Inhalt löschen und Trend-Diagramm auf 0 zurücksetzen. Laut Codesys soll das mit dem folgenden Code möglich sein: You can insert an input element in the visualization which the operator can use to delete the previous value recording in the trend visualization at runtime. The curve displayed until then is removed and the display starts over. In the application (example: in the program PLC_PRG), implement the following code: itfTrendRecording : ITrendRecording; itfTrendStorageWriter : ITrendStorageWriter; itfTrendStorageWriter3 : ITrendStorageWriter3; sTrendRecordingName : STRING := 'TrendRecording'; itfTrendRecording := GlobalInstances.g_TrendRecordingManager.FindTrendRecording(ADR(sTrendRecordingName)); xClearHistoryTrend: BOOL; IF xClearHistoryTrend THEN itfTrendRecording := GlobalInstances.g_TrendRecordingManager.FindTrendRecording(ADR(sTrendRecordingName)); IF itfTrendRecording <> 0 THEN itfTrendStorageWriter := itfTrendRecording.GetTrendStorageWriter(); IF __QUERYINTERFACE(itfTrendStorageWriter, itfTrendStorageWriter3) THEN itfTrendStorageWriter3.ClearHistory(); END_IF END_IF In the visualization of the trend recording, add a button for deleting the previous curve. Configure its Toggle property with the variable PLC_PRG.xClearHistoryTrend. ⇒ When xClearHistoryTrend is set to TRUE, the previously recorded curve is deleted. The recording immediately starts again. Dies löscht auch die Daten vom Trend, aber das Diagramm wird nicht auf 0 zurückgesetzt, sondern läuft einfach da weiter wo man gestoppt hat. Braucht es für den Diagramm-Reset noch einen zusätzlichen Befehl? Gruss
Last updated: 2024-06-11
Post by psychoengineer on Cannot Save CSV File on Windows Computer Using CODESYS and Control Win
CODESYS Forge
talk
(Post)
I am currently working on a project using CODESYS and Control Win on a Windows computer. I've encountered an issue where I am unable to save a CSV file. I have followed the standard procedures and used the appropriate file handling functions, but the file is not being created or saved as expected. IF xStartTest THEN sFileName := '\logs.txt'; sFileName := CONCAT(gvl.g_sMainDirectory, sFileName); sFileNameCopy := '\CAAFileCopy.txt'; sFileNameCopy := CONCAT(gvl.g_sMainDirectory, sFileNameCopy); //eWriteState := FILE_OPEN_TRIGGER; xTestDone := FALSE; xError := FALSE; xStartTest := FALSE; END_IF VAR_GLOBAL g_sMainDirectory : STRING := 'C:\LogFiles'; // file path for CSV file END_VAR Despite this, the file does not appear in the specified directory, and no error messages are being generated. I've checked the directory permissions and ensured that the path is correct. Has anyone else experienced a similar issue or have any suggestions on how to resolve this? Any help would be greatly appreciated. Thank you!
Last updated: 2024-07-04
Post by to-ke on Errors with VisuUserManagement library
CODESYS Forge
talk
(Post)
Hallo zusammen, hi all, ich habe den gleichen Fehler. Auf einem Raspberry Pi geht der Fehler weg, wenn ich alles bereinige und dann vollständig übersetze. Wenn das Projekt im Codesys Development System wieder neu geladen wird ist der Fehler aber wieder da. Mit eine Win V3 x64 PLC kann ich den Fehler nur unterbinden wenn ich auf der HMI das VUM_Login einbinde. Dieses brauche ich aber nicht, da ich die HMI für das User Management selbst gestaltet habe. Das funktioniert auch. I have the same error. On a Raspberry Pi the error goes away if I clean everything and then compile completely. When the project is reloaded in the Codesys Development System, the error returns. With a Win V3 x64 PLC I can only prevent the error if I integrate the VUM_Login on the HMI. But I don't need this because I designed the HMI for user management myself. That works too. Anyone have an idea to fix this problem. Many thanks
Last updated: 2024-07-09
Post by solve-it on SysFileOpenAsync
CODESYS Forge
talk
(Post)
Just realized that it is the /dev/input/js0 file. Don't think this is a prob either. Found the ConfigFile. Where and how to add /dev/input/js0? raspberry [SysFile] FilePath.1=/etc/, 3S.dat PlcLogicPrefix=1 [SysTarget] TargetVersionMask=0 TargetVersionCompatibilityMask=0xFFFF0000 [CmpLog] Logger.0.Name=/tmp/codesyscontrol.log Logger.0.Filter=0x0000000F Logger.0.Enable=1 Logger.0.MaxEntries=1000 Logger.0.MaxFileSize=1000000 Logger.0.MaxFiles=1 Logger.0.Backend.0.ClassId=0x00000104 ;writes logger messages in a file Logger.0.Type=0x314 ;Set the timestamp to RTC [CmpSettings] FileReference.0=SysFileMap.cfg, SysFileMap FileReference.1=/etc/CODESYSControl_User.cfg [SysExcept] Linux.DisableFpuOverflowException=1 Linux.DisableFpuUnderflowException=1 Linux.DisableFpuInvalidOperationException=1 [CmpWebServer] ConnectionType=0 [CmpOpenSSL] WebServer.Cert=server.cer WebServer.PrivateKey=server.key WebServer.CipherList=HIGH [SysMem] Linux.Memlock=0 [CmpCodeMeter] InitLicenseFile.0=3SLicense.wbb [SysEthernet] Linux.ProtocolFilter=3 [CmpSchedule] ProcessorLoad.Enable=1 ProcessorLoad.Maximum=95 ProcessorLoad.Interval=5000 DisableOmittedCycleWatchdog=1 [CmpUserMgr] AsymmetricAuthKey=6873d655ac1f166f3743feea42d2f3dd1b39ae40 [CmpSecureChannel] CertificateHash=09fd8d52be4ddd45a709bc9c95e2aa093b3f5695 [SysSocket] Adapter.0.Name="eth0" Adapter.0.EnableSetIpMask=1 ;raspberry [ComponentManager] ;Component.1=CmpGateway ;Component.2=CmpGwCommDrvTcp ;Component.3=CmpGwCommDrvShm [SysCom] ;Linux.Devicefile=/dev/ttyS [CmpBlkDrvCom] ;Com.0.Name=MyCom ;Com.0.Baudrate=115200 ;Com.0.Port=3 ;Com.0.EnableAutoAddressing=1 [SysProcess] Command.0=shutdown [CmpApp] Bootproject.RetainMismatch.Init=1 ;Application.1=Application ;Application.1=Application ;Application.1=Application Application.1=Application [CmpRasPi] Architecture=armv6l [CmpRedundancyConnectionIP] [CmpRedundancy] [CmpSrv] [IoDrvEtherCAT]
Last updated: 2024-07-16
Post by trusty-squire on Confused by dwIpoTime input for SMC_Interpolator
CODESYS Forge
talk
(Post)
Hi, Learning Codesys CNC, and I am confused by the dwIpoTime parameter. I have a basic demo application, using SMC_Interpolator feeding into SMC_TRAFO_Gantry2Tool2, which then sets the position of the x/y SM_Drive_Virtual axis. I also have a C axis which revolves the tool, which is controlled using a simple tangential angle calculation SMC_CalcDirectionFromVector. The GCode I'm using has feed/accel set at 500. The axis configuration limits are well above that (2000). What's strange is that, when I run the simulation, the feed speed changes drastically when I update the variable dwIpoTime. The larger the number, the faster it moves. What's going on here? The documentation only says "This variable has to be set for each call. It represents the cycle time in μsec." Why does it change the feed speed I'm seeing the in simulation? What is a good number to use? The example I was looking at set it at 5000. Screenshot attached.
Last updated: 2024-07-18
Post by salvadegianluca on List files in a directory with SysDiropen And SysDirRead
CODESYS Forge
talk
(Post)
Good morning; I'm facing an issue that seems being caused by the library itself. I'm trying to create the list of all the files that are stored inside a psecific directory. Unluckily the first file is allways hidden. VAR CONSTANT arysEmptyArray:ARRAY[iArrayMinDimension..iArrayMAXDimension] OF STRING := [(iArrayMAXDimension - iArrayMinDimension)('')]; iArrayMinDimension:INT := 1; iArrayMAXDimension:INT := 99; END_VAR VAR_INPUT sDirectoryToInspect:STRING; sSearchFilter:STRING; END_VAR VAR_IN_OUT xCheckFileInsideDirectory:BOOL; END_VAR VAR arysListOfFoundFiles:ARRAY[iArrayMinDimension..iArrayMAXDimension] OF STRING; sNullString:STRING; iNullIndex:INT := 0; libInfoAboutThePath:DirInfo; libResultOfThePathMonitoring:CmpErrors.RTS_IEC_RESULT; libInstanceToMonitorThePath:CmpErrors.RTS_IEC_HANDLE; sEntityToSearch:STRING; dMaxEntityDimension:DINT := SIZEOF(sEntityToSearch); libFileInfo:DirInfo; sFilteredFileName:STRING; iIndexToScrollArrays:INT; END_VAR IF xCheckFileInsideDirectory THEN arysListOfFoundFiles:=arysEmptyArray; iIndexToScrollArrays:=iArrayMinDimension; libInstanceToMonitorThePath:= SysDirOpen(szDir:= sDirectoryToInspect,szDirEntry:=sNullString,diMaxDirEntry:= iNullIndex,pDirInfo:= ADR(libInfoAboutThePath),pResult:= ADR(libResultOfThePathMonitoring)); WHILE libResultOfThePathMonitoring = Errors.ERR_OK AND iIndexToScrollArrays <= iArrayMAXDimension DO sEntityToSearch:= ''; libResultOfThePathMonitoring:=SysDirRead(hDir:=libInstanceToMonitorThePath,szDirEntry:=sEntityToSearch,diMaxDirEntry:=dMaxEntityDimension,pDirInfo:=ADR(libFileInfo)); sFilteredFileName:= FUN_06_00_FindItemInString_0(sFilter:=sSearchFilter,sSource:=sEntityToSearch); IF sFilteredFileName <> '' THEN arysListOfFoundFiles[iIndexToScrollArrays]:=sFilteredFileName; iIndexToScrollArrays:=iIndexToScrollArrays + 1; END_IF IF libResultOfThePathMonitoring <> Errors.ERR_OK THEN libResultOfThePathMonitoring:= Errors.ERR_OK; END_IF END_WHILE libResultOfThePathMonitoring:=SysDirClose(hDir:= libInstanceToMonitorThePath); xCheckFileInsideDirectory:=FALSE; END_IF How is possible to solve this issue? Any known work around?
Last updated: 2024-09-17
Post by salvadegianluca on List files in a directory with SysDiropen And SysDirRead
CODESYS Forge
talk
(Post)
Good morning; I'm facing an issue that seems being caused by the library itself. I'm trying to create the list of all the files that are stored inside a psecific directory. Unluckily the first file is allways hidden. VAR CONSTANT arysEmptyArray:ARRAY[iArrayMinDimension..iArrayMAXDimension] OF STRING := [(iArrayMAXDimension - iArrayMinDimension)('')]; iArrayMinDimension:INT := 1; iArrayMAXDimension:INT := 99; END_VAR VAR_INPUT sDirectoryToInspect:STRING; sSearchFilter:STRING; END_VAR VAR_IN_OUT xCheckFileInsideDirectory:BOOL; END_VAR VAR arysListOfFoundFiles:ARRAY[iArrayMinDimension..iArrayMAXDimension] OF STRING; sNullString:STRING; iNullIndex:INT := 0; libInfoAboutThePath:DirInfo; libResultOfThePathMonitoring:CmpErrors.RTS_IEC_RESULT; libInstanceToMonitorThePath:CmpErrors.RTS_IEC_HANDLE; sEntityToSearch:STRING; dMaxEntityDimension:DINT := SIZEOF(sEntityToSearch); libFileInfo:DirInfo; sFilteredFileName:STRING; iIndexToScrollArrays:INT; END_VAR IF xCheckFileInsideDirectory THEN arysListOfFoundFiles:=arysEmptyArray; iIndexToScrollArrays:=iArrayMinDimension; libInstanceToMonitorThePath:= SysDirOpen(szDir:= sDirectoryToInspect,szDirEntry:=sNullString,diMaxDirEntry:= iNullIndex,pDirInfo:= ADR(libInfoAboutThePath),pResult:= ADR(libResultOfThePathMonitoring)); WHILE libResultOfThePathMonitoring = Errors.ERR_OK AND iIndexToScrollArrays <= iArrayMAXDimension DO sEntityToSearch:= ''; libResultOfThePathMonitoring:=SysDirRead(hDir:=libInstanceToMonitorThePath,szDirEntry:=sEntityToSearch,diMaxDirEntry:=dMaxEntityDimension,pDirInfo:=ADR(libFileInfo)); sFilteredFileName:= FUN_06_00_FindItemInString_0(sFilter:=sSearchFilter,sSource:=sEntityToSearch); IF sFilteredFileName <> '' THEN arysListOfFoundFiles[iIndexToScrollArrays]:=sFilteredFileName; iIndexToScrollArrays:=iIndexToScrollArrays + 1; END_IF IF libResultOfThePathMonitoring <> Errors.ERR_OK THEN libResultOfThePathMonitoring:= Errors.ERR_OK; END_IF END_WHILE libResultOfThePathMonitoring:=SysDirClose(hDir:= libInstanceToMonitorThePath); xCheckFileInsideDirectory:=FALSE; END_IF How is possible to solve this issue? Any known work around?
Last updated: 2024-09-17
Post by salvadegianluca on List files in a directory with SysDiropen And SysDirRead
CODESYS Forge
talk
(Post)
Good morning; I'm facing an issue that seems being caused by the library itself. I'm trying to create the list of all the files that are stored inside a psecific directory. Unluckily the first file is allways hidden. VAR CONSTANT arysEmptyArray:ARRAY[iArrayMinDimension..iArrayMAXDimension] OF STRING := [(iArrayMAXDimension - iArrayMinDimension)('')]; iArrayMinDimension:INT := 1; iArrayMAXDimension:INT := 99; END_VAR VAR_INPUT sDirectoryToInspect:STRING; sSearchFilter:STRING; END_VAR VAR_IN_OUT xCheckFileInsideDirectory:BOOL; END_VAR VAR arysListOfFoundFiles:ARRAY[iArrayMinDimension..iArrayMAXDimension] OF STRING; sNullString:STRING; iNullIndex:INT := 0; libInfoAboutThePath:DirInfo; libResultOfThePathMonitoring:CmpErrors.RTS_IEC_RESULT; libInstanceToMonitorThePath:CmpErrors.RTS_IEC_HANDLE; sEntityToSearch:STRING; dMaxEntityDimension:DINT := SIZEOF(sEntityToSearch); libFileInfo:DirInfo; sFilteredFileName:STRING; iIndexToScrollArrays:INT; END_VAR IF xCheckFileInsideDirectory THEN arysListOfFoundFiles:=arysEmptyArray; iIndexToScrollArrays:=iArrayMinDimension; libInstanceToMonitorThePath:= SysDirOpen(szDir:= sDirectoryToInspect,szDirEntry:=sNullString,diMaxDirEntry:= iNullIndex,pDirInfo:= ADR(libInfoAboutThePath),pResult:= ADR(libResultOfThePathMonitoring)); WHILE libResultOfThePathMonitoring = Errors.ERR_OK AND iIndexToScrollArrays <= iArrayMAXDimension DO sEntityToSearch:= ''; libResultOfThePathMonitoring:=SysDirRead(hDir:=libInstanceToMonitorThePath,szDirEntry:=sEntityToSearch,diMaxDirEntry:=dMaxEntityDimension,pDirInfo:=ADR(libFileInfo)); sFilteredFileName:= FUN_06_00_FindItemInString_0(sFilter:=sSearchFilter,sSource:=sEntityToSearch); IF sFilteredFileName <> '' THEN arysListOfFoundFiles[iIndexToScrollArrays]:=sFilteredFileName; iIndexToScrollArrays:=iIndexToScrollArrays + 1; END_IF IF libResultOfThePathMonitoring <> Errors.ERR_OK THEN libResultOfThePathMonitoring:= Errors.ERR_OK; END_IF END_WHILE libResultOfThePathMonitoring:=SysDirClose(hDir:= libInstanceToMonitorThePath); xCheckFileInsideDirectory:=FALSE; END_IF How is possible to solve this issue? Any known work around?
Last updated: 2024-09-17
Post by salvadegianluca on List files in a directory with SysDiropen And SysDirRead
CODESYS Forge
talk
(Post)
Good morning; I'm facing an issue that seems being caused by the library itself. I'm trying to create the list of all the files that are stored inside a psecific directory. Unluckily the first file is allways hidden. VAR CONSTANT arysEmptyArray:ARRAY[iArrayMinDimension..iArrayMAXDimension] OF STRING := [(iArrayMAXDimension - iArrayMinDimension)('')]; iArrayMinDimension:INT := 1; iArrayMAXDimension:INT := 99; END_VAR VAR_INPUT sDirectoryToInspect:STRING; sSearchFilter:STRING; END_VAR VAR_IN_OUT xCheckFileInsideDirectory:BOOL; END_VAR VAR arysListOfFoundFiles:ARRAY[iArrayMinDimension..iArrayMAXDimension] OF STRING; sNullString:STRING; iNullIndex:INT := 0; libInfoAboutThePath:DirInfo; libResultOfThePathMonitoring:CmpErrors.RTS_IEC_RESULT; libInstanceToMonitorThePath:CmpErrors.RTS_IEC_HANDLE; sEntityToSearch:STRING; dMaxEntityDimension:DINT := SIZEOF(sEntityToSearch); libFileInfo:DirInfo; sFilteredFileName:STRING; iIndexToScrollArrays:INT; END_VAR IF xCheckFileInsideDirectory THEN arysListOfFoundFiles:=arysEmptyArray; iIndexToScrollArrays:=iArrayMinDimension; libInstanceToMonitorThePath:= SysDirOpen(szDir:= sDirectoryToInspect,szDirEntry:=sNullString,diMaxDirEntry:= iNullIndex,pDirInfo:= ADR(libInfoAboutThePath),pResult:= ADR(libResultOfThePathMonitoring)); WHILE libResultOfThePathMonitoring = Errors.ERR_OK AND iIndexToScrollArrays <= iArrayMAXDimension DO sEntityToSearch:= ''; libResultOfThePathMonitoring:=SysDirRead(hDir:=libInstanceToMonitorThePath,szDirEntry:=sEntityToSearch,diMaxDirEntry:=dMaxEntityDimension,pDirInfo:=ADR(libFileInfo)); sFilteredFileName:= FUN_06_00_FindItemInString_0(sFilter:=sSearchFilter,sSource:=sEntityToSearch); IF sFilteredFileName <> '' THEN arysListOfFoundFiles[iIndexToScrollArrays]:=sFilteredFileName; iIndexToScrollArrays:=iIndexToScrollArrays + 1; END_IF IF libResultOfThePathMonitoring <> Errors.ERR_OK THEN libResultOfThePathMonitoring:= Errors.ERR_OK; END_IF END_WHILE libResultOfThePathMonitoring:=SysDirClose(hDir:= libInstanceToMonitorThePath); xCheckFileInsideDirectory:=FALSE; END_IF How is possible to solve this issue? Any known work around?
Last updated: 2024-09-17
Post by andrax on CodeSys Raspberry pi I2C driver not found
CODESYS Forge
talk
(Post)
Hi, Communication with the ADS1115 is actually simple. 1. write config 2. write address pointer 3. read conversation register The ADS1115 works like a multiplexer. This means that you do this individually for each channel that you want to read. e.g: Channel 1: write config > write address pointer > read conversation register Channel 2: write config > write address pointer > read conversation register Channel 3: write config > write address pointer > read conversation register Channel 4: write config > write address pointer > read conversation register then you start again from the beginning You can also omit individual channels or read only one. It doesn't matter. I have written the driver so that I can also use it on the TCA9548. The driver is from Stefan Dreyer. In your case, the driver works and communication with the ADS1115 is running. As you can see, the cfgWrong:=FALSE If you could not write or read data, cfgWrong:=TRUE; This means that either something is wrong with your ADS1115 or you have connected something incorrectly. Question: what voltage do you want to measure?
Last updated: 2024-11-08
Post by s1ack on Request a dark mode for CODESYS
CODESYS Forge
talk
(Post)
and other colors have to be licensed? Introducing Code-Based Licensing Code Basic S: White text w/ grey background (ST only) Code Basic M: White text w/ dark gray background (ST Only) Code Basic L: White test w/ black background (ST Only) Code Standard S: 2 Colors of light syntax highlight colors w/ black background. (ST Only) Code Standard M: 4 Colors of light syntax highlight colors w/ black background. (ST only) Code Standard L: 6 Colors of light syntax highlight colors w/ black background. (ST only) Code Performance S: 2 Colors of light syntax highlight colors w/ user definable background. (Entire IDE) Code Performance M: 4 Colors of light syntax highlight colors w/ user definable background. (Entire IDE) Code Performance L: 6 Colors of light syntax highlight colors w/ user definable background. (Entire IDE) You get the gist... I used to be a big fan of CoDeSys. Recent re-entry after 5 years away, not so much.
Last updated: 2 hours ago
Post by spiessli on Raspberry Pi 4 with Legacy Drivers and Codesys 3.5.19 Patch 4
CODESYS Forge
talk
(Post)
Thanks for the suggestion, I have tried it eagerly: I have updated all packages to latest version with Codesys Installer and installed newest runtime and gateway on Raspberry Pi. Unfortunately, the error is still there. As soon as I add the SM_Drive_Servo to the device tree, I get the error below when generating the code. Reverting SM3_Basic to version 4.14 makes the error disappear. ------ Übersetzungslauf gestartet: Applikation: Device.Application ------- Code typisieren... Code erzeugen... [FEHLER] sm3_drive_servo, 4.10.0.0 (codesys): GetStandardConfigParams [AXIS_REF_SERVO]: C0032: Typ 'Unbekannter Typ: 'ConfigGetParameterValueLREAL(pParam, 0)'' kann nicht in Typ 'LREAL' konvertiert werden [FEHLER] sm3_drive_servo, 4.10.0.0 (codesys): GetStandardConfigParams [AXIS_REF_SERVO]: C0046: Bezeichner 'ConfigGetParameterValueLREAL' nicht definiert [FEHLER] sm3_drive_servo, 4.10.0.0 (codesys): GetStandardConfigParams [AXIS_REF_SERVO]: C0035: Programmname, Funktion oder Funktionsbausteinstanz an Stelle von 'ConfigGetParameterValueLREAL' erwartet [FEHLER] sm3_drive_servo, 4.10.0.0 (codesys): GetStandardConfigParams [AXIS_REF_SERVO]: C0032: Typ 'Unbekannter Typ: 'ConfigGetParameterValueLREAL(pParam, 0)'' kann nicht in Typ 'LREAL' konvertiert werden [FEHLER] sm3_drive_servo, 4.10.0.0 (codesys): GetStandardConfigParams [AXIS_REF_SERVO]: C0046: Bezeichner 'ConfigGetParameterValueLREAL' nicht definiert [FEHLER] sm3_drive_servo, 4.10.0.0 (codesys): GetStandardConfigParams [AXIS_REF_SERVO]: C0035: Programmname, Funktion oder Funktionsbausteinstanz an Stelle von 'ConfigGetParameterValueLREAL' erwartet [FEHLER] sm3_drive_servo, 4.10.0.0 (codesys): GetStandardConfigParams [AXIS_REF_SERVO]: C0032: Typ 'Unbekannter Typ: 'ConfigGetParameterValueLREAL(pParam, 0)'' kann nicht in Typ 'LREAL' konvertiert werden [FEHLER] sm3_drive_servo, 4.10.0.0 (codesys): GetStandardConfigParams [AXIS_REF_SERVO]: C0046: Bezeichner 'ConfigGetParameterValueLREAL' nicht definiert [FEHLER] sm3_drive_servo, 4.10.0.0 (codesys): GetStandardConfigParams [AXIS_REF_SERVO]: C0035: Programmname, Funktion oder Funktionsbausteinstanz an Stelle von 'ConfigGetParameterValueLREAL' erwartet [FEHLER] sm3_drive_servo, 4.10.0.0 (codesys): GetStandardConfigParams [AXIS_REF_SERVO]: C0032: Typ 'Unbekannter Typ: 'ConfigGetParameterValueLREAL(pParam, 0)'' kann nicht in Typ 'LREAL' konvertiert werden [FEHLER] sm3_drive_servo, 4.10.0.0 (codesys): GetStandardConfigParams [AXIS_REF_SERVO]: C0046: Bezeichner 'ConfigGetParameterValueLREAL' nicht definiert [FEHLER] sm3_drive_servo, 4.10.0.0 (codesys): GetStandardConfigParams [AXIS_REF_SERVO]: C0035: Programmname, Funktion oder Funktionsbausteinstanz an Stelle von 'ConfigGetParameterValueLREAL' erwartet [FEHLER] sm3_drive_servo, 4.10.0.0 (codesys): GetStandardConfigParams [AXIS_REF_SERVO]: C0032: Typ 'Unbekannter Typ: 'ConfigGetParameterValueLREAL(pParam, 0)'' kann nicht in Typ 'LREAL' konvertiert werden [FEHLER] sm3_drive_servo, 4.10.0.0 (codesys): GetStandardConfigParams [AXIS_REF_SERVO]: C0046: Bezeichner 'ConfigGetParameterValueLREAL' nicht definiert [FEHLER] sm3_drive_servo, 4.10.0.0 (codesys): GetStandardConfigParams [AXIS_REF_SERVO]: C0035: Programmname, Funktion oder Funktionsbausteinstanz an Stelle von 'ConfigGetParameterValueLREAL' erwartet Übersetzung abgeschlossen -- 15 Fehler, 0 Warnungen : Kein Download möglich
Last updated: 2023-12-20
Post by mgabryel on Problems with CAN 2.0 comunication on Wago PLC (Codesys 3.5)
CODESYS Forge
talk
(Post)
Hello, I am trying to program CAN Bus comunication on WAGO PLC (more precisely on WAGO Touch Monitor model TP600). I am using for this purpose library "WagoAppCanLayer2" from Wago company. My IDE for programming this device is CODESYS V3.5 SP19 Patch 2 + (64-bit). My program is written in Structured text using function blocks from previously mentioned library. Here is code of this program: 1) Variables declarations: PROGRAM PLC_PRG VAR oOpenInterface : WagoAppCanLayer2.FbCanL2Open :=( udiBaudrate := 125000 ); xInterfaceIsOpen : BOOL; sInterfaceInfo : STRING; oReceive : WagoAppCanLayer2.FbCanRx29BitFrame :=( xBufferMode := FALSE, wCanId := 16#181 ); xRecv : BOOL; sReceiveInfo : STRING; oSend : WagoAppCanLayer2.FbCanTx29BitFrame :=( dwCanId := 16#100, //was 16#201 xRtrFrame := FALSE ); xSend : BOOL; sSendInfo : STRING; oCanDiag : WagoAppCanLayer2.FbCanErrorInfo; xRst : BOOL; aSendData : ARRAY [1..8] OF BYTE; bSendLen : BYTE; TON_0 : TON; TON_1 : TON; END_VAR 2) Program body: oOpenInterface( xEnable := NOT xInterfaceIsOpen, I_Port := IoConfig_Globals.WAGO_CAN_LAYER2_DEVICE ); sInterfaceInfo := oOpenInterface.oStatus.GetDescription(); xInterfaceIsOpen S= oOpenInterface.xValid AND NOT oOpenInterface.xError; oReceive( xEnable := xInterfaceIsOpen, I_Port := IoConfig_Globals.WAGO_CAN_LAYER2_DEVICE, xRxTrigger := xRecv ); sReceiveInfo := oReceive.oStatus.GetDescription(); IF NOT xRecv THEN IF oReceive.bRxNBytes > 0 THEN oReceive.aRxBuffer[1]; oReceive.aRxBuffer[2]; oReceive.aRxBuffer[3]; oReceive.aRxBuffer[4]; oReceive.aRxBuffer[5]; oReceive.aRxBuffer[6]; oReceive.aRxBuffer[7]; oReceive.aRxBuffer[8]; END_IF xRecv := TRUE; END_IF aSendData[1] := 224; aSendData[2] := 13; aSendData[3] := 14; aSendData[4] := 15; aSendData[5] := 222; aSendData[6] := 13; aSendData[7] := 14; aSendData[8] := 15; bSendLen := 8; TON_0(IN:= NOT TON_1.Q, PT:= T#2S , Q=>xSend, ET=> ); TON_1(IN:= TON_0.Q, PT:= T#2S , Q=>, ET=> ); oSend( xEnable := xInterfaceIsOpen, I_Port := IoConfig_Globals.WAGO_CAN_LAYER2_DEVICE, aTxBuffer := aSendData, bTxNBytes := bSendLen, xTxTrigger := xSend ); sSendInfo := oSend.oStatus.GetDescription(); oCanDiag( xEnable := TRUE, I_Port := IoConfig_Globals.WAGO_CAN_LAYER2_DEVICE, xTriggerResetCounter := xRst, xValid=> , xError=> , oStatus=> , wBusState=> , wBusDiag=> , uiRxOverflowsL2=> , uiTxOverflowsL2=> , uiRxOverflows=> , uiMsgTimeouts=> , uiBusOffs=> , uiBusWarnings=> ); Program first opens comunication on CAN 2 device and then periodically try send one CAN data frame. After starting program CAN 2 interface is properly open. The xSend variable is toggling with period 2s. When program sends data an "Tx overflow" error appears. When I am watching CAN_H line on DSub 9 socket i am not able to see proper CAN frames - see screenshot attached to this message. Could somebody help me determine what is wrong with this program. Best regards
Last updated: 2024-08-02
Post by jickisticki on Witch library?
CODESYS Forge
talk
(Post)
Crafting my Fellowship Personal Statement was like weaving the threads of my aspirations into a tapestry of words. Each sentence became a brushstroke, painting a vivid portrait of my journey and ambitions. Beyond being just a document, it became a mirror reflecting the depth of my experiences. Like a conductor guiding an orchestra, my personal statement was composed to resonate with my unique voice. In the realm of specialized opportunities, this statement serves as a compass, guiding me toward the next chapter of my professional growth. With each word, I felt the guidance of mentors shaping my story into an eloquent narrative.
Last updated: 2023-08-17
Post by ellcap on Did a library update and now can't open project
CODESYS Forge
talk
(Post)
EDIT: Title was a mistake. Should say now I can't compile / download project. Codesys V3.5SP19 Patch 2. Updated the libraries/packages using the Codesys Installer. I'm hit with this error ------ Build started: Application: ------- Typify code... [ERROR] iecvaraccess, 4.4.0.0 (system): IecVarAccess: C0086: No definition found for interface 'IIecVarAccess17' [ERROR] iecvaraccess, 4.4.0.0 (system): IecVarAccess: C0077: Unknown type: 'IIecVarAccess17' [ERROR] iecvaraccess, 4.4.0.0 (system): Initialize [IecVarAccess]: C0032: Cannot convert type 'IECVARACCESS(iecvaraccess, 4.4.0.0 (system))' to type 'IIecVarAccess17' [ERROR] iecvaraccess, 4.4.0.0 (system): QueryInterface [IecVarAccess]: C0231: Expression of type 'BOOL' expected in this place [ERROR] iecvaraccess, 4.4.0.0 (system): QueryInterface [IecVarAccess]: C0077: Unknown type: 'ITFID_IIecVarAccess17' [ERROR] iecvaraccess, 4.4.0.0 (system): QueryInterface [IecVarAccess]: C0046: Identifier 'ITFID_IIecVarAccess17' not defined Compile complete -- 6 errors, 101 warnings Build complete -- 6 errors, 101 warnings : No download possible
Last updated: 2023-09-25
Post by matthew on New Ladder Editor Issues
CODESYS Forge
talk
(Post)
Hi There, When using the new ladder editor there is no option for function blocks to Remove uncalled FB call parameters. I also see no update function block. When you double click the function block it no longer opens the function block. I also now get warnings if I insert FB call without a contact in front. Warning is: (Impl)): C0373: Expression or part of it has no effect I take it the new editor must work differently? The only reason for using new ladder editor is the ST execute/block editing is far better, If you have alot of text in the old ST execute the editor window is very small and when online it's even worse. The new ST block seems a lot better Thanks!
Last updated: 2023-10-10
Post by smartcoco on The text list provided outside the library is not available for visualization controls within the library.
CODESYS Forge
talk
(Post)
I have a project called 'DemoProject' and a library called 'DemoLib'. Create a visual control named "DemoVisu" in the library, with a selection box of type "ComboBoxInteger" in the space. Now 'ComboBoxInteger' requires a 'Text list'. This "Text list" is provided when I call the "DemoVisu" control of the "DemoLib" library in "DemoProject". And this text list is in 'DemoProject'. I found that 'ComboBoxInteger' no longer works at this time. Other visual controls that use text lists also have this issue. I hope there is a good solution to this problem.
Last updated: 2023-10-16
Post by grant32 on Codesys ARTI .XML file not creating but working.
CODESYS Forge
talk
(Post)
Hello, I am working on a project with a Beijer Nexto Xpress. I have done this a few times with no issues but for some reason this time when creating a Symbol Configuration the ARTI .xml file is not being created in the Project Folder. However when manually putting the ARTI tags in the HMI program they are connected and work. So I am just not getting the file to import all the tags. I can do it manually which is fine but no matter where the project folder is saved this occurs. Anyone experienced this? Did not see another forum on it.
Last updated: 2023-10-27
Post by dhumphries on install codesys runtime on linux
CODESYS Forge
talk
(Post)
I'm running the 3.5.18.20 IDE, installed the control for linux SL package from the installer. Following the directions here: https://content.helpme-codesys.com/en/CODESYS%20Control/_rtsl_install_runtime_on_controller.html it says: Installing the runtime package with CODESYS on the Linux device Click Tools → Update CODESYS Control for <device> SL.</device> I don't have the update option in my tools menu. I've tried it without opening a project, as well as with a project open that uses the control for linux SL as a device. I have found the update device option by right clicking on the device in the device tree, but this only lets me change the device the project is using not load the runtime on the linux computer. Is there an updated instruction somewhere, or do I need to do some further preparation like install additional packages?
Last updated: 2023-11-04
Post by ewi04 on Recipe Manager - RecipeManCommands, load & write wrong values, Bug?
CODESYS Forge
talk
(Post)
I'm getting closer to the error. The combination of STRUCT and ARRAY probably causes the strange behavior. As soon as the ARRAY is followed by a variable, the problem arises. Examples: X: ARRAY[1..2] OF INT; // okay Y: ARRAY[1..2] OF STRUCT; // problem Z: STRUCT; Z.ArrayOfInt[1]; // okay Z.ArrayOfStruct[1].Variable // problem // *update - array of array also causes the error A: ARRAY[1..2] OF ARRAY[1..4] OF BOOL; // problem I can't be the only one who has this problem. Or? Maybe there is a solution. Anyone? Or is it a bug after all?
Last updated: 2023-11-17
Post by appling on License status of Linux 64Bit runtime via CLI
CODESYS Forge
talk
(Post)
Hi, I have a Linux 64Bit system with a Codesys application running on it. It stops after 2hours and a few minutes, which makes me think something is wrong with the installed license. (in my last timing it stopped after 2h4min, on the codesys website it is stated that runtimes without a license stop after 2h) I installed the license via a USB license dongle that I activated on my workstation with the Codesys IDE a while ago. Now the system is shipped at not accessible physically, only remotely via SSH. So is there a way to check the status of the License of the Codesys runtime when it is running on the system? Running the codesyscontrol script with "status" just tells me that it is running, but does not provide any license information. Best regards
Last updated: 2023-12-04
Post by mark on IO link on IFM AL133x only single digital input on a channel
CODESYS Forge
talk
(Post)
I have a problem with the CODESYS IO-Link SL software. When I insert a IO link master AL1332 and plug a discrete digital input to a channel it reads only 1 of the 2 available inputs on that channel. Is there anyone who sorted out if the second input is also usable? When we configure the module without the CODESYS IO-Link SL software then the second input on the channel can be used. At the moment we use some channels on a module as IO-link port, and some as discrete IO. It would be very nice if we can use both inputs on a channel with the use of CODESYS IO-Link SL.
Last updated: 2023-12-18
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
.