Table of Contents

Logic Analyzer

Commands that provide access to the logic analyzer instrument data and functions.

Get Current State


Get the current state of the instrument's channel

Example

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 Parameters


Set the specified parameter(s) of the specified LA channel(s).

sampleFreq - mHz bufferSize - in samples

Example:

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


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

Example:

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