Search talk: constant library

 
<< < 1 .. 33 34 35 36 37 38 > >> (Page 35 of 38)

Post by jmfernandes on OpenDir always in error CODESYS Forge talk (Post)
Hello I'm trying to use DirOpen to access a directory where then I can read/list the files inside. But I can't list any files because DirOpen.xError is always true. In eError the message is this: " ERROR_UNKNOWN Local library error ID (0: no error; 5101: time out)**** " I have in the file explorer the path 'C:\CodesysTest\Aluminium' and to make sure I also created in the plc a folder to 'prj/Recipes/Aluminium'. I tried using the different paths, but in both it happens the same thing.Inside the folder Aluminium there is two csv files, that I want to list. I added in the library manager CAA Files and CAA Types. I am using the example of https://content.helpme-codesys.com/en/libs/CAA%20File/Current/Examples.html#directory but not matter what I do, I can't get the list the names of the files. What am I missing?
Last updated: 2024-07-31

Post by mondinmr on First IO address of a CAADiagDeviceDefault. CODESYS Forge talk (Post)
I have a device CAADiagDeviceDefault: IoConfig_Globals.Axis_A In our library, we perform introspection of the Etc_SlaveDiag. In that case, we have connectors, and by searching for them by address, I can find them in the IO mapping using the offset and size provided by EtherCAT. However, a Lenze i700 drive, instead of placing the IO mapping in the Etc_SlaveDiag device, places it in a sub-device CAADiagDeviceDefault. So, when I perform introspection, I cannot find the IO correspondences. Yet, in the CAADiagDeviceDefault, I do not find the connectors and cannot do the matching. Is there a way with a pointer or reference to a CAADiagDeviceDefault to obtain the address of the first input and the address of the first output? This is because we have our own motion library with many EtherCAT devices that automatically configure the mappings, but I can't manage to do so with the Lenze i700.
Last updated: 2024-08-22

Post by george32 on TCP Server CODESYS Forge talk (Post)
Thank you for your advice Rinie, I have tried to follow this example but found one problem.When I disconnect with Hercules the system does not acknowledge the lost of its connection this could result in critical errors. Because of this error I am trying to implement the Syssocket library. With this library I am having a problem which I could not solve. I have the following code: ip_adres : STRING :='0.0.0.0'; port : WORD := 5000; iStep : INT := 1; // Socket information Socket_handler : SysSocket_Interfaces.RTS_IEC_HANDLE; Socket_handler_result : SysSocket_Interfaces.RTS_IEC_RESULT; Socket_adress : SysSocket_Interfaces.SOCKADDRESS; Addres_Convert : SysSocket_Implementation.RTS_IEC_RESULT; // Bind information Bind_handler : SysSocket_Interfaces.RTS_IEC_RESULT; // Listener Information Listener_handler : SysSocket_Interfaces.RTS_IEC_RESULT; Addres_Convert := SysSocket_Implementation.SysSockInetAddr(szIPAddress:= ip_adres,pInAddr:= ADR(Socket_adress.sin_addr)); Socket_adress.sin_family:= SysSocket_Interfaces.SOCKET_AF_INET; Socket_adress.sin_port := SysSocket_Implementation.SysSockHtons(usHost:= port); CASE iStep OF 1: // Create Socket Socket_handler :=SysSockCreate( iAddressFamily :=SysSocket_Interfaces.SOCKET_AF_INET, diType:=SysSocket_Interfaces.SOCKET_STREAM, diProtocol:=SysSocket_Interfaces.SOCKET_IPPROTO_TCP, pResult:=ADR(Socket_handler_result)); IF Socket_handler = SysSocket_Interfaces.RTS_INVALID_HANDLE THEN iStep := 1; ELSE iStep := 2; END_IF 2: Bind_handler := SysSocket_Implementation.SysSockBind( hSocket:=Socket_handler, pSockAddr :=ADR(Socket_adress), diSockAddrSize:=SIZEOF(Socket_adress) ); 3: Listener_handler := SysSocket_Implementation.SysSockListen( hSocket :=Socket_handler, diMaxConnections :=1); END_CASE When I am trying to get this working, the SysSockBind function gives a value of 16#207 which means adress already in use. I find this weird because of the IP-adress of 0.0.0.0. I think I am converting the Ip-adress in the wrong way, but the code does not give a error arround this. So therefore I cannot find the solution to this problem. I hope someone could help me with this problem. Thanks in advance George
Last updated: 2025-02-20

Post by josul on Web Client HTTPS Communication Issue CODESYS Forge talk (Post)
Web Client Library Documentation Company: 3S - Smart Software Solutions GmbH Title: Web Client Version: 1.0.1.7 Categories: Application|Utils Namespace: WEB_CLIENT Author: 3S - Smart Software Solutions GmbH Placeholder: WebClient I encountered an issue using this library above. Note it is now part of Codesys IIoT Libraries SL in the form of Web Client SL, but I am not using this version. I was sending Content-Type: application/json, HTTP POST using a HTTPS URL. No issue observed initially, successful operation. At some point operation stopped and the codesyscontrol.log file started to accumulate errors: ERROR: TlsCreateContext2: Failed to save context. An application reset failed to resume operation and I was unable observe any TCP connection forming to a destination port 443. The error appeared as a TCP_INIT error. I can find no details as to what may have happened or why a reset of the PLC application did not resume operation. Testing with a curl operation proved to be successful, so I am confident there was no fundamental networking issue preventing a TCP connection forming. The solution was to reboot the hardware itself, but this is not satisfactory in the long term. Is there any description of the TLS error I received? Is there any suggestion here that there might be an issue with certificates? Any advice or information is appreciated.
Last updated: 2025-06-05

Post by struccc on Inheritence of struct, CODESYS Forge talk (Post)
Strangely reminds me to my struggles... Want to do something "Elegant", reusable, universal, practical... In CODESYS??? 🙃 First of all, before you get too deep into this: If you could find a way, to make a "universal" log entry object, containing the variable length data itself, you wouldn't be able to store them in an array, or access them like an array, or pass them by value as a type. (please correct me, if I'm wrong, incorrect, or not precise). Because... Basically you can't declare a type with variable memory footprint. This is a very deeply embedded characteristic of CODESYS, and all IEC 61131-3 systems, and it has many reasons behind. And yes, it is a very common trap / mistake, to forget about. So, with a log entry - I guess - it's pretty much the purpose: store data and metadata together, and then handle it in a uniform way. There are ways to handle this, really depends on what is the purpose. For example: 1. Entries with fixed length (Maybe it is not as evil as it looks for the first time. Depends on the situation, but definitely the fastest and easiest code) You can have your base object, with an internal, fixed length string or byte array variable. I would go with a string, and call it _Data.; And then you can make properties, like As_Bool, As_Int, As_Real... In the 'set' accessors, you can do like: pReal := ADR(_Data); // POINTER TO REAL As_Real := pReal^; In the 'get' accessors, evidently: pReal := ADR(_Data); // POINTER TO REAL pReal^ := AS_Real; Or, can use ANY type, if you are not obsessed with variable / property like access: 2. Fixed length, but nicer First, some disadvantage to any values: - You can only assign values with write access. No literals, constants, etc... - Can only be used as input variable of function or function_block - Therefore, stg you could reach: LogEntry.Initialize (stVariable|rVariable|iVariable|xVariable); Just a quick example (it's funny to play with ANY): Be careful it was not tested. I'm sure can be done better, please feel free to comment FUNCTION_BLOCK FB_LogEntry VAR_INPUT MsgClass : UDINT; // Like DEBUG, WARN, ERR... MsgCode : UDINT; // Like Errors.ERR_FAILED MsgTS : DT; // The timestamp END_VAR VAR _Data : STRING(80); // Our data container... _Descr : __SYSTEM.AnyType; // A standard descriptor for our data, containing TYPE_CLASS, address and size END_VAR METHOD SET_Value : BOOL VAR_INPUT anyValue : ANY; END_VAR VAR I : DINT; diSize : DINT; pStr : POINTER TO STRING; END_VAR // Check what did we receive in anyValue. diSize := anyValue.diSize; // We use constant __SYSTEM.TYPE_CLASS to identify the received data type CASE anyValue.TypeClass OF // Maybe we don't want to store references, pointers... and who knows what else... __SYSTEM.TYPE_CLASS.TYPE_REFERENCE, __SYSTEM.TYPE_CLASS.TYPE_POINTER : SET_Value := FALSE; // For the planned types we will be just fine. TYPE_CLASS.TYPE_BOOL, TYPE_CLASS.TYPE_INT, TYPE_CLASS.TYPE_REAL : SET_Value := TRUE; // Optionally string can be handled separately, maybe we have received STRING(255), but practically it is shorter than 80 bytes... TYPE_CLASS.TYPE_STRING : pStr := anyValue.pValue; diSize := MIN(anyValue.diSize, LEN(pStr^) + 1); // Get the actual size, and rewrite the received structure member diSize := MIN(SIZEOF(_Data), diSize); // Can chop down the received string to our length... SET_Value := TRUE; // Maybe want to play a little bit more here, to narrow down or convert datatypes, etc... // Or just reject any other datatype ELSE SET_Value := FALSE; RETURN; END_CASE // Fail, if the received value is still larger than our container... IF diSize > SIZEOF(_Data) THEN SET_Value := FALSE; END_IF // Here we should be ok, just set up the _DataType structure, and copy store the data IF SET_Value THEN THIS^._Descr.TypeClass := anyValue.TypeClass; // The typeclass is already filtered THIS^._Descr.diSize := diSize; // Set the (adjusted) size THIS^._Descr.pValue := ADR(_Data); // This will not change, just to be sure {IF defined (pou:SysMem.SysMemCpy)} SysMem.SysMemCpy(_DataType.pValue, anyValue.pValue, TO_UDINT(anyValue.diSize)); {ELSE} // An ugly replacement MemCpy FOR I:=0 TO diSize - 1 DO _Descr.pValue[I] := anyValue.pValue[i]; END_FOR {END_IF} // Otherwise, in case of failure maybe better set an empty value (overwrite the former data descriptor) ELSE THIS^._Descr.TypeClass := TYPE_CLASS.TYPE_NONE; THIS^._Descr.pValue := ADR(_Data); THIS^._Descr.diSize := 0; END_IF METHOD GET_Value : BOOL VAR_INPUT anyValue : ANY; END_VAR VAR I : DINT; END_VAR // We just have to serve the data, using the __System.AnyType structure received // Roughly we can say: IF anyValue.TypeClass = _Descr.TypeClass AND anyValue.pValue <> 0 // This should not be possible, already taken care of by Codesys (?) THEN {IF defined (pou:SysMem.SysMemCpy)} SysMem.SysMemCpy(anyValue.pValue, _DataType.pValue, TO_UDINT(MIN(anyValue.diSize, _Descr.diSize))); {ELSE} // An ugly replacement MemCpy FOR I:=0 TO MIN(anyValue.diSize -1, _Descr.diSize - 1) DO anyValue.pValue[I] := _Descr.pValue[I]; END_FOR {END_IF} // Just to make sure, that our string is terminated... IF anyValue.TypeClass = TYPE_CLASS.TYPE_STRING THEN anyValue.pValue[anyValue.diSize -1] := 0; END_IF GET_Value := TRUE; RETURN; END_IF // ... But can play more CASE anyValue.TypeClass OF TYPE_CLASS.TYPE_WSTRING : ; // Could do conversion TYPE_CLASS.TYPE_XSTRING : ; // Wow, I have to figure this out TYPE_CLASS.TYPE_PARAMS : ; // BTW, what is this, how to use? TYPE_CLASS.TYPE_ANYNUM : ; // ... END_CASE Be careful it was not tested. I'm sure can be done better, please feel free to comment 3. If you really want to do entries with variable size In a standard environment, it would be similar to the previous, except you dont have the container variable _Data, just use a pointer, practically _Descr.pValue At Initialize (SET_Value), you have to allocate the memory, would be easy with SysMem.SysMemAlloc - nowadays with SysMem.SysMemAllocData -, and you make sure to release it after use with SysMem.SysMemFreeData... SysMemAlloc was already hidden. The problem with this, that sooner or later your application will totally fragment the dynamic memory, and fail... So should look for some form of dynMaybe MemUtils.MemoryManager (I am not sure what is the status and the future of it). 4. You will end up by a LogEntry Factory ... 5. You could still have a look at this IEC Snippets BTW, Standard Codesys Logger is not a bad choice either. If you are really interested, I share some more code / library.
Last updated: 2025-03-09

Post by jari-koivuluoma on Problem trying Net Base Services 3.5.15.0 TCP connection CODESYS Forge talk (Post)
I have a need to send messages between 2 PLCs and I cant use network variables (because of size limit) so I tried writing this simple test program. This seems to work fine. I can send messages back and forth when a first "Start server" and then "Connect client". See the attached image. However, if I disconnect the client by setting ClientConnect to false and try to re-connect then the TCP_Client just gives me TIMEOUT error. When I stop and start the server again, then Im able to reconnect. How is this supposed to work? Why reconnecting wont work. There is not other way of disconnecting the client than setting xEnable of the TCP_Client to false. This is just a testing program and I will try it on 2 seperate devices once this works. PROGRAM PLC_PRG VAR CONSTANT mySize : UDINT := 255; END_VAR VAR Server: NBS.TCP_Server; ServerIpStr: STRING := '127.0.0.1'; ServerIP: NBS.IP_ADDR; ServerPort: UINT := 50000; ServerConnection: NBS.TCP_Connection; Client: NBS.TCP_Client; ServerRead: NBS.TCP_Read; ServerWrite: NBS.TCP_Write; ServerSend: STRING(mySize); ServerReceive: STRING(mySize); ServerConnect: BOOL; bServerSend: BOOL; IP: NBS.INADDR; ConnectedClientIP: STRING; ClientPort: UINT := 50000; ClientIpStr: STRING := '192.168.1.49'; ClientIP: NBS.IP_ADDR; ClientRead: NBS.TCP_Read; ClientWrite: NBS.TCP_Write; ClientSend: STRING(mySize); ClientReceive: STRING(mySize); ClientConnect: BOOL; bClientSend: BOOL; Error: BOOL; Message: BOOL; END_VAR // Server ServerIP.sAddr := ServerIpStr; Server( ipAddr := ServerIP, uiPort := ServerPort ); ServerConnection( xEnable := Server.xEnable, hServer := Server.hServer, ); IP := ServerConnection.IPAddress; ConnectedClientIP := F_Concat7( BYTE_TO_STRING(IP.S_un_b.s_b1),'.', BYTE_TO_STRING(IP.S_un_b.s_b2),'.', BYTE_TO_STRING(IP.S_un_b.s_b3),'.', BYTE_TO_STRING(IP.S_un_b.s_b4)); ServerRead( xEnable := ServerConnection.xActive, hConnection := ServerConnection.hConnection, szSize := SIZEOF(ServerReceive), pData := ADR(ServerReceive) ); IF ServerRead.xReady AND ServerRead.szCount > 0 THEN Message := TRUE; END_IF IF ServerRead.eError > 0 THEN Error := TRUE; END_IF ServerWrite( xExecute := ServerConnection.xActive AND bServerSend, hConnection := ServerConnection.hConnection, szSize := LEN(ServerSend)+1, pData := ADR(ServerSend) ); IF ServerWrite.xDone THEN bServerSend := FALSE; END_IF IF ServerWrite.eError > 0 THEN Error := TRUE; END_IF // Client ClientIP.sAddr := ClientIpStr; Client( xEnable := ClientConnect, ipAddr := ClientIP, uiPort := ServerPort, udiTimeOut := 10000000 ); ClientRead( xEnable := Client.xActive, hConnection := Client.hConnection, szSize := SIZEOF(ClientReceive), pData := ADR(ClientReceive) ); IF ClientRead.xReady AND ClientRead.szCount > 0 THEN Message := TRUE; END_IF IF ClientRead.eError > 0 THEN Error := TRUE; END_IF ClientWrite( xExecute := Client.xActive AND bClientSend, hConnection := Client.hConnection, szSize := LEN(ClientSend)+1, pData := ADR(ClientSend) ); IF ClientWrite.xDone THEN bClientSend := FALSE; END_IF IF ClientWrite.eError > 0 THEN Error := TRUE; END_IF
Last updated: 2024-10-03

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 janderson on OPC UA Server limitations, large array crashes runtime CODESYS Forge talk (Post)
What are the limitations of the OPC UA Server? I am trying to get data off my PLC that is acquired at high rates (~50k samples/s) so I am storing them in arrays and trying to get the arrays off the PLC. When I attempt to read a ~200k element array through OPC UA the server and runtime crashes (requiring tools -> update linux arm64 -> start runtime). Is there a better way to get highspeed data off? The ACDatalog library seems a bit irritating to use so I would prefer to go through OPC UA.
Last updated: 2023-08-23

Post by rringo on Function block not autofilling CODESYS Forge talk (Post)
I am attempting to place a block and make it an Analog sensor. When I go to change the name like in the instructional video on youtube it does not give me an option to autofill the block with a known configuration. This is a problem I have in Codesys 2.5 and 3.5. Did I mess up the install of the program or need to install a library? Any help would be appreciated. https://www.youtube.com/watch?v=PkJYQeIUmIM&t=136s at time mark 2:15ish The first image is what I can do and the second is what the videos function autofills to.
Last updated: 2023-08-24

Post by manuknecht on Specify Input Configuration "OnDialogClosed" Action to only react to certain Dialogs CODESYS Forge talk (Post)
I have a project with several buttons and dialogs. Most of the dialogs are opened using the Open Dialog action of the Input configuration of the buttons. Some dialogs are openend using the FbOpenDialogExtended FB of the Visu Utils library and the FbOpenDialogExtended FB is called in the Execute ST-Code action. I am also using the FileOpenSave dialog from Visu Dialogs which requires an OnDialogClosed action to read out. I realized that the OnDialogClosed action which is meant for the FileOpenSave dialog also triggers if a dialog is closed, which was previously openend using the FbOpenDialogExtended FB. Is there a way to detect which dialog was closed last and specify to which dialogs the OnDialogClosed action reacts?
Last updated: 2023-09-20

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 royw on Profinet Library für C# CODESYS Forge talk (Post)
Hallo, ich weiß nicht ob ich hier richtig bin und ob es überhaupt möglich ist ... Ich suche eine Möglichkeit ein Profinet Device mit Record Read und Write anzusprechen. Eigentlich brauche ich nur sehr wenige Kommandos um unser Device zu konfigurieren. Das bedeutet setzen der MAC Adresse und einer Seriennummer. Das würden wir gern aus einem C# Programm herus machen. Nun sind wir auf der Suche nach einer Bibliothek o.ä. . Da man es ja auch aus Codesys heraus machen, dachte ich mir, gibt es eventuell eine DLL o.ä. die man dafür nutzen könnte. Wie gesagt wir wollen keine Realtime Abfragen der zyklischen Daten sondern lediglich Record read/write. Hat da jemand einen helfenden Hinweis ? Schon mal vielen Dank im Voraus
Last updated: 2023-12-22

Post by mohammadasif on Blink Function definition is wrong in codesys online help CODESYS Forge talk (Post)
https://content.helpme-codesys.com/en/libs/Util/Current/Signals/BLINK.html in the above link, please correct your website the following: "Output value, starts with FALSE and switches between TRUE and FALSE for the given high and low times" it should actually be: "Output value, starts with TRUE and switches between TRUE and FALSE for the given high and low times" if not please let me know if this has changed in a util library update, in your older website it has the right definition here: https://help.codesys.com/webapp/blink;product=codesys;version=3.5.11.0
Last updated: 2023-12-28

Post by fdmartello on Unable to compare projects containing alarm manager 4.5.0.0 CODESYS Forge talk (Post)
Hello. In Codesys version 3.5.19.50 when comparing two projects that have an "Alarm Configuration" obj from the Alarm Manager library vers. 4.5.0.0 the attached error pops up. This originally happened with two projects that I converted from vers. 3.5.17.30 so, thinking it was some conversion issue, I created two clean projects directly in 3.5.19.50 using the Standard Project template and only added the Alarm Configuration objects in them. The result is the same and the only way I found that allowed me to compare them is by deleting the incriminated object in one of the two projects. Has anyone else encountered this issue? Best regards
Last updated: 2024-01-19

Post by ewi04 on How to upload application file to remote controller (offline) ? CODESYS Forge talk (Post)
Hi, I am looking for a good way to update a decice remotely. The devices are distributed worldwide and have normally no connection to the internet. The CODESYS Automation Server can't help here. So I want to update the decices via USB stick. I have written my own code* to update the files that are created with ‘Create boot application’. But sometimes strange things happen: visu elements are present, but are not found the application is no longer registered and therefore no longer starts I have not yet found out why these errors occur. Has anyone had similar problems or found a better way? Is there perhaps a CODESYS library or something else? Many thanks! *the code deletes the directories on the device and copies the new directories from the USB stick while the system is running (goes without saying)
Last updated: 2024-02-05

Post by alexgooi on Codesys licensing explanation CODESYS Forge talk (Post)
Dear Forum, We are currently switching to a native Codesys controller, and I'm currently trying to determine the correct license. I have a question regarding the Modbus instances. With the Standard S license this is set to 4 (See picture). In our projects we are using a lot of communications to Modbus servers using a Codesys Controller, for this communication I'm using the ModbusFB library (supplied by 3S) (see picture). In my project I would like to use more than 4 instances of the ClientTCP FB. My question is, is this now capped at 4 possible connections with the standard S license. Or do these function blocks have a different relation with the license? Some clarity on this topic would be very welcome. Thank you in advance
Last updated: 2024-02-15

Post by ac-spr on Runtime variable that indicates a user is online to the code CODESYS Forge talk (Post)
Looking to access a variable at runtime that indicates a user is online to the code. essentially want to use this value to feedback to the user on the HMI. we use turck and bosch rexroth devices if this information helps. I was hoping there was a variable at the application level, or a library that could be used but I was unable to find anything. I know there's a pop up when you try to login/ go online to the code when a user is already logged in, so the system does provide an indication that it knows already online, but has no access to a value from what I can see. Any help is appreciated
Last updated: 2024-04-22

Post by matt-purcell on Which Lib to use, connect to a socket with URL instead of IP address CODESYS Forge talk (Post)
Hello, I have a new project and I need to connect to a TCP socket using the URL instead of an explicit IP address, myendpoint@mydomain.com Which library is best suited for this? This is for a new enterprise project, the endpoint is a server in a datacenter running some real time application. We have big IP, it will automatically reassign the IP address to the backup server if a crash occurs so an explicit IP won't work for me. I've done this in RS logix, working now to migrate that code over to codesys. Thanks in advance!
Last updated: 2024-06-17

Post by lorenzo-pisoni on SysProcessExecuteCommand CODESYS Forge talk (Post)
Hello, I'm encountering an issue with the Sysprocess library while attempting to execute commands to transfer a file from a NAS to my PLC. Currently, I'm trying to test a simple "reboot" command, but it doesn't work as demonstrated in this video: https://youtu.be/77c7Af5xRhE?si=uFZdB6fTNQitzWMQ. I'm using CODESYS V3.5 SP18 Patch 4 (3.5.18.40). From other sources, I've learned that to enable the PLC to execute commands, I need to add the following line to the file CODESYSControl_User.txt: [SysProcess] Command=AllowAll However, the issue I'm facing is that this file doesn't exist on my CPU. I have full SSH access and can see all files, but only CODESYSControl.txt is present. Adding the command to CODESYSControl.txt hasn't resolved the problem.
Last updated: 2024-07-11

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

Post by drml on How to implement an interface (IElement)? CODESYS Forge talk (Post)
I'm struggling with the implementation of the IElement interface (in the ElementCollections library), which I will use to create a SortedList. I created a class (FB) "Device" that implements this interface and that has a "Priority" property that I want to use in order to compare the devices in my implementation of the ElementCompareTo method. Unfortunately, the IElement.ElementCompareTo method needs an IElement as an input, which doesn't know about the "Priority" property of "Device". I tried to define the input itfElement as a Device, but then it doesn't want to compile, because the type in the implementation doesn't match the interface.
Last updated: 2024-07-19

Post by toffeebonbon on EL7041-0052 - does it run with EL7041 SoftMotion? CODESYS Forge talk (Post)
I let this project rest for a while and picked it up last week. I have been in contact with the support from beckhoff and got the information that the terminals were identical (communication wise). As the Log of the Axis (not the drive's log) shows the error when trying to write into the register 0x8012 and set the value for an encoder to a value that is the default - at least according to the manual - I was wondering if it is possible to "not write that value" to skip that part? Or am I misunderstanding the way the library communicates with the drive?
Last updated: 2024-07-24

Post by expertplas on No connection to opc server from codesys opc client CODESYS Forge talk (Post)
Hello, we have aproblen to connect our CODESYS OPC Client to the OPC Server. We installed the client according the CODESYS manual. We can browse the server and variables can be linked to the PLC. I created a self signed certificate for the CmpOPCUAClent as described. The server has a cerificate also. I copied the certificates to the trusted zone of server and client. But when it comes to data exchange we get an error message. "Communication error in data source OPC UA Library. Error ID : 7001 German : "Kommunikatinsfehler inder Datenquelle OPC UA -Bibiothek. Es wurde kein genauer Fehler angegeben. Fehler ID : 7001" It semms that there is no cerificate exchange. We are working with CODESYS 3.5 SP19 Patch 5. Can anyone here say something about this error or has an idea for a solution? Thanks.
Last updated: 2024-08-19

Post by c3po on SNMP Communication with WAGO 750-8212 PFC CODESYS Forge talk (Post)
Hello folks, my problem is a bit bigger for just one question. So let's start with the easiest. But first, my system setup: It's a WAGO 750-8212 PFC with some I/O-modules. I try to communicate with the controlsystem over SNMP using the IIoT library from codesys. https://content.helpme-codesys.com/de/CODESYS%20Examples/_ex_iot_snmp_service.html Is there some expirience with this kind of communication? It's just about transfering some data from PFC to network and setting some analogsettings from network to the PFC. So my easiest question: Do I ever need the SNMP_Agent or can I use the SET / GET function as standalone, without the agent? (maybe some more questions will follow, if someone will answer to my request) thanks so far
Last updated: 2024-08-21

Post by micik on Reverse bytes in an array CODESYS Forge talk (Post)
Hello, I'm getting the data in Codesys that is an array of 8 bytes. From this array, I need to foram LREAL number, however, because of different endiannes I need to reverse bytes in this array and then copy to a LREAL variable. For this I'm using a loop and it works OK. I wonder if there is a built in function to do this. I have found CAA Memory library but it has functions like reverse bytes in DWORD. But it seems it doesn't have what I need. https://content.helpme-codesys.com/en/libs/CAA%20Memory/Current/CAA_Memory/Reverse-Bit-Swap-ByteWord-order/ReverseBYTEsInDWORD.html What I need is a function to reverse bytes in an 8 byte array, or something similar.
Last updated: 2024-08-22

<< < 1 .. 33 34 35 36 37 38 > >> (Page 35 of 38)

Showing results of 939

Sort by relevance or date