Its been a while but researching jogged my memory
What module are using, just out of curiosity
You have special V memory location for your slots 1-4
V700-V707 Sets the V-memory location for option card in slot 1
V710-V717 Sets the V-memory location for option card in slot 2
V720-V727 Sets the V-memory location for option card in slot 3
V730-V737 Sets the V-memory location for option card in slot 4
This is further broken down to :
Slot No. 1 2 3 4
No. of Channels V700 V710 V720 V730
Input Pointer V701 V711 V721 V731
Output Pointer V702 V712 V722 V732
You will need a program similar to the one found in
https://cdn.automationdirect.com/static/manuals/d0optionsm/ch11.pdf
on Page 11
SP0
LD K402
Loads a constant that specifies the number of channels to scan and the
data format. The upper byte selects the input data format (i.e. 0=BCD,
8=Binary) and the number of input channels (set to 4). The lower byte
selects the output data format (i.e. 0=BCD, 8=Binary) and the number
of output channels (set to 2)..
OUT V710
Special V-memory location, V710, assigned to the option slot
contains the data format and the number of channels to scan.
Loads a constant that specifies the number of channels to scan and the
data format. The upper byte selects the input data format (i.e. 0=BCD,
8=Binary) and the number of input channels (set to 4). The lower byte
selects the output data format (i.e. 0=BCD, 8=Binary) and the number
of output channels (set to 2)..
LDA O2000
This loads an octal value for the first V-memory location that will be used
to store the incoming data. For example, the O2000 entered here would
designate the following addresses:
Ch1 – V2000, Ch2 – V2001, Ch3 – V2002, Ch4 – V2003.
OUT V711
The octal address (O2000) is stored here. V711 is assigned to the
option slot and acts as a pointer, which means the CPU will use the
octal value in this location to determine exactly where to store the
incoming data..
LDA O2010
This loads an octal value for the first V-memory location that will be used
to store the output data. For example, the O2010 entered here would
designate the following addresses:
Ch1 – V2010, Ch2 – V2011.
OUT V712
The octal address (O2010) is stored here. V712 is assigned to the
option slot and acts as a pointer, which means the CPU will use the
octal value in this location to determine exactly where to get the output
data.
This will be used to assign address to your card channels, almost like aliases or pointers. In the example shown V2000 is used for the 4 input channels the channels automatically cascade down
V2000 = Ch1
V2001 = Ch2
V2003 = Ch3
V2004 = Ch4
and
V2010 is used for 2 outputs
V2010=Ch1
V2011=Ch2
hopes this helps