Tektronix Technical Forums are maintained by community involvement. Feel free to post questions or respond to questions by other members. Should you require a time-sensitive answer, please contact your local Tektronix support center here.

KUSB-3116 output signal using FIFO

KUSB and KPCI DAQ Data Acquisition Products
Post Reply
flopezurda
Posts: 4
Joined: March 24th, 2014, 5:00 am
Country: Spain

KUSB-3116 output signal using FIFO

Post by flopezurda » March 24th, 2014, 5:51 am

Hello everybody:

Right now I am working with a KUSB-3116 model trying to output with MATLAB 4 simultaneously waves using the FIFO available in the product. The MATLAB version I am currently working with is the 2011 version and 32 Bits. I followed the guide (available here: http://www.keithley.com/base_download?dassetid=50440 ) and I checked out that the driver was successfully installed and was properly working in MATLAB. When I used the function 'daqregister' I get a 'successfully registered' answer given by MATLAB. I used:

daqregister('C:\matlab\lab\dtol.dll')

%ans =

%'dtol.dll' successfully registered.

daqhwinfo('dtol')

%ans =
%
% AdaptorDllName: 'C:\matlab\lab\dtol.dll'
% AdaptorDllVersion: '1, 0, 0, 52'
% AdaptorName: 'dtol'
% BoardNames: {'DT9834(00)'}


I check out than I can output two sine waveform simultaneously (only two, I cannot output four simultaneously sine waveform) but at a very low frequency (800 mHz). Looking for the problem I release that MATLAB is not using the FIFO memory (MATLAB does not allow me to define a Buffer bigger than 2000 samples and two channels). When I try to define a bigger Buffer I find the following error:

ai0.BufferingConfig=[2000 2000];

%Error using daqdevice/subsasgn (line 100)
%Unable to set BufferingConfig[2] above maximum value of 2000.


I try to change the created object properties due to force MATLAB to use the device FIFO memory, but I have the following error:

set(ai0,'FIFOAvailable','yes');

%Error using daqdevice/set (line 232)
%Attempt to modify read-only property: 'FIFOAvailable'.


As MATLAB says, some of the MATLAB's object properties are defined in read-only mode so I cannot change them (more details about the code I am using, a snapshot of the result shown on an oscilloscope when I try to put 4 sine waveform at the same time and a snapshot of the object properties are attach to this message).

My question is: Is it possible to use the output FIFO memory with MATLAB? If the answer is affirmative, What is wrong in my code, and how should I change this in order to everything works fine?
Attachments
2014-03-20 14.08.45.jpg
Oscilloscope Snapshot
2014-03-20 14.08.45.jpg (1.35 MiB) Viewed 26828 times
Object properties_1.png
The properties window
Object properties_1.png (109.24 KiB) Viewed 26828 times
generar_seno.pdf
MATLAB's code
(16.16 KiB) Downloaded 1550 times

DTSupport
Posts: 8
Joined: February 13th, 2013, 7:37 am
Country: Germany

Re: KUSB-3116 output signal using FIFO

Post by DTSupport » March 25th, 2014, 7:38 am

Hello

The KUSB-3116 has an internal Fifo.
But this Fifo is not available from "outside".
The device Driver manages the Fifo itself.

But you can write signals down to the internal Fifo and Output they in repeated mode.
Attached is an example which demonstrates this.

If you whant to Change your Signal during outputting you Need to modidify the example so that it will be possible to add new data to the internal Fifo.

Let me know if you have any further questions.
Attachments
SimpleDA_3Channel.txt
Example how to use 3 DAC outputs
(1019 Bytes) Downloaded 1516 times

flopezurda
Posts: 4
Joined: March 24th, 2014, 5:00 am
Country: Spain

Re: KUSB-3116 output signal using FIFO

Post by flopezurda » March 28th, 2014, 3:10 am

Hello again,

Firstable, thank you very much for you faster answer.

I have just try to use the code you posted me but I can´t because MATLAB's gives me the following error using the 'putdata' function:

% ??? The analog output subsystem of this device does not support clocked
% generation.
% With this hardware you must output individual samples using PUTSAMPLE
% and can not
% use a combination of PUTDATA and START.

% Error in ==> analogoutput.putdata at 110
% putdata(uddobj,data);

% Error in ==> DA at 34
% putdata(ao, data);


Thank you very much for the support.

DTSupport
Posts: 8
Joined: February 13th, 2013, 7:37 am
Country: Germany

Re: KUSB-3116 output signal using FIFO

Post by DTSupport » April 1st, 2014, 4:32 am

Hi

The KUSB-3116 supports clocked output.
I assume that the Driver you use is not the newest.
I would suggest to check the device Driver and the Matlab Driver I assume that there are newer ones available.

I tested with my DT9834 which is identical with KUSB-3116 and the example works.

flopezurda
Posts: 4
Joined: March 24th, 2014, 5:00 am
Country: Spain

Re: KUSB-3116 output signal using FIFO

Post by flopezurda » April 3rd, 2014, 2:49 am

Hi,

I've just checked out the MATLAB's driver and the device driver and firmware and reinstall all. Right now I am using the latest drivers available al Keithley website (Matlab's driver, device's driver, device's software and device's firmware):

http://www.keithley.com/products/data/m ... ownloads#2

I try the code you sent me again and I have the same error:

Error using daq.analogoutput_dtol_1_1/putdata
The analog output subsystem of this device does not support clocked generation.
With this hardware you must output individual samples using PUTSAMPLE and can not
use a combination of PUTDATA and START.

Error in analogoutput/putdata (line 110)
putdata(uddobj,data);


In my opinion, the device driver is working correctly because when I output a signal using ¨QuickDataAcq¨ (the software that Keithley provides for the device) the output signal parameters are all correct (frequency, amplitude and waveform shape).ç

Thank you

flopezurda
Posts: 4
Joined: March 24th, 2014, 5:00 am
Country: Spain

Re: KUSB-3116 output signal using FIFO

Post by flopezurda » April 9th, 2014, 12:11 pm

Hello again,

I am still looking for the problem I have. I have tried to install the KUSB-3116 in two different computers:

1st:
OS: Windows 7 64 bits and matlab 2012 (32 bits).

2nd:
OS: Windows XP 32 bits and matlab 2011 (32 bits).

I have used the latest drivers available at Keithley website (download section) and I still getting the same errors. You told me that you tried the KUSB-3116 with the latest drivers and the code you posted before, so I want to replicate your system. Which OS and MATLAB version are you using? Are you using the drivers available at KEITHLEY website?

DTSupport
Posts: 8
Joined: February 13th, 2013, 7:37 am
Country: Germany

Re: KUSB-3116 output signal using FIFO

Post by DTSupport » April 15th, 2014, 2:56 am

Hi

I use Win 7 64-bit and Matlab 2013a (32-bit).
It is important to use 32-bit Matlab because the 64-bit Version does not support the DaqAdaptor for Matlab.

I could not give you my exact Drivers, because as I said I use a DT9834 from Data Translation.
And the Data Translation Drivers. But this drivers are normaly compatible with KUSB-3116.
Maybe you could also try this.

My Drivers where from Omni CD V7.4.0 and the DaqAdaptor is Version 1.0.10.20.
This combination of drivers and hardware works with the script I add.

Post Reply

Return to “Keithley DAQ Data Aquisition Products”

Who is online

Users browsing this forum: No registered users and 3 guests