User manual MATLAB DATA ACQUISITION TOOLBOX ADAPTOR KIT 2

Lastmanuals offers a socially driven service of sharing, storing and searching manuals related to use of hardware and software : user guide, owner's manual, quick start guide, technical datasheets... DON'T FORGET : ALWAYS READ THE USER GUIDE BEFORE BUYING !!!

If this document matches the user guide, instructions manual or user manual, feature sets, schematics you are looking for, download it now. Lastmanuals provides you a fast and easy access to the user manual MATLAB DATA ACQUISITION TOOLBOX ADAPTOR KIT 2. We hope that this MATLAB DATA ACQUISITION TOOLBOX ADAPTOR KIT 2 user guide will be useful to you.

Lastmanuals help download the user guide MATLAB DATA ACQUISITION TOOLBOX ADAPTOR KIT 2.


Mode d'emploi MATLAB DATA ACQUISITION TOOLBOX ADAPTOR KIT 2
Download
Manual abstract: user guide MATLAB DATA ACQUISITION TOOLBOX ADAPTOR KIT 2

Detailed instructions for use are in the User's Guide.

[. . . ] Data Acquisition ToolboxTM Adaptor Kit 2 User's Guide How to Contact The MathWorks Web Newsgroup www. mathworks. com/contact_TS. html Technical Support www. mathworks. com comp. soft-sys. matlab suggest@mathworks. com bugs@mathworks. com doc@mathworks. com service@mathworks. com info@mathworks. com Product enhancement suggestions Bug reports Documentation error reports Order status, license renewals, passcodes Sales, pricing, and general information 508-647-7000 (Phone) 508-647-7001 (Fax) The MathWorks, Inc. 3 Apple Hill Drive Natick, MA 01760-2098 For contact information about worldwide offices, see the MathWorks Web site. Data Aquisition ToolboxTM Adaptor Kit User's Guide © COPYRIGHT 2000­2010 by The MathWorks, Inc. The software described in this document is furnished under a license agreement. The software may be used or copied only under the terms of the license agreement. [. . . ] The Open method typically just checks the device ID and initializes the subsystem, then calls the SetDaqHwInfo method. For a discussion of the important properties for SetDaqHwInfo, consult Appendix D, "Sample Property and daqhwinfo Tables. " Step 5. 5 Modify the SetPortDirection Method The SetPortDirection method is used to set up the read or write status of each line in each port. The calling syntax of the method is as follows: HRESULT ::SetPortDirection(LONG Port, ULONG DirectionValues) The first argument is the port number, and the second argument is a masked list of directions for that particular port. A 0 in any bit position means that the particular line should be an input (reading), while a 1 in any bit position means that the line must be configured for output (writing). Note For port-configurable devices, the DirectionValues variable is always set to 0 for input, or 255 for output, regardless of the size of the port. A typical example of the SetPortDirection method is given below for the Measurement Computing adaptor: HRESULT CDio::SetPortDirection(LONG Port, ULONG DirectionValues) { if (PortNum[Port]==AUXPORT) return S_OK; if (DirectionValues==0) { CBI_CHECK(cbDConfigPort(_BoardNum, PortNum[Port], DIGITALIN)); } else { CBI_CHECK(cbDConfigPort(_BoardNum, PortNum[Port], DIGITALOUT)); 3-57 3 Step-by-Step Instructions for Adaptor Creation } return S_OK; } Step 5. 6 Implement the ReadValues Method The ReadValues method is used to read data from a number of digital lines. The ReadValues method is called whenever the user requests digital input using the getvalue function in MATLAB (see "Reading Line Values" in Chapter 2 for more information on the getvalue function). A typical implementation of this method is shown for the Measurement Computing adaptor: HRESULT CDio::ReadValues(LONG NumberOfPorts, LONG * PortList, ULONG * Data) { if (Data == NULL) return E_POINTER; USHORT val; for (int i=0;i<NumberOfPorts;i++) { CBI_CHECK(cbDIn(_BoardNum, PortNum[PortList[i]], &val)); Data[i]=val; } return S_OK; } The data is always returned to MATLAB as unsigned long data. Note Some boards allow lines on a given port to be configured separately. In this case, ReadValues still assumes that the whole port will be read. However, the values obtained from the lines configured for output are meaningless, because they reflect values latched from a previous write operation. The engine returns only the requested line information to the user. 3-58 About the Demo Adaptor Software Testing the ReadValues Method Once you have written the ReadValues method, you can test your device. The code given in "Reading Line Values" in Chapter 2 provides example code to test your adaptor. Step 5. 7 Implement the WriteValues Method The WriteValues method is used to write data to a number of digital lines. The WriteValues method is called whenever the user sends digital input data using the putvalue function in MATLAB (see "Writing Line Values" in Chapter 2 for more information on the putvalue function). A typical implementation of this method is shown for the Measurement Computing adaptor: HRESULT CDio::WriteValues(LONG NumberOfPorts, LONG * PortList, ULONG * Data, ULONG * Mask) { for (int i=0;i<NumberOfPorts;i++) { CBI_CHECK(cbDOut(_BoardNum, PortNum[PortList[i]], Data[i])); } return S_OK; } Testing the WriteValues Method Once you have written the WriteValues method, you can test your device. The code given in "Writing Line Values" in Chapter 2 provides example code to test your adaptor. 3-59 3 Step-by-Step Instructions for Adaptor Creation 3-60 4 Working with Properties Overview . 4-2 Accessing Properties from Your Adaptor . 4-4 Accessing a Property Using GetProperty . 4-5 Creating Adaptor-Specific Properties . 4-8 Modifying Property Values, Defaults, and Ranges . 4-11 Working with Enumerated Properties . 4-12 Passing Arrays to MATLAB Using Safe Arrays . 4-14 4 Working with Properties Overview This chapter contains information on dealing with Data Acquisition Toolbox properties in your adaptor. This information provides you with techniques for using the Adaptor Kit templates for · Accessing properties from your adaptor · Attaching to properties to monitor property changes (or for frequent interaction with the property) · Creating adaptor-specific properties Once you have created a reference to the property (using one of the preceding techniques), this chapter also provides you with information on · Setting values, defaults, and ranges · Adding and removing items from enumerated lists The Data Acquisition Toolbox uses properties of data acquisition objects to control how the object behaves in response to user requests. Any action taken by a data acquisition object should be due to specific property values, or combinations of values of many properties. [. . . ] Conversion offset from native (raw) data to input range. Conversion scaling from native (raw) data to input range. NativeOffset NativeScaling Note: NativeOffset and NativeScaling properties are read only properties. ConversionExtraScaling An additional scaling factor that you can apply to the conversion of the raw data to the target units, after all other scaling calculations have occurred. You do not need to adjust this value unless the default scaling mechanism cannot correctly calculate the scaling factor based on the number of bits, and the various range properties. This reflects in the final scaling value reported by the channel's NativeScaling property. [. . . ]

DISCLAIMER TO DOWNLOAD THE USER GUIDE MATLAB DATA ACQUISITION TOOLBOX ADAPTOR KIT 2

Lastmanuals offers a socially driven service of sharing, storing and searching manuals related to use of hardware and software : user guide, owner's manual, quick start guide, technical datasheets...
In any way can't Lastmanuals be held responsible if the document you are looking for is not available, incomplete, in a different language than yours, or if the model or language do not match the description. Lastmanuals, for instance, does not offer a translation service.

Click on "Download the user manual" at the end of this Contract if you accept its terms, the downloading of the manual MATLAB DATA ACQUISITION TOOLBOX ADAPTOR KIT 2 will begin.

Search for a user manual

 

Copyright © 2015 - LastManuals - All Rights Reserved.
Designated trademarks and brands are the property of their respective owners.

flag