| Data Acquisition Toolbox | Search  Help Desk |
| UserData | Examples |
UserData stores data that you want to associate with the device object.
Characteristics
| Device Objects | AI, AO |
| Class | Common |
| Access | Read/write |
| Data Type | Any type |
| Modify while Running | Yes |
Values
The default value is an empty vector.Example
Suppose you create an analog input objectai and want to access filter coefficients during an acquisition. A structure can be created to store these coefficients, which can then be stored in UserData.
coeff.a = 1.0 coeff.b = -1.25 ai.UserData = coeff;To return the second coefficient
x = ai.UserData;
x.b
ans =
-1.2500