提供访问任意波形发生器的数据和功能的命令


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

命令

  • awg - (Object) - 任意波形发生器的目标.
    • # - (Array<Object>) - An array of command objects to apply to the awg channel.
      • command - (String) - 获取当前状态的命令: “getCurrentState”

响应

  • awg - (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.
          * ** 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
            }
        ]
    }
}



设置AWG的通道参数以输出正常的波形

命令

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

响应

  • 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
         }
      ]
   }
}



运行


运行AWG通道

命令 * 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” 响应 * awg - (Object) - The arbitrary waveform generator object. * # - (Array<Object>) - An array of command objects applied to the awg channel. * command - (String) - The Run command: “run” * 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.
#### 举例:

Command

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

Response

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



#### 停止 —- 停止AWG通道
命令 * 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” 响应 * 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 reference/software/digilent-instrumentation-protocol/status-codes * wait - (Integer) - The number of ms to wait before the device is ready to process another command.
#### 举例:

Command

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

Response

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



### 直流电压 提供访问直流电压数据和函数的命令 #### 获取当前状态 —- Get the current state of the instrument's channel
Command * dc - (Object) - The DC power supply object. * # - (Array<Object>) - An array of command objects to apply to the DC power supply channel. * command - (String) - The Get Current State command: “getCurrentState” Response * gpio - (Object) - The DC power supply object. * # - (Array<Object>) - An array of command objects applied to the DC power supply 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 current state of the channel: “idle” or “running”. * voltage - (Integer) - The current measured value of the channel in mV.
#### 举例

Command

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

Response

{
    "dc": {
        "1": [
            {
                "command": "getCurrentState",
                "statusCode": 0,
                "wait": 0,
                "state": "idle",
                "voltage": 3300                
            }
        ]
    }
}


#### 获取电压值 —- Get the output voltage(s) of the specified DC power supply channel(s).
Command * dc - (Object) - The DC power supply object. * # - (Array<Object>) - An array of command objects to apply to the DC power supply channel. * command - (String) - The Get Voltage command: “getVoltage” Response * gpio - (Object) - The DC power supply object. * # - (Array<Object>) - An array of command objects applied to the DC power supply channel. * command - (String) - The Get Voltage command: “getVoltage” * 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.
* voltage - (Integer) - The current measured value of the channel in mV. #### 举例

Command

{
   "dc":{
      "1":[
         {
            "command":"getVoltage"
         }
      ]
   }
}

Response

{
   "dc":{
      "1":[
         {
            "command":"getVoltage",
            "statusCode":0,
            "wait":100,
            "voltage":3300
         }
      ]      
   }
}



#### 设置电压 —- Set the output voltage(s) of the specified DC power supply channel(s).
Command * dc - (Object) - The DC power supply object. * # - (Array<Object>) - An array of command objects to apply to the DC power supply channel. * command - (String) - The Set Current State command: “setCurrentState” * voltage - (Integer) - The desired voltage in mV. Response * gpio - (Object) - The DC power supply object. * # - (Array<Object>) - An array of command objects applied to the DC power supply channel. * command - (String) - The Set Current State command: “setCurrentState” * 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.
#### 举例:

Command

{
   "dc":{
      "1":[
         {
            "command":"setVoltage",
            "voltage":3300
         }
      ]
   }
}

Response

{
   "dc":{
      "1":[
         {
            "command":"setVoltage",
            "statusCode":0,
            "wait":500
         }
      ]
   }
}