Search talk: codesys controller for pfc200 slave

 
<< < 1 .. 211 212 213 214 215 .. 893 > >> (Page 213 of 893)

CODESYS Development System V3 ( 3.5.19.70 ) on Windows Virtual Machine CODESYS Forge talk (Thread)
CODESYS Development System V3 ( 3.5.19.70 ) on Windows Virtual Machine
Last updated: 2024-05-14

CODESYS Development System V3 ( 3.5.19.70 ) on Windows Virtual Machine CODESYS Forge talk (Thread)
CODESYS Development System V3 ( 3.5.19.70 ) on Windows Virtual Machine
Last updated: 2024-05-15

Any guides on using Codesys containers in Docker? CODESYS Forge talk (Thread)
Any guides on using Codesys containers in Docker?
Last updated: 2024-05-19

send appliaction files to wago plc (codesys 3.5) via ssh CODESYS Forge talk (Thread)
send appliaction files to wago plc (codesys 3.5) via ssh
Last updated: 2024-05-30

Help with IFM EcomatController CR710S in Codesys CODESYS Forge talk (Thread)
Help with IFM EcomatController CR710S in Codesys
Last updated: 2024-06-04

CODESYS Control Raspberry Pi mit Servotreiber T6 von StepperOnline CODESYS Forge talk (Thread)
CODESYS Control Raspberry Pi mit Servotreiber T6 von StepperOnline
Last updated: 2024-06-06

Codesys access to DICTIONARY OBJECTS of ethercat (CoE ) Servo Drive CODESYS Forge talk (Thread)
Codesys access to DICTIONARY OBJECTS of ethercat (CoE ) Servo Drive
Last updated: 2024-06-19

Codesys access to DICTIONARY OBJECTS of ethercat (CoE ) Servo Drive CODESYS Forge talk (Thread)
Codesys access to DICTIONARY OBJECTS of ethercat (CoE ) Servo Drive
Last updated: 2024-06-19

License Reset Request – CODESYS Control Win V3 Standard L CODESYS Forge talk (Thread)
License Reset Request – CODESYS Control Win V3 Standard L
Last updated: 2025-10-23

EL6910 as a PROFIsafe F-Host in Codesys CODESYS Forge talk (Thread)
EL6910 as a PROFIsafe F-Host in Codesys
Last updated: 2025-10-23

Codesys IDE initialization error from a new Sandbox image CODESYS Forge talk (Thread)
Codesys IDE initialization error from a new Sandbox image
Last updated: 2025-12-05

How to use MQTT in CODESYS Control Win V3 CODESYS Forge talk (Thread)
How to use MQTT in CODESYS Control Win V3
Last updated: 2025-12-12

Opc UA Data Source Client Browse Error in Codesys HMI CODESYS Forge talk (Thread)
Opc UA Data Source Client Browse Error in Codesys HMI
Last updated: 2025-11-17

'keep last value' option in CODESYS EtherCAT CODESYS Forge talk (Thread)
'keep last value' option in CODESYS EtherCAT
Last updated: 2025-11-18

Error while using Codesys SP19 Patch 4 on Windows 11 CODESYS Forge talk (Thread)
Error while using Codesys SP19 Patch 4 on Windows 11
Last updated: 2025-11-27

Non-formal invocation of function blocks in CODESYS CODESYS Forge talk (Thread)
Non-formal invocation of function blocks in CODESYS
Last updated: 2025-12-04

Non-formal invocation of function blocks in CODESYS CODESYS Forge talk (Thread)
Non-formal invocation of function blocks in CODESYS
Last updated: 2025-12-05

CODESYS OPC UA Security: HMI Client Not Receiving Server Certificate CODESYS Forge talk (Thread)
CODESYS OPC UA Security: HMI Client Not Receiving Server Certificate
Last updated: 2026-01-06

CODESYS OPC UA Security: HMI Client Not Receiving Server Certificate CODESYS Forge talk (Thread)
CODESYS OPC UA Security: HMI Client Not Receiving Server Certificate
Last updated: 2026-01-06

Codesys 3.5.21.3 add Library search not work CODESYS Forge talk (Thread)
Codesys 3.5.21.3 add Library search not work
Last updated: 2026-01-20

How to get SYM File on CodeSys 3.5 CODESYS Forge talk (Thread)
How to get SYM File on CodeSys 3.5
Last updated: 3 days ago

RS232 Communication in CODESYS Control RTE V3 CODESYS Forge talk (Thread)
RS232 Communication in CODESYS Control RTE V3
Last updated: 1 day ago

Post by mondinmr on COL.IMap2 and HashTableFactory cause frequent Access Violation CODESYS Forge talk (Post)
Good morning, I’ve been using the Collection library for a long time, mostly with Stack, LinkedList, and List. From your examples I was able to manage the different factories, even for custom elements. Now I need a hashtable, but with this object I’m running into a lot of random access violations. If I append something inside FB_Init after constructing the hashtable, it crashes, even though the list was already created. If I only create the hashtable in FB_Init and append afterwards, it usually works. I don’t understand the meaning of the dispose call in this code: pSlave := ADR(slave); uSlave := TO_ULINT(pSlave); iKey := fKey.Create(uSlave); IF hash.CountKeys() = 0 THEN Service.logger.appendLog('Filling hashtable', 'HashManager', AdvLogType.AdvDebugMsg); ok := FALSE; ELSE eError := hash.ContainsKey(iKey, xResult => ok); END_IF IF NOT ok THEN pI := __NEW(UINT); iVal := fKey.Create(TO_ULINT(pI)); Service.logger.appendLog(CONCAT('New slave', TO_STRING(uSlave)), 'HashManager', AdvLogType.AdvDebugMsg); hash.AddKeyValuePair(iKey, iVal); appendNewSlave := pI; ELSE eError := hash.GetElementByKey(iKey, itfValue => iElem); xResult := __QUERYINTERFACE(iKey, itfIInstance); IF xResult THEN itfIInstance.Dispose(); END_IF IF eError <> COL.COLLECTION_ERROR.NO_ERROR THEN Service.logger.appendLog(CONCAT('ERROR ', TO_STRING(eError)), 'HashManager', AdvLogType.AdvCriticalMsg); appendNewSlave := nullptr; RETURN; END_IF __QUERYINTERFACE(iElem, iVal); {warning disable C0033} pI := TO___UXINT(iVal.UlintValue); {warning restore C0033} appendNewSlave := pI; END_IF Without the dispose call, every second cold reset crashes immediately when I try to access iVal, even if eError doesn’t report any error. With the dispose call, the cold reset issue disappears, but I get other problems: a) If I start the runtime using systemctl start codesyscontrol, it crashes at IF hash.CountKeys() = 0 THEN b) If I delete the files in PlcLogic and download again, it works and survives multiple cold resets. But as soon as I run systemctl restart codesyscontrol, everything gets corrupted again and it starts crashing at that point. FUNCTION_BLOCK SlaveMapCounter VAR hash : COL.IMap2; eError : COL.COLLECTION_ERROR; END_VAR In its FB_Init I create it: METHOD FB_Init: BOOL VAR_INPUT bInitRetains: BOOL; // TRUE: retain variables are initialized (reset warm / reset cold) bInCopyCode: BOOL; // TRUE: the instance will be copied to the copy code afterward (online change) END_VAR VAR hF : COL.HashTableFactory; END_VAR hash := hF.Create(256); In another FB I instantiate it statically: FUNCTION_BLOCK ABSTRACT AbstractServoEthercatController EXTENDS AbstractServoController VAR_STAT hashSlaves : SlaveMapCounter; END_VAR VAR field : REFERENCE TO ADVAbstractFieldUnitEthercatCia402; initCnt : REFERENCE TO UINT; END_VAR The append method is the one shown above, and I call it after the runtime has started. The accesses are performed by a single task, and in any case I’m working on an isolated single core. I’ve tried everything, moving the create, the instances, and all the rest several times, but nothing seems to work. I’d like to point out that these FBs are part of our own library, which is used in many applications.
Last updated: 2025-09-11

Post by scoob on ModbusFB - Slow Response Time CODESYS Forge talk (Post)
Hello, I have been trying to use the ModbusFB functions so I can put some code into libraries, but it seems to be very slow for me. I have a Modbus device with 100ms registers. I previously setup 10 channels in the 'traditional' Modbus Slave with channels and mappings - and set a cyclic trigger at 100ms - this worked fine. I then tried the ModbusFB example, and setup reading the same 10 blocks of modbus addresses, copying the example and putting all of the requests into an array and triggering the requests sequentially. I timed how long the requests are taking to get round to each one, and it is around 1s 450ms. How do I speed this up to match the cyclic time? IF NOT(init) THEN init := TRUE; // Set the required IP address: ipAddress[0] := 192; ipAddress[1] := 168; ipAddress[2] := 1; ipAddress[3] := 10; // Pass the required IP address to the clinet FB: client_NetworkSwitch.aIPaddr := ipAddress; client_NetworkSwitch.udiLogOptions := (ModbusFB.LoggingOptions.ClientConnectDisconnect OR ModbusFB.LoggingOptions.ClientReceivedValidReplies); // Try to connect the client client_NetworkSwitch(xConnect:=TRUE); // Configure all the channels to read connecting them to the client: portStatus_Request(rClient := client_NetworkSwitch, uiStartItem := 4096, uiQuantity := 32, pData := ADR(portStatus), udiReplyTimeout := udiReplyTimeout); portSpeed_Request(rClient := client_NetworkSwitch, uiStartItem := 4352, uiQuantity := 32, pData := ADR(portSpeed)); flowControl_Request(rClient := client_NetworkSwitch, uiStartItem := 4608, uiQuantity := 32, pData := ADR(flowControl)); linkUpCounter_Request(rClient := client_NetworkSwitch, uiStartItem := 5888, uiQuantity := 32, pData := ADR(linkUpCounter)); txPacketCounter1_Request(rClient := client_NetworkSwitch, uiStartItem := 8192, uiQuantity := 100, pData := ADR(txPacketCounter1)); txPacketCounter2_Request(rClient := client_NetworkSwitch, uiStartItem := 8292, uiQuantity := 28, pData := ADR(txPacketCounter2)); rxPacketCounter1_Request(rClient := client_NetworkSwitch, uiStartItem := 8448, uiQuantity := 100, pData := ADR(rxPacketCounter1)); rxPacketCounter2_Request(rClient := client_NetworkSwitch, uiStartItem := 8548, uiQuantity := 28, pData := ADR(rxPacketCounter2)); txErrors_Request(rClient := client_NetworkSwitch, uiStartItem := 8704, uiQuantity := 64, pData := ADR(txErrors)); rxErrors_Request(rClient := client_NetworkSwitch, uiStartItem := 8960, uiQuantity := 64, pData := ADR(rxErrors)); // Trigger all client requests initially FOR clientRequestsCnt := 0 TO (SIZEOF(clientRequests)/SIZEOF(clientRequests[0]))-1 DO pClientRequest := clientRequests[clientRequestsCnt]; pClientRequest^.xExecute := TRUE; END_FOR // Prepare sequential trigger / control of client requests. clientRequestsCnt := 0; pClientRequest := clientRequests[clientRequestsCnt]; END_IF // Call the client to do request processing: client_NetworkSwitch(); // Now we trigger client request sequentially ... IF NOT pClientRequest^.xExecute AND NOT pClientRequest^.xDone AND run AND client_NetworkSwitch.xConnected THEN pClientRequest^.xExecute := TRUE; END_IF // .. and check result/error IF pClientRequest^.xExecute AND run AND client_NetworkSwitch.xConnected THEN IF pClientRequest^.xDone THEN // Prepare next trigger of client request (a rising edge of xExecute) pClientRequest^.xExecute := FALSE; IF clientRequestsCnt < SIZEOF(clientRequests)/SIZEOF(clientRequests[0])-1 THEN // next client request clientRequestsCnt := clientRequestsCnt + 1; ELSE clientRequestsIterationCounter := clientRequestsIterationCounter + 1; clientRequestsCnt := 0; END_IF pClientRequest := clientRequests[clientRequestsCnt]; END_IF END_IF I did try a semi-coded way using the IoDrvModbusTCP library, and setting the slave com settings, then 10 commands and 10 requests, then using a TP on xDone as a pause, before triggering another request - this is time the delay is around 120ms - so the device is fine with the speed, just something I am doing wrong in the ModbusFB method I am sure.
Last updated: 2024-04-26

Post by gmau on RS232 Communication in CODESYS Control RTE V3 CODESYS Forge talk (Post)
Hello, I would like to implement RS232 communication into CODESYS Control RTE V3. I was writing the program testing it on CODESYS Control Win V3, where it worked fine. When I changed it to RTE, the communication was on, but I cannot send the data between PLC and scale - there is no or little response from scale - mostly one time receive and that is it. On Win V3 it was working fine. I read that I am supposed to configure CODESYSControl file for a proper communication using RTE, but even after that I can not get a stable and working communication. I am attaching my CODESYSControl and CODESYSControlUser data below, as well as I am sending the code from communication function. The communication should be through COM1 port of PC. CODESYS Version: CODESYS V3.5 SP21 + (64-bit) Runtime + Version: CODESYS Control RTE V3 Version 3.5.21.0 / CODESYS Gateway V3 - x64 Version 2.5.21.0 I would be much gratefull for any help. Sincerely,
Last updated: 2025-07-16

<< < 1 .. 211 212 213 214 215 .. 893 > >> (Page 213 of 893)

Showing results of 22317

Sort by relevance or date