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.

SetOutputRate /GetOutputRate

Go down

SetOutputRate /GetOutputRate Empty SetOutputRate /GetOutputRate

Post  mrklab Tue Jan 15, 2019 6:13 pm

I am trying to change the output rate from 50Khz to something smaller.

I used the NET assemblies from inside Matlab (R2018b)
For instance to use 1 Kz I call:

o.SetOutputRate(uint32(1000))
(where o is a handle to the Mcs.Usb.CStg200xDownloadNet object)

I adjust the data and the duration vectors that I pass to the device accordingly, o.SendChannelData(thisChannel-1,adValues,uint64(step*1e6*ones(size(adValues))));

(where adValues has the values of the waveform and step = 1/OutputRate (1e-03 in this example))

but the waveforms don't have the correct frequency (and sometimes fail to change...) . I checked this on an oscilloscope. The waveforms are correct when using the default 50000 OutputRate.



So I wanted to check the OutputRate (After setting it)
but calling
h = o.GetOutputRate

Results in the following error:


Message: HCD return STALL PID
Source: McsUsbNet
HelpLink:


Any pointers?




mrklab

Posts : 3
Join date : 2017-05-30

Back to top Go down

SetOutputRate /GetOutputRate Empty Re: SetOutputRate /GetOutputRate

Post  Frank MCS Fri Jan 18, 2019 9:17 am

Hi Mrklab,

Indeed, the "SetOutputRate" is not implemented in some of the STG devices. These devices have a fixed output rate of 50 kHz output rate
and the "SetOutRate" call returns an error.

The download of stimulus signal has an compression algorythm, so that the amount of STG memory needed to store a stimulus
pattern at 50 kHz with the signal only changing at a rate of 1 kHz does not differ much from the memory which would be
needed when output rate itself is reduced to 1 kHz.

You should have no disadvantage in sending your intended stimulus signal with an output rate of 50 kHz and only changing patterns every "n"th output sample.



Frank MCS
Frank MCS

Posts : 188
Join date : 2008-07-14

Back to top Go down

Back to top


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