Unable to retrieve proper trigger settings and capacity in Matlab for STG
2 posters
Page 1 of 1
Unable to retrieve proper trigger settings and capacity in Matlab for STG
After much trying I can't get the GetCapacity or GetTrigger methods to work. The only value that seems to work is the channel map for GetTrigger. In particular, I've verified that setting the 'repeat' value works, based on stimulation time, but I can't properly query the 'repeat' value from GetTrigger. Is it possible these methods aren't working properly? Can anyone show a solution in Matlab or even C# in which these methods work?
Some example code:
Calling into .NET
Additionally, I'm curious as to why GetTrigger uses "ref" definitions instead of "out". The results from the sync_map and repeat from GetTrigger seem to just be the "inputs" that I am passing to the function.
I'm using 3.2.45 of the dll and an STG4004 SW version 1.46
Thanks,
Jim
Some example code:
- Code:
device.SetCapacity(ones(1,4,'uint32'),ones(1,4,'uint32'))
chan_cap = uint32(device.GetCapacity);
%chan_cap isn't 1,1,1,1 as expected
device.SetTriggerSource(0,1,1,100);
c2 = NET.convertArray(zeros(1,4),'System.UInt32');
s2 = NET.convertArray(zeros(1,4),'System.UInt32');
r2 = NET.convertArray(zeros(1,4),'System.UInt32');
[c2,s2,r2] = obj.h.GetTrigger(c2,s2,r2);
repeats = uint32(r2); %not showing 100 as expected
Calling into .NET
- Code:
UInt32[] c1 = { 1 };
UInt32[] s1 = { 1 };
UInt32[] r1 = { 10 };
//dbasic => public CStg200xDownloadBasicNet dbasic;
dbasic.SetupTrigger(0, c1, s1, r1);
uint[] a = { 1, 1, 1, 1 };
uint[] b = {0, 1, 2, 3};
uint[] c = {0, 0, 0, 0};
dbasic.GetTrigger(ref a,ref b,ref c);
System.Console.WriteLine(c[0]);
//c[0] not 10 as expected.
Additionally, I'm curious as to why GetTrigger uses "ref" definitions instead of "out". The results from the sync_map and repeat from GetTrigger seem to just be the "inputs" that I am passing to the function.
I'm using 3.2.45 of the dll and an STG4004 SW version 1.46
Thanks,
Jim
JimHokanson- Posts : 8
Join date : 2017-07-07
Re: Unable to retrieve proper trigger settings and capacity in Matlab for STG
Dear Jim,
it's indeed a bug in the .dll. Could you provide an e-mail, or write to support@multichannelsystems.com, so we can send the fixed version?
Frank MCS
it's indeed a bug in the .dll. Could you provide an e-mail, or write to support@multichannelsystems.com, so we can send the fixed version?
Frank MCS
Frank MCS- Posts : 188
Join date : 2008-07-14
Similar topics
» default channel capacity and signal memory for stg4004
» Coating Protocol
» Unable to read Spike Parameters with Neuroshare
» Gain settings for FA60SBS and MPA32
» Displaying the trigger (digital) channel...
» Coating Protocol
» Unable to read Spike Parameters with Neuroshare
» Gain settings for FA60SBS and MPA32
» Displaying the trigger (digital) channel...
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum