To clarify: this is my script for the triggerprofiles:
ValveSuction = ones(1,10000)*5; %>> List of voltages to be played
NoValveSuction = ones(1,10000)0; %>> Instead of 'X' to stop all waveforms (interfering with miniscope), load new waveform containing only 0V
Base = ones(1,10000)*3.3;
Trigger = ones(1,10000)0;
A.TriggerMode = 'Master'; %>> Overrides playback if new message comes
A.loadWaveform(1, ValveSuction);
A.loadWaveform(4, NoValveSuction);
A.loadWaveform(2, Base);
A.loadWaveform(3, Trigger);
% A.TriggerProfiles = [4 3 255 255; 4 2 255 255; 1 2 255 255; 255 255 255 255; 255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255;255 255 255 255]; (tried out of desperation)
% % A.TriggerProfiles(1:12) = [4 67 255 255; 4 66 255 255; 1 66 255 255]; (also tried this, since this looked similar to a previous post)
A.TriggerProfileEnable = 'On';
LoadSerialMessages(1, ['P' 0]);
LoadSerialMessages(2, ['P' 1]);
LoadSerialMessages(3, ['P' 2]);
% % LoadSerialMessages('WavePlayer1', {['P' 0], ['P' 1], ['P' 2]});
(And in statemachine the 'Waveplayer1' messages)
[b]Alternative: I have also tried just playing two waveforms on channel 1 and 2, respectively. However, I can only get channel 1 to work (even when I switch the waveform):
ValveSuction = ones(1,10000)*5;
Trigger = ones(1,10000)3.3; (also doesn't work with 3V)
A.TriggerMode = 'Master';
A.loadWaveform(1, ValveSuction);
A.loadWaveform(2, Trigger);
A.BpodEvents{1} = 'On';
LoadSerialMessages('WavePlayer1', ['P' 1 0], 1);
LoadSerialMessages('WavePlayer1', ['P' 2 1], 2);
OR
LoadSerialMessages('WavePlayer1', {['P' 1 0], ['P' 2 1]});
With in the statemachine {'Waveplayer1', 1} and {'Waveplayer1', 2} in their respective states (and 'X' when no waveforms need to be played)