Hi Yasmine,
(1) How do we program the laser to drive 1 of the 4 channels? We don’t see channel number as an option, only modes.
mode_1 sets the mode for channel 1, mode_2 for channel 2, etc. If you don’t want to use a channel, set its mode to off (or just omit the corresponding mode parameter from the device definition).
(2) Do we need to send a digital TTL to the laser to enable activation?
Yes. From the QCUALOR user manual, I see that the back panel has a BNC connector labeled “Modulation Enable Gate” (i.e. MEG). In order for the laser to recognize configuration commands and activate, the TTL signal connected to that input must be set high.
In your MWorks experiment, if you
- set the
meg_state parameter of the qcualor device to the name of the variable,
- use that same variable as the
value parameter of a DATAPixx bit output channel, and
- connect the digital line associated with the output channel to the laser’s MEG input BNC,
then MWorks will set the MEG input high and low at the appropriate times.
If you don’t want MWorks to do this, then omit the meg_state parameter. In this case, your experiment will have to set the MEG input explicitly.
In our VPixx configuration file, we currently set dout 21 for use with the laser. We are assuming that this is what the “meg_state” variable controls.
If dout 21 is physically connected to the laser’s MEG input, and you’ve arranged things as described above, then you are correct.
(3) Could you please give us an example of the syntax we need to make the laser deliver the following stimulation:
- Channel 1
- Blue laser
- Sinusoidal
- Frequency 100
- Amplitude X
- Duration Y
In my notes from our meeting with Karim, I have that channels 1 and 3 are red, 2 and 4 are blue. I don’t see this mentioned in the user manual, though, so I can’t confirm.
Anyway, assuming you want channel 1, here’s an example that configures the laser as you described and runs it for one second:
var amplitude = 0.1 // Between 0 and 1, subject to max_gain
var meg_state = false
iodevice/qcualor laser (
mode_1 = 'sinusoidal'
modulation_frequency = 100
gain_1 = amplitude
meg_state = meg_state
)
protocol {
start_io_device (laser)
wait (1s)
stop_io_device (laser)
}
If meg_state is used as discussed above, then start_io_device will turn the laser on, and stop_io_device will turn it off. (Stopping the experiment will also turn it off.)
(4) Is there an easy way for us to test the USB serial signals coming from MWorks (in case our laser is not configured correctly)?
I don’t understand how testing the signals coming from MWorks would tell you if your laser is configured correctly. Can you elaborate?
Cheers,
Chris