Click for Web Layout

HSL example





An example of some PID controllers in normal logic, while some laws of nature are expressed in HSL to simulate the real process.

Running Hcad Simulation Language example

Note that HCADwin is now showing a running simulation. The red line above tells you so, but also many red values are added in the proper places. The dark green line indicates some pipeline with gas. The vessel has a pressure transmitter P2 and a temperature transmitter TVAT, both are modeled in the HSL container (plain text).
The status bar shows Differs, meaning that the logic on the screen may differ from the logic in the running code. In this case I moved something to fit all logic on a small window, but no functional changes were made.

Just put the cursor in a PID controller and give a Pcommand for altering the properties like the "P" and "'I" constants.
The above shown page is all what you need, no extra pages for this simple model.
Just for the example the P&ID part is drawn here too. Normally special comment sheets are used for that purpose (and no vertical lines to separate input/logic/output sections)

When giving a T for Trending command on a line or a tagged symbol, a trend can be shown. Up to 32 trends each with 7200 points per 100msec are stored and displayed when HCSimul is active. Must EXCEL do the job?
Just fill "=HCADDDE|Simul!TVAT" in a cell and it will be dynamically updated.

The above example is very old. It works with V4. In 2018, starting with V8113, the HSL is evolved. Even more graphical simulation definitions are possible. Inspect the examples in the example directory when upgrading HCADwin.