hotloop
GitHub
Releases

HotLoop Transmitter release notes

Every message now carries a timestamp from the PLC's clock, and the library installs through the CODESYS Installer from a .package.

  • Timestamps, on by default. The NetworkMessage and the DataSetMessage each carry the same DateTime, read from the PLC's real-time clock once per message. A message is 17 bytes longer, and the fields and values did not move.
  • bTimestamp := FALSE sends exactly the 1.0.0 bytes. Pin that if a receiver of yours refuses timestamps. The lab checked it.
  • The resolution is one second. The clock is read with SysTimeRtc, which is whole seconds, so a receiver sees the same stamp on every message inside a second. Sub-second stamps are on the roadmap.
  • A new output, diLastClockResult. If the clock cannot be read the message goes out unstamped, which Part 14 allows, and this says why.
  • A new system library, SysTimeRtc, which the runtime provides. Control for Linux SL 4.22.0.0 does. A target without it cannot use 1.1.0 with timestamps, so stay on 1.0.0.
  • A CODESYS .package, made by CODESYS's own PackageManagerCLI, that puts the same library into the repository through the Installer. It is the same library as the .library file.

A subscriber that wants to know when a value was sampled now gets it from the packet instead of guessing from when it arrived, and you can install the library through the CODESYS Installer like any other add-on. What was run, on The Beast against CODESYS Control for Linux SL 4.22.0.0 in a container: the library and the example build with 0 errors and 0 warnings in CODESYS 3.5.22.30. Two publishers, Variant and RawData, with timestamps on, and every value equals what the PLC reports over its own OPC UA server. Every message has both timestamps, the same instant, never going backwards, and over an 11 second capture the stamp moved 11 seconds. open62541 1.4.9 reads both timestamps of all 113 messages of each writer. HotLoop core's subscriber, from its main branch and not in a core release yet, reads both publishers with every reading carrying the publisher's timestamp as its time. The package installs through PackageManagerCLI and the example builds against it. On a 20 ms task with two publishers the block adds about 9.6 microseconds per cycle on average, and the longest cycle in the run was 81 microseconds. What was not run: any physical controller, any runtime but Control for Linux SL 4.22.0.0, a controller whose real-time clock is unset or wrong (the block would stamp what the clock says), the package in the IDE's own Package Manager window, multicast, a runtime that loses and regains its network, and the end of the two hour demo window. Not in this release: KeepAlive and Delta Frames, more than one DataSetMessage per NetworkMessage, WSTRING, a per-field status, sub-second timestamps, message security, and the subscriber side. A PLC project pinned to 1.0.0 keeps working and keeps sending the 1.0.0 bytes. Download `HotLoopTransmitter-1.1.0.library`, the `.compiled-library` or the `.package` from [hotloop.io/hotloop-transmitter/1.1.0/](https://hotloop.io/hotloop-transmitter/1.1.0/HotLoopTransmitter-1.1.0.library), check them against `SHA256SUMS` in the same folder, and see the [install page](https://docs.hotloop.io/transmitter/install/).

The first HotLoop Transmitter release: a CODESYS library that puts a PLC's values on the wire as OPC UA PubSub, from about fifteen lines of Structured Text, with nothing else installed on the controller.

  • One block, FB_HLTX_Publisher, sends one UADP NetworkMessage per publishing interval, from Structured Text over SysSocket UDP. Every message is a Data Key Frame, so it holds every field.
  • Variant and RawData encodings, picked per publisher. BOOL through LREAL, STRING and TIME, and arrays of all of those but STRING, up to 128 fields and 1472 bytes a message. A message never fragments.
  • Unicast or multicast, with publisher id, writer group, dataset writer, interval and versions as inputs.
  • A non-blocking send. A bad address, a dead socket or a field list that is too big becomes an error state you can read, never a fault in your application.
  • Run on a container runtime and read back by four different readers, including HotLoop core's subscriber. Not run on a physical controller, and multicast was not run.

Add the library, declare one function block, add the variables you want out, and call it once per cycle. Anything that subscribes to OPC UA PubSub can read it, HotLoop included. What was run: all of it on The Beast, against CODESYS Control for Linux SL 4.22.0.0 in a container. The library builds with 0 errors and 0 warnings in CODESYS 3.5.22.30. Two publishers, one in each encoding, seventeen fields each, and every value on the wire equals what the PLC reports over its own OPC UA server, with no gap in the sequence numbers. open62541 1.4.9 reads the Variant message in full and the RawData scalars, and cannot read a RawData array or a long RawData string at all, which is its limit and not the library's. HotLoop core's subscriber (from core's main branch, not in a release yet) reads both publishers, including the string, the TIME, both arrays and two counters that move. A second Go decoder reads all 222 captured datagrams. The block adds about 10.6 microseconds per cycle on average on a 20 ms task, a cycle that sends costs 10 to 100, and the longest send in 12 000 cycles took 14.3 ms on a busy shared host, so put the publisher in its own lower priority task if that matters to your control logic. What was not run: any physical controller, any runtime but Control for Linux SL 4.22.0.0, any CPU but x86-64, multicast, a runtime that loses and regains its network, the end of the two hour demo window, and receivers other than the four above. Not in this release: timestamps, KeepAlive and Delta Frames, more than one DataSetMessage per NetworkMessage, WSTRING, a per-field status, message security, and the subscriber side. A receiver that insists on a timestamp, a KeepAlive or a Delta Frame will not be satisfied by this version. Download `HotLoopTransmitter-1.0.0.library` from [hotloop.io/hotloop-transmitter/1.0.0/](https://hotloop.io/hotloop-transmitter/1.0.0/HotLoopTransmitter-1.0.0.library), check it against `SHA256SUMS` in the same folder, and install it with Tools, Library Repository, Install in CODESYS 3.5 SP22 or later. The `.compiled-library` is the same library without its source. The [install page](https://docs.hotloop.io/transmitter/install/) has the rest.