All Neighborhoods

CODESYS Talk

    CODESYS Forge

  • YIN YIN posted a comment on discussion Engineering πŸ‡¬πŸ‡§

    That localhost-works-but-LAN-doesn't pattern is a strong hint, and since you already tried with the firewall off I'd stop chasing the firewall for now. First thing I'd do is check what the server is actually listening on. On the Windows box run netstat -ano | findstr 4842 and look at the local address column β€” if it says 127.0.0.1:4842 and nothing on 0.0.0.0 or 192.168.0.XX, the OPC UA server simply isn't bound to the LAN interface, so UAExpert on another machine never gets a TCP connection and FindServers...

  • YIN YIN posted a comment on discussion Engineering πŸ‡¬πŸ‡§

    Your Wireshark capture is the part I'd trust most here. No RPC Bind, no Record Read or Write at all β€” the request never leaves the controller, so the SK205E, the GSDML and the parameter number are probably not the problem. Cyclic IO working at the same time fits that: the cyclic channel is up and the record channel never gets built, and the AR CMI timeout that keeps repeating in the diagnostics says the same thing. Before anything else, watch the controller's diagnostic log in the moment you pulse...

  • YIN YIN posted a comment on discussion Engineering πŸ‡¬πŸ‡§

    Yes, you are on the right track, and ADR(myArray) is the way I would do it too. I usually declare a small buffer just for this, something like an ARRAY[0..1] OF BYTE, put the alias in there low byte first, and then pass ADR() of that buffer as pbyData, with the length set to 2 rather than 2048. The 2048 you saw is just the size of the buffer the FB can work with, not what you have to write every time, and for the alias at 16#0012 you really only want those two bytes. One thing I learned the hard...

  • YIN YIN posted a comment on discussion Engineering πŸ‡¬πŸ‡§

    Hi, your guess about ppConnectorList is on the right track, at least in my experience. When the IDE runs a scan it calls IoDrvScanModules on your device FB, and that method is supposed to hand back one connector entry per module it finds, so the IDE can match each entry against the device descriptions in the repository and show them in the dialog. So the enumeration part really belongs in that method: ask the master for the attached modules over your socket, then build one entry per module. The breakpoints...

  • YIN YIN posted a comment on discussion Engineering πŸ‡¬πŸ‡§

    Hi Kmax, I ran into the same confusion the first time I tried this, so you are not missing something obvious. Function code 6 is not really a function block you create on its own, it is just the operation you pick inside the Modbus setup, and that is why searching the Library Manager for a block called ModbusTCP_FunctionCode06 does not get you anywhere. In your case the PQM_1000 is the slave and your PLC is the master, so I would do it through the device tree rather than hand-coding the frame. Add...