Post by captaincookie on increase default string length in queue
CODESYS Forge
talk
(Post)
Hello, I'm using Codesys V3.5 SP18 Patch 4. In the ElementCollectionExample Project from Codesys, I test the SimpleQueueExample in a Control Win V3 x64 environment. I try to add a string of 95 characters length to a queue. The default length of strings is defined as 80 characters. In the initialization of a string variable, it is possible to increase the length by the definition of e.g. STRING(1000). But when I write the string defined like this to the queue, only 80 characters are written to it and the rest is missing. I think the default length is still set in the queue definition, so it is necessary to change this, isn't it? Is there any option to increase the default length of strings in the queue? Attached you can find the used project. Thanks in advance. If any information are missing or my description unclear please let me know.
Last updated: 2023-10-05
Post by mondinmr on Direct Pointers in IOMapping for EtherCAT with IoDrvEthercatLib.ETCSlave_Dia
CODESYS Forge
talk
(Post)
Using SDO, I can read the EtherCAT mappings and offsets from various registers like 0x1c12, 0x1c13, etc. When I obtain registers mapped in the PDOs and various offsets, I could technically access directly to the statusword, controlword, etc., if they are mapped. I have noticed that on IoDrvEthercatLib.ETCSlave_Diag I can find pointers to the input and output buffers. However, although the input buffer can be easily read by referring to what has been obtained from the SDOs, it is not possible to write to the output buffer, as it is overwritten in each cycle by the data from the IOMapping task. Is there a way, knowing an instance of IoDrvEthercatLib.ETCSlave_Diag, to obtain the pointer to the first data in the IOMapping? The offsets are identical to those of the PDOs, but obviously the data is a copy. For me, the cleanest thing would be to access the pointers on IOMapping, for DS402a devices to retrieve the key data and point them to internal references. I need to know this as, having developed our own motion library, I would like to simplify the initial setup by eliminating unnecessary and nonsensical mappings that can lead users to unnecessary errors. In the current version that we have been using for years, we have to map everything manually. I would like to pass only the slave reference to the FB_init constructors and eliminate the mapping.
Last updated: 2024-02-12
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 otbeka on CmpCrypto CryptoGenerateHash Not Outputting
CODESYS Forge
talk
(Post)
Hi, I have been trying to use CryptoGenerateHash from the CmpCrypto Implementation library. My code is taken almost directly from the CryptoDemo.project example provided on Codesys Forge, yet the CryptoGenerateHash function does not write to the address listed in pHash. RTS_IEC_RESULT is OK, but I am getting nothing out of the function. No errors either, all my libraries are up to date. Any help would be appreicated! PROGRAM PLC_PRG VAR sMessage : MESSAGE := 'The red fox runs across the ice'; abyHashCode : HASH_CODE := [ 16#52, 16#ED, 16#87, 16#9E, 16#70, 16#F7, 16#1D, 16#92, 16#6E, 16#B6, 16#95, 16#70, 16#08, 16#E0, 16#3C, 16#E4, 16#CA, 16#69, 16#45, 16#D3 ]; xMessageOK : BOOL; END_VAR xMessageOK := CheckMessage(sMessage, abyHashCode); FUNCTION CheckMessage : BOOL VAR_INPUT sMessage : REFERENCE TO MESSAGE; abyHashCode : REFERENCE TO HASH_CODE; END_VAR VAR _hHASH : RTS_IEC_HANDLE := CryptoGetAlgorithmById(ui32CryptoID:=RtsCryptoID.HASH_SHA1, pResult:=0); Result : RTS_IEC_RESULT; bsMessage : RtsByteString := (ui32MaxLen:=SIZEOF(sMessage), pByData:=ADR(sMessage), ui32Len:=TO_UDINT(LEN(sMessage))); abyNewHashCode : HASH_CODE; bsNewHashCode : RtsByteString := (ui32MaxLen:=SIZEOF(abyNewHashCode), pByData:=ADR(abyNewHashCode)); diCmpResult : DINT; END_VAR Result := CryptoGenerateHash(hAlgo:=_hHASH, pData:=ADR(bsMessage), pHash:=ADR(bsNewHashCode)); diCmpResult := SysMemCmp(pBuffer1:=ADR(abyHashCode), pBuffer2:=ADR(abyNewHashCode), udiCount:=SIZEOF(HASH_CODE)); CheckMessage := diCmpResult = 0;
Last updated: 2024-09-06
Post by bruceae on Ethernet/IP Scan
CODESYS Forge
talk
(Post)
Hello, I have a robot configured as a Generic Ethernet Module under Ethernet/IP Scanner. I can not see the change of state of the outputs coming from the robot on the codesys side in real-time. (The robot has it's own internal program that would changes the values of remote outputs 0-3 off and on). Also when I send data down to the inputs of the robot it doesn't transfer over as expected. As an example I'll send to the robot's input bit 0 a value of 1. It doesn't see that value change. However, when I write that input bit 0 back to a value of 0, the robot changes state and shows a value of 1. And if I change the state of a different bit, the other bits update properly, except for the bit that I changed. Any advice would be greatly appreciated, and if anything else is needed let me know.
Last updated: 2024-09-10
Post by paulg on RasPi CAA Serial example - unexpected behavior during debug
CODESYS Forge
talk
(Post)
I've trimmed down the CAA Serial Codesys example to only listen on one port but, when stepping through the Case structure in debug mode, it jumps out of the structure during a specific point in every scan (I'll point it out below after describing the setup and listing the code). I'm using a Pi 4 Model B, and I have an Arduino Nano Every plugged in via USB which is streaming the following serial message at 1 Hz: Time since opening connection: 1 s Time since opening connection: 2 s ...and so on. The Pi shows the Nano at /dev/ttyACM0 so I edited CODESYSControl_User.cfg to read: Linux.Devicefile=/dev/ttyACM The code in my PLC_PRG is (ignore some of the comments, I hadn't deleted them out from the original example): PROGRAM PLC_PRG VAR xStartTest : BOOL:= TRUE; iState : INT; xTestDone : BOOL;(* True, when the test was done succesfully *) (* Settings to communicate with the COM Port *) aCom1Params : ARRAY [1..7] OF COM.PARAMETER; como1 : COM.Open; comc1 : COM.Close; comw1 : COM.Write; comr1 : COM.Read; //sWrite : STRING := 'Test String!'; sRead : STRING(25); szRead : CAA.SIZE; xCom1OpenError : BOOL; xCom1CloseError : BOOL; xCom1WriteError : BOOL; xCom1ReadError : BOOL; END_VAR //This example shows the communication of two COM Ports with each other. //The first one writes a string of characters, which is read by the second one. //After successful execution, the two COM Ports are closed and the test is done. IF xStartTest THEN CASE iState OF 0: //The parameters are set for the COM Port aCom1Params[1].udiParameterId := COM.CAA_Parameter_Constants.udiPort; aCom1Params[1].udiValue := 1; // the correct Port should be adapted aCom1Params[2].udiParameterId := COM.CAA_Parameter_Constants.udiBaudrate; aCom1Params[2].udiValue := 115200; aCom1Params[3].udiParameterId := COM.CAA_Parameter_Constants.udiParity; aCom1Params[3].udiValue := INT_TO_UDINT(COM.PARITY.NONE); aCom1Params[4].udiParameterId := COM.CAA_Parameter_Constants.udiStopBits; aCom1Params[4].udiValue := INT_TO_UDINT(COM.STOPBIT.ONESTOPBIT); aCom1Params[5].udiParameterId := COM.CAA_Parameter_Constants.udiTimeout; aCom1Params[5].udiValue := 0; aCom1Params[6].udiParameterId := COM.CAA_Parameter_Constants.udiByteSize; aCom1Params[6].udiValue := 8; aCom1Params[7].udiParameterId := COM.CAA_Parameter_Constants.udiBinary; aCom1Params[7].udiValue := 0; //The first Port is opened with the given parameters como1(xExecute := TRUE, usiListLength:=SIZEOF(aCom1Params)/SIZEOF(COM.PARAMETER),pParameterList:= ADR(aCom1Params)); IF como1.xError THEN xCom1OpenError := TRUE; iState := 1000; END_IF //After a successful opening, the next state is reached IF como1.xDone THEN iState := 15; END_IF 15: // the reading process is started comr1(xExecute := TRUE,hCom:= como1.hCom, pBuffer:= ADR(sRead), szBuffer:= SIZEOF(sRead)); IF comr1.xError THEN xCom1ReadError := TRUE; END_IF //After completion the size of the written bytes are saved IF comr1.xDone OR comr1.xError THEN szRead := comr1.szSize; iState := 20; END_IF 20: // If everything was successful the ports are closed and the handles are released comc1(xExecute := TRUE,hCom:= como1.hCom); IF comc1.xError THEN xCom1CloseError := TRUE; END_IF IF comc1.xDone OR comc1.xError THEN iState := 25; END_IF 25: // The first port is closed and the used handle released xTestDone := TRUE; xStartTest := FALSE; iState := 0; como1(xExecute := FALSE); comw1(xExecute := FALSE); comc1(xExecute := FALSE); ELSE iState := 0; END_CASE END_IF I realize as I write this that the .udiPort should be 0 and not 1, but that shouldn't be causing the issue I'm seeing. I'm forcing xStartTest:=TRUE every scan so that I can step into each line and observe what's happening. What I see is that the port parameters are set and the port is opened with no errors, but the code jumps out of the case structure to the last line every time it reaches (and I step into) the iState:=15 line (at the end of the iState:=0 block). So every scan cycle it goes through the block for iState=0 and jumps out at the same spot. I'm a little new to PLC programming so I may be misunderstanding the flow, but shouldn't this case structure keep moving down in the same scan? If it only handles one case per scan, why doesn't the value of iState persist? Thanks! Update: I restarted the Codesys control today and I was then able to see an error for como1.eError of "WRONG_PARAMETER". I tried doing some digging and another post made me think I should add another line to CODESYSControl_User.cfg, so I now have: [SysCom] Linux.Devicefile=/dev/ttyACM portnum := COM.SysCom.SYS_COMPORT1 So now when I set .udiPort to 1, I get "NO_ERROR" but I also don't read anything from the port (i.e. szRead = 0 always). If I try setting the port to 0 (which I'm confused about, because I added a COMPORT1 line but the device shows on the Pi as ACM0), I get the "WRONG_PARAMETER" error again. Is there an easier way to troubleshoot the Pi and view what ports the Codesys runtime is actually able to see while the Pi is running?
Last updated: 2024-06-06
Post by john-robinson on Limiting Memory Access of an Array to Within its Bounds
CODESYS Forge
talk
(Post)
Recently we had an issue regarding some simple code to calculate a rolling average. The code indexes from zero to 199 to properly store the current input into a circular buffer which then allows us to calculate a rolling average: VAR input_5s : REAL; outs_arr : ARRAY[0..199] OF REAL; i : USINT := 0; END_VAR ___ //this code runs every five seconds, calculating a rolling average outs_arr[i] := input_5s; i := i + 1; output := OSCAT_BASIC.ARRAY_AVG(ADR(outs_arr), SIZEOF(outs_arr)); IF i >= SIZEOF(outs_arr) THEN i := 0; END_IF There is a simple bug in this code where the index will be set to 0 when it has surpassed the length of the array in bytes (800 in this case) rather than larger than the number of reals in the array (200). The solution here is simple, replacing i >= SIZEOF(outs_arr) with i >= SIZEOF(outs_arr)/SIZEOF(outs_arr[0]). In this example when the index increased to 201 and the line outs_arr[201] := input_5s was called, codesys arbitrarily wrote to the address in memory that is where outs_arr[201] would be if the array was that long. I would like to find a way to wrap the codesys array inside of a wrapper class that checks if an input is within the bounds of an array before writing to that value. I know how I would implement that for a specific array, I could create a method or class that takes an input of an array of variable length, ie. ARRAY[*] OF REAL, but I don't know how to make this for any data type. I am wondering if anyone has ever done anything similar to this, or has any better suggestions to ensure that none of the programmers on this application accidentally create code that can arbitrarily write to other locations in memory.
Last updated: 2024-03-05
Post by youness on No source code available (cip object)
CODESYS Forge
talk
(Post)
Hi yotaro, hope your problem was resolved. I had the same, but with an other library title. This exception is not detected during compilation, but rather at a given position in the program (when switching to a given visualization). Although the exception is generated at this point, it does not involve the visualization in question. This error is due to one of 3 reasons: 1) A division by zero somewhere: The program is able to detect divisions by zero at compile time. But in the case of a variable, which takes a valid value at init and changes to 0 at a later stage. 2) An invalid pointer: (either because it has a value of 0, or because it points outside the memory reserved for the program) is being dereferenced. Locate any pointers or interfaces you have in the code and check them - you should also be wary of mixing inline modifications and pointers. 3) Array overflow: Generally when a processing operation is executed outside the array's definition range. Example: a write loop with n iterations is executed on an array of dimmension n-1. On the other hand, the error message may not appear. In the latter case, the error may have fatal consequences, as the overflow has induced writing to potentially forbidden memory areas. This problem can be explained by the fact that it's not always the adjacent memory areas of PLC_PRG that are overwritten, but the memory areas that are randomly allocated to the array during compilation. In this case, however, there is no entry in the log, so you need to integrate the "Implicit Check function", which checks the line of code generating the error. To integrate this functions, click on Application --> POU for implicit controls Regards,
Last updated: 2024-07-16
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 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
Post by garyl on Comments in arrays and assigning RST coil's to 600 outputs
CODESYS Forge
talk
(Post)
Hello all, im working on a project that requires me to convert an old automation direct DirectSoft PLC d2-250-1. One of the problems im encountering is that all of the comments are attached to members of the different addresses. When i convert the addresses (1777 "C" registers, 777 X registers, and 20,0000 V registers) im running into difficulties keeping the inputs/outputs correct since they are missing documentation. Is there a good way to retain the comments of the indexes in the array? Secondly, initially i was declaring the "C" and "V" addresses individually and this worked to retain the comments as to which register did what, however i ran into a problem when one rung reset (or set to 0) approximately 600 C Addresses. Since each tag is separately declared this proved to be nearly impossible without a literal wall of code that attempted to crash the program. So i converted all of the registers (C,X,Y,V) into separate structs, declared them as arrays and pointed all of the original call outs in the program to the newly defined structs. However i have now lost comments and the program is very hard to follow. Thanks for any help with this issue.
Last updated: 2023-08-31
Post by egret on Issue with J1939, PGN 65267 (Vehicle Position)
CODESYS Forge
talk
(Post)
I have a J1939 network (ISOBUS) connected to my PLC. I can receive various PGNs such as 65256 (Vehicle Direction/Speed) and 65254 (Time/Date). However, I cannot receive 65267 (Vehicle Position). PGN 65267 (VP) contains SPN 584 (Latitude) and SPN 585 (Longitude). On the network both SPNs return a value of -210 (meaning the CAN message payload is zero in both cases). The conversion settings are the default values and appear to be correct (see attached screenshot). Using a CAN analyser I can see that PGN 65267 (Vehicle Position) is being transmitted over the network with valid (non-zero) data that matches the latitude and longitude coordinates I would expect. I've created a program to read the raw J1939 data and this also returns valid data. It seems that the Codesys J1939 database has a problem with reading PGN 65267 messages. Can anybody else confirm this? I'm using Codesys Version 3.5 SP16 Patch 5.
Last updated: 2023-09-13
Post by manuknecht on Persistence Manager does not save alphabetically first value
CODESYS Forge
talk
(Post)
I have several libraries which contain values that should be saved on a PLC. As apparently no Persistent Variable List is available within Libraries, I use the Persistence Manager to create a Persistence Channel in the Project which imports the library. I then specify the persistence channel in the library using the {attribute 'ac_persist':='PersistenceChannel_CT'} specifier. This generally works very well and gives me exactly the properties I require. However, it came to my attention that the (alphabetially) first value from the library is not saved in the created ASCII file. When checking the content of the Persistence Channel, it shows all the variables as defined in the library. But the created file does not contain the first value and it is not restored after restart or reset. (see attached picture) I disabled Periodic Saving and set xSaveOnChange to TRUE and so the file usually updates immediately after changing one of the values. When changing the first value, it does not update which is consistent with this value not being saved. I also created a sample project and library from scratch which shows the same issue both using a Raspberry Pi and using a Linux machine. Does someone know what the reason for this could be or did someone make similar experiences? Looking forward to hearing your suggestions. Thanks in advance and best wishes Manuel
Last updated: 2023-10-17
Post by manuknecht on Persistence Manager does not save alphabetically first value
CODESYS Forge
talk
(Post)
After some more digging I realized that I get an error on the PLC Logger saying PersistenceChannel: 150 (invalid type in data: SimpleLibrary). I suppose the issue could be found in the ConfigData, which is automatically generated and which looks like this: 1 9##83 SimpleLibrary#GVL.aMoreZeros.[1]#0#64512#15#0 <[2]#0#64520#15#0 <[3]#0#64528#15#0 <[4]#0#64536#15#0 <#0#64544#15#0 <[6]#0#64552#15#0 <<lrVar#0#64560#15#0 <strVar#0#64428#16#80 <uiDummy#0#64370#11#0 Perhaps the fact that the variable is stored within a library confused the compiler? I tried changing the PersistenceChannel parameters to xCompressTags := FALSE which changed the entry in the data file from _xCompressTags BOOL:TRUE _xCompressTags BOOL:FALSE but the actual content of the data file and also the config data did not change.
Last updated: 2023-10-17
Post by user3000 on Can't find an Extended Pulse Timer (TP and LTP)
CODESYS Forge
talk
(Post)
Hello, For my program I need an extended pulse timer, which can be referred to as a retriggerable pulse timer. Where every rising edge of the input resets the elapsed time zero, extending the lenght of the output pulse. The Codesys pulse timer (TP) is a one-shot timer and only resets the elapsed time with the falling edge of the input. There is also a pulse timer (LTP) in codesys, but in my simulation it was also functioning as a one-shot even though the description sounds like LTP should be retriggerable. I have uploaded some timing plots from another PLC program for reference. I am looking for a timer equivalent to the "TEP" diagram. Is there an Extended Pulse Timer in Codesys? Maybe there is a way to manipulate the input so it resets the elapsed time outside the function block?
Last updated: 2023-12-06
Post by dhumphries on Minimum system requirements for codesys control standard S
CODESYS Forge
talk
(Post)
I'm working on a low cost project and I'm considering installing the Codesys runtime on a PC running Linux Debian instead of buying a PLC with a pre-installed runtime. For my needs the Control Standard S license should be capable of running some IO over ethernet/ip, and a webvisu. The PC I am considering has a AMD GX-424CC 2.4GHz processor (4 core/4 thread) and 4GB RAM. This may compare to a raspberry pi4, but I know an X86 processor doesn't directly compare to an ARM processor, and a processor can have a high clock speed but other factors like L2/L3 cache can influence the overall performance. I can't find any published specs for the processor and RAM requirements to run the Codesys Control runtime, does anybody have a link to the minimum system requirements or experience using devices that are at or below the minimum system requirements. A raspberry pi with the control for raspberry pi SL runtime license would be the lowest cost option, but the license is not for commerical use. This restriction is somewhat vague, can anybody clarify if this means I can use a raspberry Pi runtime for in-house automation, what about if I am selling an integrated system that uses a raspberry Pi as a controller?
Last updated: 2023-12-25
Post by edepalos on Text list from sd card
CODESYS Forge
talk
(Post)
Hi guys, I have a textlist in my project which is working just as expected in a drop down list. I would like to move this text list to a sd card and access it from there, because I want to ease the editing of the contents of this textlist. I'm imagining a solution like the operator shuts down the plant, takes the sd card out, edits the textlist on the card with a windows machines notepad, then reinserts the card in the PLC and restarts the plant, having the new content of the textlist populating the dropdown list. I'm sorry that I'm asking you to spoonfeed me, but I did not find anything straightforward to do this... I saw in the Project>Project settings>Visualisation a relative path thingy, but I have the plant in operation and I would not like to make 100 trial and errors right now... I'm also not interested in SysLib file read commands and stuff, I would just like to access the file from the cards part, I don't want to replace its contents dynamically or such... nor I have language files or recipes... Thank You in advance! Br, Ede
Last updated: 2024-01-16
Post by willbechel on Errors about PLC configuration in CoDeSYs software
CODESYS Forge
talk
(Post)
I saved it as the same project but in a different location. I opened this "new project". I clicked on the "Direct Login from Automation Builder" button. It automatically directed me to CODESYS, where I was able to create the "Create Boot Project" but first I also clicked login again but inside CODESYS keeping the automation builder login online. Additional Information: The "Create Boot Project" function in CODESYS is used to create a project that will automatically start when the controller is booted up. To create a boot project, you must first create a new project in CODESYS. Once you have created a new project, you can then use the "Create Boot Project" function to create a boot application. The "Create Boot Project" function will create a new application that is based on the current project. The new application will be saved in the same location as the current project. You can then download the new application to the controller.
Last updated: 2024-02-01
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 thewizard8 on Raspberry PI4 Serial Port
CODESYS Forge
talk
(Post)
Hi Dear All, I'm using my raspberry PI4 as a CoDeSyS PLC (Build from scratch with custom electronics). I was able to implement all fieldbuses with the exception of Modbus Serial. I'm using the internal Port (GPIO) and I configured it in /etc/Codesyscontrol_user.cfg the following away: [SysCom] Linux.Devicefile.1=/dev/ttyUSB0 Linux.Devicefile.2=/dev/ttyS0 I'm using COM2 on Master configuration. I'm using a interface board from TTL/RS485 (bidirectional board), and it's works perfectly with other devices but not in CoDeSyS. I'm able to send data with python script and read it on my pc using putty, but when I use a modbus slave simulator to interface with codesys I always get red icons on master and slave. (Please find image attached). I'm pretty shure that this might be a bad parameter on my CoDeSyS runtime configurstion file. Can someone help me? I'm stuck and this is for my master degree certification.
Last updated: 2024-03-18
Post by markushunter on Different behavior between the "Start" button in the IDE and the Cmp function "AppStartApplication()"
CODESYS Forge
talk
(Post)
In our application with CODESYS V3.5 SP19 Patch 5 and the Soft-PLC Name: CODESYS Control Win V3 x64 Typ: 4096 ID: 0000 0004 Version: 3.5.19.50 the application behaves differently when we start the application via Cmp.AppStartApplication(pApp) than when we press the "Start" button in online mode in the IDE. Unfortunately, it looks like the AppStartApplication() function, which is called in the "StopDone" system event, is not able to restart the fieldbus driver correctly, in our case the EtherNet_IP_Scanner: Name: EtherNet/IP Scanner Hersteller: 3S - Smart Software Solutions GmbH Kategorien: EtherNet/IP Scanner Typ: 100 ID: 0000 100B Version: 4.5.1.0 Bestellnummer: 1 And one EtherNet/IP adapter Name: FANUC Robot R30iB Plus Hersteller: FANUC Robotics America Kategorien: EtherNet/IP Remote Adapter Typ: 101 ID: 356_12_4_3 Version: Major Revision=16#3, Minor Revision = 16#1 Beschreibung: EtherNet/IP Target imported from EDS File: fanucrobot0301_r30ibp.eds Device: FANUC Robot R30iB Plus Version Konfiguration 3.5.6.0 The application was cold reset in both cases via CmpApp.AppReset(pApp := pApp, usResetOption := CmpApp.RTS_RESET_COLD. Does anyone know the difference between the functions or services executed by the "START" button in online mode and Cmp.AppStartApplication()? Thanks and best regards, markushunter
Last updated: 2024-03-20
Post by markushunter on Different behavior between the "Start" button in the IDE and the Cmp function "AppStartApplication()"
CODESYS Forge
talk
(Post)
In our application with CODESYS V3.5 SP19 Patch 5 and the Soft-PLC Name: CODESYS Control Win V3 x64 Typ: 4096 ID: 0000 0004 Version: 3.5.19.50 the application behaves differently when we start the application via CmpApp.AppStartApplication(pApp) than when we press the "Start" button in online mode in the IDE. Unfortunately, it looks like the AppStartApplication() function, which is called in the "StopDone" system event, is not able to restart the fieldbus driver correctly, in our case the EtherNet_IP_Scanner: Name: EtherNet/IP Scanner Hersteller: 3S - Smart Software Solutions GmbH Kategorien: EtherNet/IP Scanner Typ: 100 ID: 0000 100B Version: 4.5.1.0 Bestellnummer: 1 And one EtherNet/IP adapter Name: FANUC Robot R30iB Plus Hersteller: FANUC Robotics America Kategorien: EtherNet/IP Remote Adapter Typ: 101 ID: 356_12_4_3 Version: Major Revision=16#3, Minor Revision = 16#1 Beschreibung: EtherNet/IP Target imported from EDS File: fanucrobot0301_r30ibp.eds Device: FANUC Robot R30iB Plus Version Konfiguration 3.5.6.0 The application was cold reset in both cases via CmpApp.AppReset(pApp := pApp, usResetOption := CmpApp.RTS_RESET_COLD. Does anyone know the difference between the functions or services executed by the "START" button in online mode and Cmp.AppStartApplication()? Thanks and best regards, markushunter
Last updated: 2024-03-20
Post by markushunter on Different behavior between the "Start" button in the IDE and the Cmp function "AppStartApplication()"
CODESYS Forge
talk
(Post)
In our application with CODESYS V3.5 SP19 Patch 5 and the Soft-PLC Name: CODESYS Control Win V3 x64 Typ: 4096 ID: 0000 0004 Version: 3.5.19.50 the application behaves differently when we start the application via Cmp.AppStartApplication(pApp) than when we press the "Start" button in online mode in the IDE. Unfortunately, it looks like the AppStartApplication() function, which is called in the "StopDone" system event, is not able to restart the fieldbus driver correctly, in our case the EtherNet_IP_Scanner: Name: EtherNet/IP Scanner Hersteller: 3S - Smart Software Solutions GmbH Kategorien: EtherNet/IP Scanner Typ: 100 ID: 0000 100B Version: 4.5.1.0 Bestellnummer: 1 And one EtherNet/IP adapter Name: FANUC Robot R30iB Plus Hersteller: FANUC Robotics America Kategorien: EtherNet/IP Remote Adapter Typ: 101 ID: 356_12_4_3 Version: Major Revision=16#3, Minor Revision = 16#1 Beschreibung: EtherNet/IP Target imported from EDS File: fanucrobot0301_r30ibp.eds Device: FANUC Robot R30iB Plus Version Konfiguration 3.5.6.0 The application was cold reset in both cases via CmpApp.AppReset(pApp := pApp, usResetOption := CmpApp.RTS_RESET_COLD. Does anyone know the difference between the functions or services executed by the "START" button in online mode and Cmp.AppStartApplication()? Thanks and best regards, markushunter
Last updated: 2024-03-20
Post by squiggleypuff on Can't Add New Version of Modbus TCP Master
CODESYS Forge
talk
(Post)
I'm having a tough time trying to get Modbus working on a Festo CPX-E PLC; it throws these pre-compiler errors as soon as I add in my Modbus TCP Master 3.5.12.30 to my project: I'm confused about the C0046 error, as I have IODrvModbusTCP 4.3.0.0 Library installed. So I thought maybe I needed to use the newest Modbus TCP Master 4.3.0.0, which is in my device repository: However, whenever I go to add this underneath the Ethernet adapter (which is version 4.2.0.0), the only TCP Master version available is the old 3.5.12.30 one, even if I have Display all versions checked.: I even went so far as to delete the old version, but then there were no options to add a Modbus TCP Master under my Ethernet adapter. What needs to be done to use the newest Modbus TCP Master? Or are these pre-compiler errors unrelated and I'm missing something? Any help greatly appreciated.
Last updated: 2024-04-04
Post by jrsantab on Remote connection to ifm PLC & HMI
CODESYS Forge
talk
(Post)
We have finally solved the problem. The version of the Gateway in the computer that worked (3.5.11.0) and the one that didn't (3.5.17.30) was different. We have three different Codesys 3.5 versions installed because we work with different controllers. I believe that, depending on the sequence you follow to install the versions you get a different Gateway version. To solve the problem you first have to disable the "obsolete" services. Open services, serach for (in our case) CODESYS Gateway V3 Version 3.5.11.0 CODESYS ServiceControl Version 3.5.11.0 I stopped the services and changed to Manual Start. Then you have to create the new services. In our case, from a Command Prompt session (cmd): SC CREATE "Codesys GatewayService Rigual" binpath="C:\Program Files\CODESYS 3.5.17.30\GatewayPLC\GatewayService.exe" and then SC CREATE "CODESYS ServiceControl Version 3.5.17.30" binpath="C:\Program Files\CODESYS 3.5.17.30\GatewayPLC\CODESYSControlService.exe" remember also to set them as Automatic Start!
Last updated: 2024-04-22
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
.