This is an old revision of the document!


Waveform Generator

Commands that provide access to Arbitrary Waveform Generator data and functions.

Get Current State


Get the current state of the instrument's channel

Command

  • awg - (Object) - The arbitrary waveform generator object.
    • # - (Array<Object>) - An array of command objects to apply to the awg channel.
      • command - (String) - The Get Current State command: “getCurrentState”

Response

  • awg - (Object) - The arbitrary waveform generator object.
    • # - (Array<Object>) - An array of command objects applied to the awg channel.
      • command - (String) - The Get Current State command: “getCurrentState”
      • statusCode - (Integer) - A numeric value representing the device status. See Digilent Instrumentation Protocol Status Codes (Redirect)
      • wait - (Integer) - The number of ms to wait before the device is ready to process another command.
      • state - (String) - The instrument channel state: “idle” or “running”.
      • waveType - (String) - The waveform type: “sine”, “square”, “triangle”, “dc”, “sawtooth”, “arbitrary”, or “none”.
      • actualSignalFreq - (Integer) - The actual waveform frequency in mHz.
      • actualVpp - (Integer) - The actual peak-to-peak voltage in mV.
      • actualVOffset - (Integer) - The actual voltage offset in mV.

Example

Command

{
    "awg": {
        "1": [
            {
                "command": "getCurrentState"
            }
        ]
    }
}

Response

{
    "awg": {
        "1": [
            {
                "command": "getCurrentState",
                "statusCode": 0,                
                "wait": 0,
                "state": "running",
                "waveType": "sine",
                "actualSignalFreq": 1000000,
                "actualVpp": 3000,
                "actualVOffset": 0
            }
        ]
    }
}


Set Regular Waveform


Set the parameters of the arbitrary waveform generator channel(s) to output a regular waveform.

Command

  • awg - (Object) - The arbitrary waveform generator object.
    • # - (Array<Object>) - An array of command objects to apply to the awg channel.
      • command - (String) - The Set Regular Waveform command: “setRegularWaveform”
      • signalType - (String) - The waveform type: “sine”, “square”, “triangle”, “dc”, “sawtooth”, “arbitrary”, or “none”.
      • signalFreq - (Integer) - The signal frequency in mHz.
      • vpp - (Integer) - The peak-to-peak voltage in mV.
      • vOffset - (Integer) - The voltage offset in mV.

Response

  • awg - (Object) - The arbitrary waveform generator object.
    • # - (Array<Object>) - An array of command objects applied to the awg channel.
      • command - (String) - The Set Regular Waveform command: “setRegularWaveform”
      • statusCode - (Integer) - A numeric value representing the device status. See Digilent Instrumentation Protocol Status Codes (Redirect)
      • wait - (Integer) - The number of ms to wait before the device is ready to process another command.
      • actualSignalFreq - (Integer) - The actual waveform frequency in mHz.
      • actualVpp - (Integer) - The actual peak-to-peak voltage in mV.
      • actualVOffset - (Integer) - The actual voltage offset in mV.

Example (Waveform)

Command

{
   "awg":{
      "1":[
         {
            "command":"setRegularWaveform",
            "signalType":"sine",
            "signalFreq":1000000,
            "vpp":3000,
            "vOffset":0 
         }
      ]
   }
}

Response

{  
   "awg":{  
      "1":[  
         {  
            "command":"setRegularWaveform",
            "statusCode":0,            
            "wait":0,
            "actualSignalFreq": 1000000,
            "actualVpp": 3000,
            "actualVOffset":0
         }
      ]
   }
}



Run


Run the arbitrary waveform generator channel(s).

Command

  • awg - (Object) - The arbitrary waveform generator object.
    • # - (Array<Object>) - An array of command objects to apply to the awg channel.
      • command - (String) - The Run command: “run”

Response

  • awg - (Object) - The arbitrary waveform generator object.
    • # - (Array<Object>) - An array of command objects applied to the awg channel.

Example:

Command

{
   "awg":{
      "1":[
         {
            "command":"run"
         }
      ]
   }
}

Response

{
   "awg":{
      "1":[
         {
            "command":"run",
            "statusCode":0,
            "wait":0
         }
      ]
   }
}



Stop


Stop the arbitrary waveform generator channel(s).

Command

  • awg - (Object) - The arbitrary waveform generator object.
    • # - (Array<Object>) - An array of command objects to apply to the awg channel.
      • command - (String) - The Stop command: “stop”

Response

  • awg - (Object) - The arbitrary waveform generator object.
    • # - (Array<Object>) - An array of command objects applied to the awg channel.
      • command - (String) - The Stop command: “stop”
      • statusCode - (Integer) - A numeric value representing the device status. See Digilent Instrumentation Protocol Status Codes (Redirect)
      • wait - (Integer) - The number of ms to wait before the device is ready to process another command.

Example:

Command

{
   "awg":{
      "1":[
         {
            "command":"stop"
         }
      ]
   }
}

Response

{
   "awg":{
      "1":[
         {
            "command":"stop",
            "statusCode":0,
            "wait":0
         }
      ]
   }
}