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]]


[TOC]

# The MEGA-IO expansion card for Raspberry-Pi
This driver is a IoDrvFB based wrapper around the Raspberry I2C MEGAIO driver v1.1.0.0 by [Sequent Microsystems](https://www.sequentmicrosystems.com/index.html).
To optimise the dataflow, some (minimal) code in I2C MEGAIO driver v1.1.0.0 has been revised.

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

Sequent uploaded a video about the Mega IO Industrial for Raspberry Pi, check it out :

[[embed url=https://www.youtube.com/watch?v=uYfWfqjnatE]]


# Changelog

* v2.0.0.0 info
    Initial release in cForge. See https://forge.codesys.com/drv/io-drivers/database/Home/ for details.
   
~~~
    <DeviceIdentification>
      <Type>501</Type>
      <Id>0004 0006</Id>
      <Version>2.0.0.0</Version>
    </DeviceIdentification>
~~~

-----


# IO interface of MEGA-IO driver v2.0.0.0
~~~ 
// 1000
TYPE IoDrvInput
STRUCT
    dacVoltage: REAL := 0; // added for sake of argument
	relayState: ARRAY[0..7] OF BOOL;
	openDrainState: ARRAY[0..3] OF BOOL;
	gpioOut: ARRAY[0..5] OF BOOL;
	gpioDir: ARRAY[0..5] OF BOOL;
END_STRUCT
END_TYPE

// 2000
TYPE IoDrvOutput
STRUCT
	adcVoltages: ARRAY[0..7] OF REAL; // added for sake of argument
	adcRaw: ARRAY[0..7] OF UINT;
	optoIn: ARRAY[0..7] OF BOOL;
	gpioIn: ARRAY[0..5] OF BOOL;
END_STRUCT
END_TYPE

// 3000
TYPE IoDrvConfig
STRUCT
    i2caddress : USINT := 16#31;
END_STRUCT
END_TYPE
~~~

-----




-----