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

获得当前状态


获得仪器通道的当前状态、

命令

  • 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”

响应

  • 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 reference/software/digilent-instrumentation-protocol/status-codes
      • 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.

例子

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 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 reference/software/digilent-instrumentation-protocol/status-codes
      • 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.

#### 举例(波形)

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 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.

举例:===

Command

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

Response

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



停止


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

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

Response

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