sltest.xil.framework.Acquisition Class
Namespace: sltest.xil.framework
Add-On Required
This class requires that you Install and Set Up the Simulink Test Support Package for ASAM XIL Standard.
Description
Use the sltest.xil.framework.Acquisition
class to set up variables on the
test bench to log data, control data acquisition, and retrieve the acquired logged data.
The sltest.xil.framework.Acquisition
class is a handle
class.
Creation
You cannot create an sltest.xil.framework.Acquisition
object. An
Acquisition
object exists only as a member of an
sltest.xil.framework.Framework
object. Create a
Framework
object first, and then use the Acquisition
methods from within that Framework
object.
Methods
Public Methods
setupWithVariables |
Configures the
Input Argument
Name-Value Pair Inputs
|
start |
Enables data logging based on settings and triggering you specified
with the |
stop |
Stops log data acquisition immediately, even if triggering has not completed. |
wait |
Waits for triggering to
complete. When triggering completes, data acquisition stops. Then, you can use
Name-Value Pair
|
fetch |
Stops log data acquisition
immediately and returns a |
clearConfiguration |
|
Examples
Set Up Acquisition Without Triggering
import sltest.xil.framework.* frm = Framework; frm.Configuration.addModelAccessPort(... 'MAPort1','asamxil.v2_1',... VendorName='ABC Co.',... ProductName='ABC Test Bench',... ProductVersion='1.7',... PortConfigFile=fullfile(pwd,'myConfigFile.xml')); frm.Configuration.addTestVariableMapping(... 'RPM','MAPort1','simpleXIL/Gain:1'... 'TaskName','SubRate1'); frm.Configuration.addTestVariableMapping(... 'Throttle','MAPort1','simpleXIL/Gain/Gain'); frm.init; rpm = frm.createVariable('RPM'); throttle = frm.createVariable('Throttle'); frm.Acquisition.setupWithVariables([throttle,rpm]); frm.Acquisition.start; frm.start;
Set Up Acquisition with Triggering
To change the above example to use triggering, change the
setupWithVariables
method to specify the trigger variable, the start
and stop trigger types, and start and stop trigger values.
frm.Acquisition.setupWithVariables([throttle,rpm],... TriggerVariables=rpm,... StartTriggerType='condition',StartTriggerVal='rpm > 500',... StopTriggerType='duration',StopTriggerVal=3);
Version History
Introduced in R2022a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)