Tree [r71] / tags / 2.0.0.0 / readme /
 History

HTTPS access


File Date Author Commit
 readme.txt 2018-10-20 aliazzz [r40]

Read Me

Library containing device support for Monarco HAT hardware developped by the guys from Monarco.io.

I decided to write this library because the hardware is very solid, but a CODESYS implementation was missing.
Writing this library was fun, but took a lot of sweat and time, please refer to this work when you use it =).

I am not affiliated with Monarco.io in any way, shape or form.

Released under Unlicense.


Enjoy!


GETTING STARTED

To use the HAT, RS-485 and the Realtime Clock under CODESYS, please follow these steps.
RTC requires no Linux side config apart from the overlay;

1) On your Raspberry Pi, switch to root user: sudo -s

2) Disable Linux console on UART: sed 's/ console=serial0,[0-9]\+//' -i /boot/cmdline.txt

3) Run the following command to get device-tree overlay definition for the RS-485 on the Monarco HAT: wget www.monarco.io/download/monarco-fix-4-9.dtbo

4) Copy it to /boot/overlays: sudo cp monarco-fix-4-9.dtbo /boot/overlays

5) Afterwards add dtoverlay=monarco-fix-4-9 line to the /boot/config.txt file: echo dtoverlay=monarco-fix-4-9 >> /boot/config.txt

6) Reboot your Raspberry Pi: reboot

7) After reboot, check the output of the following command: ls -l /dev/serial0

8) The response should read "/dev/serial0 -> ttyAMA0"

9) Again, switch to root user: sudo -s  cd etc/

10) Then: nano CODESYSControl.cfg

11) Add the following lines: [SysCom] Linux.Devicefile=/dev/ttyAMA

12) Then reboot your Raspberry Pi again: reboot

13) After reboot: Now you can use the HAT, RS-485 and the Real-Time Clock rom within an CODESYS IEC application via a comlib of you own flavour (like CAA SerialCOM library).