I've made an ior5e task module for anyone who wants it. Code is in the attached zipfile, along with a skeleton example of how to use it.

The code uses a union declared as follows:

`typedef union _IOR5E`

{

struct

{

unsigned int ledPWR : 1;

unsigned int ledRLY1 : 1;

unsigned int ledRLY4 : 1;

unsigned int ledRLY2 : 1;

unsigned int ledRLY5 : 1;

unsigned int ledRLY3 : 1;

unsigned int ledIN4 : 1;

unsigned int ledIN1 : 1;

unsigned int ledIN5 : 1;

unsigned int ledIN2 : 1;

unsigned int ledIN6 : 1;

unsigned int ledIN3 : 1;

unsigned int ledOPTO3 : 1;

unsigned int ledOPTO1 : 1;

unsigned int ledOPTO4 : 1;

unsigned int ledOPTO2 : 1;

unsigned int rly1 : 1;

unsigned int rly2 : 1;

unsigned int rly3 : 1;

unsigned int rly4 : 1;

unsigned int rly5 : 1;

unsigned int unused1 : 1;

unsigned int unused2 : 1;

unsigned int unused3 : 1;

} bits;

unsigned short long Val;

unsigned char bytes[3];

} ;

extern union _IOR5E ior5e;

Each led and relay is labelled as per the legend on the panel supplied with the IOR5E.

To switch off the LED labelled OPTO 2, for example, just write:

`ior5e.bits.ledOPTO2 = 0;`

I should add that it is based heavily on the example code provided by David.

Hope someone finds it useful.

Steve S