Post by jarnok on How to know if output if function block is used
CODESYS Forge
talk
(Post)
Hi, Is it possible to know of an output of a function block is used? I've found there is a way to find unused inputs of a fb, through the attribute: is_connected. But I'm wondering if the same can be done for an output. Thanks in advance!
Last updated: 2024-10-15
Post by eschwellinger on Bibliothek: floatingpointutils
CODESYS Forge
talk
(Post)
naja die compiled library hast du ja - du hast halt eine exception - und dann wirst du gefragt ob du das ganze Debuggen willst. Die offene Bibliothek wirst du nicht bekommen - daher würde ich so vorgehen: Dein Projekt hier mal anhängen so das man mal draufschauen was du genau aufrufst und wie.
Last updated: 2024-10-18
Post by davidbo on Modbus: Is there a way to get the channel index from the channel name?
CODESYS Forge
talk
(Post)
When I use the FUNCTION_BLOCK ModbusChannel I have to sepcify the integer iChannelIndex It can easily go wrong if one has many channels. It would be better if one could use the name. Is that possible? Attached a snippet of the channel name and the channel index to the left.
Last updated: 2024-10-21
Post by phoward131 on Alarm Table Filtering
CODESYS Forge
talk
(Post)
I actually just found the solution maybe. If anyone else is running into this, go to your Project Settings > Visualization > Advanced (check 'Visible' to see advanced settings) > UNCHECK 'Activate property handling in all element properties.' I am not sure what else unchecking this might affect but it seems to allow the alarm table to be filtered as expected.
Last updated: 2024-10-28
Post by phoward131 on Alarm filtering latch variables
CODESYS Forge
talk
(Post)
I actually just found the solution maybe. If anyone else is running into this, go to your Project Settings > Visualization > Advanced (check 'Visible' to see advanced settings) > UNCHECK 'Activate property handling in all element properties.' I am not sure what else unchecking this might affect but it seems to allow the alarm table to be filtered as expected.
Last updated: 2024-10-28
Post by pascaljt on Warning code C0373
CODESYS Forge
talk
(Post)
Hello, I wrote a function block for a controller but I have a warning code C0373 "expression or part of it has no effect" and the sub routine which contain my function block is underlined in blue. Despite, the FB works perfectly. Do you know why I have this warning ? Thanks. Pascal.
Last updated: 2024-10-30
Post by lsislsis on SIGABRT Error
CODESYS Forge
talk
(Post)
After many tests i see that problem comes when serial communication established for modbus rtu. If the slave device not connected we don't see the exception. If the slave device connected at serial port then we have exception about 1 hour after startup and every 10 or 15 minutes. Any suggestion?
Last updated: 2024-11-08
Post by timvh on Converting each character to a string into ASCII
CODESYS Forge
talk
(Post)
Nice puzzle for a Saturday afternoon :-). Here my suggestion: VAR sInput : STRING := 'R123'; byChar : BYTE; sOutput : STRING; i: INT; END_VAR sOutput := ''; IF LEN(sInput) = 0 THEN RETURN; END_IF FOR i := 0 TO LEN(sInput) - 1 DO byChar := sInput[i]; sOutput := Concat(sOutput, TO_STRING(byChar)); END_FOR
Last updated: 6 days ago
Post by damian177 on Codesys and SMS in RPi
CODESYS Forge
talk
(Post)
I tried initialize my GSM modem by write simple application in C, and GSM modem works, below used AT commands: AtChat: T : "AT" AtChat: F : "OK" AtChat: T : "AT+CMEE=1" AtChat: F : "OK" AtChat: T : "AT+CMGF=0" AtChat: F : "OK" AtChat: T : "AT+CGMI" AtChat: F : "WH_Ltd" AtChat: F : "WH_GM35" AtChat: F : "Revision: RDA BV5" AtChat: F : "OK" AtChat: T : "AT+CGMM" AtChat: F : "WH_GM35" AtChat: F : "OK" AtChat: T : "AT+CGMR" AtChat: F : "Revision: GM35-D_B5_R05_A01_D170914" AtChat: F : "OK" AtChat: T : "AT+CGSN" AtChat: F : "868221045990218" AtChat: F : "OK" AtChat: T : "AT+CNMI=2,1,0,1,0" AtChat: F : "OK" AtChat: T : "AT+CLIP=1" AtChat: F : "OK" AtChat: T : "AT+COPS?" AtChat: F : "+COPS: 0,2,\"26002\"" AtChat: F : "OK" operator name: "26002" AtChat: T : "AT+CREG?" AtChat: F : "+CREG: 1,1" AtChat: F : "OK" at+creg Modem is initialized I do not understand why Codesys SMS library send AT+CPIN? command ?
Last updated: 2023-09-29
Post by captaincookie on increase default string length in queue
CODESYS Forge
talk
(Post)
Hello, I'm using Codesys V3.5 SP18 Patch 4. In the ElementCollectionExample Project from Codesys, I test the SimpleQueueExample in a Control Win V3 x64 environment. I try to add a string of 95 characters length to a queue. The default length of strings is defined as 80 characters. In the initialization of a string variable, it is possible to increase the length by the definition of e.g. STRING(1000). But when I write the string defined like this to the queue, only 80 characters are written to it and the rest is missing. I think the default length is still set in the queue definition, so it is necessary to change this, isn't it? Is there any option to increase the default length of strings in the queue? Attached you can find the used project. Thanks in advance. If any information are missing or my description unclear please let me know.
Last updated: 2023-10-05
Post by annd on Migration von "CODESYS Control for PFC200 SL" zu WAGO FW26 "CODESYS V3.5.19.2"
CODESYS Forge
talk
(Post)
Ich hab's hinbekommen: Nach dem Controller Update hab ich ein neues Projekt gemacht und nur den PFC200(8212) eingefügt (es erscheint dann ein leerer Kbus und eine serielle Schnittstelle COM1). Dann hab ich mich am Controller eingeloggt und den Kbus (Rechtsklick: Geräte suchen) mit allen Modulen automatisch ergänzen lassen. Bei den leeren Modulen hab ich dann das E/A-Abbild in csv exportiert. Dasselbe hab ich bei meinem alten "PFC200 SL" Projekt gemacht. Und dann in Excel alle Variablennamen in die leeren csv kopiert und danach wieder im neuen Projekt importiert. Dann hab ich noch alle Programmblöcke, Tasks, Visualisierungen und auch Modbus TCP Master u. Slave und auch Modbus COM Port Master und Slave in das neue Projekt kopiert. Weiters hab ich alle notwendigen Bibliotheken im Bibliotheksverwalter eingefügt. Dann noch ein paar kleine Fehler korrigiert (ich musst einen anderen Block zum Lesen der Uhrzeit nehmen) bis ich das neue Projekt fehlerfrei übersetzen konnte. Dann konnte ich es auf den Wago Controller übertragen und direkt starten. Es sieht so aus, dass alles läuft. Gruß annD
Last updated: 2023-11-18
Post by chalk on No source code available
CODESYS Forge
talk
(Post)
Hello, This is my first time using Codesys, I am trying to add EtherNetIP communication to a Raspberry PI. I’ve added the EtherNetIP Adapter configured the network setting and added some modules to the pi but when I download the project it generates the following error: “There is no source code available for the object because it is in the compiled library ‘cip object, 4.5.1.0 (3s – smart software solution gmbh)’. Do you want to browse for the original library in order to display the source code? There are 2 errors in the log which are: SOURCEPOSITION App=[Application] area=3, offset=332760 EXCEPTION [Application] occurred: App=[Application], Task=[ENIPAdapterServiceTask] I can’t for the life of me work out how to get around this. I can’t find the source code anywhere or any information regarding this error. I’m using Codesys V3.5 SP19 Patch 3, the version of the Ethernet adapter is 4.5.1.0 and the version of the modules is 4.1.0.0. Any help on this will be greatly appreciated. Thanks
Last updated: 2024-02-02
Post by yannickasselin on Connect to remote PLC via local pc and teamviewer
CODESYS Forge
talk
(Post)
Yes it is possible. I did it a lot of times using TeamViewer VPN. Unfortunately, TeamViewer VPN only works on Windows. If the remote PLC is a Codesys runtime running on Windows, you should be able to login directly using TeamViewer VPN if it is installed on the PC/PLC. If it is not Windows based, you can still do it but you need to have a Windows based PC acting as a gateway in the middle. In this case you need to enable IP Forwarding on the Windows remote PC (the gateway) and you need to setup the gateway IP address on the PLC to be the address of the Windows PC. Then you need to add a route on your local PC to point to the gateway PC for Codesys communication. I know it may not be detailed enough but I did not want to make a whole tutorial on how to do it. Bottom line, it is possible. I do it all the time.
Last updated: 2024-02-02
Post by fredsta on Unable to load dynamic modules (Download failed: Application=Application)
CODESYS Forge
talk
(Post)
Hey there, I am currently trying to find a good solution for the communication between CODESYS Control on Raspberry Pi and "the rest of the world", i. e. the things apart from CODESYS on my linux. My first approach was to use the c-integration. So I created a lib, defined extern fbs, compiled the code on my Pi using the SDK and put the .so into my lib project. When I try to log into the Pi and load the program, I get the error message which you can see in the attached picture. "Die dynamischen Module der C-Integration konnten nicht auf das Laufzeitsystem geladen werden" is german and means roughly "the modules from the c-integration could not be loaded onto the runtime system." Is this normal? Am I doing something wrong? I will have a look at the unix domain socket thing next, as I am still in the process of finding the best solution for the communication.
Last updated: 2024-02-15
Post by tim-roelant on Problem mit control runtime V3 und profinet
CODESYS Forge
talk
(Post)
Ich habe einen brandneuen Beckhoff-Panel-PC mit einer Codesys Control Runtime V3 eingerichtet. Ich habe es zusammen mit 2 Profinet-Feldgeräten konfiguriert: einem 16in/16out IO-Modul von Turck und einem MTS-Linearencoder. Die Maschine funktioniert einwandfrei, bis plötzlich die Kommunikation abbricht und die Profinet-Teilnehmer nicht mehr erreichbar sind. Zu diesem Zeitpunkt kann ich das Gerät noch anpingen, aber der Profinet-Master findet sie nicht mehr: Wenn ich einen Scan durchführe, werden sie nicht gefunden. Wenn ich einen Kaltstart durchführe, wird der Profinet-Master wieder aktiv und die Geräte werden wieder gefunden. Im Protokoll erhalte ich den Ethercat-Paketempfangsfehler: sysethernet. Ich bin etwas verwirrt, es gibt kein Ethercat-Gerät im Gerätebaum. Ich habe den Sendetakt und das Untersetzungsverhältnis bereits auf höhere Werte eingestellt, jedoch ohne Ergebnis. Kann Codesys so konfiguriert werden, dass die Kommunikation ohne Kalt-Reset wiederhergestellt wird? Das ist sehr ärgerlich und verursacht viele Produktionsausfälle. Grüße Tim
Last updated: 2024-02-27
Post by francescoc on Custom log CmpLog
CODESYS Forge
talk
(Post)
Hi, I am trying to create a log in my application. Since I cannot find any documentation regarding modifying the codesys configuration file to be able to log in ms, i tried to create a new log via CmpLog.LogCreate. Below is the part of the code where I create the logger and write a test string. In the log tab of codesys I actually see the new log that was created, but it is empty, and in the folder I cannot find any files. I can't find any detailed documentation. Can you guys give me support? Are there any examples? Thank you IF NOT FirstCycle THEN LogName:= 'LOGS/TestLog'; LogOptions.bEnable:= 1; LogOptions.iMaxEntries:= 5000; LogOptions.iMaxFiles:= 100; LogOptions.iMaxFileSize:= 5000; LogOptions.szName:= LogName; LogOptions.uiType:= CmpLog.LogTypes.LT_TIMESTAMP_RTC_HIGHRES; LogOptions.uiFilter:= CmpLog.LogClass.LOG_ALL; LogHandle:= CmpLog.LogCreate(pOptions := ADR(LogOptions), pResult:= ADR(Result)); LogHandle:= CmpLog.LogOpen(pszName:= LogName, pResult:= Result); Component_Manager.CMAddComponent2('TestLogNEW', 16#00000001, ADR(udiCmpIdNEW), 0); CmpLog.LogAdd2(LogHandle, udiCmpIdNEW, CmpLog.LogClass.LOG_INFO, 1, 1, 'Logger started...'); END_IF IF TestWrite THEN TestWrite:= FALSE; CmpLog.LogAdd2(LogHandle, udiCmpIdNEW, CmpLog.LogClass.LOG_INFO, 1, 1, 'Write test'); END_IF
Last updated: 2024-03-16
Post by paro on Modbus Client Request Not Processed
CODESYS Forge
talk
(Post)
Hi, Problem in your code is that you are not calling the ClientFb cyclic. Please look at the Example from CODESYS: https://forge.codesys.com/prj/codesys-example/modbus/home/Home/ Your code works if the client fb is called cyclic! IF NOT initDone THEN initDone := TRUE; // configure clientTcp clientTcp(aIPaddr:=Ethernet.IPAddress, uiPort:=502); // configure clientSerial clientSerial(iPort:=SysCom.SYS_COMPORT2, dwBaudRate:=SysCom.SYS_BR_115200, byDataBits:=8, eParity:=SysCom.SYS_EVENPARITY, eStopBits:=SysCom.SYS_ONESTOPBIT, eRtuAscii:=ModbusFB.RtuAscii.RTU); // configure clientRequestReadCoils_1 clientRequestReadCoils_1(rClient:=clientTcp, uiUnitId:=42, udiTimeout:=TO_UDINT(T#10MS)); // configure clientRequestWriteSingleRegister clientRequestWriteSingleRegister(rClient:=clientTcp, uiUnitId:=43, udiTimeout:=TO_UDINT(T#10MS)); // configure clientRequestReadCoils_2 clientRequestReadCoils_2(rClient:=clientTcp, uiUnitId:=44, udiTimeout:=TO_UDINT(T#10MS)); // configure clientRequestReadInputRegisters clientRequestReadInputRegisters(rClient:=clientTcp, uiUnitId:=44, udiTimeout:=TO_UDINT(T#10MS)); END_IF // call the client FB's clientTcp(); clientSerial(); // call client request FB's clientRequestReadCoils_1(rClient:=clientTcp, xExecute:=TRUE, uiStartItem:=2, uiQuantity:=3, pData:=ADR(aDataCoils_1[0])); // for more details see Example_TCP, especially ClientRequest control (xExecute, xDone, xError). IF clientRequestReadCoils_1.xDone THEN // get data from aDataCoils_1 ... END_IF clientRequestWriteSingleRegister(rClient:=clientTcp, xExecute:=TRUE, uiItem:=3, uiValue:=123); clientRequestReadCoils_2(rClient:=clientTcp, xExecute:=TRUE, uiStartItem:=2, uiQuantity:=3, pData:=ADR(aDataCoils_2[0])); clientRequestReadInputRegisters(rClient:=clientTcp, xExecute:=TRUE, uiStartItem:=16, uiQuantity:=3, pData:=ADR(aDataInputRegisters[0]));
Last updated: 2024-05-29
Post by hppatrick on Datenkonvertierung für ein SPS-AO-Modul
CODESYS Forge
talk
(Post)
Hi Leute , ich bin neu hier im Forum und habe seit kurzer Zeit mein eigenes SPS-Projekt. Ich stoße hin und wieder an Probleme aber habe diese auf kurz oder lang gelöst. Nun zu meinem Problem: Als Projekt habe ich eine Kühlwassersteuerung , die einen Relativdruck einließst, und anhand desssen Werte dann einen Frequenzumrichter ansteuert. Z. Bsp. 5Bar -> FU auf 70Prozent. Ich lese in Codesys den Analogwert mit der Wago A20_750_455_020 ein. Dieser Wert wird umgerechnet mit LIN_TRAFO in 0-10 (Bar)und und wird dann über einen PID Regler geregelt. (Bibliothek UTIL). Dieser Wert wird dann wieder für die Ausgangskarte Umgerechnet (LIN_TRAFO) . Nun zu meinem Problem : Die Ausgangskarte nimmt nur einen Word Datentyp und meine Bausteine haben den REAL Datentyp. Wenn ich einen Konvertierungsbaustein nehme, Schmeist mir Codesys einen Fehler und das Programm wird geschlossen. Könnt Ihr mir helfen? Vielen Dank im Voraus (Datei habe ich angehängt). Die Ausgangskarte ist eine Wago 750-555-08
Last updated: 2024-06-14
Post by fizzy-bubblech on 3.5 P20 hangs - no response
CODESYS Forge
talk
(Post)
Colleagues, i have the same problems. At the current time, I have to use the new version of the Codesys (3.5.20.10) + Control for Linux SL 4.11.0.0, but it works unstable : theree are a lot of freezes and not-respondings. I tested this on different projects: those that were created in the current version of the project, and those that were migrated from other versions of the development environment. Compiling a project without connecting to a controller is fast enough. The first downloading of the code into the controller, too. But as soon as you need to make edits and download a new code problems begin. Codesys "freezes" at the "Generation code" stage for 15-20 minutes. And only after that time loads the code into the controller. Previously, we used version 3.5.17.60 + Control for Linux SL 4.7.0.0. The process took 1-2 minutes. Do you have any ideas how can i fix it? I will be grateful for your answers.
Last updated: 2024-06-27
Post by climblinne on Calling OPC UA Methods from UaExpert
CODESYS Forge
talk
(Post)
Hello, I hope someone could help me. I installed the newest Codesys 3.5 SP 20 Patch 1. When loading the demo files from @i-campbell I can upgrade them to the latest version and everthing works on the OPC-UA client side as expected (object "a" is visible, I can use the "ExampleMethod"). Now I * remove the "Information Model", * delete the "OPC_UA_Symbols Objects", * Add "Information Model" again * add "TestRootObjectType" again and "Generate IEC declarations" * and search for mapped instances (to get instance "a" again) Very good still working as expected. Now I delete the OPC_UA_Symbols and add it again referring to the "objecttest" from 16.9.2020. Also I redo the steps from above. The result is now, that I can't see the "a" object in the "Root/Objects" folder. Why ist this and how can I make it running? I think, it could may be a different version of the UA configuration file. I tried to build my own model definition files and got the same problem (but I am really not an expert). When someone has a actual model, which is also running in the actual Codesys I would be very grateful. Or even better, how to make the correct model in e.g. UA Modeler SW (I followed the description https://documentation.unified-automation.com/uamodeler/1.6.0/html/howprojnet_sec.html).
Last updated: 2024-07-01
Post by psychoengineer on Cannot Save CSV File on Windows Computer Using CODESYS and Control Win
CODESYS Forge
talk
(Post)
I am currently working on a project using CODESYS and Control Win on a Windows computer. I've encountered an issue where I am unable to save a CSV file. I have followed the standard procedures and used the appropriate file handling functions, but the file is not being created or saved as expected. IF xStartTest THEN sFileName := '\logs.txt'; sFileName := CONCAT(gvl.g_sMainDirectory, sFileName); sFileNameCopy := '\CAAFileCopy.txt'; sFileNameCopy := CONCAT(gvl.g_sMainDirectory, sFileNameCopy); //eWriteState := FILE_OPEN_TRIGGER; xTestDone := FALSE; xError := FALSE; xStartTest := FALSE; END_IF VAR_GLOBAL g_sMainDirectory : STRING := 'C:\LogFiles'; // file path for CSV file END_VAR Despite this, the file does not appear in the specified directory, and no error messages are being generated. I've checked the directory permissions and ensured that the path is correct. Has anyone else experienced a similar issue or have any suggestions on how to resolve this? Any help would be greatly appreciated. Thank you!
Last updated: 2024-07-04
Post by tyronnosaurus on ReceiveWatchdog FB not working on J1939 P2P PGNs
CODESYS Forge
talk
(Post)
Hi guys. I've got a device that sends a status message over J1939 and a PLC running Codesys to receive it. This message uses a P2P PGN (as opposed to a broadcast PGN). Codesys can only read it if I mark the J1939_ECU as "Local" (see screenshot 1). The message is received correctly, that is not the problem. The problem is detecting if the message stops being received. Local ECUs have no Watchdog checkbox to detect if the message has been received in the last X seconds. In order to implement a watchdog, I've used a ReceiveWatchdog FB. The same code works well for any non-P2P message, but doesn't work for this particular P2P message I'm trying to monitor. Even if I physically disconnect the device, ReceiveWatchdog.xBusy stays True, and ReceiveWatchdog.xError never triggers due to a timeout error. Is there any caveat in the ReceiveWatchdog FB that makes it unable to monitor P2P PGNs in Local J1939_ECUs?
Last updated: 2024-07-11
Post by biiebs on Aufbau von Ablaufsteuerungen ermitteln
CODESYS Forge
talk
(Post)
Hallo Zusammen, gibt es in CODESYS bei Ablaufsteuerungen weitere Möglichkeiten außer den AS-Einstellungen z.B. die Aufbaustruktur der Ablaufsteuerung herauszufinden? Gesamtanzahl der verwendeten Aktionen / Schritte - Im besten Fall auch die einzelnen Verzweigungen? Ich würde den gesamten Aufbau der Schrittkette gerne als "View" in einer übergeordneten Software abbilden lassen, da sich die Ablaufsteuerungen, je nach Projekt im Aufbau unterscheiden bräuchte ich die Kenntniss über den Aufbau dieser Schrittketten. Oder müsste ich mir hier einen "Workaround" programmieren, der z.B. bei Init erstmal den Aufbau der Ablaufsteuerung durchläuft und mir die nötigen Informationen liefert? Natürlich wäre auch ein Weg den Aufbau des AS-Bausteins über die PLCopen XML zu exportieren, jedoch müsste dies bei Änderungen jeweils nachgezogen werden - was etwas unschön wäre, falls dies vergessen würde. Mittlerweile habe ich auch das Tool "SFC Visu Generator" gefunden, dessen Funktion im Prinzip genau das darstellt, was ich benötige - jedoch leider nur als CODESYS interne Visualisierung. Ich würde den Export des Bausteins gerne in meine übergeordnete Software implementieren. Gibt es hier die Möglichkeit das Vorgehen zu Erfahren oder den vom Baustein generierten Export bei mir zu implementieren? Hat hier jemand sowas ähnliches schonmal gelöst? Vielen Dank im Voraus Mit freundlichen Grüßen Biiebs
Last updated: 2024-07-25
Post by paulorb on STRUCT AT %MW1000
CODESYS Forge
talk
(Post)
Hi I am trying to use STRUCT to parse commands from Modbus/TCP, Modbus client will fill the bytes related to a specific command (type, parameters), then PLC (Codesys) will access the command parameters. A STRUCT will simplify a lot the process of parsing the data, so I don't need to parse byte per byte, address will be mapped to a struct and I can use it for parsing the data. From what I understood, the compiler does not allow me to specify the location of the struct for a %MW register. VAR_COMMAND AT %MW1002: structGenericModbusCommand; This will throw: Bad declaration, use '%ML' for 'structGenericModbusCommand' variable But If I change it to %ML, when you go online you see that it is actually allocating the struct in another memory address. When we go online, on GVL we can see: VAR_COMMAND. structGenericModbusCommand %ML1002 commandType COMMANDTYPE %MB8016 ... %MB8020 I am not specifying a pointer or a reference it is a struct type, why is it mapping to a %MW location (random one). How can I control where it is mapping to? I need a consistent way to map STRUCT to specific modbus address. Is it possible? Thanks, Paulo Note I am using a Codesys OEM: Schneider Machine Expert Logic Builder (M241)
Last updated: 2024-08-13
Post by greenwood on CODESYS Control Raspberry Pi mit Servotreiber T6 von StepperOnline
CODESYS Forge
talk
(Post)
Hallo, ich versuche, eine Modbus-RTU-Kommunikation zwischen meinem Raspberry Pi mit CODESYS Control für Raspberry Pi 64 SL und einem Servotreiber von StepperOnline, Typ T6, herzustellen. Die Verbindung ist wie folgt: RJ45-Stecker am Servotreiber -> Kabel mit RJ45 an einem Ende und USB-A-Stecker am anderen Ende -> Seriell-zu-USB-Konverter -> Raspberry Pi. Der Seriell-zu-USB-Konverter und die Kabel habe ich zusammen mit dem Motor und Treiber von StepperOnline gekauft und sie sind dafür gedacht, den Servotreiber mit einem Computer zu verbinden, auf dem deren Setup-Software läuft. dmesg | grep tty auf dem Pi sagt mir, dass der USB-zu-Seriell-Konverter auf ttyusb0 ist. Ich weiß nicht, wie man das in einen COM-Port übersetzt, ich habe COM 1 genommen. Ich habe ein Projekt in Codesys erstellt und ein Modbus_COM-Gerät hinzugefügt, einen Modbus_Master_COM_Port und einen Modbus_Slave_COM_Port angehängt. Auf der Registerkarte "Allgemein" des Modbus_COM habe ich die folgenden Werte eingestellt: Slave address 1 Baud rate 9600 Parity None Data bits 8 Stop bits 2 Ich habe den Servotreiber auf die gleichen Werte eingestellt. (Ich habe auch andere Werte getestet, aber mit dem gleichen Ergebnis). Auf der Registerkarte "Modbus Slave Channel" des Modbus_Slave_COM_Port habe ich einen Kanal hinzugefügt und die folgenden Werte eingetragen: Access type Read Holding Registers (Function Code 3) Read Register offset 0x0000 Length 1 Ich habe noch keinen Code geschrieben, weil ich noch nicht herausgefunden habe, wie man die Kommunikation programmiert. Wenn ich das Projekt zum Raspberry Pi herunterlade scheint der Modbus_Master_COM_Port zu laufen (grünes Symbol), aber der Modbus_Slave_COM_Port nicht (rotes Dreiecksymbol). Wenn ich einen anderen COM-Port eintrage, haben sowohl der Master als auch der Slave das rote Dreiecksymbol. Ich habe dies auch mit meinem Windows-PC unter Verwendung von Codesys Control Win 64 versucht und die gleichen Ergebnisse bekommen. Ich wäre dankbar für jede Hilfe oder Tipps, wie ich den Grund dafür herausfinden kann, warum der Servotreiberreiber nicht reagiert.
Last updated: 2024-05-31
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
.