Welcome to our user forum (read only mode).
Would you like to react to this message? Create an account in a few clicks or log in to continue.

default channel capacity and signal memory for stg4004

Go down

default channel capacity and signal memory for stg4004 Empty default channel capacity and signal memory for stg4004

Post  JimHokanson Fri Jul 28, 2017 5:08 pm

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.

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

Back to top Go down

default channel capacity and signal memory for stg4004 Empty Re: default channel capacity and signal memory for stg4004

Post  JimHokanson Fri Jul 28, 2017 7:05 pm

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

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum