# :LTESt:LLINe:SWAVeform:FUNCtion{N}:STATe

:LTESt Limit Line Commands

- :LTESt:LLINe:TEST{N}:MODE
- :LTESt:LLINe:TEST{N}:STATe
- :LTESt:LLINe:SIMage:FNAMe
- :LTESt:LLINe:SIMage:FNAMe:AUPDate
- :LTESt:LLINe:SIMage:FNAMe:USTandard
- :LTESt:LLINe:SIMage:FTYPe?
- :LTESt:LLINe:SIMage:IMETadata
- :LTESt:LLINe:SIMage:INVert
- :LTESt:LLINe:SIMage:MONochrome
- :LTESt:LLINe:SIMage:SAVE
- :LTESt:LLINe:SIMage:SINClude
- :LTESt:LLINe:SIMage:STATe
- :LTESt:LLINe:SIMage:WINDow
- :LTESt:LLINe:SSUMmary:FNAMe
- :LTESt:LLINe:SSUMmary:STATe
- :LTESt:LLINe:SWAVeform:CHANnel{N}:FNAMe
- :LTESt:LLINe:SWAVeform:CHANnel:FTYPe
- :LTESt:LLINe:SWAVeform:CHANnel{N}:STATe
- :LTESt:LLINe:SWAVeform:CHANnel{N}:WMEMory
- :LTESt:LLINe:SWAVeform:CMODe{N}:FNAMe
- :LTESt:LLINe:SWAVeform:CMODe:FTYPe
- :LTESt:LLINe:SWAVeform:CMODe{N}:STATe
- :LTESt:LLINe:SWAVeform:CMODe{N}:WMEMory
- :LTESt:LLINe:SWAVeform:DIFF{N}:FNAMe
- :LTESt:LLINe:SWAVeform:DIFF:FTYPe
- :LTESt:LLINe:SWAVeform:DIFF{N}:STATe
- :LTESt:LLINe:SWAVeform:DIFF{N}:WMEMory
- :LTESt:LLINe:SWAVeform:FUNCtion{N}:FNAMe
- :LTESt:LLINe:SWAVeform:FUNCtion{N}:STATe
- :LTESt:LLINe:SWAVeform:FUNCtion{N}:WMEMory
- :LTESt:LLINe:SWAVeform:RESet

## Command Syntax

    :LTESt:LLINe:SWAVeform:FUNCtion{1:64}:STATe {DISK | MEMory | OFF}

## Query Syntax

    :LTESt:LLINe:SWAVeform:FUNCtion{1:64}:STATe?

## Description

Specifies the reporting action for the selected function waveform upon completion of limit testing for a limit line test. Use the command argument to select or turn off the reporting action. To disable the reporting action of all channel, common-mode, differential, and function waveforms, use the `:LTESt:LLINe:SWAVeform:RESet` command.

To turn on limit testing for a limit line test, use the `:LTESt:LLINe:TEST{N}:STATe` command.

Command Arguments
Argument | Description
--- | ---
DISK | Saves the waveform to a file (.h5) in the `%USER_DATA_DIR%\Limit Lines` folder. Use the `:LTESt:LLINe:SWAVeform:FUNCtion{N}:FNAMe` command to specify the file name.
MEMory | Saves the waveform to a memory location. Use the `:LTESt:LLINe:SWAVeform:DIFF{N}:WMEMory` command to specify the memory location.
OFF | Turns off the saving of a function waveform.

## Example

This example shows the general steps required to load two limit line tests. One test is for a channel waveform and one test is for a function waveform. Limit testing is applied to each limit line test and both waveforms are saved to a file upon test completion which occurs on the first failed data point. The waveform content window is tiled so that the two waveforms do not overlap. In a real example, you would need to create the limit test for your waveforms and manage the correct positioning of the limit lines.

    :CHANnel1:DISPlay ON
    :FUNCtion1:DISPlay ON

    :SYSTem:AUToscale

    //  Load and start two limit line tests.
    :LLINe1:LOAD:FNAMe "%USER_DATA_DIR%\Limit Lines\Golden Test.lltx"
    :LLINe1:SOURce CHANnel1
    :LLINe1:DISPlay ON  //  Display first limit line test.

    :LLINe2:LOAD:FNAMe "%USER_DATA_DIR%\Limit Lines\Golden Test.lltx"
    :LLINe2:SOURce FUNCtion1
    :LLINe2:DISPlay ON  //  Display second limit line test.

    :DISPlay:WINDow:TIME1:DMODe STILed  //  Stack and tile waveform window.//  Configure "Save Channel Waveform" reporting.
    :LTESt:LLINe:SWAVeform:RESet  //  Turn saving of all waveforms off.
    :LTESt:LLINe:SWAVeform:CHANnel1:FNAMe "%USER_DATA_DIR%\Waveforms\FailCH1A.h5"  //  Waveform file name.
    :LTESt:LLINe:SWAVeform:CHANnel1:STATe DISK  //  Save waveform to file.//  Configure "Save Function Waveform" reporting.
    :LTESt:LLINe:SWAVeform:FUNCtion1:FNAMe "%USER_DATA_DIR%\Waveforms\FailFunction1.h5"  //  Waveform file name.
    :LTESt:LLINe:SWAVeform:FUNCtion1:STATe DISK  //  Save waveform to file.//  Run limit testing.
    :LTESt:LLINe:TEST1:MODE SOFailure  //  Stop limit testing on fail condition.
    :LTESt:LLINe:TEST1:STATe ON  //  Enable limit testing.
    :LTESt:LLINe:TEST2:MODE SOFailure  //  Stop limit testing on fail condition.
    :LTESt:LLINe:TEST2:STATe ON  //  Enable limit testing.
    :ACQuire:STOP
    :ACQuire:CDISplay  //  Clear existing waveform data.
    :ACQuire:RUN  //  Enable data acquisition.