Rear-panel configuration

Discussions and questions about 1401 updates, hardware problems and any other issues
IsmaelNavarro
Posts: 10
Joined: 15 Apr 2021, 10:44
Contact:

Rear-panel configuration

Unread postby IsmaelNavarro » 20 Apr 2022, 13:58

Maybe this is a stupid question, but I want to make sure how the Power3 1401 works.

In my setup I do not have the Signal Expansion installed, so the number of DAC output ports is limited. For my experiments I need to send TTL pulses to 4 different devices (three LEDs and a solenoid valve). 2 of them are connected to the front panel
However, I have searched the manuals for information on how to configure the rear panel pins to send the TTL pulses to the remaining two devices but I have a few questions.

1. Do I need to use the rear Digital Inputs socket (25pins) to control these channels or should I do it through the Analogue Expansion socket (44pins)?

2. I work with Spike 2 and have already changed the settings in the Edit --> Edit preferences --> Sampling tab. However, when I try to send TTL pulses through the Digital output rear panel I don't get any results. Is it necessary to change something else regarding the configuration?

3. I am using Sequencer Documents where I have defined the sequence and the timing at which the pulses are presented. I attach an example where the front ports 2, 3, 4 and 6 are used. Could all these channels be moved to the rear panel or can only two be connected in the back?

4. Is it necessary to change how the channels that I use in the Sequencer Document are defined? If I have different pulses set for ports 2, 3, 4 and 6, do I have to connect the devices to the rear pins with similar numbers? Does the CED automatically recognize to which pins a device is connected?

Hope someone can help me
Thanks in advance,

Ismael
Attachments
S2_GreenLED_Reward_5-8.pls
(1.96 KiB) Downloaded 5 times

User avatar
Tim Bergel
Site Admin
Posts: 2379
Joined: 19 Jun 2008, 14:40
Location: Cambridge, England
Contact:

Re: Rear-panel configuration

Unread postby Tim Bergel » 20 Apr 2022, 16:14

Hi Ismael,

1. You have to use the rear digital outputs connector.

2. I assume that by this you mean that you have changed things so that events 0 and 1 do not come from the 1401 front panel. That is not necessary - the events are inputs and we are talking outputs here. No config changes are needed.

3. I do not understand this - are you talking ADC ports or what?

4. Again I do not understand this, but no the 1401 does not automatically recognise the pins for devices.

You talk about connecting devices to the pins with the same numbers. That is not how this works - the pin numbers have no real connection with the digital output bit numbers. If you look at the Spike2 sequencer or 1401 documentation you will find a description of what output connects to what pins.

There is an extra potential source of confusion here, because there are 16 1401 digital outputs numbered 0 to 15. However throughout Spike2 either the lower or upper 8 bits of output are used in a given situation and these 8 bits are numbered 0 to 7. The output bits that the sequencer normally controls are the upper 8 so when you use the sequencer DIGOUT instruction to set what it calls bit zero it is actually bit 8 which is changed and you need to find the connector pin for bit 8, not 0.

This is a quick reply because I don't have any more time right now. Hopefully that will allow you to get started but of course do feel free to get back to me.
Tim Bergel Cambridge Electronic Design

IsmaelNavarro
Posts: 10
Joined: 15 Apr 2021, 10:44
Contact:

Re: Rear-panel configuration

Unread postby IsmaelNavarro » 21 Apr 2022, 15:29

Hi Tim, thank you very much for the answer, it helped me to start to solve the problem.

I have been carefully reading the CED manual and the Spike2 manual to understand what output connects to what pins. However, I still don't know how to write a DIGOUT instruction in Spike2 to generate an electrical pulse with certain characteristics. To be able to look at an example, could you write an example in which an electrical pulses of 200ms are generated by pins 1 and 5 of the digital output socket (for example)? I don't know how to determine characteristics like pulse length and voltage through that instruction and the examples I've seen are too messy. Maybe with a simple example I'll be able to replicate it much better.

Sorry for not explaining myself clearly in the last two questions. Basically I wanted to know if to control a specific pin on the rear panel it was necessary to change the instructions of the sequencer document (for example using the DIGOUT/DIGLOW instructions instead of the DAC instruction to control the electrical pulses generated).

Thanks again for all your help!
Ismael

User avatar
Tim Bergel
Site Admin
Posts: 2379
Joined: 19 Jun 2008, 14:40
Location: Cambridge, England
Contact:

Re: Rear-panel configuration

Unread postby Tim Bergel » 22 Apr 2022, 15:04

Hi Ismael,

No apologies necessary - the sequencer system is complicated to get to grips with. So for an example you want to generate a pulse on pins 1 and 5 of the outputs socket. This corresponds to digital output bits 15 and 7 which is a bit weird so I am going to assume that you meant bits 1 and 5 of the standard digital outputs (which are actually bits 9 and 13 which are on pins 4 and 2). If you do want bits 15 and 7 you would need to use both DIGOUT and DIGLOW which will make things complicated. The code would look like:

DIGOUT [..1...1.]
DELAY ms(200)-2
DIGOUT [..0...0.]

The first instruction sets two output bits, the delay generates a wait, and the final instruction clears the two bits. Please note:

The pulse length is generated by the delay between the two instructions as the sequencer executes instructions at a fixed rate. The ms(200) calculates the correct delay count, the -2 adjusts for the time taken for the delay instruction itself and one of the DIGOUTs

These are digital outputs with TTL signals, so they only exist in two states: high and low. Low is close to zero volts, high is usually around 4.5 volts but for digital outputs the actual voltage is relatively unimportant. But you are talking about controlling the voltage, so if you really mean that then you should indeed be using the DACs instead.

Basically I wanted to know if to control a specific pin on the rear panel it was necessary to change the instructions of the sequencer document (for example using the DIGOUT/DIGLOW instructions instead of the DAC instruction to control the electrical pulses generated).


From what you say here, I fear we have been talking at cross purposes because I did not understand you. The 1401 can generate both digital and DAC outputs, these have different characteristics, and are available on different connectors on the 1401 - you cannot change a given physical connector on the 1401 from DAC to digital or anything like that.

DAC outputs and the digital outputs are both available on the front of the 1401 and the back panel but this is just for convenience in wiring things up - the DAC signals on the BNCs are the same as the DAC signals on the rear analogue connector (& similar for digital but different connectors).

So when you use a command like DAC 0,1 you are setting the voltage on DAC number 0, whose output is available on a front panel BNC and on a specific pin on the rear analogue connector. Similarly if you change the state of digital bit 1 this will change the voltage on the corresponding connectors.

I hope that is clear.

So first of all you have to look at what type of outputs you need. Looking back at your first post (with better understanding now), you say you want to use the 4 DACs to control 3 LEDs and a solenoid. DACs are fine for the LEDs, but a solenoid valve will require significant current which will require external electronics. If all you want to do is turn LEDs on and off and open and close the valve then it seems to me that these are all on/off situations and digital outputs can be used (again electronics will be needed for the solenoid) but DACs will be fine. If, however, you were ;looking for TTL signals then you need to use the digital outputs.

As you say two DAC outputs are on the front, numbers 0 and 1, so they are easy to get at. The other two, numbers 2 and 3, are on the rear analogue connector so a bit of wiring there. But crucially (I think this is what you really wanted to know) you would use the sequencer DAC instruction to control all four of these, with different DAC numbers in the instruction to control which DAC (& therefore which connector) is affected.
Tim Bergel Cambridge Electronic Design

IsmaelNavarro
Posts: 10
Joined: 15 Apr 2021, 10:44
Contact:

Re: Rear-panel configuration

Unread postby IsmaelNavarro » 25 Apr 2022, 18:15

Hi Tim,

Thanks to your example I have understood how to control the digital input socket and I can control the LEDs that I needed. Also, thank you very much for your explanation about the differences between digital and DAC outputs, now I understand it much better.

However, thanks to your explanation I think I should use another connector on the rear panel for my purpose. You are right when you say that the voltage is not really important because with both types of signal the lights turn on. However, I want to know at what times these on/off changes occur and to do so I have to define them as an event. Sorry for not mentioning it before, I thought that digital outputs could also be recognized as events by the CED. In this way, I think that in order to be able to visualize the events on the computer screen during the experiments and to save the moment in which the LEDs change state, I should use the rear-panel analogue socket. Is this correct or am I wrong? Is it also necessary to connect these pulses to the event socket to be able to visualize them or is it enough with the rear analogue connector?

Thank you very much for all the help, thanks to you I am solving the problems that arise in my experiments.

User avatar
Tim Bergel
Site Admin
Posts: 2379
Joined: 19 Jun 2008, 14:40
Location: Cambridge, England
Contact:

Re: Rear-panel configuration

Unread postby Tim Bergel » 02 May 2022, 11:21

Hi Ismael,

I am glad to hear that you are able to do what you want.

If I understand you correctly, you want markers in your data file showing when various things happen. There are several ways to do this, but switching to an analogue output on the rear connector will not achieve this - it is still just an output which can be controlled, and this control doesn't generate any data for the Spike2 data file being generated.

The first way is what you suggested - to physically connect the outputs which you are controlling to 1401 inputs which can generate data in the file. So if you were generating an output on a DAC you could connect the DAC to an ADC input (as well as to whatever other hardware the DAC controlled) and then log the DAC output as a waveform by adding the ADC input to a sampling configuration. Here where you are using digital outputs, you would wire them to the digital event inputs which are used to log events and add these events to the sampling configuration.

An easier and more flexible method is to use the sequencer MARK instruction. This generates a digital marker with a specified code so MARK 02 would generate a marker with code 2. You have to add the standard digital marker channel to the sampling configuration, the sequencer generated markers are put into that channel. Note that when the sequence writes to the digital outputs, the actual digital outputs do not change until the time that the next sequencer instruction executes. This means that if you have a DIGOUT instruction followed by a MARK instruction, the marker time will be exactly when the digital outputs changed. The really nice thing about this method (apart from not requiring extra wiring) is that if you need to extend the sequence so that it does more things - control a second solenoid perhaps - it is easy to include a new MARK instruction with a different code so that the time of this new action is shown correctly. Spike2 can use marker filters to hide all but a specified choice of marker codes so it is easy to generate a duplicate marker channel holding only the markers you want, perhaps as start times for analysis. So as you can guess I recommend that you use this method.
Tim Bergel Cambridge Electronic Design


Return to “1401 hardware”

Who is online

Users browsing this forum: No registered users and 1 guest

cron