Hello,
I am struggling with setting up a Cedrus Wireless StimTrigger with Presentation. The StimTrigger is connected to the stim computer through USB, but emulates a serial port via FTDI drivers. The StimTrigger is recognized as a USB Serial Port (COM5) in the Device Manager. I have set up the port in the Presentation Settings as indicated in the Presentation demo:
Rate:115200
Parity: None
Data bits: 8
Stop bits: 1
(all other options are set either to “disable” or “off”. The FIFO interrupt option is not selected.)
A couple of problems here.
- When I click the “Test” button, nothing happens.
- When I run the Presentation demo, it does work and sends the codes. However, the code provided by Presentation is somehow obscure to me:
begin;
begin_pcl;
output_port soport = output_port_manager.get_port( 1 );
# set pulse width
soport.send_code(109); #m
soport.send_code(112); #p
soport.send_code(144);
soport.send_code(1);
soport.send_code(0);
soport.send_code(0); #400, little endian
soport.send_code(109); #m
soport.send_code(104); #h
soport.send_code(0); #all lines low
soport.send_code(0); #extra byte
wait_interval(600);
soport.send_code(109); #m
soport.send_code(104); #h
soport.send_code(1); #line 1 high, others low
soport.send_code(0); #extra byte
wait_interval(600);
soport.send_code(109); #m
soport.send_code(104); #h
soport.send_code(2); #line 2 high, others low
soport.send_code(0); #extra byte
wait_interval(600);
soport.send_code(109); #m
soport.send_code(104); #h
soport.send_code(3); #line 1 and 2 high, others low
soport.send_code(0); #extra byte
wait_interval(600);
The codes sent are just 1, 2, and 3. I guess the remaining send_code
lines (i.e., the “m”, “h”, “p”, and “extra byte” lines) are just the way the stim trackers sends the markers. Can anyone explain to me what they are and why it is like that? It sounds like I will need to change the whole code…
I have also found out that the Lab Streaming Layer might be an easier way out of this. Both Presentation, and the CGX wireless stim tracker and headset are fully supported by LSL. So I was wondering if you have any insight about that.
Thank you in advance!