DATAQ Instruments Developer NetworkLabView Resources
How do I use the DATAQ ActiveX controls in MATLAB®?MatLab has a COM client function actxcontrol that allows you to create an ActiveX control in a figure window. The type of control is determined by the progid:
Syntax for actxcontrol: dataqcontrol = actxcontrol('progid', position, fig_handle, event_handles, 'filename') The returned object (dataqcontrol in the above example) is the default interface for the control in MATLAB®. For example, the line below would produce a figure window with the DQChart control on it, 10 pixels from the bottom left corner, and 400 X 400 width by height: dqchart = actxcontrol('DQCHART.DQChartCtrl.1',[10,10,400,400]) To learn more about actxcontrol, consult the MATLAB® help documentation under MATLAB>>External Interfaces Reference>>COM Functions>>COM Client Functions In the table below, replace <dataqcontrol> with the name of your created object to find out information about the controls.
When your control is no longer needed, use the release and the delete function to reclaim the memory used by it. Use the Tab key to display the available control options:
Event HandlersYou can register your event handler functions either:
Set PropertiesMATLAB Syntax to set properties: set(h, 'propertyname', value[, 'propertyname2', value2, ...]) Example: set(dataqsdk, 'DeviceDriver', 'DI101NT.DLL') Example M-file MATLAB® programsDATAQ has a variety of example M-file programs available for download. You need to first add the directory where the file is located to the MATLAB® path using the addpath function: addpath('C:\matlabR14\work') After you add the path, you can run the example programs just by typing the name of the M-file at the MATLAB® command prompt. For example, ReadDataqFile.m can be run by typing: ReadDataqFile Data Acquisition Product Links(click on text to jump to page) |
|||||||||||||||||||||||||||||||||||||