This is an old revision of the document!
Trigger
Commands that provide access to trigger functionality.
Get Current State
Get the current state of the instrument's channel
- state: “armed”, “acquiring”, “idle”, or “triggered”
- acqCount: number or null
- source: see trigger setParameters or null
- targets: see trigger setParameters or null
Example
Command
{
"trigger": {
"1": [
{
"command": "getCurrentState"
}
]
}
}
Response
{
"trigger": {
"1": [
{
"command": "getCurrentState",
"statusCode": 0,
"acqCount": 10,
"source": {
"instrument": "osc",
"channel": 1,
"type": "risingEdge",
"lowerThreshold": 0,
"upperThreshold": 30
},
"targets": {
"osc": [1, 2],
"la": [1]
},
"state": "armed" || "acquiring" || "idle" || "triggered",
"wait": 0
}
]
}
}
Force Trigger
Force an immediate acquisition without waiting for a trigger condition.
Example:
Command
{
"trigger":{
"1":[
{
"command":"forceTrigger"
}
]
}
}
Response
{
"trigger":{
"1":[
{
"command":"forceTrigger",
"statusCode":0,
"acqCount": 27,
"wait": -1
}
]
}
}
Set Parameters
Set the device trigger parameters.
Command
- trigger - (Object) - The trigger endpoint.
- # - (Array<Object>) An array of trigger configuration objects.
- command - (String) - The trigger command: “setParameters”
- source - (Object) - The trigger source configuration
- instrument - (String) - The instrument that will generate the trigger condition.
- ex. “osc”, “la”, “external”
- channel - (Integer) - The instrument channel that will generate the trigger condition
- type - (String) - The trigger condition type [“risingEdge”, “fallingEdge”]
- lowerThreshold - (Integer) - The trigger lower threshold value.
- upperThreshold - (Integer) - The trigger upper threshold value.
- The trigger signal must pass through both threshold values in the correct order to trigger the acquisition.
- targets - (Array<Object>) - The instruments to acquire data on when a trigger condition occurs.
- …
- …
- …
Example:
Command
{
"trigger": {
"1": [
{
"command": "setParameters",
"source": {
"instrument": "osc",
"channel": 1,
"type": "risingEdge",
"lowerThreshold": 3300,
"upperThreshold": 4000
},
"targets": {
"osc": [
1,
2
],
"la": [
1,
2
]
}
}
]
}
}
Response
{
"trigger":{
"1":[
{
"command":"setParameters",
"statusCode":0,
"wait":0
}
]
}
}
run
Arm the specified trigger and immediately re-arm the trigger after a successful acquisition.
Example:
Command
{
"trigger":{
"1":[
{
"command":"run"
}
]
}
}
Response
{
"trigger":{
"1":[
{
"command":"run",
"statusCode":0,
"wait":-1,
"acqCount": 27
}
]
}
}
single
Arm the specified trigger and do not re-arm the trigger after a successful acquisition.
Example:
Command
{
"trigger":{
"1":[
{
"command":"single"
}
]
}
}
Response
{
"trigger":{
"1":[
{
"command":"single",
"statusCode":0,
"wait":-1,
"lastAcqCount": 27
}
]
}
}
Stop
Disarm the specified trigger.
Example:
Command
{
"trigger":{
"1":[
{
"command":"stop"
}
]
}
}
Response
{
"trigger":{
"1":[
{
"command":"stop",
"statusCode":0,
"wait": 0
}
]
}
}

