Home

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

ERROR! The markdown supplied could not be parsed correctly. Did you forget to surround a code snippet with "~~~~"?

[[members limit=20]]
[[download_button]]
[[download url=https://forge.codesys.com/drv/mega-io/code/HEAD/tree/tags/v2.0.0.0/package/IoDrvMEGAIO%20v2.0.0.0.package?format=raw]]


[TOC]

# CODESYS V3 MEGA-IO driver v2.0.0.0
This driver is a IoDrvFB based wrapper around the Raspberry I2C MEGAIO driver v1.1.0.0 for CODESYS by [Sequent Microsystems](https://www.sequentmicrosystems.com/index.html).

[[img src=https://forge.codesys.com/drv/mega-io/code/HEAD/tree/screenshots/MEGAIO.jpg?format=raw width=50%]]

* This IO driver replaces the FB based program calls with mappable hardware channels,
* To optimise I/O dataflow, some small codechanges to the I2C MEGAIO driver v1.1.0.0 were neccessary, 
* 100% Open source,
* 100% Pure IEC 61131-3 code (ST).

Sequent Microsystems uploaded a video about the Mega IO Industrial for Raspberry Pi, check it out :
[[embed url=https://www.youtube.com/watch?v=fNdZ7oo1mec]]


## IO interface benefits

* Simple I2C Address Parameter access;
[[img src=https://forge.codesys.com/drv/mega-io/code/HEAD/tree/screenshots/IoDrvMEGAIO%20Parameters.png?format=raw width=60%]]

* Hardware I/O Mapping instead of function block calls in your program
[[img src=https://forge.codesys.com/drv/mega-io/code/HEAD/tree/screenshots/IoDrvMEGAIO%20IoMapping.png?format=raw width=60%]]

* Example Project with visualisation
[[img src=https://forge.codesys.com/drv/mega-io/code/HEAD/tree/screenshots/IoDrvMEGAIO%20Application%20Visualisation.png?format=raw width=60%]]


## Changelog
* v2.0.0.0 by Aliazzz under "Unlicense". Released on cForge. See https://forge.codesys.com/drv/io-drivers/database/Home/ for details.
* v1.1.0.0 by [Sequent Microsystems](https://www.sequentmicrosystems.com/index.html) under "Unlicense".

-----

## i2c address setting

### install i2c tools

sudo apt-get update
sudo apt-get install i2c-tools

### MEGAIO i2c address

Be sure the MEGAIO is attached.

* Run sudo i2cdetect -y 0 => You should now see a table with the connected i2c slave address.
* If Run sudo i2cdetect -y 0 does not work, Run sudo i2cdetect -y 1

The MEGAIO default address is 16#31 (41dec).

-----

##Package installation
![](https://forge.codesys.com/drv/mega-io/code/HEAD/tree/screenshots/IoDrvMEGAIO%20package.png?format=raw )
[[download url=https://forge.codesys.com/drv/mega-io/code/HEAD/tree/tags/v2.0.0.0/package/IoDrvMEGAIO%20v2.0.0.0.package?format=raw]]

Install the package via;

* Double-click the package or via CODESYS IDE Package Manager,
* Install the loose components via the Library / Device Repository, found under Tools menu option in CODESYS IDE.


-----
## Limitations / Bugs 
If you experience any bugs or limitations, please leave a [Ticket](https://forge.codesys.com/drv/mega-io/tickets/)


-----
## Acknowledgements

Special thanks goes out to Ingo Hornberger for helping out with difficulties and for his patience.