background image

T3SP-D4MX Operator’s Manual

3.2.5 Matlab

Interfacing the

cDMXU.dll

shared library from Matlab can be achieved by

using the

calllib

function. It allows for calling functions in shared li-

braries. It can be used to wrap these libraries in a Matlab m-file, as shown

in the following example:

function

varargout = mux_example(varargin)

% function varargout = mux_example(varargin)

%

% Examples:

%

mux_example('init');

%

mux_example('release')

%

mux_example('getserialnumber')

%

mux_example('getnumberofchannels')

%

mux_example('setchannel', 1); % starting with 1 (0: ALL OFF)

%

mux_example('getchannel');

if

~

nargin

cmd = 'init';

else

cmd =

lower

(varargin{1});

end

dll = 'cDMXUD';

shrlib = ['C:\YOUR_PATH\' dll '.dll'];

header = 'C:\YOUR_PATH\cDMXU.h';

assert(

exist

(header,'file')>0, 'Unable to locate header file');

if

~libisloaded(dll)

loadlibrary(shrlib,header);

end

is_init = (calllib(dll,'cDMXU_IsInitialized') == 0);

if

~is_init,

err = calllib(dll,'cDMXU_Init','');

assert(err == 0, 'Initialization failed');

18

933407 Rev1

Содержание Everywhereyoulook T3SP-D4MX

Страница 1: ...Operator s Manual RF Multiplexer T3SP D4MX ...

Страница 2: ...emark of Teledyne LeCroy Inc All rights reserved Specifications prices availability and delivery subject to change without notice Product brand or brand names are trademarks or requested trademarks of their respective holders T3 stands for Teledyne Test Tools 2 933407 Rev1 ...

Страница 3: ...ogramming Examples 10 3 2 1 C C Code 10 3 2 2 C Code 12 3 2 3 Python 14 3 2 4 LabVIEW 16 3 2 5 Matlab 18 4 Safety Instructions 21 4 1 Operating Environment 21 4 2 Power 21 4 3 Safety Symbols Terms 22 5 Maintenance 23 6 Certifications 24 6 1 EMC Compliance 24 6 1 1 EC DECLARATION OF CONFORMITY EMC 24 6 1 2 AUSTRALIA NEW ZEALANDDECLARATIONOFCON FORMITY EMC 25 6 2 Safety Compliance 26 6 2 1 EC DECLAR...

Страница 4: ...T3SP D4MX Operator s Manual 6 3 Environmental Compliance 27 6 3 1 END OF LIFE HANDLING 27 6 3 2 RESTRICTION OF HAZARDOUS SUBSTANCES RoHS 27 4 933407 Rev1 ...

Страница 5: ... against electromagnetic discharge ESD is given by internal protection diodes A main advantage of using MEMS technology is a very long lifetime which goes hand in hand with a high number of cycle times up to 1 billion The device typically is used in multi signal path testing applications e g cable testing It can be programmed either by a stand alone applications or inte grated into automated test ...

Страница 6: ... signal paths typ 5ps skew Up to 1 billion switching cycles cold 500 million hot 10dBm 50Ω Starts in not connected state Internal ESD protection SMA connectors Controlled and powered via USB Figure 1 Simplified functional diagram showing input ports CH1 and CH2 to the left and the blocks of four output ports for each input port Alternatively the input can be set to an unconnected state 6 933407 Re...

Страница 7: ...life time 109 cold switching 500 106 hot switching 10dBm 50Ω Human body model HBM Caution hot switching reduces switch life time RF Characteristics single ended Parameter min typ max Frequency Insertion loss 0 4dB 0 5dB DC 0 3GHz 1 0dB 1 2dB 0 3GHz 2GHz 3 0dB 3 5dB 2GHz 8GHz 5 0dB 6 0dB 8GHz 10GHz Return loss CH1 2 input 20dB 25dB DC 0 3GHz 16dB 18dB 0 3GHz 2GHz 13dB 15dB 2GHz 8GHz 8dB 10dB 8GHz 1...

Страница 8: ...ons SMA in output connectors USB mini B connector programming power Ground jack 4mm Dimensions 49x108x180mm3 with connectors feet Dimensions 42x108x165mm3 without connectors feet Figure 2 Front panel dimensions Figure 3 Rear panel dimensions 8 933407 Rev1 ...

Страница 9: ...d on a communica tion chip from Future Technology Devices International Limited FTDI Win dows operating systems usually have the required D2XX driver for this chip family pre installed If this is exceptionally not the case the corresponding driver can be downloaded from the FDTI driver download page The device is not controlled via a virtual comport protocol therefore it is necessary to control it...

Страница 10: ...l int cDMXU_GetChannel void int cDMXU_GetSerialNumber void int cDMXU_GetNumberOfChannels void int cDMXU_Release void The following is a simple main program that calls all functions as an example make sure cDMXU lib is added to linker dependencies include stdio h include header file include cDMXU h include T3SP D4MX header macro for checking on errors define CHK_ERROR e m if e 0 printf m return e i...

Страница 11: ...d number of available channels no_of_channels cDMXU_GetNumberOfChannels CHK_ERROR no_of_channels Getting number of channels failed 1 based numbers 0 ALL OFF if cDMXU_SetChannel 1 0 CHK_ERROR 1 Setting channel failed 1 based numbers 0 ALL OFF channel cDMXU_GetChannel CHK_ERROR channel Getting channel failed release library if cDMXU_Release 0 CHK_ERROR channel Getting channel failed return OK return...

Страница 12: ...Cdecl DllImport shared_lib CallingConvention ccv static extern int cDMXU_Init string id DllImport shared_lib CallingConvention ccv static extern int cDMXU_IsInitialized DllImport shared_lib CallingConvention ccv static extern int cDMXU_SetChannel int channel DllImport shared_lib CallingConvention ccv static extern int cDMXU_GetChannel DllImport shared_lib CallingConvention ccv static extern int cD...

Страница 13: ...c bool IsInitialized return cDMXU_IsInitialized 0 public int SetChannel int channel return cDMXU_SetChannel channel public int GetChannel return cDMXU_GetChannel public int GetNumberOfChannels return cDMXU_GetNumberOfChannels public int GetSerialNumber return cDMXU_GetSerialNumber 13 933407 Rev1 ...

Страница 14: ...l assert os path isfile dll MUX error DLL not found load DLL mux cdll LoadLibrary dll setup argument and result types mux cDMXU_Init restype c_int mux cDMXU_Init argtypes c_char_p mux cDMXU_IsInitialized restype c_int mux cDMXU_IsInitialized argtypes mux cDMXU_SetChannel restype c_int mux cDMXU_SetChannel argtypes c_int mux cDMXU_GetChannel restype c_int mux cDMXU_GetChannel argtypes mux cDMXU_Get...

Страница 15: ... serial no failed read number of channels no_of_channels mux cDMXU_GetNumberOfChannels assert no_of_channels 0 Reading number of channels failed set mux channel A B 2 C 3 D 4 res mux cDMXU_SetChannel 1 assert res 0 Setting channel A failed read back current channel channel mux cDMXU_GetChannel assert channel 0 Reading current channel failed to set switch to OFF state pass 0 res mux cDMXU_SetChanne...

Страница 16: ... library con verts data types in the shared library to LabVIEW data types and generates a wrapper VI for each function The wizard saves the VIs in a LabVIEW project library Continue to the Use Header File with the Import Shared Library Wiz ard section Start the import as follows 1 Launch LabVIEW 2 Navigate to Tools Import Shared Library dll to launch the Import Shared Library Wizard 3 Select Creat...

Страница 17: ...shed with configuration select Finish to create your Lab VIEW Project library lvlib file An example with the VIs created by means of the wizard is shown below The example performs some initialization and responds to events triggered by the Channel input control The file mux example vi can be downloaded from the Teledyne LeCroy website Figure 5 LabVIEW example VI for controlling the T3SP D4MX 17 93...

Страница 18: ...x_example varargin Examples mux_example init mux_example release mux_example getserialnumber mux_example getnumberofchannels mux_example setchannel 1 starting with 1 0 ALL OFF mux_example getchannel if nargin cmd init else cmd lower varargin 1 end dll cDMXUD shrlib C YOUR_PATH dll dll header C YOUR_PATH cDMXU h assert exist header file 0 Unable to locate header file if libisloaded dll loadlibrary ...

Страница 19: ...seif strcmpi cmd getnumberofchannels ret NoC elseif strcmpi cmd setchannel check for errors error nargchk 2 2 nargin ch varargin 2 assert isnumeric ch isscalar ch Channel must be a scalar integer assert ch int32 ch ch 0 ch NoC Invalid channel err calllib dll cDMXU_SetChannel ch assert err 0 Setting channel failed elseif strcmpi cmd getchannel ret calllib dll cDMXU_GetChannel assert ret 0 Getting c...

Страница 20: ...ual assert err 0 Error while releasing library end unloadlibrary dll else error Unknown command end assign return value if isempty ret if nargout 0 varargout 1 ret else disp sprintf s returned d cmd ret end end 20 933407 Rev1 ...

Страница 21: ...adiators and other heat sources should be avoided and have to be taken into account when assessing the ambient temperature Humidity 5 to 90 RH non condensing up to 31 C decreasing linearly to 50 RH at 40 C Altitude Up to 3000m at or below 30 C 4 2 Power DC Voltage 5V via USB port Power Consumption 60mW 21 933407 Rev1 ...

Страница 22: ...t against personal injury or damage Do not proceed until conditions are fully understood and met This symbol states that ESD precautions are re quired at all RF ports This symbol is used to denote a safety ground con nection OBSERVE ALL TERMINAL RATINGS Do not apply a voltage to any input that exceeds the maximum rating of that input Refer to the markings on the unit s front panel Pleaser refer to...

Страница 23: ...nual 5 Maintenance Do not use abrasive cleaning agents To remove tenacious contami nations use a commercial non abrasive cleaning agent If necessary clean the T3SP D4MX carefully by wiping it with a humid cloth 23 933407 Rev1 ...

Страница 24: ... 55011 2016 A1 2017 Radiated and Conducted Emissions Group 1 Class A 2 3 Electromagnetic Immunity EN 61000 4 2 2009 Electrostatic Discharge 4kV contact 8kV air 4kV vertical horizontal coupling planes 4 EN 61000 4 3 2006 A2 2010 RF Radiated Electromagnetic Field 3V m 80 1000MHz 3V m 1 4 2GHz 1V m 2 2 7GHz 1 To ensure compliance with all applicable EMC standards use high quality shielded inter face ...

Страница 25: ...he following standards in accordance with requirements imposed by Australian Communica tion and Media Authority ACMA AS NZS CISPR 11 2015 Radiated and Conducted Emissions Group 1 Class A Australia New Zealand Contacts RS Components Pty Ltd Suite 326 The Parade West Kent Town South Australia 5067 RS Components Ltd Units 30 31 Warehouse World 761 Great South Road Penrose Auckland New Zealand Visit t...

Страница 26: ... for measurement con trol and laboratory use Part 2 030 Particular requirements for testing and measuring circuits The design of the instrument has been verified to conform to the following limits put forth by these standards Mains Supply Connector Overvoltage Category II instrument intended to be supplied from the building wiring at utilization points socket outlets and similar Measuring Circuit ...

Страница 27: ...pecified all the materials and processes are compliant with RoHS Direc tive 2011 65 EU in its entirety inclusive of any further amendments or modifications of said Directive CHINA RoHS 2 Unless otherwise specified all the materials and processes are compliant with the latest requirements of China RoHS 2 The hazardous substances contained in the instrument are disclosed in accordance with the stand...

Страница 28: ... O 电源 O O O O O O 风扇 O O O O O O 电池 O O O O O O 电源线 O O O O O O 外部电源 如有 X O O O O O 探头 如有 X O O O O O 熔丝 如有 O O O O O O 产品外壳 如有 O O O O O O 适配器 模块 如有 O O O O O O 鼠标 如有 O O O O O O 探头EFUP 10年 使用条件 参阅用户手册 环境条件 部分的规定 部件名称 有毒有害物质和元素 O 表明该有毒有害物质在该部件所有均质材料中的含量均在SJ T11364 2014标准规定的限量要求之下 X 表示该有毒有害物质至少在该部件的某一均质材料中的含量超出SJ T11364 2014标准规定的限量要求 EFUP 对环境友好的使用时间 30年 28 933407 Rev1 ...

Страница 29: ...obes 10 years Polybrominated Biphenyls PBB Lead Pb Mercury Hg Cadmium Cd Use Conditions Refer to the environmental conditions stated in the User Manual Toxic or Hazardous Substances and Elements Hexavalent Chromium Cr6 Polybrominated Diphenyl Ethers PBDE O Indicates that this toxic or hazardous substance contained in all of the homogeneous materials for this part is below the limit requirement spe...

Отзывы: