Search talk: visu registration in the plc failed

 
<< < 1 .. 167 168 169 170 171 .. 262 > >> (Page 169 of 262)

Post by timvh on When Keyboard Key is in Hold, then Webvisu is extreme slow and latent CODESYS Forge talk (Post)
I'm not really sure what you are trying to do, but maybe you are referring to using the CmpCharDevice library? When you "open" the connection to a device, you can pass flags. What helped me is to set the non-blocking flag. I'm not sure if this is what you are referring to, but maybe it helps: dFlags: DINT := CmpCharDevice.ACCESS_MODE.O_RDONLY + DINT#4000; // see details for flags: http://linux.die.net/man/2/open, + DINT#4000 is for non-blocking hDevice := CmpCharDevice.CDOpen(szFilename, dFlags, Result);
Last updated: 2023-09-20

Post by martinlithlith on Raspberry Pi: List of available drivers / libraries CODESYS Forge talk (Post)
As most of the posts are moved here around 2015, what would be the right version of codesys to run? Would it be better to install a older version of codesys or should i keep on downgrading libraries? Is there any work done to update theses libraries? ItΒ΄s been a few years since the last update in this post, are there new libraries/devices for raspberry being added/posted somewhere else? Thanks, Martin
Last updated: 2023-10-17

Post by simotion on Inheritance of axis CODESYS Forge talk (Post)
I have developped a function block 'Axis' the inherits from 'AXIS_REF_SM3' -> FUNCTION_BLOCK Axis EXTENDS AXIS_REF_SM3 In my global variable list I define a variable MasterDrive of type Axis and assign Axis1. Axis1 is a virtual drive (AXIS_REF_VIRTUAL_SM3). This type should inherit from AXIS_REF_VIRTUAL. VAR_GLOBAL MasterDrive : Axis := Axis1; However I get the error 'Cannot convert type'. What is the way to obtain what I want : function block inheriting AXIS_REF_SM3 and initialising this function block with a Softmotion virtual or real axis?
Last updated: 2023-12-07

Post by simover on TCP/IP client CODESYS Forge talk (Post)
I want to send a string to a tics TCP/IP server. I got i working with the Net Base lib. for communication good with this tcis i need to by array of byte I want to include a string in the third position of the array TCIS_Send[1] :=254; //this valus is fix for evry communication TCIS_Send[2] :=80; //this valus is fix for evry communication TCIS_Send[3] := ; here I put my and my string is lik this 5806509-DRAP10#AB#3452302073 TCIS_Send[4] :=252; //this valus is fix for evry communication
Last updated: 2023-12-18

Post by tvm on SEND_RECV_MSG function block on Schneider Machine Expert CODESYS Forge talk (Post)
Anyone else using the SEND_RECV_MSG function block for RS-485 communication on Schneider Machine Expert? I have had ongoing issues with it for several years, which Schneider tech support is aware of, but hasn't been able to fix. The latest version of Machine Expert (v2.2) appears to have broken some of the functionality altogether. I'd be interested in hearing from anyone else using this platform for serial communication.
Last updated: 2024-01-03

Post by toby on Codesys Control Raspberry PI 4.10.0 - missing 'Update Raspberry PI' option CODESYS Forge talk (Post)
Hi Edwin, Thanks for the message. My apologies I should have researched this more thoroughly before posting on here. I found a solution to my issue on this post: https://forge.codesys.com/forge/talk/Runtime/thread/6455efaa17/ I needed to run the 'CODESYS Installer' as an Admin, then install the RPi package v4.10.0 in to my package (v3.5 SP19 Patch 5). Thanks, hope you have a good day. Toby
Last updated: 2024-01-09

Post by sturmghost on Visualization using methods and cyclic ST-calls CODESYS Forge talk (Post)
I found a way to do it: You can use, for example, the text variable property of any visualization element and call a function in it. Example: Write a test POU as a function (FUN), like MyTestFun which need a boolean Variable as an input value. Now write into the text variable property: MyTestFun(bBooleanValue) Thats it. The function is called at each visu_task cycle.
Last updated: 2024-01-22

Post by takashi on CODESYSControlWinCE Crash CODESYS Forge talk (Post)
Hey all CODESYS-experts. I'm at a customer site, and we hade a power-failure and one of the devices apparently runs codesys and has crashed. It's an old device (out of warranty) that is bought many years ago. Now this device doesn't seem to boot. Any idea what to do in this case? We have access to the drive so we have access to the files. See screenshots.
Last updated: 2024-01-23

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 ferrim on IEC 61499 CODESYS Forge talk (Post)
IEC 61499 is probably something more complex than what you have correctly said so the prospects are interesting but we cannot ignore that it came out almost 20 years ago and has not won many hearts. I started to explore this world with a PLCnext controller because I love these devices based on RT Linux and Codesys is somehow usable with them but I have made little progress and I feel like inside a nutshell in the middle of the sea ;-) Gary's voluminous and precious book is always on my desk...
Last updated: 2024-02-10

Post by kleeswi on SysFileOpen does not work after update to V3.5 SP19 Patch 5 CODESYS Forge talk (Post)
I use the function SysFile.SysFileOpen(sFileNamePara, SysFile.ACCESS_MODE.AM_WRITE, pErrorFileOpen); to open and write a file. Since the update from Codesys V3.5 SP17 to V3.5 SP19 Patch 5 it does not work anymore. I first had SysFile.SysFileOpen(sFileNamePara, SysFile.ACCESS_MODE.AM_APPEND_PLUS, pErrorFileOpen); in both versions. hFile_Test is a pointer to byte. It gives an exceptional error when dereferencing the hFile_Test pointer. Edit: I use Codesys on a Raspberry pi
Last updated: 2024-02-19

Post by richard-wang on Codesys recipe manager - what does it do? CODESYS Forge talk (Post)
Hi All Thanks for sharing this information. For whom may not know why always get error code 16#4000 or 16#4002 while performing Recipe commands, the root cause is There is a line need to be inserted in CODESYSControl.cfg file, which is PlaceholderFilePath.1=/var/opt/codesys/PlcLogic/ I am using Pi, therefore the above path is set to my pi unit, after adding above line to my cfg file, all the Recipe commands work fine. But I still do not know how and when this file got modified though.
Last updated: 2024-04-29

Post by wiresplus on Display minutes as hours & minutes CODESYS Forge talk (Post)
Hello, I have a counter that increments an INT value once per minute I want to display this value in Minutes until 60, then Hours/Minutes thereafter on the HMI Codesys V3.5 SP16 I can divide the minutes by 60 to get hours, but then the minutes is still more than 60. Example: a process has run for 350 Minutes. I need to display "5 Hours 50 Minutes" But if it's only been 45 Minutes, I don't want "0 Hours 45 Minutes" , just "45 Minutes"
Last updated: 2024-05-25

Post by kris-samoy on Get Alarm status in Codesys CODESYS Forge talk (Post)
I am rather new to Codesys and I'm trying to figure out how to get the status of an alarm. This to interlock the start of a device until the alarm has been acknowledged... I am not sure if IAlarm.GetState (METH) can be used for this purpose. If yes then could someone please briefly explain how to use this? https://content.helpme-codesys.com/en/libs/AlarmManager/4.1.0.0/Interfaces/pou-IAlarm/GetState.html Thx & grtz, Kris
Last updated: 2024-06-03

Post by mozed on Bug Device login CODESYS Forge talk (Post)
Good morning, The problem I encounter is very disturbing, when I try to connect to my project, it asks me to put in my username and password, which I do. However, I cannot connect and it restarts. the window to rewrite my identifiers. However it is the correct identifier and password I do not understand why. When I try to put false identifiers there strangely it tells me that these are not valid identifiers. There is something what can I do? Sincerely
Last updated: 2024-06-11

Post by trusty-squire on How to adapt Codesys Control SL to custom board CODESYS Forge talk (Post)
For general usage, these links might help you out. If you are looking at using I2C interfaces, examples from the Raspberry Pi will probably be useful, even if your board isn't a Raspberry Pi. https://content.helpme-codesys.com/en/CODESYS%20Examples/_ex_rts_serial_com.html https://content.helpme-codesys.com/en/CODESYS%20Examples/_ex_raspberry.html If you're developing your own drivers, I can't help you there, although the link you provided will help. If you drill in deeper, the I2C page for example shows function block and method usage, etc. Good luck!
Last updated: 2024-08-09

Post by andre-luis on Device diagnosis ( EtherCAT IO card ) CODESYS Forge talk (Post)
Hi, In our project, it is not rare to have I/O cards issues. I wanted to have a way to check their statuses ( Eg. INIT, OP, PREOP, etc.. ) I was trying to use the GetDeviceDiagnosisInfo method from the IoConfig_Globals, but there is no info available on the Web with a simple example; does someone have a link to some tutorial or anything else ? Kind Regards, Andre.
Last updated: 2025-02-06

Post by darko7417 on When running as a service, CodesysControl doesn't write log files to the disk (and other CmpLog related issuess) CODESYS Forge talk (Post)
Wow! Thanks mr Strucc. Changed to service to run as local acc, and now log works! The service (run from local acc) is using this config: C:\Users\SRV\AppData\Roaming\CODESYS\CODESYSControlWinV3\C4DBB537\CODESYSControl.cfg The path you first mentioned (c:\Windows\System32\config\systemprofile\AppData\Roaming) has no CODESYS folder in it (Windows 11 24H2 b26100.3194). Thanks for your help :)
Last updated: 2025-03-06

Post by nz-dave on ethercat softmotion axis error CODESYS Forge talk (Post)
Hi all I'm having a little trouble get my axis to work. i can turn them off and on. i can run each servo manually inputting directly to the mapping address. as soon as i try to use any FB's like jog etc my servos wont move and error out. so far I've had error "SMC_ERROR.SMC_DI-POSITIONLAGERROR" and another one about not calling a fb. cheers. in the attachment I have just jogged X_Axis with the MC_JOG FB
Last updated: 2025-03-10

Post by dkugler on Beckhoff EL6652-0010 with Codesys CODESYS Forge talk (Post)
we use successful for many years the KEB MFI terminal for Profinet, EtherCAT, Ethernet/IP,... You'll need a EtherCAT Coupler as "head" from KEB, Kendrion or Berghof. It's all the same board inside: https://www.kebamerica.com/products/ethercat-bus-coupler/ Or the coupler with 16Di/Do integrated: https://www.kebamerica.com/products/ethercat-digital-io-module/ last year I got a EK1100 with EL6731 Profibus treminal runnig. But it was a lot of reverse engineering and thinkering in Codesys and TwinCAT to be done, to get it up, fulfilling my needs. Good luck!
Last updated: 2025-03-25

Post by nz-dave on sysfile- transfer file to pc CODESYS Forge talk (Post)
Hi Trying to send csv file to c:\data\xxx.csv Im able to save to plclogic and after doing this https://forge.codesys.com/forge/talk/Runtime/thread/5cac1390b4/ i can now "file transfer" to host pc downloads. but still cant transfer to c:\ im sure i have done this in the past with older versions of the 3.5 ide? just concat the file name as c:\data\My_Filename.csv. any ideas? cheers
Last updated: 2025-04-23

Post by vsgn on Passing properties as VAR_IN_OUT variables. CODESYS Forge talk (Post)
Hi, in my experience, the best options for such a case could be: 1. Pass a FunctionBlock via VAR_IN_OUT, containing all variables, mehods and properties needed for the logic of this graphic element (be aware of implementing correcly both get and set accessor for properties) 2. Pass an Interface via VAR_INPUT, of which you can use obviously only Properties and Methods. This is much more elegant for me. Here, you can just pass directly the instance of a FunctionBlock implementing such Interface as input. Hope you'll find this suggestions useful.
Last updated: 2025-05-13

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 pierre123 on User management - User Tab missing CODESYS Forge talk (Post)
i had the same problem. Thanks you for the response.
Last updated: 2023-08-25

new feature: list/view plclogs from the plcs CODESYS Forge talk (Thread)
new feature: list/view plclogs from the plcs
Last updated: 2023-08-30

<< < 1 .. 167 168 169 170 171 .. 262 > >> (Page 169 of 262)

Showing results of 6531

Sort by relevance or date