Post by gediminas on Datasource OPC UA client system failure
CODESYS Forge
talk
(Post)
I am using CODESYS v3.5 SP20 Patch 3 / Control for BeagleboneBlack SL v4.13 and after some time the OPC UA Server crashes. However, Runtime still works without any issues. The events leading up to the OPC server crash are the most suspicious: 1) Mutex deadlock detected - owner thread died, and 2) Runtime received SIGABRT. And it seems very similar with this topic except used versions - issues should be fixed with previous SP's. I can't seem to find any information about these events. Need some pointers in the right direction on how I can fix this problem.
Last updated: 2024-10-25
Post by sigurdrb on Codesys and error messages, warnings exceptions etc.
CODESYS Forge
talk
(Post)
Hi, I tried some different libraries (CmpApp etc.) to find some global variables that I could read out as a variable in the codesys environment. Do any one of you know which libraries are best suited for this, and how I can read it out? My goal is to send messages, warnings etc. to the system that communicates to the PLC. Currently if something goes wrong I need to see the logfiles, or go online with the controller. I think I could save a lot of time if I could read the errors from our user interface that is connected to the PLC by TCP/IP.
Last updated: 2024-11-06
Post by gatto on Undertanding Application Based Licenses
CODESYS Forge
talk
(Post)
Hi, i think you are right. Did you press the key shopping cart? Codesys tells you the license. What I don't appreciate is that i need an additional license for communication. The system reports opc ua but this cheats you. This is communication that also concerns the tag symbols that codesys eth v3 exchanges with an operator panel. Attached is a screenshot of my case where you can see that communication opc ua is cheating you. 512 tags included in the program license are few. So, I had to buy 2 licenses. one for the program and one for communication. I don't like this policy.
Last updated: 4 days ago
Post by vahasa on CAN TPDO / RPDO
CODESYS Forge
talk
(Post)
Hi I'm automation engineering student and I'm not yet quite familiar with CAN-bus. What I am trying to achieve, to send two byte message via CAN from Epec display to Scott Drive inverter. I'm using code template made with Epec Multitool in Codesys 3.5 Problem i'm facing is that drive responds with same COB-ID. In multitool, you can create TPDO/RPDO. And depending on that, display either sends or only receives. This is problem, because for parameter polling from drive, you need to send two byte request to 0x399 and drive responds with eight bytes. If request is longer, drive don't respond. 0x399 is currently setted as RPDO, so display doesn't send anything on startup and I made program that sends messages to 0x399 bytes 0 and 1 and bytes 3-7 are shown in display. If setted as TPDO, display send all eight bytes and therefor drive cannot respond. But, I think because they are defined as RPDO, display won't send message, although monitoring with Codesys, values are changed. Question is, how should COB-ID be configured in Codesys, so it wouldn't automatically start to send message but would send when needed?
Last updated: 2023-12-19
Post by tama00 on GPIOs not running with Raspberry Pi 4 (and SPI connection)
CODESYS Forge
talk
(Post)
Hello everyone, I have a working SPI connection (with transferExt) between a Raspberry master with Codesys and an ESP32 slave. I would also like to use a few GPIO pins. Is there a problem with using SPI AND GPIOs? Environment: Raspberry Pi 4+ with Raspian from Oct 23 Codesys V3.4 SP19 Patch 5 with Runtime Version 4.10.0.0 Device: GPIOs B+/Pi2 My problem: The status is displayed as “GPIOs : not running”. And also during mapping the message “The bus is not running. The values shown are perhaps not actual”. However, the variable changes that I make in my program are displayed under “Current Value”. In the Logic Analyzer, the pin toggles during transmission with small intervals of +-4us (seems to be a cyclical disorder, but I don't know where exactly it could be coming from). This applies to pins that I actually use (output) but also to the other GPIOs (not used). With GPIO 4, the line remains permanently high. Attached is a screenshot from the Logic Analyzer. Channel 1,3,5 were GPIO pin 26, 22, 17 Would be very grateful for help. Best regards
Last updated: 2024-05-06
Post by ahuckphin on Issues with Modbus Slave with Raspberry Pi
CODESYS Forge
talk
(Post)
I have a DFRobot RS485 temperature & humidity sensor (SEN0438) connected to my Raspberry Pi via a USB to RS485 adapter. I am able to connect and read the sensor data when running a python code locally. However in Codesys, I encounter this error "A bus error has occurred." and "There was no response in time". Could this be because of Modbus Server Channel and Modbus Server Init configuration on my part? Admittedly I am new to Codesys. To get to this stage, I: 1. added some lines to CODESYSControl_User.cfg 2. added "Modbus_COM" in Codesys and set "Serial Port Configuration" under "General" 3. added "Modbus_Master_COM_Port" in Codesys and checked transmission mode is set to "RTU" 4. added "Modbus_Slave_COM_Port" in Codesys and checked server address is set to 1 (also set 1 in my sensor) 5. added 1 channel and 1 init for "Modbus_Slave_COM_Port" under "Modbus Server Channel" and "Modbus Server Init"
Last updated: 2024-07-10
Post by mubeta on Some 'pathetic' errors in SoftMotion program
CODESYS Forge
talk
(Post)
Hello everyone, I have a very simple program for the process, but it's driving me crazy and I can't see the problems I'm left with: Short topological description: Dual Core Berghof controller with softmotion runtime version 3.5.19.30; Two axes with servodrive on canopen bus, clocked distributed from master; Ethercat I/O node; 2 ms ethercat task, 2 ms canopen bus cycle time; I/O objects of the canopen master and canopen drives connected to the ethercat task cycle; Problem 1: Two separate programs each manage their own axis and drive, with separate state machines. A first axis moves primarily in velocity, except having to position itself absolutely at a predetermined point at the end of the job; the second axis, on the other hand, is a paper unwinder that changes, for each job cycle, from actions in absolute, relative, and cam displacement with the master axis. Well, the state machine of both axes was written in such a way as to call running the useful FB and change it on state change in this way: CASE i_stateMachine OF 0: o_Power(Enable := TRUE, bRegulatorOn := FALSE, bDriveStart := FALSE, Axis := o_PaperUnwinderAxis); o_MoveAbs(Execute := FALSE, Axis := o_PaperUnwinderAxis); o_MoveRel(Execute := FALSE, Axis := o_PaperUnwinderAxis); o_CamSelect(Execute := FALSE, Master := o_MachineAxis, Slave := o_PaperUnwinderAxis, CamTable := cam_PaperUnwinder); o_CamIn(Execute := FALSE, Master := MachineEncoder, Slave := o_PaperUnwinderAxis); o_CamOut(Execute := FALSE, Slave := o_PaperUnwinderAxis); o_SetPosition(Execute := FALSE, Axis := o_PaperUnwinderAxis); IF ... THEN i_StateMachine := 10; END_IF; 10: o_Power( Enable := TRUE, bRegulatorOn := TRUE, bDriveStart := TRUE, Axis := o_PaperUnwinderAxis ); IF o_Power.Status THEN i_StateMachine := 20; END_IF; 20: (* Avanzamento carta *) o_MoveAbs( Execute := TRUE, Position := o_Somewhere, Velocity := 25.0, Acceleration := 3666.7, Deceleration := 3666.7, Jerk := 48000.0, Direction := MC_DIRECTION.positive, Axis := o_PaperUnwinderAxis ); IF o_MoveAbs.Done THEN o_MoveAbs(Execute := FALSE, Axis := o_PaperUnwinderAxis); i_StateMachine := 30; END_IF 30: d_HomingPosition := ...; o_SetPosition( Execute := TRUE, Position := d_HomingPosition, Mode := FALSE, Axis := o_PaperUnwinderAxis ); (* ... *) IF o_SetPosition.Done = TRUE THEN o_SetPosition(Execute := FALSE, Axis := o_PaperUnwinderAxis ); o_LogServer.Append(sMessage := '...', lscClass := LOGSERVER_CLASS.ALWAYS, sdt := o_CommonsMgrData.systime.sdtLocal); i_StateMachine := 40; END_IF; 50: ... The code above is a sketchy example of what I wanted to write. But it gives me a spot problem: in some, the state change results in a drive error, which is unrecoverable except with a reinitialization via SM3_ReinitDrive(). Things are improved a little if in the program I always run the call of all softmotion blocks in this way: o_Power(Axis := o_PaperUnwinderAxis); o_Jog(Axis := o_PaperUnwinderAxis); o_Halt(Axis := o_PaperUnwinderAxis); o_MoveAbs(Axis := o_PaperUnwinderAxis); o_MoveRel(Axis := o_PaperUnwinderAxis); o_CamIn(Master := MachineEncoder, Slave := o_PaperUnwinderAxis); o_CamOut(Slave := o_PaperUnwinderAxis); If I don't execute all the calls of all the motion FBs used, when exchanging machine state often (but not always), the axis goes into error with event id THE_FB_WASNT_CALL... Done a little diagnostics it seems that the FBs return the bDone, before they are completely terminated. I tried doing the machine state exchange not with the bDone bit of the FBs, but with the 'standstill' state of the axis. It didn't seem to change anything. Problem 2: During the use SM3_ReinitDrive() I get the erro in the log: "NetID 0: SDO read error for object 16#607C..." Assuming that the device involved it's one of the two servodrive, (no others device are present in the network), I don't found any object 0x607C in the 'possible object list in/out' of the two drive, and I don't understand where this object can be listed. So any ideas and suggestions regarding these two issues will be very, very welcome. If you need the source project, I am willing to send it.
Last updated: 2024-07-17
Post by tk096 on Some 'pathetic' errors in SoftMotion program
CODESYS Forge
talk
(Post)
Meanwhile, I would like to understand why the motion FB instances must still be called even after the Execute is set to FALSE, especially in view of the fact that the next instruction is programmed to abort the previous one, with BufferMode set to 'Aborting'. All these unnecessary FB calls are an unnecessary overhead on the CPU anyway. Is there any precise rule about when to cease calling the various instances? (It should precisely be the 'done' status that says this one has finished its work). In general: - Motion function blocks have to be called until they report 'Done', 'Error', 'CommandAborted' or a subsequent motion FB with BufferMode=Aborting is started in the current cycle. - Setting the Execute input to FALSE will not abort any ongoing motion of the motion function block. For example, one case that is often problematic is the execution of the Axis Halt instruction. When, after a MoveAbosulte instruction this returns the event as 'done' and indeed the axis is in standstill, the state machine first sets the move instruction to FALSE, and the next cycle sets the Halt request to TRUE. Some of the time everything works out fine. Occasionally, however, in this exchange, the axis goes into fault, also losing the OPERATIONAL state. I think the error SMC_FB_WASNT_CALLED_DURING_MOTION is only a follow-up (and misleading) error that results from the axis not being in operational state anymore (bus problems). Is there an error 'regulator or start not set' in the device log before the error 'motion generating FB wasn't called for at least one cycle'? Which error does the respective function block (Halt.ErrorId) report?
Last updated: 2024-07-22
Post by mubeta on Some 'pathetic' errors in SoftMotion program
CODESYS Forge
talk
(Post)
Thank you for your interest. Your answers are in line with what I knew, so at least it comforts me that I did not misinterpret the situation. However, I don't have an exact match as, for this project over the past few days I have: 1) I have gone back to leaving the various FBs of the motion always called, all of them, and in the state machine I use a boolean to activate the various useful Execute. (But in the future I want to go back and try the programming technique with which I wanted to develop this project); 2) For the occasional error: SMC_FB_WASNT_CALLED_DURING_MOTION perhaps it was due to the fact that I had set the Ethercat bus synchronism only at the CAN master level, but not at the level of individual drives. I have now also activated it for the individual drives and it does indeed seem to have been resolved, but having also adopted the programming technique mentioned in point 1), I cannot say whether this was the solution to the problem, or instead the previous point. Is there an error ‘regulator or start not set’ in the device log before the error ‘motion generating FB wasn't called for at least one cycle’? I can't answer that right now. By now the machine is running and I am no longer there, at this one. Also, I seem to remember that the 'fbeFBerror' drive structure (5-element array), does not cycle, BUT ONCE THE 5 EVENTS AFTER SWITCHING ON, IT DOES NOT UPDATE ANYMORE (but that's another issue), so diagnostics were not easy.
Last updated: 2024-07-24
Post by shooxplc on How to call the same program from library and get the vars updated.
CODESYS Forge
talk
(Post)
Hi, I am writing to you today because I would like to create a library that would contain a program with its various subprograms, in my example "PLC_PRG" with "a", "aa", "aaa". But once the library is created as shown below: I would like to be able to drag and drop my folder as many times as I want (let's say I manage the same system multiple times). Once the drag and drop is done, we can see the second folder with the variables renamed successfully. As shown below: But my variables in CAD_1 remain the same as for CAD, so it's PLC_PRG instead of PLC_PRG_1, for example. Is there a solution to automate this? I wouldn't want to have to rename all my variables manually, considering that in the program where I want to do this, the number of variables is substantial. Lucas.
Last updated: 2023-08-23
Post by ofey on Testing of Codesys program
CODESYS Forge
talk
(Post)
Hi! I thought to hear what you guys think is the best way to test the program in my scenario. I have some PLC programs that have been made and deployed on different PLC's. The program has added the specific devices and IO that is applicable. I have made a test environment for everything outside of the PLC, ie. the same SCADA system that is talking to the PLC, and a program running locally is simulating the plant (level regulation of different tanks). Pr. now I have had to manually change the variables that are reading/writing values from the IO so they read/write via OPC instead. I also have to change the device tree from the specific PLC rack, to the soft PLC. So I kind of end up with two different programs that I have to maintain. I was just wondering if you believe there is an easier way to do this. So I can have the exactly same program and kind of switch between the soft mode, and the "real" mode.
Last updated: 2023-12-07
Post by aseitzinger on CODESYS Control for Linux SL on virtual machine?
CODESYS Forge
talk
(Post)
Hello, there in different information available regarding the possibility to run CODESYS Control for Linux SL on a virtual machine. https://forge.codesys.com/trg/linux-sl/home/Home/ says CODESYS Control for Linux SL is a runtime system, which can run on any Debian based X86 PC, VM or Cloud container... https://store.codesys.com/media/n98_media_assets/files/2302000005/3/CODESYS%20Control%20for%20Linux%20SL_de.pdf says CODESYS Control for Linux SL can not be used on virtual hardware Currently I run the package mentioned on a virtualized debian machine running in PROXMOX Virtual Environment 7.4-17 and apart from huge jitter it runs without problems. The CODESYS key is passed as a USB defice to the VM. I wonder why there are different statements regarding the suitability in virtual machines and if the jitter would be reduced by installing CODESYS runtime on the host installing CDS runtime on the host and using a preemptive kernel (if available for the PROXMOX installation leaving CDS runtime where it is (on the virtualized debian machine) and install a preemptive kernel on the host and on the guest... Any advice is appreciated. Greets Arno
Last updated: 2024-01-08
Post by vipul on Multicast udp
CODESYS Forge
talk
(Post)
Hi, Good afternoon can anybody help me with UDP Multicast code. I am not able to send or recieve data when code is dumped on linux device. Below is my code. Declaration: PROGRAM udp_multicast VAR oneTimeFlag :UINT :=0; state: INT:=0; driver: UDP.UDPDriver; //port : UDP.Port;//moved to GVL src_ipAddr_ud: UDINT; src_ipAddr_st:STRING := '192.168.127.155';//'192.168.1.155';//ipms ip address dst_ipAddr_ud:UDINT; group_ipAddr_st:STRING := '239.1.5.10'; //group_ipAddr_ud:UDINT; result: SysTypes.RTS_IEC_RESULT; //result of recieve function. bind: UDINT; //result of binding. resultCreate:SysTypes.RTS_IEC_RESULT;//result of port creation. timer:BLINK; temFlag :INT:= 0; post:INT :=0; checksumFunc:checksumXor; localStringBuf:STRING[500]; chksum:BYTE; dataBuffer:POINTER TO BYTE; checksumString:ARRAY[0..5] OF BYTE; recvSize:__XINT; errorCode:UDINT; joinGroupErrorCode:UDINT; END_VAR ************8 Implementation: IF oneTimeFlag <> 1 THEN oneTimeFlag:=1; resultCreate := driver.CreatePort(ADR(GVL.port)); src_ipAddr_ud := UDP.IPSTRING_TO_UDINT(sIPAddress:= src_ipAddr_st); GVL.group_ipAddr_ud := UDP.IPSTRING_TO_UDINT(sIpAddress:= group_ipAddr_st); GVL.port.IPAddress := src_ipAddr_ud; GVl.port.ReceivePort:= GVL.src_port;//port on which messages are expected. GVl.port.SendPort := GVL.dest_port; GVl.port.OperatingSystem := 0; //0- any system GVL.port.Socket :=3; //3- socket type is multicast bind := GVL.port.Bind(udiIPAddress:=src_ipAddr_ud,); GVl.port.JoinGroup(udiGroupAddress:= GVL.group_ipAddr_ud,udiInterfaceAddress:= src_ipAddr_ud,eLogCode=>joinGroupErrorCode); END_IF timer(ENABLE:=TRUE,TIMELOW:=T#100MS,TIMEHIGH:=T#100MS); IF timer.OUT = TRUE THEN GVL.port.Send(udiIPTo:=GVL.group_ipAddr_ud,GVL.dest_port,pbyData:=ADR(GVL.writeData),diDataSize:=SIZEOF(GVL.writeData)); ELSE SysMemSet(ADR(GVL.readData[0]),0,SIZEOF(GVL.readData)); result := GVl.port.Receive(ADR(GVL.readData),diDataSize:=SIZEOF(GVL.readData),udiIPFrom=>dst_ipAddr_ud,diRecvSize=>recvSize,eLogCode=>errorCode); SysMemMove(ADR(GVL.readDataBuf[0]),ADR(GVL.readData[0]),SIZEOF(GVL.readData)); END_IF post:=LEN(GVL.readDataBuf);
Last updated: 2024-01-14
Post by alexgooi on Codesys OPC DA server requires more then 2 GB of ram
CODESYS Forge
talk
(Post)
Dear Forum, We are currently running into a problem that the CODESYS OPC DA server is running out of RAM (larger than 2 GB). We have a setup of 10 Codesys controllers which features around 300.000 discoverable tags per controller. We are only interested in 10 percent of the tags to be communicated to the OPC-server, this is due to the fact the program consists of arrays of objects which on their part implements arrays of objects, simply reducing the number of discoverable tags is not an option The OPC-DA server loads all the discoverable tags, is it possible to: 1 let the OPC-DA server only load the tags that are requested by the SCADA/MES system. 2 let the OPC-DA server claim more memory. 3 run 2 OPC-DA servers in parallel? Thank you in advance
Last updated: 2024-01-25
Post by axilleas on SMC_Interpolator + SMC_controAxislbyPos
CODESYS Forge
talk
(Post)
dear all I am working on a very generic gantry system (virtual drives + win v3 control) reading gcode from external file. In order to stop the interpolator function from running when gaps are detected, SMC_controlAxisByPos FB has the bStopIpo output which according to the manual is connected to the Interpolator's bEmergencyStop. Lets assume that the axis are parked in position X1000 Y1000 and the initial G code movement is G00 X500 Y500. The normal behavior is to travel from the actual x1000 y1000 to G00 X500 Y500. The SMC_Interpolator always gets the X0 Y0 as the initial position, meaning that the bStopIpo is active until the axis are in X0 Y0 and the release the interpolator to set the new positions to X500 Y500. Is there a suggested method to solve this behavior? bonus question: I get a lot of bStopIpo during standard interpolation movements (not gaps). While working with virtual axis this is not a problem but when real axis are installed this will be an issue. What exactly triggers the bStopIpo output? Slow axis accelerations compare to Gcode defaults? Kind Regards
Last updated: 2024-02-05
Post by fredsta on Unable to load dynamic modules (Download failed: Application=Application)
CODESYS Forge
talk
(Post)
Hey there, I am currently trying to find a good solution for the communication between CODESYS Control on Raspberry Pi and "the rest of the world", i. e. the things apart from CODESYS on my linux. My first approach was to use the c-integration. So I created a lib, defined extern fbs, compiled the code on my Pi using the SDK and put the .so into my lib project. When I try to log into the Pi and load the program, I get the error message which you can see in the attached picture. "Die dynamischen Module der C-Integration konnten nicht auf das Laufzeitsystem geladen werden" is german and means roughly "the modules from the c-integration could not be loaded onto the runtime system." Is this normal? Am I doing something wrong? I will have a look at the unix domain socket thing next, as I am still in the process of finding the best solution for the communication.
Last updated: 2024-02-15
Post by alex00 on DCS / Central Engineering with Codesys support
CODESYS Forge
talk
(Post)
Hello together I'm currently investing in possibilities to have a central engineering software / system for Codesys based controllers. Something like a DCS / SCADA depending on where you see the functionality. We plan to use more or less vanilla codesys. The tool should support the following: - Connect to multiple PLC's in a project to see its variables and debug it. - Central Engineering capabilities (for example shared libraries in a project). - Download the new code / binaries to the plc. - Maybe have functionality to combine visualization elements and logic together. - See the live status variables on all the systems (crosscommunication). I see that codesys theoretically supports engineering of multiple PLC's, but I couldnt find to much functionality for a DCS type of operation, but that could be lack of knowledge. Any tips from you? Is Codesys good enough for this and maybe there are some manufacturers which build around it? Or are there good tools on the market with Codesys support (and the engineering is separate, but download to codesys possible). The use case is distributed energy installations like Heating pumps, Photovoltaics, etc. All these installations should have a PLC with codesys installed and run in one larger network, the PLC's are connected via VPN. Thanks for your inputs Greetings
Last updated: 2024-02-19
Post by alex00 on DCS / Central Engineering for Codesys
CODESYS Forge
talk
(Post)
Hello together I'm currently investing in possibilities to have a central engineering software / system for Codesys based controllers. Something like a DCS / SCADA depending on where you see the functionality. We plan to use more or less vanilla codesys. The tool should support the following: - Connect to multiple PLC's in a project to see its variables and debug it. - Central Engineering capabilities (for example shared libraries in a project). - Download the new code / binaries to the plc. - Maybe have functionality to combine visualization elements and logic together. - See the live status variables on all the systems (crosscommunication). I see that codesys theoretically supports engineering of multiple PLC's, but I couldnt find to much functionality for a DCS type of operation, but that could be lack of knowledge. Any tips from you? Is Codesys good enough for this and maybe there are some manufacturers which build around it? Or are there good tools on the market with Codesys support (and the engineering is separate, but download to codesys possible). The use case is distributed energy installations like Heating pumps, Photovoltaics, etc. All these installations should have a PLC with codesys installed and run in one larger network, the PLC's are connected via VPN. Thanks for your inputs Greetings
Last updated: 2024-02-19
Post by brell on Automatic xExecute NBS.TCP_write
CODESYS Forge
talk
(Post)
I've recently started experimenting with CODESYS for a project and am fairly new to it. I'm currently working with Function Block Diagrams (FBD) to set up TCP communication between a server and a client, where the client is implemented as a Python script. Once the communication is established, my connection status changes to True, which is the expected behavior. My challenge arises with the TCP write module, which requires the xEnable_write flag to toggle between True and False. If xEnable_write remains True, the module only performs a single write operation. To address this, I introduced a falling edge trigger (F_TRIG), expecting it to help in toggling xEnable_write and it does, However, I've encountered an issue where in the beginning after connxion established I need to manually set xEnable_write to True for the system to work as intended. I'm looking for a way to automate this process so that xEnable_write becomes True automatically upon establishing a connection . Initially, I tried setting xEnable_write to True from the start, but this approach didn't work well since it left the flag permanently True, preventing further toggling. I also experimented with using a TON timer, but I faced similar issues. I am seeking a solution that automatically toggles xEnable_write between True and False after a connection is established, ensuring continuous write operations without manual intervention. Any advice or guidance on how to achieve this would be greatly appreciated."
Last updated: 2024-03-05
Post by manuknecht on High Cycle Times for SoftMotion_PlanningTask when using AxisGroup
CODESYS Forge
talk
(Post)
Hello all I am using an AxisGroup with the Gantry2 Kinematics to move a 2D-Gantry system. When creating the AxisGroup, the SoftMotion_PlanningTask is created automatically with a cycle time of 2 ms in my case. I realized that the maximum cycle time of this task can spike to very high values (up to 60 ms) at lower speeds of the motion, leading to synchronization issues and errors on the axes. The same behaviour - though not as drastic - can be observed with virtual axes too. Is this behaviour intended or to be expected? Can the cycle time or type of the SoftMotion_PlanningTask be changed to prevent these errors? Or is there another fix for this issue? I tried changing the cycle type to Freewheeling, which solved the synchronization issues, but caused an error on the AxisGroup after a while, reading SMC_CP_QUEUE_UNDERRUN. Thanks in advance and best regards Manuel
Last updated: 2024-03-07
Post by acc00 on Main Task cycle too long leading to PLC Fail
CODESYS Forge
talk
(Post)
I have 2 Wago PFC200 PLC, running with Runtime SP19 Patch 5, with the Redundant application. The PLC communicates as Modbus Master with at this moment 15 Modbus Slaves -later there will be 28 in total- (Drives, Power management units,...). These devices are connected in 2 rings (1 ring of Drives, 1 ring of Power Management units), with 2 Managed Moxa Switches being part of the ring. Each PLC is connected to one of these switches. The issue I'm encountering is that the Cycle time of the Active PLC goes very high when I'm closing the Drive ring (simulating an issue on one Cabinet supply, resulting in that one Drive shut down, which can happen on field quite often). As a result of this long cycle, the PLC fails and goes to Exception, and the Passive PLC does not take control of the system. A normal cycle is around 30ms for the Main task, and a few ms for the Ethercat task. When I monitor with Profiler, I see that in this Maximum Cycle, the main Task is only taking 13ms, so I'm not sure where the PLC is hanging for so long. Is the remaining cycle time the Redundant management/sync or something else? Thank you in advance.
Last updated: 2024-03-08
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 danieldiaz on Problem with FB execution
CODESYS Forge
talk
(Post)
Hello everyone, I've been working on a system which needs an error function, with this purpose I've created a FB programmed in LD, after debugging I run the simulation. It seems that the variable linked to a coil doesn't change the value when the contacts are associated to input variables. When I use internal variables the logic works properly. I don't know if the problem is related to the variables definition or with the logic program. As you can see in the image, I1 and I2 are variables declared on the FB, the rest are input variables. If I force the eStop and Reset signals to TRUE the coil value should change, but it doesn't. However in the second network if I1 is TRUE the coil change to TRUE as it has to be. To sum up, my doubt is why that coil doesn't change its value? I would like someone to shed a light on this. Thanks!
Last updated: 2024-04-02
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
.