Post by timvh on VisuElems.CurrentUserGroupId is not stable
CODESYS Forge
talk
(Post)
I'm not sure what you are trying to do, but getting the CurrentUserGroupID like this will not work, because there could be multiple Visualization Clients and each can have a different user that is logged in. Also when you go online with CODESYS and open an Visualization, this is counted as a client. Probably this is the reason you see it changing. What you can to is "iterate" over all clients and then see which user is logged in on which visualization Client. For this you need to add the Visu Utils library to the project and call the FbIterateClients. See https://content.helpme-codesys.com/en/libs/Visu%20Utils/4.4.0.0/VisuUtils/VisuActionUtilities/Function-Blocks/FbIterateClients.html fbClientIteration( xExecute := x_Execute, itfClientFilter := VU.Globals.AllClients, itfIterationCallback := fbIterator, xDone => x_Done, xBusy => x_Busy, xError => x_Error, eError => e_Error); The fbIterator, in the example above, should be an instance of an FB which you have created yourself and this must implement VU.IVisualizationClientIteration. For example: FUNCTION_BLOCK FB_ITERATOR IMPLEMENTS VU.IVisualizationClientIteration Then automatically the corresponding methods will be called. In the HandleClient Method, you will get an interface to the client(s) and then you can get the current user through this interface: itfClient.UserGroupId You can also get the UserName: itfClient.UserName
Last updated: 2023-11-14
Post by nizrahel on OpC UA server on Raspberry Pi 64 SL runtime
CODESYS Forge
talk
(Post)
Hi all! I'm working on an home project using a Raspberry Pi 3 device with Codesys for Raspberry Pi 64 SL runtime. I would like to create the HMI interface with Siemens WinCC Unified (or Advanced) configuring the Raspberry as OPC UA server. I tryed everything, but I didn't find the way to let the OPC UA connection works using UaExpert. I tryed to use anonymous connection, authenticated connection and the ip address instead of the server name in the path connection. There is no way to connect to the OPC UA server and I was asking myself if this feature is really supported for the runtime version used. Another strange thing I noted, is that is not possible to quickly create an OPC UA certificate in the Security Screen, as show in any tutorials. I have correctly created the Symbol Configuration enabling the OPC UA feature. I attach to this topic some printscreen of the actual configuration (sorry for the italian language interface, but I didn't find the way to switch to english). Thank you very much in advance for your support and advices!
Last updated: 2023-12-03
Post by ofey on Testing of Codesys program
CODESYS Forge
talk
(Post)
Hi! I thought to hear what you guys think is the best way to test the program in my scenario. I have some PLC programs that have been made and deployed on different PLC's. The program has added the specific devices and IO that is applicable. I have made a test environment for everything outside of the PLC, ie. the same SCADA system that is talking to the PLC, and a program running locally is simulating the plant (level regulation of different tanks). Pr. now I have had to manually change the variables that are reading/writing values from the IO so they read/write via OPC instead. I also have to change the device tree from the specific PLC rack, to the soft PLC. So I kind of end up with two different programs that I have to maintain. I was just wondering if you believe there is an easier way to do this. So I can have the exactly same program and kind of switch between the soft mode, and the "real" mode.
Last updated: 2023-12-07
Post by ragarcia on Error while using UpdateConfiguredIPSettings to change IP address
CODESYS Forge
talk
(Post)
Hello everyone, I am trying to change dynamically by code the IP address of a Weidmuller controller. So I am basically using IoDrvEthernet library to use UpdateConfiguredIPSettings function but I am getting constantly the 'INVALID_STATE' error. Even though I am following a procedure it should work: * First I added on the config file of codesys the following: [SysSocket] Adapter.0.Name="eth0" Adapter.0.EnableSetIpAndMask=1 Adapter.1.Name="eth1" Adapter.1.EnableSetIpAndMask=1 * Secondly I am first disabling the ethernet interface by using Ethernet_0.Enable = FALSE and then executing DED.Reconfigure. After that, I run the Ethernet_1.updateConfiguredIPSettings Code: Ethernet_1.Enable:= EnableDisable; Reconfigure(xExecute:= TRUE, itfNode:= Ethernet_1, xError=> ErrorReconfigure, eError=> ErrorCodeReconfigure); IF Reconfigure.xDone THEN ErrorCodeIP:= Ethernet_1.UpdateConfiguredIPSettings(IPAddress:= newIP, SubnetMask:= newMask, Gateway:= newGW); END_IF IF Reconfigure.xDone OR Reconfigure.xError THEN Reconfigure(xExecute:= FALSE); END_IF Ethernet_1.Enable:= TRUE; Reconfigure(xExecute:= TRUE, itfNode:= Ethernet_1); IF Reconfigure.xDone OR Reconfigure.xError THEN Reconfigure(xExecute:= FALSE); END_IF Can someone help me? Thank you. All I am trying is to find a way to change dynamically with code, the IP addresses of my controller (2 ethernet ports).
Last updated: 2023-12-11
Post by kevin123 on auto-answer dialog using system.prompt_answers
CODESYS Forge
talk
(Post)
I am trying to do "update device" in a project which was saved in a different version of CODESYS using ScriptEngine, a dialog with 'Yes' and 'No' button popped up showing that "Do you want to upgrade the storage format for this project? -if you click 'Yes', storage format will be upgraded... -if you click 'No', storage format will not be changed..." I have to click the 'Yes' button automatically by scriptEngine. I know from others topics here in forum, that some dialogs can be auto-answered using system.prompt_answers. And I also get the messagekey of this dialog: Key: "<< No Key>>" Message: "Do you want to upgrade the storage format for this project? - If you click 'Yes',... i have tried using the system.prompt_answers command below, but the dialog was not auto-answered. system.prompt_answers["<<No Key>>"] = PromptResult.Yes Does someone know how to auto-answer the dialog using system.prompt_answers command with messagekey"<< No key>>"? or any suggestions to solve this issue, Thanks!
Last updated: 2024-01-26
Post by kevin123 on auto-answer dialog using system.prompt_answers
CODESYS Forge
talk
(Post)
I am trying to do "update device" in a project which was saved in a different version of CODESYS using ScriptEngine, a dialog with 'Yes' and 'No' button popped up showing that "Do you want to upgrade the storage format for this project? -if you click 'Yes', storage format will be upgraded... -if you click 'No', storage format will not be changed..." I have to click the 'Yes' button automatically by scriptEngine. I know from others topics here in forum, that some dialogs can be auto-answered using system.prompt_answers. And I also get the messagekey of this dialog: Key: "<< No Key>>" Message: "Do you want to upgrade the storage format for this project? - If you click 'Yes',... i have tried using the system.prompt_answers command below, but the dialog was not auto-answered. system.prompt_answers["<<No Key>>"] = PromptResult.Yes Does someone know how to auto-answer the dialog using system.prompt_answers command with messagekey"<< No key>>"? or any suggestions to solve this issue, Thanks!
Last updated: 2024-01-26
Post by kevin123 on (no subject)
CODESYS Forge
talk
(Post)
I am trying to do "update device" in a project which was saved in a different version of CODESYS using ScriptEngine, a dialog with 'Yes' and 'No' button popped up showing that "Do you want to upgrade the storage format for this project? -if you click 'Yes', storage format will be upgraded... -if you click 'No', storage format will not be changed..." I have to click the 'Yes' button automatically by scriptEngine. I know from others topics here in forum, that some dialogs can be auto-answered using system.prompt_answers. And I also get the messagekey of this dialog: Key: "<< No Key>>" Message: "Do you want to upgrade the storage format for this project? - If you click 'Yes',... i have tried using the system.prompt_answers command below, but the dialog was not auto-answered. system.prompt_answers["<<No Key>>"] = PromptResult.Yes Does someone know how to auto-answer the dialog using system.prompt_answers command with messagekey"<< No key>>"? or any suggestions to solve this issue, Thanks!
Last updated: 2024-01-26
Post by brell on Automatic xExecute NBS.TCP_write
CODESYS Forge
talk
(Post)
I've recently started experimenting with CODESYS for a project and am fairly new to it. I'm currently working with Function Block Diagrams (FBD) to set up TCP communication between a server and a client, where the client is implemented as a Python script. Once the communication is established, my connection status changes to True, which is the expected behavior. My challenge arises with the TCP write module, which requires the xEnable_write flag to toggle between True and False. If xEnable_write remains True, the module only performs a single write operation. To address this, I introduced a falling edge trigger (F_TRIG), expecting it to help in toggling xEnable_write and it does, However, I've encountered an issue where in the beginning after connxion established I need to manually set xEnable_write to True for the system to work as intended. I'm looking for a way to automate this process so that xEnable_write becomes True automatically upon establishing a connection . Initially, I tried setting xEnable_write to True from the start, but this approach didn't work well since it left the flag permanently True, preventing further toggling. I also experimented with using a TON timer, but I faced similar issues. I am seeking a solution that automatically toggles xEnable_write between True and False after a connection is established, ensuring continuous write operations without manual intervention. Any advice or guidance on how to achieve this would be greatly appreciated."
Last updated: 2024-03-05
Post by 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 tomast on Codesys and Siemens SINAMICS 20 modbus RTU "Response CRC Fail"
CODESYS Forge
talk
(Post)
Hi everyone, I'm currently working on a project involving the control of 5 VFDs via Modbus RTU, this time using the WAGO 750-8212 CPU. So far, I've managed to make progress, but I've encountered an issue. While I can successfully read and write to all the registers I need, I consistently encounter a "Response CRC Fail" error when attempting to write the value 1151 to the STW register at address 40100. I'm able to set the frequency via register 40101 and adjust all other parameters using different registers. Setting STW to 1150 results in the drive ready boolean from the ZSW-bit being received instantly. However, the moment I attempt to send 1151 to register 40100, I immediately receive the "Response CRC Fail" error for all channels. I've also attempted to use combined control, employing Modbus for frequency control and starting from a digital input. Everything seems to function properly until I send the start command to the VFD. Interestingly, I consistently encounter the same error the moment I send the start command, regardless of whether I use register 40006 (high) or 40100 (1151). Could someone please assist me in resolving this issue?
Last updated: 2024-03-21
Post by danieldiaz on Problem with FB execution
CODESYS Forge
talk
(Post)
Hello everyone, I've been working on a system which needs an error function, with this purpose I've created a FB programmed in LD, after debugging I run the simulation. It seems that the variable linked to a coil doesn't change the value when the contacts are associated to input variables. When I use internal variables the logic works properly. I don't know if the problem is related to the variables definition or with the logic program. As you can see in the image, I1 and I2 are variables declared on the FB, the rest are input variables. If I force the eStop and Reset signals to TRUE the coil value should change, but it doesn't. However in the second network if I1 is TRUE the coil change to TRUE as it has to be. To sum up, my doubt is why that coil doesn't change its value? I would like someone to shed a light on this. Thanks!
Last updated: 2024-04-02
Post by rjwkerkhof on IIot Libraries SL --> Web Socket Client SL Pong issue
CODESYS Forge
talk
(Post)
Dear all, I am developing a Web Socket Client in Codesys 3.5 using the Web Socket Client SL library to retrieve data from a third party. Connecting and reading works fine however after 40 seconds the connection gets interrupted by the server due to keepalive ping timeout. After discussion with third party it seems that the Web Socket Client SL library replys to the Ping request of the Web Socket server BUT does not add the "Application data" = 4 bytes in the body of the Pingframe to the Pongframe. Therefor the server does not recognize the Pongframe send by the Web Socket Client SL library and automatically disconnects. Is this a known issue with the libary or am I doing something wrong? Is there a workaround to add the 4 bytes manually to the Pongframe before replying it to the server? Thanks in advance, Roy
Last updated: 2024-04-09
Post by joshskellig on Publish a JSON payload via MQTT Publish (using IIot Libraries)
CODESYS Forge
talk
(Post)
I am trying to figure out how to get a JSON payload to properly publish to my MQTT Broker. I am able to generate JSON using the examples from Codesys, but when I send that payload via MQTT there are characters that are extra or not recognized by my MQTT client. Any idea what could be causing it? PROGRAM PLC_PRG VAR hostname: STRING := 'localhost'; port: UINT := 1883; topic: WSTRING(1024) := "testing/"; payload: BYTE; factory : JSON.JSONDataFactory; eDataFactoryError : FBF.ERROR; pJsonData : POINTER TO JSON.JSONData := factory.Create(eError => eDataFactoryError); fb_JBuilder : JSON.JSONBuilder; wsValue : WSTRING := "Value1"; diRootIndex, diObject1Index : DINT; iValue : INT := 1234; jsonArrayWriter : JSON.JSONByteArrayWriter; wsJsonData : WSTRING(1000); xFirst : BOOL := TRUE; mqttClient: MQTT.MQTTClient; mqttPublish: MQTT.MQTTPublish; mqttPublishProperties: MQTT.MQTTPublishProperties := (bPayloadFormatIndicator := 1, wsContentType := "application/json"); END_VAR // Json Functionality IF xFirst THEN fb_JBuilder(pJsonData := pJsonData, diRootObj => diRootIndex); fb_JBuilder.SetKeyWithValue("Key1", wsValue, diParentIndex := diRootIndex); diObject1Index := fb_JBuilder.SetKeyWithObject("Key2", diParentIndex := diRootIndex); fb_JBuilder.SetKeyWithValue("Key3", iValue, diParentIndex := diObject1Index); xFirst := FALSE; END_IF jsonArrayWriter(pwData := ADR(wsJsonData), udiSize := SIZEOF(wsJsonData), jsonData := pJsonData^, xAsyncMode := FALSE); MSU.StrTrimW(pString:= ADR(wsJsonData)); // MQTT Functionality mqttClient( sHostname:=hostname, uiPort:=port, eMQTTVersion:=MQTT.MQTT_VERSION.V5 ); mqttPublish( mqttClient:=mqttClient, pbPayload:=ADR(wsJsonData), udiPayloadSize:=SIZEOF(wsJsonData), wsTopicName:=topic, mQTTPublishProperties:=mqttPublishProperties );
Last updated: 2024-04-10
Post by rabaggett on CODESYS control for Raspberry Pi 64 SL errors
CODESYS Forge
talk
(Post)
Hi, I am trying to create a project using a raspberry pi, I have added the modules for the Pi and MCP3008. I have encountered som errors that I don't know how to track down. 1. The GPIOs give preprocessor errors, but I read that this does not prevent compiling. This seems to be true. I can build the empty project with no errors. 2. After adding a SPI master and MCP3008, the preprocessor errors double, but seem similar and the project again builds with no errors. 3. I add a DUT and GVL, with a function, and I get the following errors. They remain even if I delete these things. ------ Build started: Application: Device.Application ------- Typify code... [ERROR] crr: C0032: Cannot convert type 'Unknown type: 'ADR(GVL_Io_17160064_c083_41f8_9e53_208be7537753_HPS_7.Io_17160064_c083_41f8_9e53_208be7537753_HPS_7)'' to type 'POINTER TO IoConfigParameter' [ERROR] crr: C0077: Unknown type: 'GVL_Io_17160064_c083_41f8_9e53_208be7537753_HPS_7.Io_17160064_c083_41f8_9e53_208be7537753_HPS_7' [ERROR] crr: C0046: Identifier 'GVL_Io_17160064_c083_41f8_9e53_208be7537753_HPS_7' not defined Compile complete -- 3 errors, 0 warnings I attach the project. What am I doing wrong? Thanks!
Last updated: 2024-05-02
Post by hanoues on setting date and time on CPX-E
CODESYS Forge
talk
(Post)
Hello, Can anybody here tell me how to modify the time and date on my CPX-E? I used the code I found on CODESYS online help, but it doesn't work. What am I missing? FUNCTION current_date_time : STRING VAR stUTC_Timestamp : SysTime; //utc time // ULINT#1528280694913 stLocal_TimeStamp : SysTime; //local time but is in general equal // ULINT#1528280694913 stdNow : SysTimeDate; //local time in an object to access each number (day, month...) dtNow : DATE_AND_TIME;//DT#2018-6-6-10:24:54 todNow : TIME_OF_DAY; // TOD#10:24:54.913 datNow : DATE; // D#2018-6-6 END_VAR SysTimeRtcHighResGet(stUTC_Timestamp); // ULINT#1528273494913 SysTimeRtcConvertHighResToLocal(stUTC_Timestamp, stdNow); //convert UTC ULINT to Local SysTime // stdNow.wYear = UINT#2018 // stdNow.wMonth = UINT#6 // stdNowy.wDay = UINT#6 // stdNow.wHour = UINT#10 // stdNow.wMinute = UINT#24 // stdNow.wSecond = UINT#54 // stdNow.wMilliseconds = UINT#913 // stdNow.wDayOfWeek = UINT#3 // stdNow.wYday = UINT#157 SysTimeRtcConvertDateToHighRes(stdNow, stLocal_TimeStamp); // ULINT#1528280694913 dtNow := TO_DT(stLocal_TimeStamp / 1000 ( ms )); // DT#2018-6-6-10:24:54 todNow := TO_TOD(stLocal_TimeStamp MOD TO_ULINT(T#1D)); // TOD#10:24:54.913 datNow := TO_DATE(dtNow); // D#2018-6-6 (convert to appropriate string) current_date_time := concat('$N[', TO_STRING(dtNow)); current_date_time:= concat(current_date_time,'.'); current_date_time:= concat(current_date_time, TO_STRING(stdNow.wMilliseconds)); current_date_time:= concat(current_date_time,'] - '); RETURN;
Last updated: 2024-05-21
Post by tortilla on J1939 connection between two devices
CODESYS Forge
talk
(Post)
Hey, I'm pretty new to CoDeSys so I don't know a lot of things yet. I have to create a connection between two devices (CANbus - J1939 connection). The idea for now is to send a message from one to another (one operates on 3.5 SP11 the other one on 2.3) I watched a few videos, worked with the documentation and worked with chatGPT 4o and was able to build the attached file. This part is about the device on 3.5.11: I'm using the J1939LocalECUDiag, TransmitParameterGroup, TransmissionTrigger Function blocks to send the message but my TransmitPG.xBusy / .xDone never turns to True and therefore my message is not sent while TransmitPG.xExcecute is True. I added the two devices in the CANbus in the J1939Manager and addapted the options like I've seen in the documentation. Can anyone explain what's wrong with my code in this casse or give me advices how to properly create a connection between my two devices? Thanks in advance!
Last updated: 2024-05-23
Post by jkessler on IoDrvModbusTCP_Diag not defined when using MODBUS
CODESYS Forge
talk
(Post)
Hi, Same for me ! Works in Codesys 3.5.19 but not in 3.5.20. I'm currenly using with a WAGO PLC200 [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0046: Identificateur 'IoDrvModbusTCP_Diag' non défini [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0080: Le bloc fonctionnel 'IoDrvModbusTCP' doit être instancié pour permettre l’accès [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0004: 'IoDrvModbusTCP_Diag' n’est pas un composant de 'IoDrvModbusTCP' [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0046: Identificateur 'ModbusTCPSlave_Diag' non défini [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0080: Le bloc fonctionnel 'IoDrvModbusTCP' doit être instancié pour permettre l’accès [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0004: 'ModbusTCPSlave_Diag' n’est pas un composant de 'IoDrvModbusTCP' [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0046: Identificateur 'ModbusTCPSlaveUnit_Diag' non défini [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0080: Le bloc fonctionnel 'IoDrvModbusTCP' doit être instancié pour permettre l’accès [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0004: 'ModbusTCPSlaveUnit_Diag' n’est pas un composant de 'IoDrvModbusTCP' Thanks in advance
Last updated: 2024-05-29
Post by jkessler on IoDrvModbusTCP_Diag not defined when using MODBUS
CODESYS Forge
talk
(Post)
Hi, Same for me ! Works in Codesys 3.5.19 but not in 3.5.20. I'm currenly using with a WAGO PLC200 [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0046: Identificateur 'IoDrvModbusTCP_Diag' non défini [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0080: Le bloc fonctionnel 'IoDrvModbusTCP' doit être instancié pour permettre l’accès [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0004: 'IoDrvModbusTCP_Diag' n’est pas un composant de 'IoDrvModbusTCP' [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0046: Identificateur 'ModbusTCPSlave_Diag' non défini [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0080: Le bloc fonctionnel 'IoDrvModbusTCP' doit être instancié pour permettre l’accès [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0004: 'ModbusTCPSlave_Diag' n’est pas un composant de 'IoDrvModbusTCP' [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0046: Identificateur 'ModbusTCPSlaveUnit_Diag' non défini [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0080: Le bloc fonctionnel 'IoDrvModbusTCP' doit être instancié pour permettre l’accès [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0004: 'ModbusTCPSlaveUnit_Diag' n’est pas un composant de 'IoDrvModbusTCP' Thanks in advance
Last updated: 2024-05-29
Post by jkessler on IoDrvModbusTCP_Diag not defined when using MODBUS
CODESYS Forge
talk
(Post)
Hi, Same for me ! Works in Codesys 3.5.19 but not in 3.5.20. I'm currenly using with a WAGO PLC200 [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0046: Identificateur 'IoDrvModbusTCP_Diag' non défini [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0080: Le bloc fonctionnel 'IoDrvModbusTCP' doit être instancié pour permettre l’accès [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0004: 'IoDrvModbusTCP_Diag' n’est pas un composant de 'IoDrvModbusTCP' [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0046: Identificateur 'ModbusTCPSlave_Diag' non défini [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0080: Le bloc fonctionnel 'IoDrvModbusTCP' doit être instancié pour permettre l’accès [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0004: 'ModbusTCPSlave_Diag' n’est pas un composant de 'IoDrvModbusTCP' [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0046: Identificateur 'ModbusTCPSlaveUnit_Diag' non défini [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0080: Le bloc fonctionnel 'IoDrvModbusTCP' doit être instancié pour permettre l’accès [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0004: 'ModbusTCPSlaveUnit_Diag' n’est pas un composant de 'IoDrvModbusTCP' Thanks in advance
Last updated: 2024-05-29
Post by jkessler on IoDrvModbusTCP_Diag not defined when using MODBUS
CODESYS Forge
talk
(Post)
Hi, Same for me ! Works in Codesys 3.5.19 but not in 3.5.20. I'm currenly using with a WAGO PLC200 [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0046: Identificateur 'IoDrvModbusTCP_Diag' non défini [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0080: Le bloc fonctionnel 'IoDrvModbusTCP' doit être instancié pour permettre l’accès [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0004: 'IoDrvModbusTCP_Diag' n’est pas un composant de 'IoDrvModbusTCP' [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0046: Identificateur 'ModbusTCPSlave_Diag' non défini [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0080: Le bloc fonctionnel 'IoDrvModbusTCP' doit être instancié pour permettre l’accès [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0004: 'ModbusTCPSlave_Diag' n’est pas un composant de 'IoDrvModbusTCP' [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0046: Identificateur 'ModbusTCPSlaveUnit_Diag' non défini [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0080: Le bloc fonctionnel 'IoDrvModbusTCP' doit être instancié pour permettre l’accès [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0004: 'ModbusTCPSlaveUnit_Diag' n’est pas un composant de 'IoDrvModbusTCP' Thanks in advance
Last updated: 2024-05-29
Post by jkessler on IoDrvModbusTCP_Diag not defined when using MODBUS
CODESYS Forge
talk
(Post)
Hi, Same for me ! Works in Codesys 3.5.19 but not in 3.5.20. I'm currenly using with a WAGO PLC200 [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0046: Identificateur 'IoDrvModbusTCP_Diag' non défini [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0080: Le bloc fonctionnel 'IoDrvModbusTCP' doit être instancié pour permettre l’accès [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0004: 'IoDrvModbusTCP_Diag' n’est pas un composant de 'IoDrvModbusTCP' [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0046: Identificateur 'ModbusTCPSlave_Diag' non défini [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0080: Le bloc fonctionnel 'IoDrvModbusTCP' doit être instancié pour permettre l’accès [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0004: 'ModbusTCPSlave_Diag' n’est pas un composant de 'IoDrvModbusTCP' [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0046: Identificateur 'ModbusTCPSlaveUnit_Diag' non défini [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0080: Le bloc fonctionnel 'IoDrvModbusTCP' doit être instancié pour permettre l’accès [ERREUR] EmPlcProgram: Application [Device: Logique API]: C0004: 'ModbusTCPSlaveUnit_Diag' n’est pas un composant de 'IoDrvModbusTCP' Thanks in advance
Last updated: 2024-05-29
Post by greenwood on CODESYS Control Raspberry Pi mit Servotreiber T6 von StepperOnline
CODESYS Forge
talk
(Post)
Hallo, Ich scheine den Grund gefunden zu haben, das Kabel mit dem RJ45 Stecker ist für RS232 verdrahtet (am anderen Ende des Kabels ist ein 9-poliger SUB-D Stecker, nicht wie von mir im Eingangspost behauptet ein USB Stecker). In der Anleitung des Treibers ist immer nur von RS 485 die Rede. Alerdings habe ich es gestern abend noch geschafft eine funktionierende Version der setup-software herunterzuladen, und die verbindet sich offenbar über RS232. Daraufhin habe ich mir in der Anleitung des Treibers das Pinout der RJ45 Buchse nochmal angesehen, und die hat Kontakte für RS232 und für RS485. (Die liegen jeweils ganz am Rand, so ist mir das vorher nicht aufgefallen). Ich muss also als Nächstes ein richtig verdrahtetes Kabel auftreiben, und dann sehen ob das mit dem Adapter den ich habe funktioniert. An einen Abschlusswiderstand habe ich auch schon gedacht, nur weiss ich nicht wo ich den an einem RJ45 Stecker / Buchse - Paar anbringen soll... Ich bitte um Entschuldigung für die Verwirrung, ich mache das alles zum ersten Mal und es ist ganz schön viel auf einmal für mich. Nochmal vielen Dank für die Unterstützung!
Last updated: 2024-06-01
Post by nikgind on Codesys Communication Manger - Required information model version exists in the model repository but is not found
CODESYS Forge
talk
(Post)
Hi I am trying to import a custom information model that I created using UA Modeler. I have only added two new methods and two new object types. It is possible to add the information model to the Communication Manager and the two new object types are shown in the Information Model tab. After compiling i get the following error: Communication Manager [Device: PLC Logic: Application]: The information model http://opcfoundation.org/UA/ is required by http://yourorganisation.org/Bsp_3.1/ 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. The error message does not make sense to me. Should it not be “Probably the information model from 15/12/2023 is missing in the information model repository”? Anyway I have installed the information model from 15/12/2023 but not from 15/09/2021. Which makes the error message even stranger.
Last updated: 2024-06-09
Post by caprez95 on Deleting the trend recording history
CODESYS Forge
talk
(Post)
Hallo Ich möchte eine laufende Trendaufzeichnung stoppen, den Inhalt löschen und Trend-Diagramm auf 0 zurücksetzen. Laut Codesys soll das mit dem folgenden Code möglich sein: You can insert an input element in the visualization which the operator can use to delete the previous value recording in the trend visualization at runtime. The curve displayed until then is removed and the display starts over. In the application (example: in the program PLC_PRG), implement the following code: itfTrendRecording : ITrendRecording; itfTrendStorageWriter : ITrendStorageWriter; itfTrendStorageWriter3 : ITrendStorageWriter3; sTrendRecordingName : STRING := 'TrendRecording'; itfTrendRecording := GlobalInstances.g_TrendRecordingManager.FindTrendRecording(ADR(sTrendRecordingName)); xClearHistoryTrend: BOOL; IF xClearHistoryTrend THEN itfTrendRecording := GlobalInstances.g_TrendRecordingManager.FindTrendRecording(ADR(sTrendRecordingName)); IF itfTrendRecording <> 0 THEN itfTrendStorageWriter := itfTrendRecording.GetTrendStorageWriter(); IF __QUERYINTERFACE(itfTrendStorageWriter, itfTrendStorageWriter3) THEN itfTrendStorageWriter3.ClearHistory(); END_IF END_IF In the visualization of the trend recording, add a button for deleting the previous curve. Configure its Toggle property with the variable PLC_PRG.xClearHistoryTrend. ⇒ When xClearHistoryTrend is set to TRUE, the previously recorded curve is deleted. The recording immediately starts again. Dies löscht auch die Daten vom Trend, aber das Diagramm wird nicht auf 0 zurückgesetzt, sondern läuft einfach da weiter wo man gestoppt hat. Braucht es für den Diagramm-Reset noch einen zusätzlichen Befehl? Gruss
Last updated: 2024-06-11
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
To search for an exact phrase, put it in quotes. Example: "getting started docs"
To exclude a word or phrase, put a dash in front of it. Example: docs -help
To search on specific fields, use these field names instead of a general text search. You can group with AND
or OR
.