Working
with the 32-Point Output Module:
![]()
![]() |
This article explains the output of the 32-Point Output Module with details on how to "Talk" to it, enabling you to turn on and off the lights, bells and whistles for your simulator. | |
|
You can't get too far without making the EPIC system 'Aware' of your 32-Point Output Module so first you'll need to "Define" & "Initialize" the output module. This code segment will need to go at the very top of your EPL code file:
|
#define
OUTPUT 2 ;"2" refers to an OUTPUT module type.
Definemodule(0, OUTPUT, 0, 16) |
|
|
This should fully initialize the output module so you can work with it. Once initialized, talking to the module is done in one of two ways: Directly or by an "Alias". Here's how to do it directly:
|
Setpoint(0,0,0b00000111) ...this turns "On" bits 0,1,2 on module 0, row 0 | |
|
Now turn 'em off
|
Clearpoint (0,0,0b00000111) | |
|
'AKA'... |
||
|
First, define the "Alias", which in this example is called 'Gearlites'
|
#Define Gearlites 0,0,0b00000111 | |
|
Turn them all on:
|
Setpoint(Gearlites) | |
|
Now off: You will probably find that working with the 'Alias' method is much simpler, once you correctly define the binary outputs
|
Clearpoint(Gearlites) | |
|
What are all those
wires for?
|
||
| Example:
To turn on current at wire #17, you would use Setpoint(0,1,0b01000000), because wire 17 is located at Module 0, Row 1, Bit 6 ! Be sure not to fall into the "Off by one" trap... it can happen very easily!! You might think you are addressing Output #0 when in fact you are really addressing Output #1. This will become more evident as you begin writing your own EPL code.. |
||
| The red wire is wire #1 | ||
![]() |
||