Search talk: real to array_of_word

 
<< < 1 .. 159 160 161 162 163 .. 168 > >> (Page 161 of 168)

Post by user3000 on Can't find an Extended Pulse Timer (TP and LTP) CODESYS Forge talk (Post)
Hello, For my program I need an extended pulse timer, which can be referred to as a retriggerable pulse timer. Where every rising edge of the input resets the elapsed time zero, extending the lenght of the output pulse. The Codesys pulse timer (TP) is a one-shot timer and only resets the elapsed time with the falling edge of the input. There is also a pulse timer (LTP) in codesys, but in my simulation it was also functioning as a one-shot even though the description sounds like LTP should be retriggerable. I have uploaded some timing plots from another PLC program for reference. I am looking for a timer equivalent to the "TEP" diagram. Is there an Extended Pulse Timer in Codesys? Maybe there is a way to manipulate the input so it resets the elapsed time outside the function block?
Last updated: 2023-12-06

Post by nz-dave on Bool turning on in case stament in wrong state? CODESYS Forge talk (Post)
I had the FB called via a for loop to call a few instances of my FB I have removed it the for loop and just called them 1 by 1. Seems to have sorted the problem. tho, i have other FB's and for loops doing the same thing but they are all fine. below is basically what was happening. var: mVibrator : ARRAY[1..GVL_Settings.Number_Of_Products] OF Main_Vibrator; end_var Controller(PRG) call: FOR v := 1 TO GVL_Settings.Number_Of_Products BY 1 DO; mVibrator[v] (); END_FOR So at state 30: the mVibrator[1].start was turning on 30: Main_Mixer.Start := TRUE; Process_State := 2; IF Main_mixer.Done THEN Main_Mixer.Start := FALSE; Control_State := 40; END_IF but its not till state 50: that it is actual in the code. 50: Main_Suction_valve.Open_Input := TRUE; mVibrator[1].Start := TRUE; Process_State := 4; IF GVL_Weigh_hopper.LoadCell_Weight = 0 THEN Main_Suction_valve.Open_Input := FALSE; mVibrator1.Start := FALSE; Control_State := 60; END_IF Thanks for your input.
Last updated: 2023-12-16

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 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 zoronoa on J1939.ReceiveWatchdog & J1939.ReceiveParameterGroup CODESYS Forge talk (Post)
Hi, I'm trying to monitor a specific PGN which I have it sending a pulse every 500mS Problem: Using the Watchdog for the ECU does not really help me as I have multiple instances with separate PGNs, if a PGN goes ghost, the ECU watchdog won't be flagged as the others will be running. I found the J1939.ReceiveWatchdog & J1939.ReceiveParameterGroup function blocks and they seem like a good solution for my problem, I just can't get them to work from my understanding you just build the J1939.ReceiveParameterGroup once and then connect it's output to the J1939.ReceiveWatchdog, here's my CODE for the setup HEARTBEAT_TIMER(IN:= TRUE, PT:= T#1000MS); //turn-on delay because of initialization race IF HEARTBEAT_TIMER.Q= TRUE THEN Glob_Var.DisplayReceive.xExecute:= TRUE; Glob_Var.DisplayReceive.itfECU:= Valve_X; Glob_Var.DisplayReceive.dwPGN:= 65511; Glob_Var.DisplayWatchdog.xEnable:= TRUE; Glob_Var.DisplayWatchdog.itfParameterGroup:= Glob_Var.DisplayReceive.itfParameterGroup; Glob_Var.DisplayWatchdog.tTimeout:= T#1500MS; END_IF Notes: Glob_Var.DisplayReceive is of type J1939.ReceiveParameterGroup Glob_Var.DisplayWatchdog is of type J1939.ReceiveWatchdog The above code is done once and not cyclically I'm monitoring Glob_Var.DisplayWatchdog.xError cyclically
Last updated: 2024-03-13

Post by thewizard8 on Raspberry PI4 Serial Port CODESYS Forge talk (Post)
Hi Dear All, I'm using my raspberry PI4 as a CoDeSyS PLC (Build from scratch with custom electronics). I was able to implement all fieldbuses with the exception of Modbus Serial. I'm using the internal Port (GPIO) and I configured it in /etc/Codesyscontrol_user.cfg the following away: [SysCom] Linux.Devicefile.1=/dev/ttyUSB0 Linux.Devicefile.2=/dev/ttyS0 I'm using COM2 on Master configuration. I'm using a interface board from TTL/RS485 (bidirectional board), and it's works perfectly with other devices but not in CoDeSyS. I'm able to send data with python script and read it on my pc using putty, but when I use a modbus slave simulator to interface with codesys I always get red icons on master and slave. (Please find image attached). I'm pretty shure that this might be a bad parameter on my CoDeSyS runtime configurstion file. Can someone help me? I'm stuck and this is for my master degree certification.
Last updated: 2024-03-18

Post by rmaas on Fieldbus has lost synchronicity CODESYS Forge talk (Post)
Hi, On a gantry system with 2 axis i am getting the following error: SMC_DI_FIELDBUS_LOST_SYNCRONICITY This happens random, sometimes it happens every 5 minutes and sometimes no error for 2 hours... The Setup: - Using codesys 3.5 SP20 with all latest libs... - Kontron AL Pi-Tron CM4 with Preempt realtime patch (Raspberry Pi 4) - Codesys runtime 4.11.0.0 (single core) - CODESYS Control for Raspberry Pi SL licensed - Softmotion + CNC + Robotics licensed - 2x Leadshine EL8-EC400 servo drives - Axis group for a 2-axis T-Gantry Ethercat network wiring: Ethercat master softmotion -> Beckhoff EK1100 -> Servo drive #1 -> Servo drive #2 Ethercat Cycle time = 4ms Max Jitter = 140~150 What i have tried so far: - changed the sync offset from 20% to 30% - changed ethercat task priority from 1 to 0 Running tasks: - Ethercat tast: Prio = 0, Interval = 4ms - Main task: Prio = 1, Interval = 8ms - Visu task: Prio = 31, Interval = 100ms - Softmotion planning task: Prio = 15, Freewheeling - 3 other default tasks that were created by AC_Persist Motion fb's are called in the ethercat task... Does anyone have an idea how to fix this? Any help is greatly appreciated!
Last updated: 2024-04-11

Post by jose-coro on Trouble installing codesys 64 3.5.19.0 CODESYS Forge talk (Post)
I tried to intalling codesys 64 3.5.19.0, during the installation process I get the following messages: "One or more problems have appeared with the current version profile. please consult with the supplier to solve the problem. -The plugin '{ee08241a-dd43-445a-b0a1-de9f717d92e0}(exactly 3.5.19.0)' is required for the current version profile but is not installed. The plug-in '{c7880c90-68c0-4cf8-a726-f0ee72b11f86}(exactly 3.5.19.0)' is required for the current version profile but is not installed. The add-on '{973a3934-1ec6-4770-83a4-59677803015a}(exactly 3.5.19.0)' is required for the current version profile but is not installed. It is recommended to terminate the application." Then the following message appears: "This package could not be installed: CODESYS Compatibility Package 3.5.17.20”. After that the instalation continue and the folling message appears: "It is possible that packages from this path could not be installed: C:\Users...\Appdata\Local\Temp{EFE2F~1}\Packages"
Last updated: 2024-04-23

Post by jose-coro on Trouble installing codesys 64 3.5.19.0 CODESYS Forge talk (Post)
I tried to intalling codesys 64 3.5.19.0, during the installation process I get the following messages: "One or more problems have appeared with the current version profile. please consult with the supplier to solve the problem. -The plugin '{ee08241a-dd43-445a-b0a1-de9f717d92e0}(exactly 3.5.19.0)' is required for the current version profile but is not installed. The plug-in '{c7880c90-68c0-4cf8-a726-f0ee72b11f86}(exactly 3.5.19.0)' is required for the current version profile but is not installed. The add-on '{973a3934-1ec6-4770-83a4-59677803015a}(exactly 3.5.19.0)' is required for the current version profile but is not installed. It is recommended to terminate the application." Then the following message appears: "This package could not be installed: CODESYS Compatibility Package 3.5.17.20”. After that the instalation continue and the folling message appears: "It is possible that packages from this path could not be installed: C:\Users...\Appdata\Local\Temp{EFE2F~1}\Packages"
Last updated: 2024-04-23

Post by k2saki on CNC / G01 Speed is very slow (or go-stop motion) in Continuous short segment . CODESYS Forge talk (Post)
I'm using CAD/CAM that outputs GCode with G01 many short segments from NURBS Curve, only X-Y axis. But CODESYS CNC motion seems much slower ( or stop-go motion ) in simulation mode than F-Value (I checked value from SMC_Interpolator - dVel ). In GCode G01, F value is F500, but movement is very slow, actual speed (dVel) is between 0 to 30 back and forth. I think very old CNC can move like that, but nowadays, a lot of CNC can move smoothly to process free curve ( somethimes option switch ) I tried to use G51 Dxx but I got the same result. My questions are 1) How do I improve CODESYS CNC motion in this case ? 2) How can I graph the sampling from dVel of SMC_Interpolate in CODESYS? From my GCode N2006 G01 X1.4364 Y-14.6847 F500 N2007 G01 X1.6759 Y-14.6768 N2008 G01 X1.9152 Y-14.6486 N2009 G01 X2.1547 Y-14.6400 N2010 G01 X2.3943 Y-14.6090 N2011 G01 X2.6336 Y-14.6002 N2012 G01 X2.8732 Y-14.5716 N2013 G01 X3.1127 Y-14.5634 N2014 G01 X3.3520 Y-14.5410 N2015 G01 X3.5915 Y-14.5336 N2016 G01 X3.8308 Y-14.5307 ... Thansk.
Last updated: 2024-04-29

Post by fizzy-bubblech on 3.5 P20 hangs - no response CODESYS Forge talk (Post)
Colleagues, i have the same problems. At the current time, I have to use the new version of the Codesys (3.5.20.10) + Control for Linux SL 4.11.0.0, but it works unstable : theree are a lot of freezes and not-respondings. I tested this on different projects: those that were created in the current version of the project, and those that were migrated from other versions of the development environment. Compiling a project without connecting to a controller is fast enough. The first downloading of the code into the controller, too. But as soon as you need to make edits and download a new code problems begin. Codesys "freezes" at the "Generation code" stage for 15-20 minutes. And only after that time loads the code into the controller. Previously, we used version 3.5.17.60 + Control for Linux SL 4.7.0.0. The process took 1-2 minutes. Do you have any ideas how can i fix it? I will be grateful for your answers.
Last updated: 2024-06-27

Post by xgongx on What is the insights of IoDrvEtherCAT.DCInSyncWindow? CODESYS Forge talk (Post)
It is well known that you need to increase the value of IoDrvEtherCAT.DCInSyncWindow to solve the "Fieldbus lost synchronicity" issue. In the official document, IoDrvEtherCAT.DCInSyncWindow is explained as the toleration of a certain jitter. But the official document doesn't explain what kind of the jitter is. Is it the jitter of DC sync deviation, master timer or something else? It is very important to know the insights of IoDrvEtherCAT.DCInSyncWindow. For example, if it is the toleration of DC sync deviation, and the official recommending value is 200us for CODESYS SoftMotion. It means maximum of DC sync deviation is 200us. It is unacceptable for some high precision motion control tasks, for example high speed gear task, etc. Increasing the value of IoDrvEtherCAT.DCInSyncWindow will increase the deviation of motor rotation sync if it is the toleration of DC sync deviation. So, would anyone tell me what the insights of IoDrvEtherCAT.DCInSyncWindow is? Thanks.
Last updated: 2024-07-09

Post by kleeswi on Visualization scaling problem with B&R T30 panel CODESYS Forge talk (Post)
The probelm arises for the B&R T30 panel after updating Codesys from 3.5.17 to 3.5.19 patch 5. We have to use 3.5.19 for other reasons so we cannot downgrade the version. The scaling problem only exists for the B&R 6PPT30.0702.20F025 panel, the B&R T50 panel and a esa lumia panel work. When we choose a fixed resolution it looks also good, however we also want to support the esa lumia panel with a different resolution. The images show the anisotropic and isotropic option. In the anisotropic option it scales the hight correctly but not the width and in the isotropic option is scales both hight and width false, it also does not start in the top left corner. Does someone have any suggestion why it does not work anymore with the new codesys version and are there workarounds? I added all versions with visualization packages as an image, visuElems is 4.4.0.0.
Last updated: 2024-07-29

Post by dogulas on OPC UA C# client connecting to OPC UA CODESYS server CODESYS Forge talk (Post)
Noob alert! I’m just getting my feet wet with CODESYS. I have a “Hello World” project in the CODESYS IDE. I’m using the Win SoftPLC on the same computer. I’ve added a Communication Manager under the Application node. Under that is “OPC UA Server -> IEC Symbol Publishing 01”. I also added “OPC_UA_Symbols -> Information Model”. I’m not sure I need the second thing. I was grasping at straws. I also set up several dummy symbols in the IEC Symbol Publishing 01 node. In my C# application, I am trying to get an instance of EndpointDescription from CoreClientUtils.SelectEndpoint(“opc.tcp://localhost:1217/Gateway-1”, useSecurity: false, 15000). I wasn’t sure about the “Gateway-1”. I found that in the CODESYS IDE under the project -> Communication Settings. When I execute the previous method call in C#, I get: “BadSecureChannelClosed”. I have no idea what that means. Any pointers to documentation are welcome.
Last updated: 2024-08-16

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 thn-power on Updating OPC UA Core Nodeset on PLS CODESYS Forge talk (Post)
Hi After much trail and error I think I found the root cause to my OPC UA problem. The problem is that I cannot manage to build and download a program with a a custom OPC UA Information model. We use a Weidmueller WL2000 PLS, but the problem also exsist on the Win V3 PLC. Our custom information model is based on the latest versions of the OPC UA Core Nodeset v 1.05.03 (2023-09-20) and UA/DI nodeset 1.04.0 (2022-11-03) Those nodesets are installed in the Codesys Information Model Repository (3.5.19.6) However, when trying to build I get the following error. [ERROR] Untitled1: Communication Manager [Device: PLC Logic: Application]: The information model http://opcfoundation.org/UA/ is required by http://bos.org/ with a minimal publication date from 15.12.2023 but the device has only a model from 15.09.2021 installed. Probably the information model from 15.09.2021 is missing in the information model repository. [ERROR] Untitled1: Communication Manager [Device: PLC Logic: Application]: The information model http://opcfoundation.org/UA/DI/ is required by http://bos.org/ with a minimal publication date from 03.11.2022 but the device has only a model from 09.03.2021 installed. Probably the information model from 09.03.2021 is missing in the information model repository. Build complete -- 2 errors, 1 warnings : No download possible I think the problem is that the UA Core nodeset is implemented in the PLC firmware (at least that in Siemens S7), and that only includes the "old" nodeset from 2021-09-21 etc. So the question is, how (or if?) can I transfer the new nodeset to the PLS? I have created separate Information models under Communication manager with the newer code nodesets (UA and DI). But it seems that the compiler does not recognize them being excising, neither in the Codesys IDE or on the PLC. Would have guessed that this is a common issue, sine many manufacturers use the latest versions of the OPC UA standard, and that it would be a solution to the problem.
Last updated: 2024-09-20

Post by paulg on RasPi CAA Serial example - unexpected behavior during debug CODESYS Forge talk (Post)
I've trimmed down the CAA Serial Codesys example to only listen on one port but, when stepping through the Case structure in debug mode, it jumps out of the structure during a specific point in every scan (I'll point it out below after describing the setup and listing the code). I'm using a Pi 4 Model B, and I have an Arduino Nano Every plugged in via USB which is streaming the following serial message at 1 Hz: Time since opening connection: 1 s Time since opening connection: 2 s ...and so on. The Pi shows the Nano at /dev/ttyACM0 so I edited CODESYSControl_User.cfg to read: Linux.Devicefile=/dev/ttyACM The code in my PLC_PRG is (ignore some of the comments, I hadn't deleted them out from the original example): PROGRAM PLC_PRG VAR xStartTest : BOOL:= TRUE; iState : INT; xTestDone : BOOL;(* True, when the test was done succesfully *) (* Settings to communicate with the COM Port *) aCom1Params : ARRAY [1..7] OF COM.PARAMETER; como1 : COM.Open; comc1 : COM.Close; comw1 : COM.Write; comr1 : COM.Read; //sWrite : STRING := 'Test String!'; sRead : STRING(25); szRead : CAA.SIZE; xCom1OpenError : BOOL; xCom1CloseError : BOOL; xCom1WriteError : BOOL; xCom1ReadError : BOOL; END_VAR //This example shows the communication of two COM Ports with each other. //The first one writes a string of characters, which is read by the second one. //After successful execution, the two COM Ports are closed and the test is done. IF xStartTest THEN CASE iState OF 0: //The parameters are set for the COM Port aCom1Params[1].udiParameterId := COM.CAA_Parameter_Constants.udiPort; aCom1Params[1].udiValue := 1; // the correct Port should be adapted aCom1Params[2].udiParameterId := COM.CAA_Parameter_Constants.udiBaudrate; aCom1Params[2].udiValue := 115200; aCom1Params[3].udiParameterId := COM.CAA_Parameter_Constants.udiParity; aCom1Params[3].udiValue := INT_TO_UDINT(COM.PARITY.NONE); aCom1Params[4].udiParameterId := COM.CAA_Parameter_Constants.udiStopBits; aCom1Params[4].udiValue := INT_TO_UDINT(COM.STOPBIT.ONESTOPBIT); aCom1Params[5].udiParameterId := COM.CAA_Parameter_Constants.udiTimeout; aCom1Params[5].udiValue := 0; aCom1Params[6].udiParameterId := COM.CAA_Parameter_Constants.udiByteSize; aCom1Params[6].udiValue := 8; aCom1Params[7].udiParameterId := COM.CAA_Parameter_Constants.udiBinary; aCom1Params[7].udiValue := 0; //The first Port is opened with the given parameters como1(xExecute := TRUE, usiListLength:=SIZEOF(aCom1Params)/SIZEOF(COM.PARAMETER),pParameterList:= ADR(aCom1Params)); IF como1.xError THEN xCom1OpenError := TRUE; iState := 1000; END_IF //After a successful opening, the next state is reached IF como1.xDone THEN iState := 15; END_IF 15: // the reading process is started comr1(xExecute := TRUE,hCom:= como1.hCom, pBuffer:= ADR(sRead), szBuffer:= SIZEOF(sRead)); IF comr1.xError THEN xCom1ReadError := TRUE; END_IF //After completion the size of the written bytes are saved IF comr1.xDone OR comr1.xError THEN szRead := comr1.szSize; iState := 20; END_IF 20: // If everything was successful the ports are closed and the handles are released comc1(xExecute := TRUE,hCom:= como1.hCom); IF comc1.xError THEN xCom1CloseError := TRUE; END_IF IF comc1.xDone OR comc1.xError THEN iState := 25; END_IF 25: // The first port is closed and the used handle released xTestDone := TRUE; xStartTest := FALSE; iState := 0; como1(xExecute := FALSE); comw1(xExecute := FALSE); comc1(xExecute := FALSE); ELSE iState := 0; END_CASE END_IF I realize as I write this that the .udiPort should be 0 and not 1, but that shouldn't be causing the issue I'm seeing. I'm forcing xStartTest:=TRUE every scan so that I can step into each line and observe what's happening. What I see is that the port parameters are set and the port is opened with no errors, but the code jumps out of the case structure to the last line every time it reaches (and I step into) the iState:=15 line (at the end of the iState:=0 block). So every scan cycle it goes through the block for iState=0 and jumps out at the same spot. I'm a little new to PLC programming so I may be misunderstanding the flow, but shouldn't this case structure keep moving down in the same scan? If it only handles one case per scan, why doesn't the value of iState persist? Thanks! Update: I restarted the Codesys control today and I was then able to see an error for como1.eError of "WRONG_PARAMETER". I tried doing some digging and another post made me think I should add another line to CODESYSControl_User.cfg, so I now have: [SysCom] Linux.Devicefile=/dev/ttyACM portnum := COM.SysCom.SYS_COMPORT1 So now when I set .udiPort to 1, I get "NO_ERROR" but I also don't read anything from the port (i.e. szRead = 0 always). If I try setting the port to 0 (which I'm confused about, because I added a COMPORT1 line but the device shows on the Pi as ACM0), I get the "WRONG_PARAMETER" error again. Is there an easier way to troubleshoot the Pi and view what ports the Codesys runtime is actually able to see while the Pi is running?
Last updated: 2024-06-06

Post by cfam on Codesys Control for PLCnext (PLC - AXL F 2152) CODESYS Forge talk (Post)
Good day All I would like to share some information on this site for the Codesys team as well for the future members using Codesys Control for PLCnext if it is allowed. I hope that i Post it in the correct spot. Subject: Codesys, Codesys Control for PLCnext Objective: Using the following Phoenix components to built a PLC Rack and run it on Codesys: Hardware and Software used 1. 2404267, AXC F 2152 - Controller 2. 1088136, AXL F BP SE6 - Module carrier 3. 1088129, AXL SE DO16/1 - Digital module 4. 1337224, AXL SE PD16 GND - Potential distributors 5. 1088127, AXL SE DI16/1 - Digital module 6. 1337223, AXL SE PD16 24V - Potential distributors 7. 1088123, AXL SE AO4 I 4-20 - Analog module 8. 1088134, AXL SE SC-A - Cover 9. Codesys v3.5 SP19 Patch 4 10. Codesys Control for PLCnext V4.10.0.0 Process: Firstly I built the Rack according to the Phoenix Project+ Software tool. Where I rebuilt it onto my test bench . I used the PLCnext Engineer IDE from Phoenix and all Communications where up and running and my PLC program executed successfully. THEN I tried the same PLC Layout with Codesys and Codesys Control for PLCnext. It was not successful and gave me the "Error: Local Bus not Running". I searched the web for answers but was unsuccessful in finding a solution. So I tried to change my configuration and found that the following Modules COULD NOT be recognized by Codesys Control. The result was that the Local Bus Failed to run. 1337224, AXL SE PD16 GND - Potential distributors 1337223, AXL SE PD16 24V - Potential distributors Example 1, Resulted in "Error: Local Bus Not Running": Module carrier slot 1: 1088129, AXL SE DO16/1 - Digital module Module carrier slot 2: 1337224, AXL SE PD16 GND - Potential distributors Module carrier slot 3: 1088127, AXL SE DI16/1 - Digital module Module carrier slot 4: 1337223, AXL SE PD16 24V - Potential distributors Module carrier slot 5: 1088123, AXL SE AO4 I 4-20 - Analog module Module carrier slot 6: 1088134, AXL SE SC-A - Cover Example 2, Result "Successful": Module carrier slot 1: 1088129, AXL SE DO16/1 - Digital module Module carrier slot 2: 1088127, AXL SE DI16/1 - Digital module Module carrier slot 3: 1088123, AXL SE AO4 I 4-20 - Analog module Module carrier slot 4: 1088134, AXL SE SC-A - Cover Module carrier slot 5: 1088134, AXL SE SC-A - Cover Module carrier slot 6: 1088134, AXL SE SC-A - Cover Result: Codesys or Codesys Control for PLCnext, has a PROBLEM to identify the following Modules. 1. AXL SE PD16 24V - Potential distributors 2. AXL SE PD16 GND - Potential distributors Hope that this information could be useful in future. Best regards Jaco Pretorius
Last updated: 2023-12-06

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 jeffg on ERROR: GetNetLinkSockAndInfoByMac(): could not open netlink socket: Too many open files CODESYS Forge talk (Post)
I just installed codesys runtime on a raspberry pi Cortex-A72 (ARM v8) 64-bit SoC @ 1.5GHz (Compute Module 4) I am running on Codesys control for raspberry pi 64 SL ver 4.13.0 and I keep getting a crash after about five to ten minutes. This program was running fine on a 32bit system with runtime 4.8 previously but they upgraded the panel PC cause it got smashed. Looking at the logs I see this error "ERROR: GetNetLinkSockAndInfoByMac(): could not open netlink socket: Too many open files" at the time of crash. I do have a UDP socket open for a serial to ethernet adapter and im wondering if maybe its opening a bunch of sockets and while receiving messages, Im not sending anything to the device only receiving. Below is the code used for the UDP VAR // Scale Comm fbPeerServer : NBS.UDP_Peer; ipAddress : NBS.IPv4Address; fbReceive : NBS.UDP_Receive; xPeerActiv : BOOL := TRUE; abyReceive : ARRAY [0..255] OF BYTE; sLastValidReceive : STRING(255); udiIndex : UDINT; END_VAR IF xPeerActiv AND NOT fbPeerServer.xBusy THEN ipAddress.SetInitialValue(ipAddress := gvlSettings.sIPAddres); fbPeerServer(xEnable := TRUE, itfIPAddress := ipAddress, uiPort := gvlSettings.uiPort); END_IF fbPeerServer(); fbReceive(xEnable := fbPeerServer.xBusy, itfPeer := fbPeerServer, pData := ADR(abyReceive), udiSize := SIZEOF(abyReceive)); IF fbReceive.udiCount > 0 THEN IF fbReceive.udiCount < SIZEOF(sLastValidReceive) THEN SysMem.SysMemCpy(pDest := ADR(sLastValidReceive), pSrc := ADR(abyReceive), udiCount := fbReceive.udiCount); // Set End of String sLastValidReceive[fbReceive.udiCount] := 0; END_IF END_IF If anyone as seen this I could really use some help figuring it out. I included the Log report
Last updated: 2024-09-19

Post by deeps on web visu on IFM CODESYS Forge talk (Post)
I have an IFM cr1077 display. I would like to show B&R mapp view on IFM visualization. I used coedsys web browser elemnt for this. I could see IFM working fine in Internet web browser but IFM device shows white screen and freezes. I think there is problem with IFM showing the web browser. Is my understanding of the web visu right? am I doing any mistake here?
Last updated: 2023-08-18

Post by arnog on Two drives on one axis, Gantry Robot CODESYS Forge talk (Post)
Hi TK_Jenssen did you found a solution I am setting up the samelike gantry only with two z-axes which are mounted on fix position with an X axes between the two z-axes. The movement and position of both z-axes must be very well aligned and calibrated. Maybe also to be adjusted by programming. Can you sent an example of your solution?
Last updated: 2023-08-25

Post by john-ronald on Communication error (#0), logout performed,please check if plc is connected CODESYS Forge talk (Post)
Hi, I have the same problem. However I am using ethernet connection not USB. I can ping the PLC and also connect to it via Wago ethernet settings, but I cannot upload using the Codesys 2.3. My PLC is Wago 750-862. The detailed error is - " connect: Connection refused Write attempt from invalid socket. " Any help would be appreciated.
Last updated: 2023-09-11

Post by transmin01 on PCAN serial "No CAN driver found" CODESYS Forge talk (Post)
Hi, I am using a PCAN mini CAN board which has the Windows drivers installed on the target PLC. PCAN board can be seen in device manager. However, I am getting "No CAN driver found" error. I have read the post https://forge.codesys.com/forge/talk/CODESYS-V2/thread/44aae19318/ and have uncommented the CmpPCANBasicDrv driver in the CodesysControl.cfg file in development PC and have copied it to the target PC. Current CodesysControl.cfg file attached. Is there anything else I am missing? Regards
Last updated: 2023-09-14

Post by manuknecht on Detect "Cancel" Press in FileOpenSave Dialog CODESYS Forge talk (Post)
When using the FileOpenSave dialog and using the Visu_FbFileListProvider FB as an In/Output I could not manage to detect the difference of pressing the "Load" button on the dialog vs. pressing the "Cancel" button. In both cases, the selected file is updated if the dialog is closed when checking using the Visu_FbFileListProvider.GetSelectedFileName() command. How can I prevent reading or writing of a file when the "Cancel" button was pressed?
Last updated: 2023-09-19

<< < 1 .. 159 160 161 162 163 .. 168 > >> (Page 161 of 168)

Showing results of 4194

Sort by relevance or date