National Instruments / Lafayette ABET hardware |
Top Previous Next |
Configure hardware → National Instruments / Lafayette ABET hardware
This configures ABET hardware from Lafayette (USA) or Campden Instruments (UK), based on the National Instruments (NI) PCI-DIO-96 card, itself based on the 82C55 chip.
PLEASE NOTE: The ABET hardware with latches cannot detect OFF transitions on inputs (input devices going off) using a single wire -- merely devices going on. To detect devices (e.g. levers) going off as well as on, you need to wire them to two inputs -- see below.
PCI-DIO-96 card and cable connections to Lafayette ABET hardware
The NI PCI-DIO-96 card (provided by Lafayette as item 81404) is installed in the computer. It has a 100-way socket on the back. The card pinouts (for a NI 6508/6508/PCI-DIO-96) look like this (using the pin names as referred to by the NI-DAQmx software):
or, with different pin names (as referred to by the older "Traditional NI-DAQ" software):
Internally, the card has four 82C55 chips, each with 24 digital I/O lines. The card is addressed in terms of 12 ports, each with 8 digital I/O lines; each port is configured as a whole for input or output.
Each 82C55 chip can generate an interrupt upon a low-to-high transition of PC3 and PC0 (see the PCI-DIO-96 manual: Theory of Operation / Interrupt Control Circuitry). That means that wire APC0, APC3, BPC0, BPC3, CPC0, CPC3, DPC0, DPC3 can generate interrupts.
If you are using the ABET hardware, then into the 100-way socket is plugged a cable (an R1005050 cable) that ends in two 50-way plugs. Their pinouts are as follows:
The electronic specifications for the ABET hardware are:
The signal connections to actual devices work like this:
So it's a "short-to-ground = active" system.
Multiplexing system for Lafayette/Campden ABET hardware
The 96-way digital I/O card is used to control up to 16 operant chambers, each with up to 16 inputs and 32 outputs. That's 48 lines per chamber, and therefore up to 768 devices. Clearly, some trickery is needed to get a 96-way card to control 768 devices, and that trickery is multiplexing. This is the system in use:
On the PCI-DIO-96: RNC: Address outputs (4 bits): APA<3:0> Port 0.3 to port 0.0 - output Output enable (1 bit): APA<4> Port 0.4 - output Service request inputs: DPA<0:7>(chambers 1-8) Port 9 - input DPB<0:7>(chambers 9-16) Port 10 - input Data inputs: CPA<0:7>(inputs 1-8) Port 6 - input CPB<0:7>(inputs 9-16) Port 7 - input Data outputs: APB<0:7>(outputs 1-8) Port 1 - output APC<0:7>(outputs 9-16) Port 2 - output BPA<0:7>(outputs 17-24) Port 3 - output BPB<0:7>(outputs 25-32) Port 4 - output
BPC (port 5) not used, or used for IRQs, it seems CPC (port 8) not used, or used for IRQs DPC (port 11) not used, or used for IRQs
Alternatively:
#define ABET_ADDRESS_OUTPUT_PORT 0 // port 0 = output (APA) - address outputs (bits 0-3) and output enable (bit 4) #define ABET_DATA_OUTPUT_PORT_A 1 // port 1 = output (APB) - controlling selected chamber outputs 1-8 #define ABET_DATA_OUTPUT_PORT_B 2 // port 2 = output (APC) - controlling selected chamber outputs 9-16 #define ABET_DATA_OUTPUT_PORT_C 3 // port 3 = output (BPA) - controlling selected chamber outputs 17-24 #define ABET_DATA_OUTPUT_PORT_D 4 // port 4 = output (BPB) - controlling selected chamber outputs 25-32 #define ABET_UNUSED_PORT_A 5 // port 5 = UNUSED (BPC) #define ABET_DATA_INPUT_PORT_A 6 // port 6 = input (CPA) - monitoring selected chamber inputs 1-8 #define ABET_DATA_INPUT_PORT_B 7 // port 7 = input (CPB) - monitoring selected chamber inputs 9-16 #define ABET_UNUSED_PORT_B 8 // port 8 = UNUSED (CPC) #define ABET_SERVICEREQUESTPORT_A 9 // port 9 = input (DPA) - service request inputs for chambers 1-8 #define ABET_SERVICEREQUESTPORT_B 10 // port 10 = input (DPB) - service request inputs for chambers 9-16 #define ABET_UNUSED_PORT_C 11 // port 11 = UNUSED (DPC)
Additionally, Vern Davidson (vern@lafayetteinstrument.com) commented that "some of the I/O is used as an address for the ABET interfaces (81401 and 81402), while the rest of the I/O on the card are latched inputs from ABET interfaces, latched outputs... and interrupt requests (IRQs)". Now APC0, APC3, BPC0, BPC3, CPC0, CPC3, DPC0, DPC3 are the only pins that can generate interrupts - so maybe BPC, CPC, and/or DPC are used for interrupts (6 potential interrupt-generating lines).
The lines are active high (high voltage = on, low voltage = off).
The multiplexing system works like this:
"In the ABET software from Lafayette, the 16 service request lines are constantly monitored. When an input to a chamber is activated, the service request line for that chamber goes high. The time that occurs is recorded as the event time; the chamber is then addressed to determine which input occurred. The address outputs are tied to a multiplexer: 0000 = chamber 1 0001 = chamber 2 0010 = chamber 3 etc. The output enable line is used to latch the outputs on the addressed chamber, like this: Set the address. Set the outputs. Pulse the output enable line. The outputs are now latched. Please note that the inputs are also latched. Pulsing the output enable line will reset the input latches, so it is necessary to read the inputs before setting the outputs."
Much fiddling with code, lightbulbs, and switches... WE CAN'T DETECT OFF TRANSITIONS. This must be what the multiplexer hardware (84101/84102 interface) does:
Detecting OFF transitions using ABET hardware and Whisker
Whisker copes with the lack of OFF-detecting hardware like this:
The easiest way to wire a device physically in order to make an "off-detecting" as well as an "on-detecting" line, using a device that shorts its signal line to ground when it goes on, would be like this, with a 28V relay (assuming the relay and device can cope with the resulting applied voltages!):
The ABET-II system
ABET-II changes the wiring system from ABET. In ABET, each operant chamber had 16 inputs and 32 outputs (the first 16 and the last 32 lines, respectively, within each group of 48 lines corresponding to each chamber, and numbered consecutively as you'd expect).
ABET-II dispenses with two outputs in each set of 48. Then, each set can either driver one operant chamber ("not split") or two ("split"), the splitting being done with a cable.
Within each of the (16) sets of 48 lines, then, the following wiring diagram is used:
ABET-II (not split)
ABET-II (split)
The "no-latch" system (probably to be called ABET-III or ABET-Touch)
The "no-latch" system is a modification to the ABET-II multiplexer (though it could in principle be applied to the ABET system as well). It removes the significant problem of not being able to detect "off" transitions.
See above for the description of how the multiplexer works normally - that is, when a device is activated, the input line and service request were set, and were cleared subsequently following a read of the inputs. The service request and input would not be set again until the device was deactivated and then reactivated.
In this modification, with the latches removed, the service request and input stay activated as long as the device is active. (Reading the service request and input will clear them but they will be set again immediately after reading.) When the device is deactivated released the corresponding input and resulting service request will clear upon reading and stay cleared.
|