Search talk: variable address

 
<< < 1 .. 31 32 33 34 35 .. 38 > >> (Page 33 of 38)

Post by dkugler on Alarm State Icon CODESYS Forge talk (Post)
thank you for pointing me to this "bug"!! I haven't recognized, the bit is reset after the first alarm is gone. I use this only for warnings, so it's not a drama, but was not correct in the past. I solved it now simply stupid by counting up a variable every time an alarm appears and decreasing it if an alarm is gone. The "warning lamp" is activated by checking the counter is > 0 The nice side effect, i'm able to show the number of active alarms in the state line now.
Last updated: 2024-04-24

Post by talhaali on Create an alarm list without use of Alarm config CODESYS Forge talk (Post)
Hi, I am trying to access active alarms in code(As alarm count variable updates only when we go to to alarm table frame in visualization). I wrote following code but it is not working: VAR iCountActiveAlarms : INT; parritfActiveAlarms : POINTER TO ARRAY[0..0] OF IAlarm; itfAlarmManagerClientAll : IAlarmManagerClient; END_VAR AlarmManager.g_AlarmHandler.GetActiveAlarms( itfAlarmManagerClient :=itfAlarmManagerClientAll, iCountActiveAlarms => iCountActiveAlarms, parritfActiveAlarms => parritfActiveAlarms); The Value is always 0. Please help.
Last updated: 2024-06-06

Post by talhaali on Create an alarm list without use of Alarm config CODESYS Forge talk (Post)
Hi, I am trying to access active alarms in code(As alarm count variable updates only when we go to to alarm table frame in visualization). I wrote following code but it is not working: VAR iCountActiveAlarms : INT; parritfActiveAlarms : POINTER TO ARRAY[0..0] OF IAlarm; itfAlarmManagerClientAll : IAlarmManagerClient; END_VAR AlarmManager.g_AlarmHandler.GetActiveAlarms( itfAlarmManagerClient :=itfAlarmManagerClientAll, iCountActiveAlarms => iCountActiveAlarms, parritfActiveAlarms => parritfActiveAlarms); The Value is always 0. Please help.
Last updated: 2024-06-06

Post by nano on How to access to variable value through symbolic string name CODESYS Forge talk (Post)
i know, this is the reason for us either. PLC-Handler is to big, and only available with additional Contracts/Costs. OPC-UA is to slow for us. As described, there is a solution available, but im not allowed to post them here. i would prefer you send a message at codesys store by "have a question" or similar called. Not sure. Or, if an Codesys-Official Member allows to share that informations, i can give you the right hints.
Last updated: 2024-06-15

Post by sajid on NMEA Serial data read in Control win v3 x64 CODESYS Forge talk (Post)
I am using the SerialCom example program from the CODESYS website to read NMEA strings in CODESYS Control Win V3 x64 through a serial-to-USB converter. However, I occasionally receive only partial data or encounter errors in the received string. A screenshot of expected NMEA string attached for reference. Could you please advise on how to ensure the full NMEA string is received consistently? Error in strRead variable is <value of="" the="" expression="" cannot="" be="" retrieved=""></value>
Last updated: 2025-10-16

Post by sajid on NMEA Serial data read in Control win v3 x64 CODESYS Forge talk (Post)
I am using the SerialCom example program from the CODESYS website to read NMEA strings in CODESYS Control Win V3 x64 through a serial-to-USB converter. However, I occasionally receive only partial data or encounter errors in the received string. A screenshot of expected NMEA string attached for reference. Could you please advise on how to ensure the full NMEA string is received consistently? Error in strRead variable is <value of="" the="" expression="" cannot="" be="" retrieved=""></value>
Last updated: 2025-10-16

Post by codegunner on how to convert library from CodeSys 2.3 to CodeSys 3.x ? CODESYS Forge talk (Post)
hello, ive tried everything and keep getting error like i have opened a file in read only so cannot save no idea what is causing it, file is not read only i cannot even open a new file i make with one variable in 2.3, get same error for read only. do you have a 2.3 file you can send me tomtry and open for a test? thanks
Last updated: 2026-04-29

Post by caspershes on Checking the device tree, not just the code: what else is worth a static check? CODESYS Forge talk (Post)
I spend most of my time reviewing other people's CODESYS projects before commissioning, and two kinds of defects keep showing up. Both compile clean. Both read fine. One is in the code. A pause timer whose own input gets cleared inside the branch the timer is supposed to gate: rampDelay(IN := run_2); IF NOT run_2 OR rampDelay.Q THEN run_1 := TRUE; run_2 := FALSE; // the timer's own input, cleared right here ELSE run_1 := FALSE; run_2 := FALSE; END_IF Next scan IN is FALSE, the timer resets, the condition is true again, and the second pump starts immediately. A 30-second ramp delay that actually lasts one task cycle. The setpoint is on the HMI, the operator turns it, and nothing changes. The other is not in the code at all. On one site the outdoor temperature read 0.0 °C in mild weather. The ST was correct, the variable was bound to the channel — but the channel's sensor type was left at "disabled", so nothing was ever digitised. Same class: a module with Disable_module = TRUE, or an analog output bound to a variable while its mode is off. Nothing in the project reports any of this, and the code review never looks there, because the configuration lives in the device tree and not in the POUs. That second class is what pushed me to parse the .export format rather than PLCopenXML alone — the export carries the device tree and the visualization, so "nothing ever writes this alarm variable" stops being a guess and becomes a fact you can check against the screen bindings. Three things about the format that cost me time, in case they save you some: the same device parameter can appear three times (template, internal copy, actual configuration) — the last occurrence is the one in effect; the enum value of a parameter is not in the parameter itself, it is one level down in BaseType/Value; a channel counts as used when a variable is bound to SensorValueN.SensorValue — InputStatus is a bad indicator, people deliberately bind it on spare inputs. So the question. What else would you check automatically, given both the code and the device tree? I am collecting rules from sites, not from style guides, and the configuration side feels largely unexplored. For what it is worth, the checker I use for this is free and runs offline (single exe, no install, nothing uploaded anywhere): https://github.com/caspershes/plc-lint — 43 rules at the moment, reads .export and PLCopenXML. Happy to add rules people here suggest.
Last updated: 2026-10-27

Post by riccardo on VisuElems.CurrentUserGroupId is not stable CODESYS Forge talk (Post)
GoodMorning everyone. I have a system that, in case of alarm, have to block. When the operator logs in must have to acknoledge the alarm and should operate in the system freely. To perform this I detect the logged User by (VisuElems.CurrentUserGroupID <> 0) with a similar code to the the following: PROGRAM AlarmMngt VAR alarm : BOOL:= FALSE; Ack : BOOL:= TRUE; PushBottonOpening : BOOL:= FALSE; Valve : BOOL := FALSE; Flag: BOOL := FALSE; END_VAR IF alarm AND Ack AND (NOT Flag) THEN valve := FALSE; PushBottonOpening := FALSE; Ack := FALSE flag := TRUE; ELSIF (NOT alarm) AND Ack THEN flag := FALSE; END_IF (* if the system is in alarm but there is a logged operator that acknowledge the alarm the system allows the valve opening.*) IF (VisuElems.CurrentUserGroupID <> 0) AND Ack AND Alarm AND PushBottonOpening THEN Valve := TRUE; ELSIF (VisuElems.CurrentUserGroupID = 0) AND Alarm THEN valve := FALSE; END_IF The problem I have is in the last 5 lines of the code: Even if there is a logged in user, the GroupID variable is subjected to a refresh that cyclically set for an instant it to 0 and this close the valve making difficult to the user to work Now I solved it creating a time hysteresys cycle but it is not a good solution. Someone is able to explane me why the GroupID variable is sobjected to this refresh and how to stabilize to avoiding it? Thank you in advance, Riccardo
Last updated: 2023-11-10

Post by trusty-squire on Confused by dwIpoTime input for SMC_Interpolator CODESYS Forge talk (Post)
Hi, Learning Codesys CNC, and I am confused by the dwIpoTime parameter. I have a basic demo application, using SMC_Interpolator feeding into SMC_TRAFO_Gantry2Tool2, which then sets the position of the x/y SM_Drive_Virtual axis. I also have a C axis which revolves the tool, which is controlled using a simple tangential angle calculation SMC_CalcDirectionFromVector. The GCode I'm using has feed/accel set at 500. The axis configuration limits are well above that (2000). What's strange is that, when I run the simulation, the feed speed changes drastically when I update the variable dwIpoTime. The larger the number, the faster it moves. What's going on here? The documentation only says "This variable has to be set for each call. It represents the cycle time in μsec." Why does it change the feed speed I'm seeing the in simulation? What is a good number to use? The example I was looking at set it at 5000. Screenshot attached.
Last updated: 2024-07-18

Post by gseidel on AXIS_REF_SM3 Error Codes? CODESYS Forge talk (Post)
Hi SLUCodesys, dwErrorId is a drive specific error number. The drive documentation should be consulted to interpret it. (Note that you should use MC_ReadAxisError to read this error, see https://content.helpme-codesys.com/en/libs/SM3_Basic/Current/SM3_Basic/POUs/Diagnostics/MC_ReadAxisError.html. Accessing the internal variable will result in outdated values if the acis error is not mapped by PDO and is not recommended in general.) uiDriveInterfaceError holds errors of the SoftMotion driver for the drive. It is also an internal variable, not intended for direct access. It is intended for logging, the PLC log will contain the drive interface error, consisting of this number and an error text. My recommendation for handling axis errors in the CODESYS application: 1) Use MC_ReadStatus on the axis to find out whether it is in state Errorstop 2) If in Errorstop, there are two possibilities: an error reported by the drive (MC_ReadAxisError) or an error of the SoftMotion function blocks (output MC_ReadStatus.FBErrorOccured). 3) If there is no drive error, you can use SMC_ReadFBError https://content.helpme-codesys.com/en/libs/SM3_Basic/Current/SM3_Basic/POUs/Diagnostics/FBError/SMC_ReadFBError.html Best regards, Georg
Last updated: 2025-09-24

Post by e13740e on Parameterized Property syntax for array element processing CODESYS Forge talk (Post)
Hello. I'm trying to create a Parameterized Property(CDS V3.5 SP21) to avoid copy-pasting code for processing array elements. I can't seem to get any result. Perhaps I am making a mistake with the syntax. None of the declaration options below are accepted by the compiler. If you know and use them (Parameterized Properties) in your work, please let me know. Thank you in advance. Option 1: PROPERTY <property_name> : <data_type> VAR_INPUT <index_name> : <index_type>; // One or more index parameters are declared here END_VAR</index_type></index_name></data_type></property_name> GET Code that uses <index_name> to return a value END_GET</index_name> SET Code that uses <index_name> and the implicit variable <property_name> to write a value END_SET</property_name></index_name> END_PROPERTY Option 2: PROPERTY <property_name> (<index_name> : <index_type>) : <data_type></data_type></index_type></index_name></property_name> GET Code that uses <index_name> to return a value END_GET</index_name> SET Code that uses <index_name> and the implicit variable <property_name> to write a value END_SET</property_name></index_name> END_PROPERTY
Last updated: 2025-10-09

Post by e13740e on Parameterized Property syntax for array element processing CODESYS Forge talk (Post)
Hello. I'm trying to create a Parameterized Property(CDS V3.5 SP21) to avoid copy-pasting code for processing array elements. I can't seem to get any result. Perhaps I am making a mistake with the syntax. None of the declaration options below are accepted by the compiler. If you know and use them (Parameterized Properties) in your work, please let me know. Thank you in advance. Option 1: PROPERTY <property_name> : <data_type> VAR_INPUT // One or more index parameters are declared here <index_name> : <index_type>; END_VAR</index_type></index_name></data_type></property_name> // Accessor for reading GET // Code that uses <Index_Name> to return a value END_GET // Accessor for writing SET // Code that uses <Index_Name> and // the implicit variable <Property_Name> to write a value END_SET END_PROPERTY Option 2: PROPERTY <property_name> (<index_name> : <index_type>) : <data_type></data_type></index_type></index_name></property_name> // Accessor for reading GET // Code that uses <Index_Name> to return a value END_GET // Accessor for writing SET // Code that uses <Index_Name> and // the implicit variable <Property_Name> to write a value END_SET END_PROPERTY
Last updated: 2025-10-09

Post by phoward131 on Alarm State Icon CODESYS Forge talk (Post)
I am trying to create an icon on an overview screen that depicts if an alarm group has active alarms, active acknowledged alarms, or inactive unacknowledged alarms (waiting for confirmation). I've attempted to set up Notification Actions in the Alarm Class to set variables based on state changes but have been unable to find a clean and effective way to do this. Because an action on any alarm will trigger the variable to be set as instructed, I'm struggling to find a way to configure it for what I need (ie if two alarms activate, then one deactivates, the variable for indicating an alarm is active would be cleared after the single deactivation). I've been pointed toward the Alarm Manager example project but I'm finding it too complicated to understand how to implement it in my own project. Has anyone come up with another good way to indicate the states of alarms or a simpler usage of the Alarm Manager functions?
Last updated: 2024-04-23

Post by gatto on Backtick identifiers CODESYS Forge talk (Post)
Hello, I’m in Codesys 3.5.20.40 and I try to declare the variable ´var1´ but I get an error. here : https://content.helpme-codesys.com/en/CODESYS%20Development%20System/_cds_rules.html i read : Backtick identifiers By using backticks, characters can also be used in identifiers that are not normally permitted in identifiers, such as special characters. The acute accent character is used for backticks: ´ (Unicode: U+02CA) The use of backticks is recommended in order to be able to use the same identifiers in CODESYS as in other programming languages or documents, such as circuit diagrams. Any character may be used between two backticks, except line breaks and other backticks. Keywords are also allowed as identifiers between backticks. Examples: ´Variable+9´ ´INT´ The backticks are part of each identifier and therefore var1 and ´var1´ are two different identifiers. Example PROGRAM PLC_PRG VAR var1 : INT; ´var1´: INT; END_VAR var1 := var1 + 1; ´var1´ := 12; Are there any limitations or is something missing in my development environment?
Last updated: 2025-10-28

Post by bertus on Can't get SMC_SmoothPath to work CODESYS Forge talk (Post)
Hi Georg, thanks for your time. What is the value of D_ANGLE_TOL? It is set to 0.01. Do you need the assignment bAbort := NOT bDecoder? Does it help to leave it out? This seems to make no difference. Any errors (e.g. SMC_SmoothPath.Error/ErrorID) or PLC log messages? No errors or log messages. What if you comment out SMC_SmoothMerge and SMC_LimtiDynamics, is corner smoothing still not working? Indeed. Is bDecode written from a different task (e.g. visu)? Then I would recommend to assign to a local variable (bDecodeLocal := bDecode) and use that for all FBs. Otherwise, FBs might see different values of bDecode in a single cycle, which will cause problems. It is a local variable, written from a state machine inside this program. But there is new information: During some trial and error, I tried skipping "stage 2: merge short linear segments" (SMC_SmoothMerge). And suddenly it rounds the corners, see attached image. Looking a bit closer, I noticed that (with the original program) after a download (cold start?), it in fact did round the corners, but only once. Ever next cycle in which the NC program was executed, the corners where not rounded. Not sure if there is any relation, but SMC_SmoothMerge is also the only FB which has no bAbort input. Perhaps I need to reset it (or any buffers) by other means?
Last updated: 2025-12-18

Post by ilya-vah on Table element issues CODESYS Forge talk (Post)
Hello, First post here. I would like to clarify whether the following behavior is known or if it is a bugs. Issue 1 — First row not displayed when using Maximum array index with 1-based arrays Description: When displaying data from an array that is indexed starting from 1 (e.g., ARRAY[1..N]), and the number of displayed rows is limited using the Maximum array index property, the first row of the array is not shown in the visualization. Steps to reproduce: Create an array indexed from 1 (e.g., ARRAY[1..N]). Bind the array to a Table element. Limit the number of displayed rows using the Maximum array index property. Run the visualization. Actual result: The first array element (index 1) is not displayed in the table. Issue 2 — Tooltip string placeholder cannot be bound to string variable from array Description: It is not possible to use a string placeholder in the tooltip that is bound to a string variable from the array. Steps to reproduce: Use a table bound to an array containing string variables. Configure a tooltip using a string placeholder referencing a string field from the array. Run the visualization. Actual result: Tooltip doesn't show any text. A test project demonstrating both issues is attached. Thank you for your time and support.
Last updated: 2026-02-16

Post by egr99 on Modbus TCP Server connection is ESTABLISHED but all holding registers are value 0? CODESYS Forge talk (Post)
Hi there, Read the above description and experienced the same: Reading coil/discrete input/input register/holding register doesn't fill the mapped I/O variable. Any suggestions? Defined (see attachment): - Ethernet (with parameters according to the used Ethernet adapter of my Windows 11 laptop) - -Modbus TCP Client - - -LOGO231 as Modbus TCP Server - - -WS242 as Modbus TCP Server (WaveShare Modbus TCP <-> RTU converter) - - - -WS242_01 as Modbus Server, COM port (slave-id 1 RTU) - - - -WS242_03 idem (slave-id 3 RTU) - - - -WS242_11 idem (slave-id 11 RTU) Writing coil/holding register works from a mapped I/O variable works fine. Verification of Modbus traffic with WireShark: QUERY to and the RESPONSE of all slave-ids are correct Status of all defined is CONNECTED, RESPONSE_SUCCESS, RUNNING etc. Request counters increase with expected frequency. Error counter = 0. (To have all counters works fine I had to change Modbus TCP Client's parameter OptimizationON to FALSE). LOGO231 works fine: values in mapped I/O conform expectation WS242 without Modbus Server, COM port and with defined channels (for only 1 slave-id possible) works fine. PLC Settings: Update I/O while in stop: I see xBusy changing from FALSE to TRUE and vice versa. Always update variables: Enabled 1
Last updated: 2026-04-05

Post by imdatatas on CFC editor: enable inline value entry on unconnected input pins (as in Ladder Logic editor) CODESYS Forge talk (Post)
In the CODESYS Ladder Logic editor, there's a really practical feature available while logged in (online) to the PLC: for an existing function block (e.g. TON or MC_MoveAbsolute), double-clicking on an unconnected input pin directly opens a value entry window right in the editor — with no need to assign any variable — and you can type a value directly. Likewise, if the input pin is of an ENUM or STRUCT type, it lets you pick a value of that type straight from a dropdown list. It also doesn't require assigning a variable or adding it to a watch list, etc. Unfortunately, in the CFC editor you can't write values directly to those unconnected input pins the way you can in Ladder — CFC only supports monitoring/display there. I wish this existing Ladder editor feature were also available in CFC — it would make the CFC editor far more usable. I think this would be a relatively small addition to the CFC editor, but it would make a real difference in daily commissioning and debugging work. It would be great to hear the development team's thoughts on whether this could be considered for a future release. Thanks in advance for reading!
Last updated: 2026-09-10

Post by wallandreas008 on OPC-Server V3 - keine Items zu sehen... CODESYS Forge talk (Post)
Hallo ich habe ebenfalls Probleme mit dem Verbindungsaufbau zu 3 ABB SPSen nach einem Windows Update. hier meine OPCServer.ini [Server] updaterate=200 publicgroups=0 logevents=1 syncinit=1 PLCs=3 PLC0=PLC1 PLC1=PLC2 PLC2=PLC3 [PLC:PLC1] interfacetype=GATEWAY motorola=1 nologin=0 timeout=10000 tries=3 buffersize=4800 project=ZE_PC01 reconnecttime=10 waittime=12 active=1 logevents=1 logfilter=0 gateway=Tcp/Ip gatewayaddress=localhost gatewayport=1210 parameters=3 device=Tcp/Ip instance=TCPIP_0_101 parameter0=Address value0=192.168.0.101 parameter1=Port value1=1201 parameter2=Motorola byteorder value2=Yes [PLC:PLC2] interfacetype=GATEWAY motorola=1 nologin=0 timeout=10000 tries=3 buffersize=4800 project=ZE_PC02 reconnecttime=15 waittime=10 active=1 logevents=1 logfilter=10 gateway=Tcp/Ip gatewayaddress=localhost gatewayport=1210 parameters=3 device=Tcp/Ip instance=TCPIP_0_102_ parameter0=Address value0=192.168.0.102 parameter1=Port value1=1201 parameter2=Motorola byteorder value2=Yes [PLC:PLC3] interfacetype=GATEWAY motorola=1 nologin=0 timeout=10000 tries=3 buffersize=4800 project=ZE_PC03 reconnecttime=15 waittime=10 active=1 logevents=1 logfilter=10 gateway=Tcp/Ip gatewayaddress=localhost gatewayport=1210 parameters=3 device=Tcp/Ip instance=TCPIP_0_103_ parameter0=Address value0=192.168.0.103 parameter1=Port value1=1201 parameter2=Motorola byteorder value2=Yes [Redundancy] NumOfGroups=0 Im Logfile habe ich immer diese Meldungen: ;********* ;<loggername>OPCServer.log</loggername> ;<logoptions> ; <maxfiles>0</maxfiles> ; <maxfilesize>1048576</maxfilesize> ;</logoptions> ;********* 2026-09-29T12:01:40.598+0200, OPC-Server V3.5.20.0 by CODESYS Development GmbH. 2026-09-29T12:01:40.598+0200, Path for ini-File: C:\ProgramData\CODESYSOPC\OPCServer.ini 2026-09-29T12:01:40.598+0200, Path for AE-Config: C:\Program Files (x86)\CODESYS 3.5.20.0\CODESYS OPC Server 3\OPCServerA.ini 2026-09-29T12:01:40.598+0200, AE-Configuration unused. 2026-09-29T12:01:40.598+0200, 3 PLCs configured 2026-09-29T12:01:40.598+0200, [PLC1]: Try to open connection... 2026-09-29T12:01:40.599+0200, [PLC2]: Try to open connection... 2026-09-29T12:01:40.599+0200, [PLC3]: Try to open connection... 2026-09-29T12:01:40.599+0200, [PLC1]: Open communication successful 2026-09-29T12:01:40.600+0200, [__CommState] : Initially added implicit variable. 2026-09-29T12:01:40.601+0200, [__CommStateOK] : Initially added implicit variable. 2026-09-29T12:01:40.601+0200, [PLC1]: ---------- Configuration ---------- 2026-09-29T12:01:40.601+0200, [PLC2]: Open communication successful 2026-09-29T12:01:40.601+0200, [__CommState] : Initially added implicit variable. 2026-09-29T12:01:40.601+0200, [PLC1]: PLCHandler Version: 3.5.20.0 2026-09-29T12:01:40.601+0200, [PLC1]: m_pPlcConfig->ulId = 0, m_pPlcConfig->pszName = PLC1 2026-09-29T12:01:40.601+0200, [PLC1]: m_pPlcConfig->it = IT_GATEWAY, m_pPlcConfig->bActive = 1 2026-09-29T12:01:40.601+0200, [PLC1]: m_pPlcConfig->bLogToFile = 1, m_pPlcConfig->ulLogFilter = 0xF 2026-09-29T12:01:40.601+0200, [PLC1]: m_pPlcConfig->bMotorola = 1, m_pPlcConfig->bLogin = 1 2026-09-29T12:01:40.601+0200, [PLC1]: m_pPlcConfig->ulBufferSize = 4800, m_pPlcConfig->bPreCheckIdentity = 0 2026-09-29T12:01:40.601+0200, [PLC1]: m_pPlcConfig->ulHwVersion = 0 2026-09-29T12:01:40.601+0200, [PLC1]: m_pPlcConfig->ulTimeout = 10000, m_pPlcConfig->ulNumTries = 3 2026-09-29T12:01:40.601+0200, [PLC1]: m_pPlcConfig->ulWaitTime = 12000, m_pPlcConfig->ulReconnectTime = 10000 2026-09-29T12:01:40.601+0200, [PLC1]: m_pPlcConfig->pszProjectName = ZE_PC01 2026-09-29T12:01:40.601+0200, [PLC1]: m_pPlcConfig->gwc->pszDeviceName = Tcp/Ip 2026-09-29T12:01:40.601+0200, [PLC1]: m_pPlcConfig->gwc->pszAddress = localhost, m_pPlcConfig->gwc->ulPort = 1210 2026-09-29T12:01:40.601+0200, [__CommStateOK] : Initially added implicit variable. 2026-09-29T12:01:40.601+0200, [PLC2]: ---------- Configuration ---------- 2026-09-29T12:01:40.601+0200, [PLC3]: Open communication successful 2026-09-29T12:01:40.601+0200, [PLC2]: PLCHandler Version: 3.5.20.0 2026-09-29T12:01:40.601+0200, [PLC2]: m_pPlcConfig->ulId = 1, m_pPlcConfig->pszName = PLC2 2026-09-29T12:01:40.601+0200, [PLC2]: m_pPlcConfig->it = IT_GATEWAY, m_pPlcConfig->bActive = 1 2026-09-29T12:01:40.601+0200, [PLC2]: m_pPlcConfig->bLogToFile = 1, m_pPlcConfig->ulLogFilter = 0xF 2026-09-29T12:01:40.601+0200, [PLC2]: m_pPlcConfig->bMotorola = 1, m_pPlcConfig->bLogin = 1 2026-09-29T12:01:40.601+0200, [PLC2]: m_pPlcConfig->ulBufferSize = 4800, m_pPlcConfig->bPreCheckIdentity = 0 2026-09-29T12:01:40.601+0200, [PLC2]: m_pPlcConfig->ulHwVersion = 0 2026-09-29T12:01:40.601+0200, [PLC2]: m_pPlcConfig->ulTimeout = 10000, m_pPlcConfig->ulNumTries = 3 2026-09-29T12:01:40.601+0200, [PLC2]: m_pPlcConfig->ulWaitTime = 10000, m_pPlcConfig->ulReconnectTime = 15000 2026-09-29T12:01:40.601+0200, [PLC2]: m_pPlcConfig->pszProjectName = ZE_PC02 2026-09-29T12:01:40.601+0200, [PLC2]: m_pPlcConfig->gwc->pszDeviceName = Tcp/Ip 2026-09-29T12:01:40.601+0200, [PLC2]: m_pPlcConfig->gwc->pszAddress = localhost, m_pPlcConfig->gwc->ulPort = 1210 2026-09-29T12:01:40.601+0200, [PLC2]: m_pDeviceDesc->pszName = Tcp/Ip 2026-09-29T12:01:40.601+0200, [__CommState] : Initially added implicit variable. 2026-09-29T12:01:40.601+0200, [PLC2]: m_pDeviceDesc->pszInstance = TCPIP_0_102_ 2026-09-29T12:01:40.601+0200, [PLC2]: m_pDeviceDesc->ulNumParams = 5 2026-09-29T12:01:40.601+0200, [PLC2]: parameter0 = Address, value0 = 192.168.0.102 2026-09-29T12:01:40.601+0200, [PLC2]: parameter1 = Port, value1 = 1201 2026-09-29T12:01:40.601+0200, [PLC2]: parameter2 = Motorola byteorder, value2 = Yes 2026-09-29T12:01:40.601+0200, [PLC2]: parameter3 = SymbolFilePath, value3 = C:\Windows\system32\ 2026-09-29T12:01:40.601+0200, [PLC2]: parameter4 = WriteThroughReadCache, value4 = 1 2026-09-29T12:01:40.601+0200, [PLC2]: ----------------------------------- 2026-09-29T12:01:40.601+0200, [PLC2]: CPLCHandler: Interface: IT_GATEWAY used 2026-09-29T12:01:40.602+0200, [PLC1]: m_pDeviceDesc->pszName = Tcp/Ip 2026-09-29T12:01:40.602+0200, [PLC1]: m_pDeviceDesc->pszInstance = TCPIP_0_101 2026-09-29T12:01:40.602+0200, [__CommStateOK] : Initially added implicit variable. 2026-09-29T12:01:40.602+0200, [PLC3]: ---------- Configuration ---------- 2026-09-29T12:01:40.602+0200, [PLC3]: PLCHandler Version: 3.5.20.0 2026-09-29T12:01:40.602+0200, [PLC3]: m_pPlcConfig->ulId = 2, m_pPlcConfig->pszName = PLC3 2026-09-29T12:01:40.602+0200, [PLC3]: m_pPlcConfig->it = IT_GATEWAY, m_pPlcConfig->bActive = 1 2026-09-29T12:01:40.602+0200, [PLC3]: m_pPlcConfig->bLogToFile = 1, m_pPlcConfig->ulLogFilter = 0xF 2026-09-29T12:01:40.602+0200, [PLC3]: m_pPlcConfig->bMotorola = 1, m_pPlcConfig->bLogin = 1 2026-09-29T12:01:40.602+0200, [PLC3]: m_pPlcConfig->ulBufferSize = 4800, m_pPlcConfig->bPreCheckIdentity = 0 2026-09-29T12:01:40.602+0200, [PLC3]: m_pPlcConfig->ulHwVersion = 0 2026-09-29T12:01:40.602+0200, [PLC3]: m_pPlcConfig->ulTimeout = 10000, m_pPlcConfig->ulNumTries = 3 2026-09-29T12:01:40.602+0200, [PLC3]: m_pPlcConfig->ulWaitTime = 10000, m_pPlcConfig->ulReconnectTime = 15000 2026-09-29T12:01:40.602+0200, [PLC3]: m_pPlcConfig->pszProjectName = ZE_PC03 2026-09-29T12:01:40.602+0200, [PLC3]: m_pPlcConfig->gwc->pszDeviceName = Tcp/Ip 2026-09-29T12:01:40.602+0200, [PLC3]: m_pPlcConfig->gwc->pszAddress = localhost, m_pPlcConfig->gwc->ulPort = 1210 2026-09-29T12:01:40.602+0200, [PLC3]: m_pDeviceDesc->pszName = Tcp/Ip 2026-09-29T12:01:40.602+0200, [PLC3]: m_pDeviceDesc->pszInstance = TCPIP_0_103_ 2026-09-29T12:01:40.602+0200, [PLC3]: m_pDeviceDesc->ulNumParams = 5 2026-09-29T12:01:40.602+0200, [PLC3]: parameter0 = Address, value0 = 192.168.0.103 2026-09-29T12:01:40.602+0200, [PLC3]: parameter1 = Port, value1 = 1201 2026-09-29T12:01:40.602+0200, [PLC3]: parameter2 = Motorola byteorder, value2 = Yes 2026-09-29T12:01:40.602+0200, [PLC3]: parameter3 = SymbolFilePath, value3 = C:\Windows\system32\ 2026-09-29T12:01:40.602+0200, [PLC3]: parameter4 = WriteThroughReadCache, value4 = 1 2026-09-29T12:01:40.602+0200, [PLC3]: ----------------------------------- 2026-09-29T12:01:40.602+0200, [PLC3]: CPLCHandler: Interface: IT_GATEWAY used 2026-09-29T12:01:40.603+0200, [PLC1]: m_pDeviceDesc->ulNumParams = 5 2026-09-29T12:01:40.603+0200, [PLC1]: parameter0 = Address, value0 = 192.168.0.101 2026-09-29T12:01:40.603+0200, [PLC1]: parameter1 = Port, value1 = 1201 2026-09-29T12:01:40.603+0200, [PLC1]: parameter2 = Motorola byteorder, value2 = Yes 2026-09-29T12:01:40.603+0200, [PLC1]: parameter3 = SymbolFilePath, value3 = C:\Windows\system32\ 2026-09-29T12:01:40.603+0200, [PLC1]: parameter4 = WriteThroughReadCache, value4 = 1 2026-09-29T12:01:40.603+0200, [PLC1]: ----------------------------------- 2026-09-29T12:01:40.603+0200, [PLC1]: CPLCHandler: Interface: IT_GATEWAY used 2026-09-29T12:01:40.623+0200, [PLC2]: CPLCHandler: Reconnect[1]: Reconnect cycle begin... 2026-09-29T12:01:40.623+0200, [PLC3]: CPLCHandler: Reconnect[1]: Reconnect cycle begin... 2026-09-29T12:01:40.623+0200, [PLC1]: CPLCHandler: Reconnect[1]: Reconnect cycle begin... 2026-09-29T12:01:40.623+0200, [PLC1]: CPLCHandler: Reconnect[1]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:01:40.623+0200, [PLC3]: CPLCHandler: Reconnect[1]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:01:40.625+0200, [PLC2]: CPLCHandler: Reconnect[1]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:01:40.850+0200, * ERROR: [PLC2]: CPLCHandler: Reconnect[1]: FAILED! Symbols were loaded offline 2026-09-29T12:01:40.850+0200, ERROR: [PLC3]: CPLCHandler: Reconnect[1]: FAILED! Symbols were loaded offline 2026-09-29T12:01:40.851+0200, [PLC2]: Open communication successful 2026-09-29T12:01:40.851+0200, [PLC2]: Starting adding new symbols 746... 2026-09-29T12:01:40.852+0200, [PLC3]: Open communication successful 2026-09-29T12:01:40.852+0200, [PLC3]: Starting adding new symbols 1168... 2026-09-29T12:01:40.875+0200, [PLC2]: Adding symbols finished 2026-09-29T12:01:40.875+0200, [PLC2]: CPLCHandler: Reconnect[1]: Reconnect cycle end 2026-09-29T12:01:40.881+0200, [PLC3]: Adding symbols finished 2026-09-29T12:01:40.881+0200, [PLC3]: CPLCHandler: Reconnect[1]: Reconnect cycle end 2026-09-29T12:01:45.928+0200, ERROR: [PLC1]: CPLCHandler: Reconnect[1]: FAILED! Symbols were loaded offline 2026-09-29T12:01:45.928+0200, [PLC1]: Open communication successful 2026-09-29T12:01:45.929+0200, [PLC1]: Starting adding new symbols 499... 2026-09-29T12:01:45.933+0200, [PLC1]: Adding symbols finished 2026-09-29T12:01:45.933+0200, [PLC1]: CPLCHandler: Reconnect[1]: Reconnect cycle end 2026-09-29T12:01:46.110+0200, OPC-Server started successful. 2026-09-29T12:01:50.625+0200, [PLC1]: CPLCHandler: Reconnect[2]: Reconnect cycle begin... 2026-09-29T12:01:50.625+0200, [PLC1]: CPLCHandler: Reconnect[2]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:01:55.625+0200, [PLC3]: CPLCHandler: Reconnect[2]: Reconnect cycle begin... 2026-09-29T12:01:55.625+0200, [PLC2]: CPLCHandler: Reconnect[2]: Reconnect cycle begin... 2026-09-29T12:01:55.625+0200, [PLC2]: CPLCHandler: Reconnect[2]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:01:55.625+0200, [PLC3]: CPLCHandler: Reconnect[2]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:01:55.625+0200, ERROR: [PLC3]: CPLCHandler: Reconnect[2]: FAILED! 2026-09-29T12:01:55.625+0200, [PLC3]: CPLCHandler: Reconnect[2]: Reconnect cycle end 2026-09-29T12:01:55.699+0200, ERROR: [PLC1]: CPLCHandler: Reconnect[2]: FAILED! 2026-09-29T12:01:55.699+0200, [PLC1]: CPLCHandler: Reconnect[2]: Reconnect cycle end 2026-09-29T12:01:59.341+0200, ERROR: [PLC2]: CPLCHandler: Reconnect[2]: FAILED! 2026-09-29T12:01:59.341+0200, [PLC2]: CPLCHandler: Reconnect[2]: Reconnect cycle end 2026-09-29T12:02:00.626+0200, [PLC1]: CPLCHandler: Reconnect[3]: Reconnect cycle begin... 2026-09-29T12:02:00.626+0200, [PLC1]: CPLCHandler: Reconnect[3]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:02:05.700+0200, ERROR: [PLC1]: CPLCHandler: Reconnect[3]: FAILED! 2026-09-29T12:02:05.700+0200, [PLC1]: CPLCHandler: Reconnect[3]: Reconnect cycle end 2026-09-29T12:02:10.626+0200, [PLC3]: CPLCHandler: Reconnect[3]: Reconnect cycle begin... 2026-09-29T12:02:10.626+0200, [PLC2]: CPLCHandler: Reconnect[3]: Reconnect cycle begin... 2026-09-29T12:02:10.626+0200, [PLC3]: CPLCHandler: Reconnect[3]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:02:10.626+0200, [PLC2]: CPLCHandler: Reconnect[3]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:02:10.626+0200, ERROR: [PLC2]: CPLCHandler: Reconnect[3]: FAILED! 2026-09-29T12:02:10.626+0200, [PLC2]: CPLCHandler: Reconnect[3]: Reconnect cycle end 2026-09-29T12:02:10.627+0200, [PLC1]: CPLCHandler: Reconnect[4]: Reconnect cycle begin... 2026-09-29T12:02:10.627+0200, [PLC1]: CPLCHandler: Reconnect[4]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:02:10.627+0200, ERROR: [PLC1]: CPLCHandler: Reconnect[4]: FAILED! 2026-09-29T12:02:10.627+0200, [PLC1]: CPLCHandler: Reconnect[4]: Reconnect cycle end 2026-09-29T12:02:15.693+0200, ERROR: [PLC3]: CPLCHandler: Reconnect[3]: FAILED! 2026-09-29T12:02:15.693+0200, [PLC3]: CPLCHandler: Reconnect[3]: Reconnect cycle end 2026-09-29T12:02:20.627+0200, [PLC1]: CPLCHandler: Reconnect[5]: Reconnect cycle begin... 2026-09-29T12:02:20.627+0200, [PLC1]: CPLCHandler: Reconnect[5]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:02:25.626+0200, [PLC3]: CPLCHandler: Reconnect[4]: Reconnect cycle begin... 2026-09-29T12:02:25.626+0200, [PLC2]: CPLCHandler: Reconnect[4]: Reconnect cycle begin... 2026-09-29T12:02:25.626+0200, [PLC2]: CPLCHandler: Reconnect[4]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:02:25.626+0200, [PLC3]: CPLCHandler: Reconnect[4]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:02:25.626+0200, ERROR: [PLC3]: CPLCHandler: Reconnect[4]: FAILED! 2026-09-29T12:02:25.626+0200, [PLC3]: CPLCHandler: Reconnect[4]: Reconnect cycle end 2026-09-29T12:02:25.699+0200, ERROR: [PLC1]: CPLCHandler: Reconnect[5]: FAILED! 2026-09-29T12:02:25.699+0200, [PLC1]: CPLCHandler: Reconnect[5]: Reconnect cycle end 2026-09-29T12:02:30.629+0200, [PLC1]: CPLCHandler: Reconnect[6]: Reconnect cycle begin... 2026-09-29T12:02:30.629+0200, [PLC1]: CPLCHandler: Reconnect[6]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:02:30.675+0200, ERROR: [PLC2]: CPLCHandler: Reconnect[4]: FAILED! 2026-09-29T12:02:30.675+0200, [PLC2]: CPLCHandler: Reconnect[4]: Reconnect cycle end 2026-09-29T12:02:34.710+0200, ERROR: [PLC1]: CPLCHandler: Reconnect[6]: FAILED! 2026-09-29T12:02:34.710+0200, [PLC1]: CPLCHandler: Reconnect[6]: Reconnect cycle end 2026-09-29T12:02:40.627+0200, [PLC2]: CPLCHandler: Reconnect[5]: Reconnect cycle begin... 2026-09-29T12:02:40.627+0200, [PLC2]: CPLCHandler: Reconnect[5]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:02:40.628+0200, [PLC3]: CPLCHandler: Reconnect[5]: Reconnect cycle begin... 2026-09-29T12:02:40.628+0200, [PLC3]: CPLCHandler: Reconnect[5]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:02:40.628+0200, ERROR: [PLC3]: CPLCHandler: Reconnect[5]: FAILED! 2026-09-29T12:02:40.628+0200, [PLC3]: CPLCHandler: Reconnect[5]: Reconnect cycle end 2026-09-29T12:02:40.630+0200, [PLC1]: CPLCHandler: Reconnect[7]: Reconnect cycle begin... 2026-09-29T12:02:40.630+0200, [PLC1]: CPLCHandler: Reconnect[7]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:02:40.630+0200, ERROR: [PLC1]: CPLCHandler: Reconnect[7]: FAILED! 2026-09-29T12:02:40.630+0200, [PLC1]: CPLCHandler: Reconnect[7]: Reconnect cycle end 2026-09-29T12:02:44.711+0200, ERROR: [PLC2]: CPLCHandler: Reconnect[5]: FAILED! 2026-09-29T12:02:44.711+0200, [PLC2]: CPLCHandler: Reconnect[5]: Reconnect cycle end 2026-09-29T12:02:50.631+0200, [PLC1]: CPLCHandler: Reconnect[8]: Reconnect cycle begin... 2026-09-29T12:02:50.631+0200, [PLC1]: CPLCHandler: Reconnect[8]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:02:55.628+0200, [PLC2]: CPLCHandler: Reconnect[6]: Reconnect cycle begin... 2026-09-29T12:02:55.628+0200, [PLC2]: CPLCHandler: Reconnect[6]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:02:55.629+0200, [PLC3]: CPLCHandler: Reconnect[6]: Reconnect cycle begin... 2026-09-29T12:02:55.629+0200, [PLC3]: CPLCHandler: Reconnect[6]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:02:55.629+0200, ERROR: [PLC3]: CPLCHandler: Reconnect[6]: FAILED! 2026-09-29T12:02:55.629+0200, [PLC3]: CPLCHandler: Reconnect[6]: Reconnect cycle end 2026-09-29T12:02:55.690+0200, ERROR: [PLC1]: CPLCHandler: Reconnect[8]: FAILED! 2026-09-29T12:02:55.690+0200, [PLC1]: CPLCHandler: Reconnect[8]: Reconnect cycle end 2026-09-29T12:02:59.692+0200, ERROR: [PLC2]: CPLCHandler: Reconnect[6]: FAILED! 2026-09-29T12:02:59.692+0200, [PLC2]: CPLCHandler: Reconnect[6]: Reconnect cycle end 2026-09-29T12:03:00.632+0200, [PLC1]: CPLCHandler: Reconnect[9]: Reconnect cycle begin... 2026-09-29T12:03:00.632+0200, [PLC1]: CPLCHandler: Reconnect[9]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:03:04.716+0200, ERROR: [PLC1]: CPLCHandler: Reconnect[9]: FAILED! 2026-09-29T12:03:04.716+0200, [PLC1]: CPLCHandler: Reconnect[9]: Reconnect cycle end 2026-09-29T12:03:10.628+0200, [PLC2]: CPLCHandler: Reconnect[7]: Reconnect cycle begin... 2026-09-29T12:03:10.628+0200, [PLC2]: CPLCHandler: Reconnect[7]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:03:10.629+0200, [PLC3]: CPLCHandler: Reconnect[7]: Reconnect cycle begin... 2026-09-29T12:03:10.629+0200, [PLC3]: CPLCHandler: Reconnect[7]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:03:10.629+0200, ERROR: [PLC3]: CPLCHandler: Reconnect[7]: FAILED! 2026-09-29T12:03:10.629+0200, [PLC3]: CPLCHandler: Reconnect[7]: Reconnect cycle end 2026-09-29T12:03:10.632+0200, [PLC1]: CPLCHandler: Reconnect[10]: Reconnect cycle begin... 2026-09-29T12:03:10.632+0200, [PLC1]: CPLCHandler: Reconnect[10]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:03:10.632+0200, ERROR: [PLC1]: CPLCHandler: Reconnect[10]: FAILED! 2026-09-29T12:03:10.633+0200, [PLC1]: CPLCHandler: Reconnect[10]: Reconnect cycle end 2026-09-29T12:03:14.762+0200, ERROR: [PLC2]: CPLCHandler: Reconnect[7]: FAILED! 2026-09-29T12:03:14.762+0200, [PLC2]: CPLCHandler: Reconnect[7]: Reconnect cycle end 2026-09-29T12:03:20.634+0200, [PLC1]: CPLCHandler: Reconnect[11]: Reconnect cycle begin... 2026-09-29T12:03:20.634+0200, [PLC1]: CPLCHandler: Reconnect[11]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:03:24.730+0200, ERROR: [PLC1]: CPLCHandler: Reconnect[11]: FAILED! 2026-09-29T12:03:24.730+0200, [PLC1]: CPLCHandler: Reconnect[11]: Reconnect cycle end 2026-09-29T12:03:25.630+0200, [PLC2]: CPLCHandler: Reconnect[8]: Reconnect cycle begin... 2026-09-29T12:03:25.630+0200, [PLC2]: CPLCHandler: Reconnect[8]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:03:25.631+0200, [PLC3]: CPLCHandler: Reconnect[8]: Reconnect cycle begin... 2026-09-29T12:03:25.631+0200, [PLC3]: CPLCHandler: Reconnect[8]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:03:25.631+0200, ERROR: [PLC3]: CPLCHandler: Reconnect[8]: FAILED! 2026-09-29T12:03:25.631+0200, [PLC3]: CPLCHandler: Reconnect[8]: Reconnect cycle end 2026-09-29T12:03:29.742+0200, ERROR: [PLC2]: CPLCHandler: Reconnect[8]: FAILED! 2026-09-29T12:03:29.742+0200, [PLC2]: CPLCHandler: Reconnect[8]: Reconnect cycle end 2026-09-29T12:03:30.635+0200, [PLC1]: CPLCHandler: Reconnect[12]: Reconnect cycle begin... 2026-09-29T12:03:30.635+0200, [PLC1]: CPLCHandler: Reconnect[12]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:03:34.717+0200, ERROR: [PLC1]: CPLCHandler: Reconnect[12]: FAILED! 2026-09-29T12:03:34.718+0200, [PLC1]: CPLCHandler: Reconnect[12]: Reconnect cycle end 2026-09-29T12:03:40.630+0200, [PLC2]: CPLCHandler: Reconnect[9]: Reconnect cycle begin... 2026-09-29T12:03:40.630+0200, [PLC2]: CPLCHandler: Reconnect[9]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:03:40.631+0200, [PLC3]: CPLCHandler: Reconnect[9]: Reconnect cycle begin... 2026-09-29T12:03:40.632+0200, [PLC3]: CPLCHandler: Reconnect[9]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:03:40.632+0200, ERROR: [PLC3]: CPLCHandler: Reconnect[9]: FAILED! 2026-09-29T12:03:40.632+0200, [PLC3]: CPLCHandler: Reconnect[9]: Reconnect cycle end 2026-09-29T12:03:40.637+0200, [PLC1]: CPLCHandler: Reconnect[13]: Reconnect cycle begin... 2026-09-29T12:03:40.637+0200, [PLC1]: CPLCHandler: Reconnect[13]: STATE_PLC_NOT_CONNECTED: tries to open channel... 2026-09-29T12:03:40.637+0200, * ERROR: [PLC1]: CPLCHandler: Reconnect[13]: FAILED! 2026-09-29T12:03:40.637+0200, [PLC1]: CPLCHandler: Reconnect[13]: Reconnect cycle end Ich kenne mich nicht so gut aus mit dem Thema OPC. Aber bis vor dem Windows Update hat es funktioniert.. Bin mit meiner Fehlersuche langsam am Ende...!
Last updated: 2026-09-29

Post by eoahe on Problem Reading Registers via Modbus from non Codesys device CODESYS Forge talk (Post)
Hey Guys :) I have the following Problem using Modbus via Codesys: I'm trying to implement a Modbus Device into my codesys project. The device is a Router from Teltonika (RUT956) and it can communicate via Modbus. Currently I'm trying to implement it into my codesys prject as a slave and I'm using my windows computer as master. As it is not a codesys device (the codesys application is not uploaded to device as it has its own software) I'm having problems requesting and reading registers from the router. I've set up my windows computer as Master and implemented the router as slave. When I go online on my master device it sais that it has established a connection to the slave (router)(So I'm thinking this could work as there is a connection?). The goal is to read the GPS (latitude and longitude) data and on the homepage of teltonika you can find the register address and number of registers (adress 143 for latitude and 145 for longitude; both have a number of two registers). I've found tutorials how to read specific registers via their register address with other modbus programs (like modbus-cli), but as my entire project is established in codesys I was hoping to read these specific registers via codesys so that I can show the GPS data on my dashboard. I've tried establishing slave channels but that hasn't been working. I tried read input register channels of the length 4 but it's not possible to define specific register addresses to read via codesys so that didn't work (I jsut get a slaves device failure) and I've also tried establishing 516 (total number of registers the router sends I think?) read inputregister channels but that has the samle failure... So i guess the problem I'm having is establishing slave channels to read these specific registers. Does anyone know how to tackle this problem and has maybe had the same problem? Or maybe someone knows a workaround? I'm quite new to codesys so maybe I'm also lacking expertise...
Last updated: 2025-03-01

Post by risele on dynamic modbus devices CODESYS Forge talk (Post)
Have the same issue: I'm making a test setup for modbus devices testing and calibration. One is run for every possible address, and it starts with minimal request: if the device is found, it continue to work with it, otherwise it's set to Disabled temporary. Those state machines are running under FOR cycle, and disabled are just skipped. Every instance have its own timer for not running too frequently and a start delay, so the actual requests are separate in time. I also check not for a single error, but have some timer to allow one-two timeouts. The small program disables and re-enables devices temporary (manually, since i could not iterate over MB devices). VAR Reset:ARRAY[1..GVL_MB.MD_COUNT] OF R_TRIG; i:INT; END_VAR {IF hasconstantvalue(GVL_MB.MD_COUNT, 1, >= )} i:=1; MD_1.Enable:=GVL_MB.MDPortsEnable[i]; Reset[i](CLK:=GVL_MB.MDPortsEnable[i]); MD_1.xReset:=Reset[i].Q; {END_IF} {IF hasconstantvalue(GVL_MB.MD_COUNT, 2, >= )} i:=2; MD_2.Enable:=GVL_MB.MDPortsEnable[i]; Reset[i](CLK:=GVL_MB.MDPortsEnable[i]); MD_2.xReset:=Reset[i].Q; {END_IF} There is also program to re-enable devices periodically. METHOD ScanBus VAR_INPUT END_VAR VAR j:INT; (*block auto scanning if calibration is running for any device since it's data-reach process that should not be interrupted with modbus timeouts *) CalibrationBusy:BOOL:=FALSE; END_VAR CalibrationBusy:=FALSE; FOR j:=1 TO GVL_MB.MD_COUNT DO CalibrationBusy:=CalibrationBusy OR MD_Calibrate.AutoTesters[j].xBusy; END_FOR; IF CalibrationBusy THEN RETURN; END_IF tBusScanSchedule(IN:=(NOT tBusScanSchedule.Q), PT:=tBusScanPeriod); IF (NOT tBusScanDelayer.Q) AND (tBusScanSchedule.Q OR (NOT xFirstScanPerforemed)) THEN xBusScanBusy:=TRUE; MissingCounter:=0; xFirstScanPerforemed:=TRUE; FOR j:=1 TO GVL_MB.MD_COUNT DO (* MD_Calibrate is main calibration program. Identifiers - is array of State machines mentioned above Phase_Faulted is a state of Identifiers where I'm sure device is missing on the bus *) IF MD_Calibrate.Identifiers[j].state=eStateMDIdentifier.Phase_Faulted THEN MD_Calibrate.Identifiers[j].Rescan(); MissingCounter:=MissingCounter+1; END_IF END_FOR END_IF tBusScanPauser(IN:=tBusScanDelayer.Q AND (MissingCounter>0),PT:=tBusScanDelay*MissingCounter); xBusScanBusy:=tBusScanPauser.Q; xFirstScanPerforemed:=xFirstScanPerforemed OR tBusScanPauser.ET>=tBusScanPauser.PT; Also the GUI have buttons for each address possible that re-enables the device if required.
Last updated: 2026-02-13

Post by critcho on WebVisu Numpad dialog - Dialogtitle not accepting string variable CODESYS Forge talk (Post)
I have a WebVisu page which is re-used for multiple types of gas; it displays the alarm thresholds etc. for one gas at a time. I have an array of structures holding the set-points for each of the gasses. I'm trying to change the dialog title for the value input pop-up (VisuDialogs.Numpad). The Dialogtitle is set to Gas_Alarms.HighAlarmActivationLevelDialog, which is a string(50): When the gas type is changed (page first loaded, or prev/next buttons), METHOD Gas_Alarms.Update_Display_Variables is called, to update the strings used for the dialog titles so it shows GasName High Alarm Activation Level (EngineeringUnits), e.g. CO2 High Alarm Activation Level (PPM): HighAlarmActivationLevelDialog := Insert(' High Alarm Activation Level ()', EngineeringUnits, 30); HighAlarmActivationLevelDialog := Insert(HighAlarmActivationLevelDialog, GasName, 0); (That's not where the problem is, I'm just explaining why I'm using a variable dialogue title.) The variables used are definitely strings, but i'm always getting the error: "The type of the dialog title must be either STRING or WSTRING". I've tried moving HighAlarmActivationLevelDialog etc. to the GVL and also changing them to WSTRING, I even tried adding them to the structure array, but I always get the same error. Clearing the dialog title for that element removes the error - so I'm confident it's not a phantom error caused by something else. But I should be able to add these titles, can't just nuke them all to make it work. The MinVal and MaxVal for the Numpad are called from the array, e.g. GVL.Gas_Alarm_Configs[0].ScaledValueMIN, they are not getting an error. I am using array indexes 1 - 5 for the gasses, when I load the form or change gas, I copy the selected index to index 0 of the array, and values from Gas_Alarm_Configs[0].[ALL] are displayed on the page. When they hit save, I copy Gas_Alarm_Configs[0].[ALL] to Gas_Alarm_Configs[CurrentGasIndex].[ALL]. (ALL just means every element, I can't figure out how to display an asterix in this question... :) ) I've searched online for variable title dialog, but not found anything to help. Thanks for your help!
Last updated: 2025-05-29

Post by jackbrady on Function Blocks and arrays of function blocks CODESYS Forge talk (Post)
Hello, I am new to Codesys and PLC programming in general (please go easy ha!) I'm not looking for code to be written for me just some help and pointing in the right direction. I am writing some code to send commands to a relay based on input values (to put it simply). Quite basic stuff. I have wrote a function block that takes a global variable (Open_command:BOOL) and outputs to another global variable (Opened : BOOL). The function block is simulating a device so I'll eventually get the globals from that. I now need to create multiple versions of this function block/ device (lets say 100) but I need each iteration of that function block to reference it's own relevant global variable. I think that the best way of doing this would be to use arrays, although I could be wrong. I am aware that for up to 100 instances I could very well manually assign everything but that seems rather time consuming and I want a fancier way of doing it. Here is a very basic example of what I am looking to do, please note I have not written this in proper code it's just to show what I mean. Global Variables V[0-100] int Open_command [0-100] Bool Opened [0-100] Bool Function Block var input x : BOOL Var output y : BOOL if x then y = TRUE ELSE y = FALSE The input to my function block will be Open_command, output will be Opened Example code. If V[x] > 10 then Open_command [x] = TRUE ELSE Open_command [x] = FALSE (So when V1 goes above 10 I need Open_command1 = TRUE therefore initiating FB1 output. V2 > 10, open_command2 = True > FB2 output V3 > 10, open_command3 = True > FB3 output ... ... ) What I can't seem to figure out is how to tie all this together, I have read through the codesys documentation and if anything it has confused me more! ha. Apologies for the poorly written post but hopefully you understand what I am trying to get at. Thanks, Jack
Last updated: 2024-02-14

Post by dandyk on Dynamic Images CODESYS Forge talk (Post)
Hello, I have very similar problem, but it seems that your solution does not work for me. I am using TwinCAT XAE Shell v3.1.4024.55 and TwinCAT Runtime. Sorry for writing here on codesys forge, but since I found the only relevant topic here and since TwinCAT is almost the same with CODESYS in many applications, I chose to write here. I simply need to dynamically update image in visualization based on camera trigger (I am doing a machine vision application). Camera triggers an image, my program processes it (applies thresholding, draws contours etc...) and saves the processed image in the runtime location (the same one you were mentioning). This was done successfully. I need to make it work at runtime, while the program is executing and I need to refresh the image in the visualization each time camera triggers a new image and program processes it. When I create image element in the visualization and define the bitmap ID variable as STRING which contains the image ID defined in the image pool, then it displays the image in the image pool, but does not work at runtime, while the program is executing. I also used the Bitmap Version. I declared it in Global variable list as integer with initial value of 0 and wrote the variable in the bitmap version in the image element in visualization. Each time new image is saved to the runtime location, I wrote a program to increment Bitmap Version by 1. It increments and the image does not update in the visualization, unfortunately. I think that bitmap version is working correctly and deletes the cached image as it is supposed to, but the Image Pool does not update the image ID with the new image... the path to the image is always the same... only the actual image changes with the same file name. Image Pool is not dynamic and cannot refresh the image in the path to the actual one at runtime. How can I refresh the image ID in the image pool at runtime? Bitmap version only deletes cached image and reloads the image from the image ID, but the image ID has the same image, because image pool won't update at runtime. Do you know any solution to this problem?
Last updated: 2024-04-06

<< < 1 .. 31 32 33 34 35 .. 38 > >> (Page 33 of 38)

Showing results of 942

Sort by relevance or date