The Digilent Instrumentation Protocol is a JSON encoded command set for communicating with and controlling electronic instruments. The Digilent Instrumentation Protocol was initially designed as the communication protocol between WaveForms Live and and the OpenScope MZ, however the protocol is designed to be hardware agnostic and extensible.
JSON encoding offers several advantages including ease of use in JavaScript based web and mobile applications, human readable commands, and bus agnostic communication that easily supports HTTP, UART, TCP, WebSockets and more.
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
Multiple commands can be sent in a single transaction using a multicommand.
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 } ] } }
The commands below are used the change the device debug print status.
Change serial debug setting on the device.
Command
Response
Command
{ "debugPrint":"off" }
Response
{ "debugPrint":"off" }
The commands below are used the change the device mode and are valid commands in every device mode.
Put the device into JSON command mode.
Command
Response
Note: This command must include a trailing '\r\n'
Command
{ "mode":"JSON" }\r\n
Response
{ "mode":"JSON" }\r\n
Put the device into menu command mode.
Command
Response
Note: This command must include a trailing '\r\n'
Command
{ "mode":"menu" }\r\n
Response
{ "mode":"menu" }\r\n
Commands that provide access to logger instrument data and functions.
List a directory on the device.
Command
Response
Command
{ "file": [{ "command": "listdir", "type": "sd0", "path": "/" }] }
Response
{ "file": [{ "command": "listdir", "statusCode": 0, "files": ["fileone.txt", "filetwo.bin"], "type": "sd0", "path": "/", "wait": 0 }] }
Write a file.
Command
Response
Command
80\r\n { "file": [{ "command":"write", "type":"flash", "path":"hardprofiledata.json", "filePosition":0, "binaryOffset":0, "binaryLength":434 }] }\r\n 1b2\r\n <Binary Data> 0\r\n \r\n
Response
{ "file": [{ "command":"write", "statusCode":0, "type":"flash", "path":"hardprofiledata.json", "actualFilePosition":0, "binaryOffset":0, "binaryLength":434, "wait":0 }] }
Read a file.
Command
Response
Command
{ "file": [{ "command":"read", "type":"flash", "path":"hardprofiledata.json", "filePosition":0, "requestedLength":-1 }] }
Response
80\r\n { "file": [{ "command":"read", "statusCode":0, "type":"flash", "path":"hardprofiledata.json", "actualFilePosition":0, "actualLength":-1, "binaryOffset":0, "binaryLength":454, "wait":0 }] }\r\n 1B2\r\n <Binary Data> 0\r\n \r\n
Delete a file on the device.
Command
Response
Command
{ "file":[{ "command":"getFileSize", "type":"sd0", "path":"ch1.dlog" }] }
Response
{ "file":[{ "command":"getFileSize", "statusCode":0, "type":"sd0", "path":"ch1.dlog", "actualFileSize":4070, "wait":0 }] }
Delete a file on the device.
Command
Response
Command
{ "file": [{ "command": "delete", "type": "sd0", "path": "garbage.txt" }] }
Response
{ "file": [{ "command": "delete", "statusCode": 0, "type": "sd0", "path": "garbage.txt", "wait": 0 }] }
Commands that provide access to device level data and functions.
Enumerate all device info.
This should return static information about the device. Dynamic data should be retrieved using getters. Command
Response
Command
{ "device":[ { "command":"enumerate" } ] }
Response
{ "device": [ { "command": "enumerate", "statusCode": 0, "wait": 0, "deviceMake": "Digilent", "deviceModel": "OpenScope MZ", "calibrationSource": "flash", "firmwareVersion": { "major": 0, "minor": 283, "patch": 0 }, "awg": { "1": { "signalTypes": [ "sine", "square", "sawtooth", "triangle", "dc" ], "signalFreqMin": 100, "signalFreqMax": 1000000000, "dataType": "I16", "bufferSizeMax": 32640, "dacVpp": 3000, "sampleFreqMin": 1000000, "sampleFreqMax": 10000000000, "vOffsetMin": -1500, "vOffsetMax": 1500, "vOutMin": -3000, "vOutMax": 3000 }, "numChans": 1 }, "dc": { "1": { "voltageMin": -4000, "voltageMax": 4000, "voltageIncrement": 40, "currentMin": 0, "currentMax": 50, "currentIncrement": 0 }, "2": { "voltageMin": -4000, "voltageMax": 4000, "voltageIncrement": 40, "currentMin": 0, "currentMax": 50, "currentIncrement": 0 }, "numChans": 2 }, "gpio": { "numChans": 10, "sourceCurrentMax": 7000, "sinkCurrentMax": 12000 }, "la": { "numChans": 1, "1": { "bufferDataType": "U16", "numDataBits": 10, "bitmask": 1023, "sampleFreqMin": 6000, "sampleFreqMax": 6250000000, "bufferSizeMax": 32640 } }, "osc": { "1": { "resolution": 12, "effectiveBits": 11, "bufferSizeMax": 32640, "bufferDataType": "I16", "sampleFreqMin": 6000, "sampleFreqMax": 6250000000, "delayMax": 4611686018427388000, "delayMin": -32640000000000000, "adcVpp": 3000, "inputVoltageMax": 20000, "inputVoltageMin": -20000, "gains": [ 1, 0.25, 0.125, 0.075 ] }, "2": { "resolution": 12, "effectiveBits": 11, "bufferSizeMax": 32640, "bufferDataType": "I16", "sampleFreqMin": 6000, "sampleFreqMax": 6250000000, "delayMax": 4611686018427388000, "delayMin": -32640000000000000, "adcVpp": 3000, "inputVoltageMax": 20000, "inputVoltageMin": -20000, "gains": [ 1, 0.25, 0.125, 0.075 ] }, "numChans": 2 }, "log": { "analog": { "1": { "resolution": 12, "effectiveBits": 12, "bufferSizeMax": 32702, "fileSamplesMax": 2147483136, "sampleDataType": "I16", "sampleFreqUnits": 0.000001, "sampleFreqMin": 1, "sampleFreqMax": 50000000000, "delayUnits": 1e-12, "delayMax": 9223372036854776000, "delayMin": 0, "voltageUnits": 0.001, "adcVpp": 3000, "inputVoltageMax": 20000, "inputVoltageMin": -20000, "gains": [1, 0.25, 0.125, 0.075] }, "2": { "resolution": 12, "effectiveBits": 12, "bufferSizeMax": 32702, "fileSamplesMax": 2147483136, "sampleDataType": "I16", "sampleFreqUnits": 0.000001, "sampleFreqMin": 1, "sampleFreqMax": 50000000000, "delayUnits": 1e-12, "delayMax": 9223372036854776000, "delayMin": 0, "voltageUnits": 0.001, "adcVpp": 3000, "inputVoltageMax": 20000, "inputVoltageMin": -20000, "gains": [1, 0.25, 0.125, 0.075] }, "fileFormat": 1, "fileRevision": 1, "numChans": 2 } } } ] }
Put the device in the bootloader.
Command
Response
Command
{ "device":[ { "command":"enterBootloader" } ] }
Response
{ "device":[ { "command":"enterBootloader", "statusCode":0, "wait":1000 } ] }
Get user calibration instructions.
Command
Response
Command
{ "device":[ { "command":"calibrationGetInstructions" } ] }
Response
{ "device":[ { "command":"calibrationGetInstructions", "statusCode":0, "wait":0, "instructions":"Connect the Orange OSC1 lead to the Blue AWG1 Lead". } ] }
Get the calibration status.
Command
Response
Command
{ "device":[ { "command":"calibrationGetStatus" } ] }
Response
{ "device":[ { "command":"calibrationGetStatus", "statusCode":0, "wait":500, "status": "idle" } ] }
Get calibration storage types.
Command
Response
Command
{ "device":[ { "command":"calibrationGetStorageTypes" } ] }
Response
{ "device":[ { "command":"calibrationGetStorageTypes", "statusCode":0, "wait":0, "storageTypes":[ "flash", "sd" ] } ] }
Load saved calibration data into the working register. The calibration data is not applied to the instruments until Calibration Apply is called.
Command
Response
Command
{ "device":[ { "command":"calibrationLoad", "type":"flash" } ] }
Response
{ "device":[ { "command":"calibrationLoad", "statusCode":0, "wait":0 } ] }
Read the calibration data from the working register.
Command
Response
Command
{ "device":[ { "command":"calibrationRead" } ] }
Response
{ "device":[ { "command":"calibrationRead", "statusCode":0, "wait":0, "calibrationData" : { <ARBITRARY JSON CALIBRATION DATA> } } ] }
Save the calibration data to non-volatile storage. Command
Response
Command
{ "device":[ { "command":"calibrationSave", "type": "flash" } ] }
Response
{ "device":[ { "command":"calibrationSave", "statusCode":0, "wait":0 } ] }
Start the calibration process. This function returns immediately. If the calibration process completes successfully new calibration data is saved in the calibration data working register. Use the Calibration Save and Calibration Apply functions to save of apply the new calibration data.
Command
Response
Command
{ "device":[ { "command":"calibrationStart" } ] }
Response
{ "device":[ { "command":"calibrationStart", "statusCode":0, "wait":45 } ] }
Connect to the active network using the specified network adapter.
Command
Response
Command
{ "device":[ { "command":"nicConnect", "adapter":"wlan0", "parameterSet":"activeParameterSet", "force":true } ] }
Response
{ "device":[ { "command":"nicConnect", "statusCode":0, "wait":-1 } ] }
Disconnect the specified network adapter from the currently connected network.
Command
Response
Command
{ "device":[ { "command":"nicDisconnect", "adapter":"wlan0" } ] }
Response
{ "device":[ { "command":"nicDisconnect", "statusCode":0, "wait":-1 } ] }
Get the status of the specified network interface controller.
Command
Response
Command
{ "device":[ { "command":"nicGetStatus", "adapter":"wlan0" } ] }
Response
{ "device":[ { "command":"nicGetStatus", "statusCode":0, "wait":0, "adapter": "wlan0", "securityType": "wpa2", "status":"connected", "ssid": "HorseFeathers", "ipAddress": "192.168.1.127" } ] }
List all network adapters on the device.
Command
Response
Command
{ "device":[ { "command":"nicList" } ] }
Response
{ "device":[ { "command":"nicList", "statusCode":0, "wait":0, "nics": ["wlan0"] } ] }
Reset all instruments on the device.
Command
Response
Command
{ "device":[ { "command":"resetInstruments" } ] }
Response
{ "device": [ { "command": "resetInstruments", "statusCode": 0, "wait": 1000 } ] }
Get a list of all non-volatile storage locations.
Command
Response
Command
{ "device":[ { "command":"storageGetLocations" } ] }
Response
{ "device":[ { "command":"storageGetLocations", "statusCode":0, "wait":0, "storageLocations":[ "flash", "sd0" ] } ] }
Delete the specified saved Wifi network.
Command
Response
Command
{ "device":[ { "command":"wifiDeleteParameters", "storageLocation":"flash", "ssid":"HorseFeathers" } ] }
Response
{ "device":[ { "command":"wifiDeleteParameters", "statusCode": 0, "wait": 0 } ] }
List all saved network parameters.
Command
Response
Command
{ "device":[ { "command":"wifiListSavedParameters", "storageLocation":"flash" } ] }
Response
{ "device":[ { "command":"wifiListSavedParameters", "statusCode":0, "parameterSets":[ { "ssid":"HorseFeathers", "securityType":"wpa2", "autoConnect":true } ] } ] }
Load a saved network parameters into the working register. This command does not connect to the network. Use the Wifi Connect Network command to connect to the network after loading it.
Command
Response
Command
{ "device":[ { "command":"wifiLoadParameters", "storageLocation":"flash", "ssid":"HorseFeathers" } ] }
Response
{ "device":[ { "command":"wifiLoadParameters", "statusCode":0, "wait":0 } ] }
Read the list of networks detected by the previous Wifi Scan call. Scan data is only available after a successful scan and is lost on the next call of a NIC or Wifi command.
Command
Response
Command
{ "device":[ { "command":"wifiReadScannedNetworks", "adapter":"wlan0" } ] }
Response
{ "device":[ { "command":"wifiReadScannedNetworks", "statusCode":0, "wait":0, "adapter":"wlan0", "networks":[ { "ssid":"HorseFeathers", "bssid":"HorseFeathers", "securityType":"wpa2", "channel": 1, "signalStrength":100 } ] } ] }
Save the parameters from the working parameter set to storage. If a network with the same SSID already exists in non-volatile storage this function will overwrite it.
Command
Response
Command
{ "device":[ { "command":"wifiSaveParameters", "storageLocation":"flash" } ] }
Response
{ "device":[ { "command":"wifiSaveParameters", "statusCode":0, "wait":0 } ] }
Scan for Wifi networks. This function returns immediately and results can be collected using the Wifi Read Available Networks command. An error is returned if the specified adapter is not able to scan (ie if it is connected).
Command
Response
Command
{ "device":[ { "command": "wifiScan", "adapter":"wlan0" } ] }
Response
{ "device":[ { "command": "wifiScan", "statusCode": 0, "wait": -1 } ] }
Set one or more parameter of the active network. Changes are applied to the working register (active network) only.
Note: Currently only DHCP is supported (not static IP)
Command
Response
Command
{ "device":[ { "command":"wifiSetParameters", "ssid":"HorseFeathers", "securityType":"wpa2", "passphrase":"swordfish", "autoConnect":true } ] }
Response
{ "device":[ { "command":"wifiSetParameters", "statusCode":0, "wait":0 } ] }
Commands that provide access to oscilloscope instrument data and functions.
Get the current state of the instrument's channel
Command
Response
Command
{ "osc": { "1": [ { "command": "getCurrentState" } ] } }
Response
{ "osc": { "1": [ { "command": "getCurrentState", "statusCode": 0, "wait": 0, "state": "triggered", "acqCount": 10, "actualVOffset": 0, "actualSampleFreq": 1000000, "actualGain": 0.25, "actualBufferSize": 32000, "triggerDelay": 0 } ] } }
Read data from the device. Data will be returned if the device acqCount is greater or equal to the command acqCount. If the device acqCount is less than the command acqCount the device responds with it's trigger status and optionally a estimated time before a new buffer will be available.
Data is returned in chunked transfer format. The first chunk of data is a JSON object that describes the following chunk of binary data. The binary data type and resolution are defined in the device enumeration and units are in mV. The first byte in the binary data corresponds to the first sample in the buffer (the earliest sample chronologically).
Command
Response
Command
{ "osc":{ "1":[ { "command":"read", "acqCount":101 } ] } }
Response
160\r\n { "osc": { "1": [ { "command": "read", "statusCode": 0, "wait": 0, "binaryOffset": 0, "binaryLength": 1024, "acqCount": 3, "actualSampleFreq": 6250000000, "pointOfInterest": 256, "triggerIndex": 256, "triggerDelay": 0 "actualVOffset": 48, "actualGain": 1 } ] } }\r\n 400\r\n <1024 Byte BLOB> \r\n 0\r\n \r\n
Set the specified parameter(s) of the specified oscilloscope channel(s).
Command
Response
Command
{ "osc":{ "1":[ { "command":"setParameters", "bufferSize": 32000, "gain": 0.25, "vOffset":3000, "sampleFreq": 1000000, "triggerDelay": 100000 } ] } }
Response
{ "osc":{ "1":[ { "command":"setParameters", "statusCode":0, "actualVOffset":3100, "actualSampleFreq": 1000000, "wait":0 } ] } }
Commands that provide access to Arbitrary Waveform Generator data and functions.
Get the current state of the instrument's channel
Command
Response
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
Response
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
Response
Command
{ "awg":{ "1":[ { "command":"run" } ] } }
Response
{ "awg":{ "1":[ { "command":"run", "statusCode":0, "wait":0 } ] } }
Stop the arbitrary waveform generator channel(s).
Command
Response
Command
{ "awg":{ "1":[ { "command":"stop" } ] } }
Response
{ "awg":{ "1":[ { "command":"stop", "statusCode":0, "wait":0 } ] } }
Commands that provide access to the logic analyzer instrument data and functions.
Get the current state of the instrument's channel
Command
{ "la": { "1": [ { "command": "getCurrentState" } ] } }
Response
{ "la": { "1": [ { "command": "getCurrentState", "statusCode": 0, "state": "triggered", "acqCount": 10, "bitmask": 1023, "actualSampleFreq": 1000000, "actualBufferSize": 32000, "triggerDelay": 0, "wait": 0 } ] } }
Set the specified parameter(s) of the specified LA channel(s).
sampleFreq - mHz bufferSize - in samples
Command
{ "la":{ "1":[ { "command":"setParameters", "bitmask": 1023, "sampleFreq": 1000000, "bufferSize": 32000, "triggerDelay": 0 } ] } }
Response
{ "la":{ "1":[ { "command":"setParameters", "statusCode":0, "actualSampleFreq": 6250000000, "actualTriggerDelay": 0, "wait":0 } ] } }
Read data from the device. Data will be returned if the device acqCount is greater or equal to the command acqCount. If the device acqCount is less than the command acqCount the device responds with it's trigger status and optionally a estimated time before a new buffer will be available.
Data is returned in chunked transfer format. The first chunk of data is a JSON object that describes the following chunk of binary data. Data type information for the binary chunk is defined under bufferDataType in the device enumeration response for the instrument. numDataBits defines the maximum number of bits that may contain LA data. Data bits are right justified. For example if bufferDataType is u8 and numDataBits is 3 and all LA channels are high the resulting binary data would be 0b00000111. bitMask defines which bits within the binary data are valid LA channels.
Command
Response
Command
{ "la":{ "1":[ { "command":"read", "acqCount":101 } ] } }
Response
160\r\n { "la": { "1": [ { "command": "read", "statusCode": 0, "wait": 0, "binaryOffset": 0, "binaryLength": 1024, "acqCount": 3, "bitmask": 1023, "actualSampleFreq": 6250000000, "pointOfInterest": 256, "triggerIndex": 256, "actualTriggerDelay": 0 } ] } }\r\n 400\r\n <1024 Byte BLOB> \r\n 0\r\n \r\n
Commands that provide access to GPIO data and functions.
Get the current state of the instrument's channel
Command
Response
Command
{ "gpio": { "1": [ { "command":"getCurrentState" } ] } }
Response
{ "gpio": { "1": [ { "command":"getCurrentState", "statusCode": 0, "wait":0, "state": "idle", "mode": "gpio", "direction": "output", "value": 1 } ] } }
Read the specified GPIO channel(s).
Command
Response
Command
{ "gpio":{ "1":[ { "command":"read" } ] } }
Response
{ "gpio":{ "1":[ { "command":"read", "statusCode":0, "wait":100, "direction: "input" "value":1 } ] } }
Set the parameters (direction) of the specified GPIO channel(s).
Command
Response
Command
{ "gpio":{ "1":[ { "command":"setParameters", "direction":"input" } ], "2":[ { "command":"setParameters", "direction":"output" } ] } }
Response
{ "gpio":{ "1":[ { "command":"setParameters", "statusCode":0, "wait":100 } ], "2":[ { "command":"setParameters", "statusCode":0, "wait":100 } ] } }
Write the output voltage(s) of the specified GPIO channel(s).
Command
Response
Command
{ "gpio":{ "1":[ { "command":"write", "value":1 } ] } }
Response
{ "gpio":{ "1":[ { "command":"write", "statusCode":0, "wait":500 } ] } }
Commands that provide access to DC Power Supply data and functions.
Get the current state of the instrument's channel
Command
Response
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
Response
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
Response
Command
{ "dc":{ "1":[ { "command":"setVoltage", "voltage":3300 } ] } }
Response
{ "dc":{ "1":[ { "command":"setVoltage", "statusCode":0, "wait":500 } ] } }
Commands that provide access to trigger functionality.
Get the current state of the instrument's channel
Command
Response
Command
{ "trigger": { "1": [ { "command": "getCurrentState" } ] } }
Response
{ "trigger": { "1": [ { "command": "getCurrentState", "statusCode": 0, "wait": 0, "acqCount": 10, "source": { "instrument": "osc", "channel": 1, "type": "risingEdge", "lowerThreshold": 0, "upperThreshold": 30, "risingEdgeMask": 0x3FF, "fallingEdgeMask": 0x3FF }, "targets": { "osc": [1, 2], "la": [1] }, "state": "idle" } ] } }
Force an immediate acquisition without waiting for a trigger condition.
Command
Response
Command
{ "trigger":{ "1":[ { "command":"forceTrigger" } ] } }
Response
{ "trigger":{ "1":[ { "command":"forceTrigger", "statusCode":0, "wait": -1, "acqCount": 27 } ] } }
Set the device trigger parameters.
Command
Response
Command
{ "trigger": { "1": [ { "command": "setParameters", "source": { "instrument": "osc", "channel": 1, "type": "risingEdge", "lowerThreshold": 3300, "upperThreshold": 4000, "risingEdgeMask": 1, "fallingEdgeMask": 0 }, "targets": { "osc": [ 1, 2 ], "la": [ 1 ] } } ] } }
Response
{ "trigger":{ "1":[ { "command":"setParameters", "statusCode":0, "wait":0 } ] } }
Arm the specified trigger and immediately re-arm the trigger after a successful acquisition.
Command
Response
Command
{ "trigger":{ "1":[ { "command":"run" } ] } }
Response
{ "trigger":{ "1":[ { "command":"run", "statusCode":0, "wait":-1, "acqCount": 27 } ] } }
Arm the specified trigger and do not re-arm the trigger after a successful acquisition.
Command
Response
Command
{ "trigger":{ "1":[ { "command":"single" } ] } }
Response
{ "trigger":{ "1":[ { "command":"single", "statusCode":0, "wait":-1, "lastAcqCount": 27 } ] } }
Disarm the specified trigger.
Command
Response
Command
{ "trigger":{ "1":[ { "command":"stop" } ] } }
Response
{ "trigger":{ "1":[ { "command":"stop", "statusCode":0, "wait": 0 } ] } }
Commands that provide access to logger instrument data and functions.
Get the current state of the instrument's channel
Command
Response
Command
{ "log": { "analog": { "1": [{ "command": "getCurrentState" }] } } }
Response
{ "log": { "analog": { "1": [{ "command":"getCurrentState", "statusCode":0, "state":"stopped", "stopReason":"NORMAL", "startIndex":0, "actualCount":0, "maxSampleCount":-1, "actualGain":0.075, "actualVOffset":0, "actualSampleFreq":50000000, "actualStartDelay":0, "overflow":"circular", "storageLocation":"sd0", "uri":"ch1.bin", "wait":0 }] } } }
Set log parameters.
Command
Response
Command
{ "log":{ "analog":{ "1":[{ "command":"setParameters", "maxSampleCount":1000, "gain":0.25, "vOffset":0, "sampleFreq":200000000, "startDelay":0, "storageLocation":"ram", "uri":"" }], "2":[{ "command":"setParameters", "maxSampleCount":1000, "gain":0.25, "vOffset":0, "sampleFreq":200000000, "startDelay":0, "storageLocation":"ram", "uri":"" }] } } }
Response
{ "log":{ "analog":{ "1":[{ "command":"setParameters", "statusCode":0, "maxSampleCount":1000, "actualGain":0.25, "actualVOffset":-37, "actualSampleFreq":200000000, "actualStartDelay":0, "storageLocation":"ram", "uri":"", "wait":0 }], "2":[{ "command":"setParameters", "statusCode":0, "maxSampleCount":1000, "actualGain":0.25, "actualVOffset":12, "actualSampleFreq":200000000, "actualStartDelay":0, "storageLocation":"ram", "uri":"", "wait":0 }] } } }
Run the logger
Command
Response
Command
{ "log": { "analog": { "1": [{ "command": "run" }] } } }
Response
{ "log": { "analog": { "1": [{ "command":"run", "statusCode":0, "wait":-1 }] } } }
Read live logger while it runs
Command
Response
Command
{ "log": { "analog": { "1": [{ "command":"read", "startIndex":0, "count":0 }] } } }
Response
12F\r\n { "log": { "analog": { "1": [{ "command":"read", "statusCode":0, "binaryOffset":0, "binaryLength":2, "actualCount":1, "startIndex":0, "maxSampleCount":1000, "actualGain":1, "actualVOffset":-68, "actualSampleFreq":200000000, "actualStartDelay":0, "overflow":"circular", "storageLocation":"ram", "uri":"ch1.bin", "wait":0 }] } } }\r\n 2\r\n <Binary Data>\r\n 0\r\n \r\n
Stop the logger
Command
Response
Command
{ "log": { "analog": { "1": [{ "command": "stop" }] } } }
Response
{ "log": { "analog": { "1": [{ "command":"stop", "statusCode":0, "wait":0 }] } } }