Beatriz wrote[quote='Beatriz' pid='65' dateline='1470045856']
Yes, I'm using the USB for the connection with the governing machine computer (wich enabled me to also use SoftCodes for some synchronizations, for example). What I'm trying to achieve with the SerialCodes is a connection with a second computer for it to run a display (or you could imagine a case where I would want to exchange information with other kinds of devices). I would therefore need the appropriate triggers from the bpod. How would you recommend going about it? Could I use the 'X' USB port on the bpod for that effect, in some way?
Bpod's firmware is not currently set up to use the 'X' USB port (a slower programming port).
You may be able to run your visualization with a second instance of MATLAB, running on the same computer.
In the state where you want the display to change, send a byte back from Bpod to MATLAB (this is called a "soft code"). For example, to send code "3":
sma = AddState(sma, 'Name', 'MyState', ...
'Timer', 1,...
'StateChangeConditions', {'Tup', 'exit'},...
'OutputActions', {'SoftCode', 3});
Then on the MATLAB side, use a soft code handler function to send your byte to the other MATLAB instance, or to the other computer.
Sending a byte between MATLAB instances or MATLAB computers is possible through TCP. It is much easier if you have the Instrument Control toolbox. Otherwise, Bpod offers limited TCP support wrapping MATLAB's undocumented Java TCP interface. It's crude, but if you just want to send a trigger byte, this could be all you need. The relevant files are: /Bpod/Functions/Internal Functions/TCPRead.m,
and
/same path/TCPWrite.m.
Make sure to configure firewalls to allow traffic on the relevant ports, if you're talking between two computers!