FB_Yahoo_Weather can compile and run without returning weather data when its TCP/IP runtime dependency is incomplete. The evidence also identifies a separate compatibility problem: an older OSCAT Network library stopped working after the weather data interface changed. Diagnose the connection layer before modifying the weather block.
Separate the failure modes
| Observed condition | Evidence-supported cause or decision |
|---|---|
| The PLC program starts, but no weather data arrives | Check the TCP/IP connection layer and confirm that IP_Control is present and operational. |
IP_Control contains unresolved components |
Having TcpIp.lib in the project and holding a TCP/IP license were not sufficient in the reported TwinCAT 3 installation; the TCP/IP Supplement also had to be installed separately. |
The connection reports Error t=1 and Error c=16777216
|
Treat this as a connection-stage diagnostic. Do not copy the reported hexadecimal conversion: decimal 16777216 equals , not 0x10000000. |
| The connection works but the old weather block no longer returns valid data | The weather service interface had changed, so OSCAT Network 1.21 was no longer suitable; the evidence identifies 1.35 as the revised library. |
Restore the TCP/IP dependency
- Confirm that the project includes the required TCP/IP library and that
IP_Controlresolves without missing elements. - Verify that the TwinCAT 3 TCP/IP Supplement is installed, not merely licensed. In the reported case, installing the Supplement corrected the TCP/IP connection and allowed the weather block to operate.
- If the computer has multiple network adapters, check the global interface-ID selection. The evidence presents this as a required configuration check for multi-adapter systems, but does not provide the variable name or a valid ID value.
- Run the supplied
YAHOO_WEATHER_DEMOfrom the library project'sdemofolder. Use it to separate library/runtime configuration faults from errors in the application wiring.
Check OSCAT and TwinCAT compatibility
The initial project used OSCAT Network 1.21 with Basic 3.3.3. After the external weather interface changed, the evidence states that Network 1.35 was required. That release was produced as a TwinCAT 2 .lib, while TwinCAT 3 uses .library; the evidence does not establish a universal conversion or installation procedure. If TwinCAT 3 rejects the library, verify the import method with Beckhoff support rather than renaming the file or applying an undocumented patch.
A separate World Weather compilation failure occurred in CSV_PARSER_BUF, where pv was POINTER_OF_BYTE and pve was DWORD. This is a type-compatibility issue, not proof of a TCP/IP fault. The evidence supplies no validated cast or code correction, so resolve it against the exact imported library and TwinCAT 3 type rules.
Verify operation
Successful compilation is not sufficient. Confirm that the connection error clears, the demo receives data, and the application outputs update after activation. If CUR_CONDITIONS_TEMP or FORCAST_DAY[1…9] differs from values displayed by the weather website, record the returned dataset and update time before changing PLC logic; the evidence reports these mismatches but does not establish their cause or prove that both displays use the same data revision.
FAQ
Why does FB_Yahoo_Weather run in TwinCAT 3 but return no data?
Check the TCP/IP runtime first. The reported installation required the TCP/IP Supplement to be installed separately even though a TCP/IP license and TcpIp.lib were already present.
What does FB_Yahoo_Weather error c=16777216 mean?
The evidence associates it with the connection stage, but provides no documented Beckhoff definition. Note that 16777216 converts to ; the reported 0x10000000 conversion is incorrect.
Which OSCAT Network version is required for the revised Yahoo Weather interface?
The evidence identifies OSCAT Network 1.35 after the interface change and states that the older version no longer worked. Because 1.35 was supplied as a TwinCAT 2 .lib, verify the supported TwinCAT 3 import path before deployment.