Project Overview

aliazzz
There is a newer version of this page. You can find it here.
Project Members:

The Monarco HAT

The Monarco HAT is a robust industrial graded HAT, perfectly suited for IOT projects, small home-automation or industrial projects and much more ...
It protects your Raspberry Pi from overvoltage or short-circuiting and simultaneously provides you with enough IO channels and channel configuration versatility.

A CODESYS V3 library was missing, so I wrote one to fill the gap after studying the C & Java Node-JS code examples and documentation provided by Monarco.
Though tested, it will probably still contain bugs =( If you spot a bug, share it so we can fix it.

Implemented as an IO device-driver, so no function block calls to the HAT in your software necessary.
The HAT is exposed as a hardware device with IO channels and parameters.
Just write code, attach variable to a I/O channel in the hardware tree, ready!

  • 100% Open source,
  • 100% Pure IEC 61131-3 code (ST)

Currently implemented parameters;

  • 4 DI channels,
  • 4 DO channels,
  • 2 AI channels (12bit),
  • 2 AOchannels (12bit),
  • Hardware Watchdog,
  • Control Byte,
  • Stable, but work in progress ..

Limitations / Missing in action

All functionality of the HAT is allready implemented into the core of the driver but some functionality still needs to be routed as parameters

Not yet routed to parameters are;

  • RS485 configuration,
  • DO channels PWM configuration,
  • DI channels Counter configuration,
  • 1-Wire bus.

Hardware prerequisitories

  1. A Raspberry Pi, see https://www.raspberrypi.org/
  2. A Monarco HAT, see https://www.monarco.io/
  3. 8 GB SD Card ...

Software prerequisitories

  1. CODESYS V3 IDE available at https://store.codesys.com/codesys.html,
  2. CODESYS Raspberry Pi .package available at https://store.codesys.com/codesys-control-for-raspberry-pi-sl.html,
  3. CODESYS Raspberry Pi SL Demo or License (The Demo is unrestricted in technical capabilities but will only run for two hours straight, after which it stops and you have to set it in run again yourself by logging in)
  4. Contents of SVN directory : SVN

Changelog

v2.0.0.2
devdescr.xml: vendor id set to 0004, device id set to 0005, see https://forge.codesys.com/drv/io-drivers/database/Home/ for details.

    <DeviceIdentification>
      <Type>501</Type>
      <Id>0004 0005</Id>
      <Version>2.0.0.2</Version>
    </DeviceIdentification>

v2.0.0.1 info
Initial release in cforge, forked from my git : https://github.com/Aliazzzz/Monarco-HAT-library-for-CODESYS-V3