32 Point Out Module    by    Martin "Pogo" Ingold
7

Setup of your 32 point output module 

Ok, let's connect the module and talk to it using EPL. Connect the expansion module with the output module using the expansion bus found on both boards. Connect the output module with your power supply. A note needs to be made here: If you are not going to draw much current, you can leave the green clamp alone. If you want to control stepper motors or a lot of bulbs, it is recommended that you power the module using the green clamp. Now that the module is connected and power is available, we need to wire some testLED's to see if it actually works. Plug a pice of wire into the 34 wire plug on the module. Refer to the following picture for the output address of your LED.


32 Point output module addresses

Solder the flat side of your LED to an approx 1kohm resistor and the resistor to the wire coming from the module. Note:

The resistor is needed to give the proper voltage for the LED. If you want to work with bulbs, you don't need the resistor.

Connect the other "leg" of the LED to the +12V wire.

Now for the coding of the module.

#Define OUTPUT 2

Definemodule(0,OUTPUT,0,4)
#Define Testled "address"
:LedOn
{

Setpoint(Testled)

}
:LedOff
{
Clearpoint(Testled)

}
Definebutton(XX,on,LedOn)
Definebutton(XX,off,LedOff)

Replace "address" with the actual address of your LED. You can easily read the address from the picture above.

With the code above your LED will illuminate when you press your button and it will be turned off when you release that same button. Note:

If you don't write the "#Define Testled 0,0,0b00000001" statement, you will have to replace the words "Testled" with the address of your LED.

You can also control the lights using events from EPIC, that EPIC get's from your simulation software. However, this requires the simulation software to communicate with EPIC. There are additional programs that extract this info from the simulation, like my memreader. In this case, you get the events from the software to EPIC in form of Qproc's. If your lights should be controlled by the simulation software, you do anything as in the example above, except for the Definebutton statements. You need to replace these with:

DefineQproc(XX,LedOn)
DefineQproc(XX,LedOff)

Voilà, your lights are now controlled by the software.
 
 

Back
Top