6\r\n chunk1\r\n 8\r\n somedata\r\n E\r\n in\r\n\r\nchunks.\r\n 0\r\n \r\n
可以使用多命令在单个事务中发送多个命令。
Command
{ "dc":{ "1":[ { "command":"setVoltage", "voltage":3300 }, { "command":"getVoltage" } ], "2":[ { "command":"setVoltage", "voltage":5000 } ] } }
Response
{ "dc":{ "1":[ { "command":"setVoltage", "statusCode":0, "wait":500 }, { "command":"getVoltage", "statusCode":0, "wait":100, "voltage":3300 } ], "2":[ { "command":"setVoltage", "statusCode":0, "wait":500 } ] } }
提供访问任意波形发生器的数据和功能的命令
获得仪器通道的当前状态、
* ** 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.
命令
{ "awg": { "1": [ { "command": "getCurrentState" } ] } }
响应
{ "awg": { "1": [ { "command": "getCurrentState", "statusCode": 0, "wait": 0, "state": "running", "waveType": "sine", "actualSignalFreq": 1000000, "actualVpp": 3000, "actualVOffset": 0 } ] } }
设置AWG的通道参数以输出正常的波形
* **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通道
Command
{ "awg":{ "1":[ { "command":"run" } ] } }
Response
{ "awg":{ "1":[ { "command":"run", "statusCode":0, "wait":0 } ] } }
停止AWG通道
Command
{ "awg":{ "1":[ { "command":"stop" } ] } }
Response
{ "awg":{ "1":[ { "command":"stop", "statusCode":0, "wait":0 } ] } }
提供访问直流电压数据和函数的命令
Get the current state of the instrument's channel
* **state** - (String) - The current state of the channel: "idle" or "running". * **voltage** - (Integer) - The current measured value of the channel in mV.
#### 举例
命令
{ "dc": { "1": [ { "command":"getCurrentState" } ] } }
响应
{ "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).
* **voltage** - (Integer) - The current measured value of the channel in mV.
#### 举例
命令
{ "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":{ "1":[ { "command":"setVoltage", "voltage":3300 } ] } }
Response
{ "dc":{ "1":[ { "command":"setVoltage", "statusCode":0, "wait":500 } ] } }