Search talk: IF OR THEN

 
<< < 1 .. 29 30 31 32 33 .. 42 > >> (Page 31 of 42)

Post by micik on Download EtherCAT project on SoftPLC (ControlWin-V3 x64) CODESYS Forge talk (Post)
Hello, I have almost exactly problem already discussed here in this old thread: https://forge.codesys.com/forge/talk/Engineering/thread/03af9426eb/ However, this is quite old and I assume not completely relevant. In my case, I use v3.5.20 on windows 11, so Winpcap is no longer supported on newer OS. Also, this hint about adding entry to the .cfg file under ProgramFiles(x86) is also not relevant anymore. I guess, I need to add entry SysEthernet to this .cfg file: C:\ProgramData\CODESYS\CODESYSControlWinV3x64...\CODESYSControl.cfg like this one: [ComponentManager] Component.1=CmpTargetVisuStub Component.2=CmpWebServer Component.3=CmpWebServerHandlerV3 Component.4=SysCpuMultiCore Component.5=SysReadWriteLock Component.6=SysCpuBreakpoints Component.7=SysPipeWindows Component.8=SysEthernet But I'm not sure about Npcap vs WinpCap. Please, if applicable, update these instructions.
Last updated: 2024-08-08

Post by cfam on Codesys Control for PLCnext SL, Bus not running CODESYS Forge talk (Post)
Good day I would appreciate it if you can give me some advice on how to fix my "Bus Not Running Error". I am Using Codesys 3.5 SP20 and Codesys Control PLCnext SL V4.12.0.0. Codesys control was installed on the device and I can log into it but it seems that it does not pick up the PLC or the IO attached (Please see attached Image). The Bus Cycle Task of the AXL F 2152 is set to Main Task and the "Always update Variable" is Enabled on each IO Module. My Main Task interval is set to 100ms and Priority is set to 0. I have tried other options and none seem to work. Your response to this issue will be highly appreciated.
Last updated: 2024-08-12

Post by micik on Python scripting - print whole project tree CODESYS Forge talk (Post)
Hello, I have found a script for printing device tree in Codesys project. This script is available as code snippet as an exmaple for using Python in Codesys. However I feel main documentation is lacking. For example, where can I find that object has "is_device" attribute? Code examples are given here: https://content.helpme-codesys.com/en/CODESYS%20Scripting/_cds_access_cds_func_in_python_scripts.html However, I have a question how to print the whole Project tree and not just devices? Of course I need to remove check: if treeobj.is_device: But simply removing this test condition will not produce what I want. I need to print PLC Logic, Application, ad other nodes in the Project tree. Where to find this documentation?
Last updated: 2024-08-12

Post by cfam on Codesys Control for PLCnext SL, Bus not running CODESYS Forge talk (Post)
Good day I would appreciate it if you can give me some advice on how to fix my "Bus Not Running Error". I am Using Codesys 3.5 SP20 and Codesys Control PLCnext SL V4.12.0.0. Codesys control was installed on the device and I can log into it but it seems that it does not pick up the PLC or the IO attached (Please see attached Image). The Bus Cycle Task of the AXL F 2152 is set to Main Task and the "Always update Variable" is Enabled on each IO Module. My Main Task interval is set to 100ms and Priority is set to 0. I have tried other options and none seem to work. Your response to this issue will be highly appreciated.
Last updated: 2024-08-12

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 Ethercat project loaded to Win V3 x64 bit SoftPLC CODESYS Forge talk (Post)
Hello, I have almost exactly problem already discussed here in this old thread: https://forge.codesys.com/forge/talk/Engineering/thread/03af9426eb/ However, this is quite old and I assume not completely relevant. In my case, I use v3.5.20 on windows 11, so Winpcap is no longer supported on newer OS. Also, this hint about adding entry to the .cfg file under ProgramFiles(x86) is also not relevant anymore. I guess, I need to add entry SysEthernet to this .cfg file: C:\ProgramData\CODESYS\CODESYSControlWinV3x64...\CODESYSControl.cfg like this one: [ComponentManager] Component.1=CmpTargetVisuStub Component.2=CmpWebServer Component.3=CmpWebServerHandlerV3 Component.4=SysCpuMultiCore Component.5=SysReadWriteLock Component.6=SysCpuBreakpoints Component.7=SysPipeWindows Component.8=SysEthernet But I'm not sure about Npcap vs WinpCap. Please, if applicable, update these instructions. I hope it is still possible to
Last updated: 2024-08-22

Post by gilbertamine on Comparing Arrays of structure CODESYS Forge talk (Post)
Hi Everybody, I'm looking for a simple way of comparing two array of a structure. My structure is define like this : TYPE Positions_T : STRUCT PosX: DINT; PosY: DINT; PosZ: DINT; END_STRUCT END_TYPE I have multiples Var : ARRAY [0..220] OF Positions_T, that I need to compare quickly. I don't really want to do a Loop that goes by every 220 points and compare each one of them so I was wondering if there is another way. I came accross the MEM.Compare function, but it require to know the size in Bytes of the memory, and I don't know how to do that... Has anybody an idea on how to do the comparing easily ? Thanks in advance
Last updated: 2024-08-22

Post by yannickasselin on codesys VLAN tagging CODESYS Forge talk (Post)
Hi, I am looking for exactly the same thing. I would think that using a layer 2/3 managed switch should work but I am not convinced. I would like to test it in order to see if it would be possible to run many Codesys Docker instances on a server and run only 1 ethernet cable from the server to a managed switch closer to the machines beeing controlled instead of having to run multiple long ethernet cables. I was going to buy a managed switch in order to test it but I want to first make sure it is possible and I want to figure out exactly what kind of switch I would need. Is this even possible? I think this is a feature that would be very useful paired with "Codesys Virtual Control SL". Thank you
Last updated: 2024-09-07

Post by shabroz-gill on Exception when OPCUA datasource disconnects from Server CODESYS Forge talk (Post)
If i loose the network and the opcua data source suddenly looses connection with the server, i get an exception and my application stops working. I am using the latest version of the communication add v4.5.2.0 Is this a known issue? This makes the datasource unusable because it is inevitable that we will loose connectivity at some point, and the datasource crashing everything due to that seems to be a deal breaker. I can provide more details is someone from codesys is reading this. You can recreate is by just shutting off the Opc server after the codesys data source is connected and reading data from it. The codesys app does not crash everytime and sometimes it is able to reconnect without crashing, so you may have to try this a few times to see the exception. Best regards
Last updated: 2024-09-16

Post by wbj0t on Raspberry Pi CM4. CoDeSyS files corrupted after hard reset. CODESYS Forge talk (Post)
Hello everyone. Raspberry Pi CM4 after some 1 week of work was hard reset mannualy several times and after these hard resets User Management file was missed (when click login button, enter login/password, error: User Management File missed). Also programm can not open file via SysFile library, but this file exists and size of him is 0 bytes, but must be more any way (I keep some kind of archive via this lib). What happens, how files corrupted? Where do I need try to find this error of the codesys or system whole? In the log files of codesys nothing interesting about this happens. Thanks for reading Is this enough hold PlcLogic and SysFileMap.cfg as reserve copy in another place for restoring the programm? And how automate restoring actions if programm files corrupted?
Last updated: 2024-09-16

Post by jari-koivuluoma on Newly created texlists wont appear in the selection dropdown CODESYS Forge talk (Post)
When I create a new textlist in Codesys 3.5 SP19 Patch 5, it wont appear in the dropdown menu at Rectangle element > Dynamic texts > Text list. If I just type the name of the textlist to the field (in quotes), I get an error saying that some file is missing. Any good ideas what to do and what is going on. I recently updated to that version and I only now noticed this when I needed to add a new textlist so Im quite screwed with this not being able to add text lists. While im typing this, I tried copying an existing list and modifying it and it seems to show. Any ideas?
Last updated: 2024-09-19

Post by davidbo on RPI can system operation like rm in a shell have an impact on a Task cycle time CODESYS Forge talk (Post)
I have noticed that a rm file1.txt command on a shell has an impact on the cycle time for a TASK writing to file2.txt. Seen in the Monitor fane of the Task configuration Furthermore if a TASK makes a system call like rm, its cycle time increases of course but it seems to have an invisible impact on other TASKs too. I have a TASK for handling communication over the CANbus (SPI) where it stops sending "Heartbeats" for many seconds when another TASK does a system rm. Why is that not seen on the Monitor fane? Is even codesyscontrol paused when system calls are made? The CPU load is about 30-40%
Last updated: 2024-09-23

Post by pernockham on Linking to IO during runtime with hot swap? CODESYS Forge talk (Post)
I have a project where a single PLC shall control multiple nodes (up to 10 units?) with IO connected through profinet. Ideally each node should be identical however with time I see situations were different setups/configurations will be used. Codesys PLC (GVLs) |Profinet | |--PNIO-node-1--| | | AIO, | | DIO, | | CNT etc. | |--PNIO-node-2--| | | AIO, | | DIO, | | CNT etc. Ideally I think of a configuration through yaml/xml-files (the assignment/linking of the profinet nodes towards GVL-variables in the PLC as well as scaling, channel configration etc.). Would be grateful if someone could suggest library/-ies that can handle the following: - Verify what IO is connected to a device/node. - Hot-swap/assign link for IO towards GVLs, either automatically or through a HMI.
Last updated: 2024-10-11

Post by timvh on Modbus TCP & RTU with Control for Linux SL CODESYS Forge talk (Post)
RS485 doesn't seem very logical to use in VPLC's in my opinion. I also don't know if this is supported.... But for TCP/IP, I think you still need to configure the Nic settings. See the attached png. In my case enp6s0. When changing this setting, restart the VPLC. What is really nice, is that you don't have to configure the IP address setting in Linux. By setting the Nic to a certain IP address in the CODESYS instance configuration, this is automatically done for you. I only tested this with EtherCAT, but I guess this works the same for Modbus TCP/IP.
Last updated: 2024-10-23

Post by struccc on HTML5 Controls - string(>80) values CODESYS Forge talk (Post)
Dear all, does anyone have experience with HTML5 controls recently? CODESYS 3.5.20.30 / Visualization 4.6.0.0 I'd like to create a simple lightweight text editor, with proper multiline handling, cut & paste, scrolling, etc. And it seems to work fine, just have problems with strings longer than 80 bytes.... Declaring a variable sText1 : STRING(8000) and referencing it in the HTML5 Controls corresponding value property works perfectly one way: the code receive the data as a string (See log1)... (Note TypeID 1000...) Also sending back the data (seems to work (See log2) except it doesn't change the value of the bound variable. Probably the issue is with using SendSimpleValue method... Naturally, I could do a workaround, but maybe there is a more standard way to implement this... Please let me know if you have any suggestions.
Last updated: 2024-10-23

Post by niallel on CamBuilder and first boundary position not zero CODESYS Forge talk (Post)
Hi, I've read the CamBuilder documentation and it shows to use the left boundary of the first segment as SMCB.BoundImplicit(), so that the transition is as smooth as possible. With this it sets X and Y to 0. My first slave position is not 0 (say for example it's 100), so I would set it with SMCB.Bound(0,100). My question is that when the cam goes back to the start (Periodic := TRUE) , will it blend with the last position (360, 100) if I do this? I imagine it will, but the documentation isn't clear as the information in the Periodic Cams only says to set Smooth Transition in the cam properties - but when I'm defining it with code there isn't an option for Smooth Transition to be set. Hope this makes sense? Many thanks,
Last updated: 2024-10-23

Post by wistaro on How to use PLC_Open FBs with PROFINET servodrive (PROFIdrive layer) CODESYS Forge talk (Post)
Hello, I would like to know if there is a PROFIdrive layer in CODESYS. I am already familliar with Codesys's SoftMotion on CANOpen/EtherCAT (to control PLC Open FBs), and I need the same kind of stuff for PROFINET-IO devices; In my configuration, I have a CIFX board from Hischer to enable IRT, the SoftPLC "Codesys Control RTE V3 x64", and a servo-drive from INFRANOR that implements PROFINET / PROFIdrive (with IRT) protocol. This drive works well with the Object Technology of Tia Portal, but some customers use Codesys. Do you have an idea how to do that? Thanks in advance. Regards, William ROMIGUIERES INFRANOR France
Last updated: 2024-10-29

Post by acc00 on Redundancy Codesys Runtime, Synchronization CODESYS Forge talk (Post)
Hi, I’m currently testing the Codesys Redundancy application with 2 Raspberry Pi, with the idea is of using in my project 2 Wago PFC200 and 1 Ethercat Master with 2 Remote IO. After I configure the redundancy, and one Pi is Active and the other is Passive, if I disconnect the Ethernet cable of the Active, the Passive become Standalone, which is good, but the problem is the following: -When I recover the Ethernet connection, both stay Standalone. They will NOT Sync until I do it manually in the Codesys environment. How to make the synchronization automatically? -If both Pi/PLC stays Standalone, who is managing the IO? (Ethercat and Serial) I have done a test with an Modbus Slave, where I am sending a counter that increase every second. And I see that when both PLC are standalone, they both keep an active connection with the Slave, and both write values. This does not seem good, since according to this in my project both PLC would try to control the IO at the same time. Note: The Codesys have an option (greyed out, not possible to select) which says “Auto Sync”. What is the purpose, and why I’m not able to select it? I'm using Codesys Control for Rapsberry Pi 64SL Runtime in my test environment (2xRaspberry Pi 4), with the idea of using Codesys Control PFC 200 Runtime in my project (2xWago PFC200 and 1 Ethercat Master with 2x Wago 750-354 Ethercat Fieldbus Coupler). Using the last Codesys 3.5 version (SP19 PAtch 5). I'd appreciate a lot any help on this questions!
Last updated: 2024-01-22

Post by umdee on Error when monitoring LAD programs CODESYS Forge talk (Post)
I get the following error when monitoring my program (see attached screenshots): "Unhandled exception has occured in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately. Value cannot be null. Parameter name: source. And the details say: See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ** Exception Text ** System.ArgumentNullException: Value cannot be null. Parameter name: source at System.Linq.Enumerable.Any[TSource] (IEnumerable1 source, Func2 predicate) at _3S.CoDeSys.NWLEditor.NWLTextCell.OnPaintCellLayer(PaintEventArgs e) at _3S.CoDeSys.Controls.Controls.GfxEdControl.PaintCellCellLayer(PaintEventArgs e, GfxCell cell) at _3S.CoDeSys.Controls.Controls.GfxEdControl.PaintCellCellLayer(PaintEventArgs e, GfxCell cell) at _3S.CoDeSys.Controls.Controls.GfxEdControl.PaintCellCellLayer(PaintEventArgs e, GfxCell cell) at _3S.CoDeSys.Controls.Controls.GfxEdControl.OnPaint(PaintEventArgs e) at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer) at System.Windows.Forms.Control.WmPaint(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.UserControl.WndProc(Message& m) at _3S.CoDeSys.Controls.Controls.GfxEdControl.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) ** Loaded Assemblies ** (3000 lines of assemblies) ** JIT Debugging ** To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled. For example: <configuration> <system.windows.forms jitdebugging="true"> </system.windows.forms></configuration> When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box The windows show red X's where the networks should be. Any advice on how to fix this? Additional Information PLC used: Wago 750-8212, Firmware FW26 Startup profile: CODESYS V3.5 SP19 Patch 5 OS version: Microsoft Windows NT 10.0.22631.0 .NET version: 4.0.30319.42000 Full Version info attached as .txt
Last updated: 2024-03-17

Post by thysonfury on OPTO22 Groov Epic PR2 Modbus Comms Dropping out every 2 hours and 4 Mins CODESYS Forge talk (Post)
Hi after some assistance with an error on a Groov PR2 PLC. We have a few different communications set up as shown below: One Modbus TCP Slave Connection - ( Sending / Receiving Data from a PC ) Two Modbus TCP Master Connection - ( Reading Data from a UPS Panel and Reading Data Gas Chromatograph) One Modbus RTU Slave Connection 485 - (Reading Data from a fire and gas panel) One Modbus RTU Master Connection 485 - (Sending Data to a Telemetry Unit) All Licenses have been installed as per OPTO22 suggestions of the order below: Modbus TCP Master Modbus TCP Slave Modbus RTU Master Modbus RTU Slave When I check on License manager the RTU Master license seems to disappear on installing the RTU. (What ever reason I’ve been told this is “normal”). If I use Device License Read It will successfully read all the licenses correctly. Now the issue is every 2 hours and between 4. For what ever reason the communications seems to end and lock up for about 20 seconds. During this time even if I was logged into the PLC it would kick me off and I’d have to re type the password to enter. Most of the devices can handle this however the RTU flags up a communications failure at the SCADA and is raising alarms every 2 hours and 4 mins. We’ve had multiple people go through the code to check for anything obvious. Does anyone have any ideas?
Last updated: 2024-04-15

Post by thysonfury on OPTO22 Groov Epic PR2 Modbus Comms Dropping out every 2 hours and 4 Mins CODESYS Forge talk (Post)
Hi after some assistance with an error on a Groov PR2 PLC. We have a few different communications set up as shown below: One Modbus TCP Slave Connection - ( Sending / Receiving Data from a PC ) Two Modbus TCP Master Connection - ( Reading Data from a UPS Panel and Reading Data Gas Chromatograph) One Modbus RTU Slave Connection 485 - (Reading Data from a fire and gas panel) One Modbus RTU Master Connection 485 - (Sending Data to a Telemetry Unit) All Licenses have been installed as per OPTO22 suggestions of the order below: Modbus TCP Master Modbus TCP Slave Modbus RTU Master Modbus RTU Slave When I check on License manager the RTU Master license seems to disappear on installing the RTU. (What ever reason I’ve been told this is “normal”). If I use Device License Read It will successfully read all the licenses correctly. Now the issue is every 2 hours and between 4. For what ever reason the communications seems to end and lock up for about 20 seconds. During this time even if I was logged into the PLC it would kick me off and I’d have to re type the password to enter. Most of the devices can handle this however the RTU flags up a communications failure at the SCADA and is raising alarms every 2 hours and 4 mins. We’ve had multiple people go through the code to check for anything obvious. Does anyone have any ideas?
Last updated: 2024-04-15

Post by thysonfury on OPTO22 Groov Epic PR2 Modbus Comms Dropping out every 2 hours and 4 Mins CODESYS Forge talk (Post)
Hi after some assistance with an error on a Groov PR2 PLC. We have a few different communications set up as shown below: One Modbus TCP Slave Connection - ( Sending / Receiving Data from a PC ) Two Modbus TCP Master Connection - ( Reading Data from a UPS Panel and Reading Data Gas Chromatograph) One Modbus RTU Slave Connection 485 - (Reading Data from a fire and gas panel) One Modbus RTU Master Connection 485 - (Sending Data to a Telemetry Unit) All Licenses have been installed as per OPTO22 suggestions of the order below: Modbus TCP Master Modbus TCP Slave Modbus RTU Master Modbus RTU Slave When I check on License manager the RTU Master license seems to disappear on installing the RTU. (What ever reason I’ve been told this is “normal”). If I use Device License Read It will successfully read all the licenses correctly. Now the issue is every 2 hours and between 4. For what ever reason the communications seems to end and lock up for about 20 seconds. During this time even if I was logged into the PLC it would kick me off and I’d have to re type the password to enter. Most of the devices can handle this however the RTU flags up a communications failure at the SCADA and is raising alarms every 2 hours and 4 mins. We’ve had multiple people go through the code to check for anything obvious. Does anyone have any ideas?
Last updated: 2024-04-15

Post by leandroct on Error reading files after runtime update from 4.0.0.0 to 4.8.0.0 CODESYS Forge talk (Post)
Since version 19 they changed how file access is handle. There are two solutions: 1. You change where the file is stored (need to go to: /PlcLogic/) 2. You can, if you don´t want to store at PlcLogic, add the following line in the CODESYSControl.cfg under [SysFile]: ForceIecFilePath=0 The CodesysControl.cfg is at C:\ProgramData\CODESYS\CODESYSControlWinV3x64\xxPROJECT_NUMBERxx\ Here the email they sent me: "with the 3.5.19 Version we changed how files are handled. See following issue: CDS-81506 - CODESYS Control SysFile system file access vulnerability. There are two solutions: 1. You change where the file is stored (need to go to: /PlcLogic/) 2. You can, if you don´t want to store at PlcLogic, add the following line in the CODESYSControl.cfg under [SysFile]: ForceIecFilePath=0 Here is the official release-note: [[COMPATIBILITY_INFORMATION]] With the activation of ForceIecFilePath the file access from IEC is now restricted to the configured paths only (file sandbox)! [SysFile] ForceIecFilePath=1 (new default) The standard path is the current directory, the PlcLogic subfolder or a configured path. Every file access outside of this path is configured via PlaceholderFilePath, for example access to temporary files or removable media: [SysFile] PlaceholderFilePath.1=/tmp, $TMP$ PlaceholderFilePath.2=/media/usb, $USB$ PlaceholderFilePath.2.Volatile=1 For more information see our tutorial FilePath & Placeholders. To restore the old behavior ForceIecFilePath may be configured as follows: [SysFile] ForceIecFilePath=0 BUT WE HIGHLY RECOMMEND TO LEAVE THIS SETTING AT ITS NEW DEFAULT VALUE! "
Last updated: 2024-05-07

Post by adamrobotic on llcallback() iec exception caught cmpid=0x00000002, eventid=0x00010008 CODESYS Forge talk (Post)
Hi All, Recently I have been experiencing a issue in CodeSys SP16 Patch 3, with a exception which comes up after I have made several online changes. callcallback() iec exception caught cmpid=0x00000002, eventid=0x00010008, after I experience this fault then I receive a error message for any subsequent online change "online change failed, no task gap within 10000ms". To recover either the controller needs a orgin reset, which will allow online edits thereafter until falling back into the loop. I am using a TURCK TX707 product which is controlling robot trajectory, We have hard coded the coordinate data rather than using persistence variables so hence the need to do online changes consistently. I have read on the forum other people have experienced similar issue with the online task gap, but I have no task which have same priority and also monitored the CPU usage and have not seen it go above 13%. Anyones help would be much appreciated, thankyou.
Last updated: 2023-08-18

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

<< < 1 .. 29 30 31 32 33 .. 42 > >> (Page 31 of 42)

Showing results of 1029

Sort by relevance or date