default channel capacity and signal memory for stg4004
Page 1 of 1
default channel capacity and signal memory for stg4004
I'm trying to stimulate with a signal using the STG4004. I had written some code that I thought would work, but it doesn't, so I'm taking a step back to the examples.
Here's some Matlab code, in which I've added more elements to the waveform. This code does not work without increasing the channel capacity.
The initial demo works fine, but adding on a zero amplitude element, it failed. I believe that shortening the first two pulses however made it work. After some testing, I came to the conclusion that the capacity was too low. Unfortunately a query of the capacity does not work (something I'm working on fixing). However, I am curious as to:
1) Is it expected that a capacity overflow throws no errors?
2) How does a signal relate to memory usage? My minimal testing here suggests that it might be related to signal duration, rather than the # of amplitude and duration elements.
Thanks,
Jim
Here's some Matlab code, in which I've added more elements to the waveform. This code does not work without increasing the channel capacity.
- Code:
%Original entries, I've added more values
%Amplitude = int32([+2000000 -2000000]); % Amplitude in uV
%Duration = uint64([100000 100000]); % Duration in us
Amplitude = int32([+2000000 0 -3000000 -2000000 2000000]); % Amplitude in uV
Duration = uint64([1e5 1e5 1e6 1e5 1e5]); % Duration in us
AmplitudeNet = NET.convertArray(Amplitude, 'System.Int32');
DurationNet = NET.convertArray(Duration, 'System.UInt64');
device.PrepareAndSendData(0, AmplitudeNet, DurationNet, Mcs.Usb.STG_DestinationEnumNet.channeldata_voltage);
device.SendStart(1);
The initial demo works fine, but adding on a zero amplitude element, it failed. I believe that shortening the first two pulses however made it work. After some testing, I came to the conclusion that the capacity was too low. Unfortunately a query of the capacity does not work (something I'm working on fixing). However, I am curious as to:
1) Is it expected that a capacity overflow throws no errors?
2) How does a signal relate to memory usage? My minimal testing here suggests that it might be related to signal duration, rather than the # of amplitude and duration elements.
Thanks,
Jim
JimHokanson- Posts : 8
Join date : 2017-07-07
Re: default channel capacity and signal memory for stg4004
Apparently, "on reset, the STG has one segment containing all available memory" (See SendSegmentDefine). I'm not entirely sure how my system got to the point where it wasn't working. I think I may have run into an issue because I had used the GUI before, and I think the GUI shrinks the memory to what is needed ...
JimHokanson- Posts : 8
Join date : 2017-07-07
Similar topics
» Unable to retrieve proper trigger settings and capacity in Matlab for STG
» Setup the memory layout of the STG 4008 using Matlab?
» Realtime signal detection and feedback for in vivo and in vitro systems
» Losing signal
» Detection of electrical signal
» Setup the memory layout of the STG 4008 using Matlab?
» Realtime signal detection and feedback for in vivo and in vitro systems
» Losing signal
» Detection of electrical signal
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|