Post by ppix on Establishing TLS Connection with MQTT Broker using MQTT Client SL Package
CODESYS Forge
talk
(Post)
I’m currently working on establishing a TLS connection with an MQTT broker using the MQTT Client SL package in CODESYS. While I’ve successfully established communication with the broker without TLS, I'm encountering issues when trying to enable TLS. In the 'MQTT Explorer' application, I can easily upload the server certificate (.crt), client certificate (.crt), and client key (.key). However, in CODESYS, I can’t find a way to upload my client key (.key file). Here's a summary of my current setup: Certificates: I have uploaded both the client and server certificates to the certificate store under the 'Trusted Certificates' folder in the security screen. TLS Context Initialization: Despite setting the _sCommonName as the name of my client certificate, a new self-signed certificate is created and placed within the device’s certificates. I then need to manually move this certificate to the trusted certificates folder. This results in three certificates in my trusted certs folder: client cert, server cert, and the newly created cert. _ciDefaultCertInfo : MQTT.NBS.CERT_INFO := (psInfo := ADR(_sCommonName), udiSize := TO_UDINT(LEN(_sCommonName))); // CN of the certificate (common name) _sCipherList : MQTT.NBS.CIPHER_LIST := STRUCT(psList := ADR('HIGH'), udiSize := 4); // Cipher string see https://www.openssl.org/docs/man1.1.1/man1/ciphers.html _tlsContext : MQTT.NBS.TLSContext := ( sUseCaseName := _sCommonName, // A certificate is stored in the certificate store with the use case name. You can choose any name. Here we use the common name. ePurpose := MQTT.NBS.PURPOSE.CLIENT_SIDE, // For client certificates set this to NBS.PURPOSE.CLIENT_SIDE sTLSVersion := '1.3', // The TLS version sCipherList := _sCipherList, // Set the cipher list sHostname := sHostname, // The hostname of the broker udiVerificationMode := 2, // 2 => Active Peer verification ciCertInfo := _ciDefaultCertInfo, // Set the cert info itfCertVerifer := 0); // 0 => No Verifier mqttClient : MQTT.MQTTClient := (xUseTLS:=TRUE, itfTLSContext := _tlsContext, itfAsyncProperty := _asyncProperty); Additional Details: In the client FB, I’ve set uiPort:= 8883, xUseTLS:= TRUE, and configured itfTLSContext as mentioned above. The certificates are encrypted with SHA256RSA. sHostname is the IP address of my broker. I’ve attached a copy of the client FB, which shows straight lines where variables are assigned and boxes where they are not. I am currently trying this on the only 2 compatible versions of COSDESYS with my controller (V3.5.15.20 and V3.5.18.40) My Question: How do I correctly set up this mTLS connection? What might I be missing? Any guidance or suggestions would be greatly appreciated, especially considering I’ve already successfully established a non-TLS connection with the same broker. Thank you in advance for your help!
Last updated: 2024-06-19
Post by alex-at-xana on EThercat Dynamic configuration
CODESYS Forge
talk
(Post)
Hi Everyone, For a fast monitoring system I am using Ethercat oversampling and timestamping inputs. As the customers has a lot of different configurations out in the field, we went for a dynamic Ethercat configuration. Already got the whole detection chain working but now I am stuck since two days in debugging the configuration. Here are my quesitons: I extended the dynamic config example for the EL3632 16#0E303052: //EL3632 pSlave^.SetDCSettings(TRUE,TRUE,80,80,TRUE,4000,0,0); pSlave^.AddSyncManager(16#1000,128,16#26,TRUE,3); pSlave^.AddSyncManager(16#1080,128,16#22,TRUE,2); pSlave^.AddSyncManager(16#1100,0,16#4,TRUE,1); pSlave^.AddSyncManager(16#1110,214,16#20,TRUE,0); pSlave^.AddFMMU(0,214,0,7,16#1110,0,1,1); pSlave^.AddFMMU(0,1,0,0,16#80D,0,1,1); xKnown := TRUE; This leads to a PLL Error for these devices. I double and triple checked the configuraton, but cannot find the issue. There seems to be one difference: the config dialog creates a startup parameter: 16#10F3:16#05, Name: Command_0, Value:0. Bitlen: 16, Stop on fault: false, jumpt at fault: false: next line: 0 a) I do not find information on how to set this in my code. Can you help me there? b) Without trying to set the value, I get a PLL error for these devices in the master log. Is the config wrong? c) Do I need to set the Master to Autoconfigure or Manual? I used autoconfigure for my tests. The stack creates input data addresses for the slaves input data range (pSlaves[i].InputData) which are different from those created when I use the Engineering tools dialogs to configure Ethercat. Specifically, the addresses seem to be aligned at 16 byte boundaries when they are created using the engineering tool, but may appear at uneven addresses when I use the script in dynamic config. I did not try to access ULINT at uneven addresses yet, but I am suspecting this may be a problem. Do I need to manually align the addresses ? Any help is appreciated...
Last updated: 2024-09-10
Post by rost on Rezeptur speichern
CODESYS Forge
talk
(Post)
Servus beianand, eine kurze Vorstellung, da ich hier neu bin Wohne und Arbeite in Bayern seit 27 Jahren als Programmierer. Mit Codesys arbeite ich seit 4 Jahren. Für mein Projekt hab ich die einfache Rezepturverwaltung verwendet. Bis jetzt alles unproblematisch, hab aber jetzt ein wenig um- und aufgeräumt, prinzipiell aber nicht verändert. Ich kann Rezepturen mit neuem Namen speichern, wenn ich aber den gleichen Namen verwende, öffnete sich bisher ein Dialogfenster mit "File already exists..." Neu öffnet sich aber der Dialog mit kryptischen Zeichen ohne Eingabemöglichkeit und ohne das Fenster wieder schließen zu können. Dann kann ich nur noch aus und wieder einschalten. Hat jemand eine Idee?
Last updated: 2024-03-01
Post by rost on Rezeptur speichern
CODESYS Forge
talk
(Post)
Servus beianand, eine kurze Vorstellung, da ich hier neu bin Wohne und Arbeite in Bayern seit 27 Jahren als Programmierer. Mit Codesys arbeite ich seit 4 Jahren. Für mein Projekt hab ich die einfache Rezepturverwaltung verwendet. Bis jetzt alles unproblematisch, hab aber jetzt ein wenig um- und aufgeräumt, prinzipiell aber nicht verändert. Ich kann Rezepturen mit neuem Namen speichern, wenn ich aber den gleichen Namen verwende, öffnete sich bisher ein Dialogfenster mit "File already exists..." Neu öffnet sich aber der Dialog mit kryptischen Zeichen ohne Eingabemöglichkeit und ohne das Fenster wieder schließen zu können. Dann kann ich nur noch aus und wieder einschalten. Hat jemand eine Idee?
Last updated: 2024-03-01
Post by rost on Rezeptur speichern
CODESYS Forge
talk
(Post)
Servus beianand, eine kurze Vorstellung, da ich hier neu bin Wohne und Arbeite in Bayern seit 27 Jahren als Programmierer. Mit Codesys arbeite ich seit 4 Jahren. Für mein Projekt hab ich die einfache Rezepturverwaltung verwendet. Bis jetzt alles unproblematisch, hab aber jetzt ein wenig um- und aufgeräumt, prinzipiell aber nicht verändert. Ich kann Rezepturen mit neuem Namen speichern, wenn ich aber den gleichen Namen verwende, öffnete sich bisher ein Dialogfenster mit "File already exists..." Neu öffnet sich aber der Dialog mit kryptischen Zeichen ohne Eingabemöglichkeit und ohne das Fenster wieder schließen zu können. Dann kann ich nur noch aus und wieder einschalten. Hat jemand eine Idee?
Last updated: 2024-03-01
Post by bschraud on Zielsystem stimmt nicht mit dem verbundenen Gerät überein
CODESYS Forge
talk
(Post)
Dank umfangreicher Hilfe durch den Kontron Support kann ich nun wieder übersetzen. Es waren einige Bibliotheken auf einem älteren, nicht 64bit-kompatiblen Stand. Beim Öffnen des Projektes erscheint zwar ein Dialog zum Aktualisieren der Bibliotheken. Diesen hatte ich auch mit "Auf neueste setzen" bestätigt. Trotzdem waren etliche Bibliotheken im Projekt veraltet. Leider habe ich noch keine Stelle in der Online Hilfe gefunden, die die Zusammenhänge in der Bibliotheksverwaltung und das Vorgehen bei Fehlern erklärt. (Z.B. wie man vermeiden kann, dass eine Komponente automatisch eine ältere Bibliotheksversion lädt, obwohl eine aktuelle Version der gleichen Bibliothek schon hinzugefügt wurde.) Vielen Dank für die Hilfe!
Last updated: 2024-03-25
Post by mondinmr on Why SysPipeWindows is not implemented in RTE?
CODESYS Forge
talk
(Post)
This library would be very useful for IPC communications. Using a UDP socket on localhost is unpredictable, as with slightly loaded machines it does not even guarantee packet delivery locally. Using TCP creates a lot of overhead. Message named pipes would be an excellent solution for Windows RTE. On Linux, since the release of the extension package, there is no issue, as it is sufficient to develop a component. However, although now 90% of our clients understand that Linux runtimes are better in every way compared to Windows RTE, especially from the security aspect (Not in kernel space) and the issues with Windows updates, 10% stubbornly insist (sometimes for trivial commercial reasons) on using Windows. Managing IPC with circular buffers in shared memory is quite ugly, or rather really ugly and unaesthetic. In the manuals, I saw the SysPipeWindows libraries, so I decided to test them, but unfortunately, I noticed that they are not implemented for RTE devices. Technically, I could try to open them as regular files, but SysFileOpen returns 16#27 or 16#39 depending on how I set the name (direction of the slashes). Here is the code to create shared memory and named pipes. Shared memory work great, named pipes no! #ifdef Q_OS_WIN32 SECURITY_ATTRIBUTES sa; SECURITY_DESCRIPTOR sd; InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION); SetSecurityDescriptorDacl(&sd, TRUE, NULL, FALSE); sa.nLength = sizeof(SECURITY_ATTRIBUTES); sa.lpSecurityDescriptor = &sd; sa.bInheritHandle = FALSE; const wchar_t* name = L"Global\\ShmTest"; HANDLE hMapFile = CreateFileMapping( INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, sizeof(SharedData), name); if (hMapFile == NULL) { qCritical("Error creating shared memory"); return 1; } data = static_cast<SharedData*>(MapViewOfFile(hMapFile, FILE_MAP_ALL_ACCESS, 0, 0, sizeof(SharedData))); if (data == NULL) { qCritical("Error mapping shared memory"); return 1; } HANDLE hPipe = CreateNamedPipe( TEXT("\\\\.\\pipe\\MyPipe"), PIPE_ACCESS_DUPLEX, PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, PIPE_UNLIMITED_INSTANCES, 1024 * 1024, 1024 * 1024, NMPWAIT_USE_DEFAULT_WAIT, &sa); if (hPipe == INVALID_HANDLE_VALUE) { qCritical("Error creating named pipe"); return -1; } if (!ConnectNamedPipe(hPipe, NULL)) { qCritical("Error connecting to named pipe"); return -1; } checkPipe(hPipe); #endif
Last updated: 2024-02-02
Post by manuknecht on Opening a Dialog on a specific Client from ST
CODESYS Forge
talk
(Post)
I managed to find a solution that seems to work reliably. As the VU.Globals.CurrentClient-filter accesses the CURRENTCLIENTID or at least a similar, internal variable it can only be used if called from a certain client (e.g. from a button in a visualization). My solution works by implementing a new client filter that compares the client ID of all clients to the ID of the last client that was used. The variable containing the data of the last client is defined as: G_LastClient : VU.IVisualizationClient; // Copy of last client that detected click This last client is then updated every time a button is pressed using the Execute ST-Code input configuration of the button: G_LastClient := VU.PublicVariables.Clients.Current; Next, I created a function block that implements the client filter interface as so: FUNCTION_BLOCK FB_LastClientFilter IMPLEMENTS VU.IVisualizationClientFilter VAR_INPUT END_VAR VAR_OUTPUT END_VAR VAR END_VAR Then i added a method to the FB called IsAccepted which is used to filter out the client. When creating the method, it should automatically be filled with the according variable declaration, as it is defined in the interface: (* For every client can be desided, if it is accepted. ``TRUE``: Client is accepted*) METHOD IsAccepted : BOOL VAR_INPUT (* The client, to check*) itfClient : VU.IVisualizationClient; END_VAR Now the client can be compared to the last used client as such: // check if clientID corresponds to clientID of last recorderd client IF itfCLient.ClientId = G_LastClient.ClientId THEN IsAccepted := TRUE; ELSE IsAccepted := FALSE; END_IF To make use of this custom client filter, initialize a variable with the client filter: LastClient : FB_LastClientFilter; // Client filter to find last used client Then use this client filter when opening or closing a dialog from ST: fbOpenMyDialog(itfClientFilter:=LastClient,xExecute:=TRUE,sDialogName:='VIS_MyDialog_DLG');
Last updated: 2023-09-27
Post by fabian on v3.5 SP19 - Modbus TCP Devices - Channel Limit?
CODESYS Forge
talk
(Post)
Hi all, Is there an update on this topic? Same problem here, I can not add more than 10 Modbus-Slave channels. Is there a workaround? Many thanks! Fabian Codesys 3.5.19 SP2, Modbus 4.3.0.0, Name: Modbus TCP Slave Hersteller: 3S - Smart Software Solutions GmbH Kategorien: Modbus TCP Slave Typ: 89 ID: 0000 0005 Version: 4.1.0.0 Bestellnummer: - Beschreibung: Ein Geraet, das als Slave für einen Modbus TCP Master konfiguriert ist. Version Konfiguration 3.5.11.0
Last updated: 2023-08-28
Post by davidbo on RPI How to login for a copy of the SD image
CODESYS Forge
talk
(Post)
I had one RPI device where I could login. I copied the SD-flash over to another SC-flash. This new SD-flash was inserted in the new device. I can boot the new device but I cannot login why? How can I install an application on this new device? Control 4.4.0.0 cat os-release PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)" NAME="Raspbian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)" VERSION_CODENAME=bullseye ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
Last updated: 2023-10-18
Post by eschwellinger on Edge Gateway online, but PLC is not online
CODESYS Forge
talk
(Post)
we need some logfiles from the edge gateway /etc/Gateway.cfg [CmpLog] CmpEdgeGateway.Filter=0xFFFFFFFF Logger.0.Name=/tmp/codesysedge.log Logger.0.Filter=0x0000000F Logger.0.Enable=1 Logger.0.MaxEntries=100000 Logger.0.MaxFileSize=5000000 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 and does the scan via Automation Server show the plc?
Last updated: 2024-01-09
Post by felipemsgarcia on Edge Gateway online, but PLC is not online
CODESYS Forge
talk
(Post)
Hi Edwin, The PLC is already in the automation server so nothing happens when I scan the network, however the PLC show offline (not connected). Please see logs below. [CmpLog] Logger.0.Name=codesysedge.log Logger.0.Filter=0x0000000F Logger.0.Enable=1 Logger.0.MaxEntries=100000 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 Thank you!
Last updated: 2024-01-09
Post by rpostwvu on Shared Memory Access Issues
CODESYS Forge
talk
(Post)
I got the shared memory example. I'm pretty sure I'm successfully created a memory space, CreateResult returns 18. szName:='CodesysDataShare'; hShm := SysSharedMemoryCreate(szName, 0, ADR(uxiSize), ADR(CreateResult)); I'm trying to access this memory with a C# application, but I get "Unable to Find Specified File". I suspect that Codesys and/or Visual Studio code alters the name I choose? Being in Windows, I cant find a way to see the mapped memory list. ~~~ using (var mmfRead = MemoryMappedFile.OpenExisting("CodesysDataShare",MemoryMappedFileRights.ReadWrite)) ~~~
Last updated: 2024-01-29
Post by andrej on POU - Access to runtime
CODESYS Forge
talk
(Post)
Hello all, when creating a POU, the Codesys IDE allows the setting "Enable System Call" (in the Settings, Property -> Build), see picture. The name suggest, that runtime functionalities i.e. functions of codesyscontrol such as "stop plc" etc. can be directly called. I tried various approches without success, the following does, unsurprisingly not work. FUNCTION accessRTE: BOOL; ****************************** codesyscontrol.stop(); Can you please tell me how I can make a system call to codesyscontrol from a POU. Or could you provide me with a use case for this setting. Many thanks for your feedback and kind regards Andrej
Last updated: 2024-03-02
Post by schnepper on Error building Extension SDK Linux code
CODESYS Forge
talk
(Post)
I'm installed the CODESYS Control for Linux SL package and am trying to use the Extension API to call a simple C function. When I get to the step to run "make all" on the Linux machine, I get the error: build interface header: out/CmpFirstTestItf.h from CmpFirstTestItf.m4 ERROR: This functionname does not contain _cext (this is mandatory, see help for details): DEF_API(void',CDECL',external_struct__fb_init',(external_struct_fb_init_struct *p)',1,0x1F77E075,0x00000001) Why does "Generate Runtime System Files" create a function that does not have cext in the name? What am I missing?
Last updated: 2024-04-01
Post by amy123 on Alarm Manager Project Doesn't Open Successfully
CODESYS Forge
talk
(Post)
Hello, when I download AlarmManager.project from https://forge.codesys.com/prj/codesys-example/alarm-manager/home/Home/, it gives an error when I open it. If I ignore the warning and continue to open, the alarms are missing. ** Exception Text ** System.ArgumentNullException: Value cannot be null. Parameter name: first at _3S.CoDeSys.ControlsContrib.Utilities.WeakMulticastDelegate.Invoke(Object[] args) at _3S.CoDeSys.ControlsContrib.Controls.WizardControl.OnFinishClick(EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Last updated: 2024-04-04
Post by alez on CANOpen SDO to write VISIBLE STRING
CODESYS Forge
talk
(Post)
Hello, I am experiencing difficulties in configuring a CANopen device by sending SDOs. In particular I am attempting to write an Object Dictionary that has VISIBLE STRING as the Data Type. When I try to configure the sending of an SDO from Codesys to configure this parameter I am not allowed to enter a string value. In my particular case I am trying to change the Manufacturer Device Name ( Index 0x1008 ). Could it be that Codesys doesn't manage these types of variables?
Last updated: 2024-04-29
Post by mgengler on Recipe Manager - Not Creating Recipe Files
CODESYS Forge
talk
(Post)
Recipe Manager will load windows explorer view and allow file name to be typed in or existing file selected but will not create a new file or overwrite an existing. Will not create a file in the default folder or even a defined folder like "c:\recipes\" although it does properly navigate to that folder location. I made sure the folder is not read-only. Can't figure out what is missing...
Last updated: 2024-05-17
Post by nano on How to access to variable value through symbolic string name
CODESYS Forge
talk
(Post)
i know, this is the reason for us either. PLC-Handler is to big, and only available with additional Contracts/Costs. OPC-UA is to slow for us. As described, there is a solution available, but im not allowed to post them here. i would prefer you send a message at codesys store by "have a question" or similar called. Not sure. Or, if an Codesys-Official Member allows to share that informations, i can give you the right hints.
Last updated: 2024-06-15
Post by konradkmiller on Variable assignments
CODESYS Forge
talk
(Post)
I have a snippet of code that I was given as a reference in ST. ** ModbusMasterRTU( xConnect:= TRUE, IPort:= IoConfigGlobals.COM1, // IoConfigGlobals.RS232485Interface, // COM1=Front Port / Serial module = Name of module in Devices structure I/O list udiBaudrate:= 19200, usiDataBits:= 8 , eParity:= WagoTypesCom.eTTYParity.None , eStopBits:= WagoTypesCom.eTTYStopBits.One , eHandshake:= WagoTypesCom.eTTYHandshake.None , ePhysical:= WagoTypesCom.eTTYPhysicalLayer.RS485HalfDuplex, xIsConnected=> xIsConnected , xError=> , oStatus=> , eFrameType:= WagoAppPlcModbus.eMbFrameType.RTU , tTimeOut:= T#1S, utQuery:= utQuery , xTrigger:= SEND, utResponse:= utResponse)** What is the meaning of => in this context?
Last updated: 2024-07-20
Post by varshag on Trying to pull Logged In user details and certain other variable values and in turn log to a database
CODESYS Forge
talk
(Post)
Hello All, I am new to Codesys and am trying to create a simple project which would let me log to a 6 column database table. I can use a push button on Visualization to initiate the logging. Column 1:Timestamp Column 2:Full name or Initials of Logged in operator Column 3,4,5,6: Certain variables Any help is highly appreciated. Thank you.
Last updated: 2024-11-07
Post by ragarcia on Error while using UpdateConfiguredIPSettings to change IP address
CODESYS Forge
talk
(Post)
Hello everyone, I am trying to change dynamically by code the IP address of a Weidmuller controller. So I am basically using IoDrvEthernet library to use UpdateConfiguredIPSettings function but I am getting constantly the 'INVALID_STATE' error. Even though I am following a procedure it should work: * First I added on the config file of codesys the following: [SysSocket] Adapter.0.Name="eth0" Adapter.0.EnableSetIpAndMask=1 Adapter.1.Name="eth1" Adapter.1.EnableSetIpAndMask=1 * Secondly I am first disabling the ethernet interface by using Ethernet_0.Enable = FALSE and then executing DED.Reconfigure. After that, I run the Ethernet_1.updateConfiguredIPSettings Code: Ethernet_1.Enable:= EnableDisable; Reconfigure(xExecute:= TRUE, itfNode:= Ethernet_1, xError=> ErrorReconfigure, eError=> ErrorCodeReconfigure); IF Reconfigure.xDone THEN ErrorCodeIP:= Ethernet_1.UpdateConfiguredIPSettings(IPAddress:= newIP, SubnetMask:= newMask, Gateway:= newGW); END_IF IF Reconfigure.xDone OR Reconfigure.xError THEN Reconfigure(xExecute:= FALSE); END_IF Ethernet_1.Enable:= TRUE; Reconfigure(xExecute:= TRUE, itfNode:= Ethernet_1); IF Reconfigure.xDone OR Reconfigure.xError THEN Reconfigure(xExecute:= FALSE); END_IF Can someone help me? Thank you. All I am trying is to find a way to change dynamically with code, the IP addresses of my controller (2 ethernet ports).
Last updated: 2023-12-11
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 dekelec on Codesys 2.3 & Peak PCAN
CODESYS Forge
talk
(Post)
I use Peak USB adapter daily to download from CoDeSys 2.3 and 3.5 to IFM, EPEC and other controllers. The process: - First you need to install the appropriate driver. Link: https://www.peak-system.com/Drivers.523.0.html?&L=1 - Restart the computer - Start the CoDeSys application - Change the name of the adapter in Communication parameters, as mentioned in previous comment. Write the name exactly as written "Peak_USB", as it could also be case sensitive (defines which .dll file to use). If this doesn't work I would contact the vendor of the controller to find out the procedure. In the attachment I've added a FAQ document from IFM regarding using PCAN USB. P.S. I've noticed in your picture of communication parameters a channel via TCP/IP is mentioned. In this case a USB to CAN connection is not being used. First you should change the channel/gateway to connect via CANbus or connect using an Ethernet cable.
Last updated: 2024-07-09
Post by george32 on Readable IO names
CODESYS Forge
talk
(Post)
Hello Folks, I have a quite basic understanding of how PLC programming works. However I keep getting stuck on 1 problem I could not get my head around. The problem is as follow: I have a PLC with 60 IO (20 inputs, 40 outputs). Each IO is defined as a function block. Furthermore I have an external IO card connected trough a CanBus connection. This IO card has 4 analog input channels (USINT), 4 digital inputs (Bool) and 4, digital outputs (Bool) Because I have 2 different components which both has data have I made 4 arrays to store the data off every component in one variable. PLC_Input: Array [1..20] of BOOL; PLC_Output: Array [1..40] of BOOL IOCard_Input: Array [1..8] of BOOL IOCard_Output: Array [1..4] of BOOL Because the control and reading of the different in and outputs is done by a TCP connection I want to use some kind of enumeration or struct to give each index a name so that my main would be a little bit more readable instead of all the magic numbers. Also this would make my program more dynamic for the furter in case I need to changes some in the IO nummers. For example: pump is placed on the fysical terminal strip number place 54, which is the 3th output of the IO card in the program: if I am sending a message with value 54 I would like to control IOCard_Output[3]. If there is a solution or methode to get this done, I can eventually do the following in my main program: IOCard_Output[Pump]. I have tried the following: IOCard_Output[Pump - 51] with an enumration but this keeps raising an error I hope some of you could help me further with this problem. In gross lines: I want to couple all the different IO to a more readable name and this readable name should control the right Array index Thanks in advance, George
Last updated: 2024-09-26
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
.