Syntax

Automatically Generated

This part of the documentation is automatically generated from the schema file used for validating protocols following the 2020-12 draft. For more detailed information on protocols, please refer the documentation by PhotosynQ, Inc.

_protocol_set_

Treating protocols as integrated sets

## Code Example
_protocol_set_: [
  {
    "label": "PAM"
  },
  {
    "label": "ECS"
  }
]
  • Array

    • Object

    • Protocol within the protocol set


adc_show

ADC (analog to digital converter) values are outputted in data_raw instead of the regular output

## Code Example
adc_show: 0
  • Integer

  • Values: 0, 1


autogain

Automatic gain control. Multiple gain functions can be added.

## Code Example
autogain: [
  [
    2,
    1,
    3,
    12,
    50000
  ],
  [
    3,
    8,
    1,
    80,
    50000
  ]
]
  • Array (Up to 10 items)

    • Array (Exactly 5 items)

    • Order and type for first 5 items (Required)

      • Integer

      • Minimum: 0

      • Maximum: 9

      • Index for storing gain settings

      • Integer

      • Minimum: 1

      • Maximum: 10

      • Select pulsed LED to test

      • Integer

      • Minimum: 1

      • Maximum: 3

      • Select detector to use

      • Number

      • Minimum: 1

      • Maximum: 65535

      • Duration in microseconds

      • Number

      • Minimum: 0

      • Maximum: 65535

      • Target Value, recommended: 40000-50000

    • Automatic gain control settings


averages

Number of times to average the protocol (only avarage is returned)

## Code Example
averages: 3
  • Number

  • Minimum: 0

  • Maximum: 10000


averages_delay

Delay between protocol averages in ms

## Code Example
averages_delay: 2000
  • Number

  • Minimum: 0

  • Maximum: 999999999999


bleed_correction

Set to 0 to disables the application of electronic offsets corrections, otherwise set to 1 or ignore parameter

## Code Example
bleed_correction: 1
  • Integer

  • Values: 0, 1


check_battery

Set to 1, otherwise set to 0 or ignore parameter. Adds error message “battery low” when active and battery level is below 10%

## Code Example
check_battery: 1
  • Integer

  • Values: 0, 1


dac_lights

When set to 1, values of ‘pulsed_lights_brightness’ and ‘nonpulsed_lights_brightness’ are interpreted as 12-bit values (0 - 4095) controlling the DAC instead of PAR values.

## Code Example
dac_lights: 0
  • Integer

  • Values: 0, 1


detectors

Detectors used in measurement, data returned in data_raw

## Code Example
detectors: [
  [
    3
  ],
  [
    3
  ],
  [
    "@s0"
  ],
  [
    3
  ]
]
  • Array

    • Array

      • String, Number

      • Input must be a number, light_intensity, previous_light_intensity, p_light, or a variable reference (@s0, @p0, @n0:1)


do_once

Set to 1, to execute a protocol in a repeating set only one time, otherwise set to 0

## Code Example
do_once: 1
  • Integer

  • Values: 0, 1


dw

Digital write to “digital_write or dw” to a specific pin number

## Code Example
dw: [
  14,
  0
]
  • Array

  • Order and type for first 2 items (Required)

    • Integer

    • Minimum: 0

    • Maximum: 34

    • Set the pin number (see: Teensy 3.2 pin layout)

    • Integer

    • Values: 0, 1

    • Set to 1, to enable digital_write, otherwise set to 0


e_time

When added, returns elapsed time since timer started with (s_time) in [ms]. Value for started timer reflects time elapsed since protocol start. Format: [timer started, elapsed time]

## Code Example
e_time: 1

energy_min_wake_time

Adjust time between 5V shutdown and wake up time in ms

## Code Example
energy_min_wake_time: 7000
  • Number

  • Minimum: 0

  • Maximum: 1000000


energy_save_timeout

Adjust Energy Save Timeout in ms

## Code Example
energy_save_timeout: 300000
  • Number

  • Minimum: 0

  • Maximum: 1000000


environmental

## Code Example
environmental: [
  [
    "light_intensity"
  ],
  [
    "temperature_humidity_pressure"
  ],
  [
    "temperature_humidity_pressure2"
  ],
  [
    "contactless_temp"
  ],
  [
    "thickness"
  ],
  [
    "compass_and_angle"
  ]
]
  • Array

    • Array

    • Order and type for first 5 items (Required)

      • String

      • Any of the following

        • Values: light_intensity, previous_light_intensity, temperature_humidity_pressure, temperature_humidity_pressure2, thp, thp2, thickness, thickness_raw, compass_and_angle, contactless_temp

      • Number

      • Number

      • Number

      • Number

    • Environmental measurement configuration


environmental_array

## Code Example
environmental_array: [
  [
    1
  ]
]
  • Array

    • Array

    • Order and type for first 1 item (Required)

      • Number


indicator

Change the color of the indicator Light (MultispeQ v2) defining the color using the channels Red, Green, Blue. The White channel needs to be defined but is ignored. All channels at 0 will turn the light off.

## Code Example #1
indicator: [
  255,
  0,
  0,
  0
]

## Code Example #2
indicator: [
  0,
  128,
  128,
  0
]

## Code Example #3
indicator: [
  0,
  0,
  0,
  0
]
  • Array (Exactly 4 items)

  • Order and type for first 4 items (Required)

    • Integer

    • Minimum: 0

    • Maximum: 255

    • Red channel

    • Integer

    • Minimum: 0

    • Maximum: 255

    • Green channel

    • Integer

    • Minimum: 0

    • Maximum: 2550

    • Blue channel

    • Integer

    • Minimum: 0

    • Maximum: 255

    • White channel


ir_baseline

## Code Example
ir_baseline: <input>

label

Provide a label to a sub-protocol

## Code Example #1
label: "PAM"

## Code Example #2
label: "ECS"
  • String


max_hold_time

Set time (in ms) at which the hold commands timeout, default is 15000

## Code Example
max_hold_time: 15000
  • Number


measurements

Number of measurement repeats, which is a set of protocols

## Code Example
measurements: 2
  • Number


measurements_delay

Delay between measurement repeats in ms

## Code Example
measurements_delay: 30
  • Number


message

Send message to user between pulse sets.

## Code Example #1
message: [
  [
    "alert",
    "Measurement noisy"
  ]
]

## Code Example #2
message: [
  [
    "prompt",
    "What is the leaf color"
  ]
]

## Code Example #3
message: [
  [
    "confirm",
    "Is the leaf clamped?"
  ]
]
  • Array

    • Array (Exactly 2 items)

    • Order and type for first 2 items (Required)

      • String

      • Values: alert, prompt, confirm

      • Message type

      • String

      • Message content


nonpulsed_lights

Select LEDs that are not pulsed during a pulse set

## Code Example
nonpulsed_lights: [
  [
    2,
    2,
    2,
    2
  ]
]
  • Array

    • Array

      • String, Number

      • Input must be a number, light_intensity, previous_light_intensity, p_light, or a variable reference (@s0, @p0, @n0:1)


nonpulsed_lights_brightness

LED brightness in µE * s⁻¹ * m⁻² (PAR) for non pulsed lights

## Code Example
nonpulsed_lights_brightness: [
  [
    100,
    100,
    200,
    300
  ]
]
  • Array

    • Array

      • String, Number

      • Input must be a number, light_intensity, previous_light_intensity, p_light, or a variable reference (@s0, @p0, @n0:1)


number_samples

Number of samples taken by the ADC (analog to digital converter)

## Code Example
number_samples: 10
  • Number

  • Minimum: 0

  • Maximum: 100


open_close_start

## Code Example
open_close_start: 1
  • Integer

  • Values: 0, 1


par_led_start_on_close

Ambient light intensity is measured and matched by selected LED until the clamp is closed

## Code Example
par_led_start_on_close: 2
  • Integer

  • Minimum: 1

  • Maximum: 10


par_led_start_on_open

Ambient light intensity is measured and matched by selected LED when the clamp is opened

## Code Example
par_led_start_on_open: 1
  • Integer

  • Minimum: 1

  • Maximum: 10


par_led_start_on_open_close

Ambient light intensity is measured and matched by selected LED until the clamp is closed

## Code Example
par_led_start_on_open_close: 2
  • Integer

  • Minimum: 1

  • Maximum: 10


pre_illumination

Sample illumination with a single LED at a set duration and light intensity

## Code Example #1
pre_illumination: [
  2,
  200,
  600000
]

## Code Example #2
pre_illumination: [
  [
    2,
    200,
    600000
  ],
  [
    3,
    400,
    600000
  ]
]
  • Only One of the following

    • Array (Exactly 3 items)

    • Order and type for first 3 items (Required)

      • String, Integer

      • Minimum: 1

      • Maximum: 10

      • LED for illumination

      • String, Number

      • Illumination duration in ms

      • String, Number

      • Intensity in µE * s⁻¹ * m⁻² (PAR) - Only for LEDs in the range of 400 nm - 700 nm

    • Array

      • Array (Exactly 3 items)

      • Order and type for first 3 items (Required)

        • String, Integer

        • Minimum: 1

        • Maximum: 10

        • LED for illumination

        • String, Number

        • Illumination duration in ms

        • String, Number

        • Intensity in µE * s⁻¹ * m⁻² (PAR) - Only for LEDs in the range of 400 nm - 700 nm


protocol_averages

Sets the number of times a sub-protocol is repeated and the results are averaged

## Code Example
protocol_averages: 5
  • Number

  • Minimum: 0

  • Maximum: 1000000


protocol_repeats

## Code Example #1
protocol_repeats: 30

## Code Example #2
protocol_repeats: "@n1:1"
  • String, Number

  • Minimum: 0

  • Maximum: 1000000


protocols

## Code Example
protocols: 2
  • Number

  • Minimum: 0

  • Maximum: 100


protocols_delay

## Code Example
protocols_delay: 2000
  • Number

  • Minimum: 0

  • Maximum: 999999999


pulse_distance

## Code Example
pulse_distance: <input>
  • Array

    • String, Number

Dependencies: pulses, pulse_length


pulse_length

## Code Example
pulse_length: [
  [
    20,
    20,
    20,
    20
  ]
]
  • Array

    • Array

      • String, Number

Dependencies: pulses, pulse_distance


pulsed_lights

## Code Example
pulsed_lights: [
  [
    1,
    1,
    1,
    2
  ]
]
  • Array

    • Array

      • String, Number

      • Input must be a number, light_intensity, previous_light_intensity, p_light, or a variable reference (@s0, @p0, @n0:1)

Dependencies: pulsed_lights_brightness


pulsed_lights_brightness

## Code Example
pulsed_lights_brightness: [
  [
    100,
    "auto_bright[1]",
    300,
    100
  ]
]
  • Array

    • Array

      • String, Number

Dependencies: pulsed_lights


pulses

Pulses defines sequence the measurement pulses by the LEDs during a measurement

## Code Example
pulses: [
  10,
  10,
  50,
  "@n1:2",
  100
]
  • Array

    • Integer, String

Dependencies: pulse_length, pulse_distance


recall

Load value from device memory (EEPROM) or receive device settings (settings) or device modifications (device_mod)

## Code Example #1
recall: [
  "userdef[1]"
]

## Code Example #2
recall: [
  "settings"
]

## Code Example #3
recall: [
  "device_mod"
]
  • Array

    • String


reference

Specify another detector to be measured and subtracted from detector.

## Code Example #1
reference: [
  [
    1
  ]
]

## Code Example #2
reference: [
  [
    1,
    2
  ]
]
  • Array

    • Array (Exactly 1 item)

    • Order and type for first 1 item (Required)

      • Number

      • Minimum: 1

      • Maximum: 4


s_time

When added, starts timer to return elapesed time with (e_time) in [ms]

## Code Example
s_time: 1

save

Save value to device memory (EEPROM).

## Code Example
save: [
  [
    1,
    1500
  ]
]
  • Array

    • Array (Exactly 2 items)

    • Order and type for first 2 items (Required)

      • Number

      • Storage Location

      • Number

      • Value to be stored in selected location


save_trace_time_scale

Set to 1 to save time scale for trace as data_raw_time, otherwise set to 0.

## Code Example
save_trace_time_scale: 1
  • Integer

  • Values: 0, 1


set_led_delay

Set pre-illumination with a selected LED for a specific amount of time. (Multiple LEDs can be used).

## Code Example
set_led_delay: [
  [
    2,
    20000,
    0
  ],
  [
    2,
    20000,
    100
  ]
]
  • Array (Between 1 and 10 items)

    • Array (Exactly 3 items)

    • Order and type for first 3 items (Required)

      • Integer

      • Values: 1, 10

      • LED identification number

      • Number

      • Minimum: 0

      • Illumination duration in ms

      • Number

      • Values: 0, 2500

      • Light intensity in µE * s⁻¹ * m⁻² (PAR)


set_light_intensity

Set a constant actinic background light intensity.

## Code Example
set_light_intensity: 1500
  • Number

  • Minimum: 0

  • Maximum: 2500


spad

Measure relative Chlorophyll content (SPAD - Special Products Analysis Division)

## Code Example #1
spad: 1

## Code Example #2
spad: [
  1
]
  • Only One of the following

    • Integer

    • Values: 0, 1

    • Array (Exactly 1 item)

    • Order and type for first 1 item (Required)

      • Integer

      • Values: 0, 1


start_on_close

Set to 1, to wait for the protocol to run until clamp is closed, otherwise set to 0

## Code Example
start_on_close: 1
  • Integer

  • Values: 0, 1


start_on_open

Set to 1, to wait for the protocol to run until clamp is opened, otherwise set to 0

## Code Example
start_on_open: 1
  • Integer

  • Values: 0, 1


start_on_open_close

## Code Example
start_on_open_close: 1
  • Integer

  • Values: 0, 1


v_arrays

Storing variables in arrays available within the protocol

## Code Example
v_arrays: [
  [
    1,
    2
  ],
  [
    100,
    200
  ]
]
  • Array (Up to 10 items)

    • Array (Up to 10 items)

      • String, Number

      • Input must be a number, light_intensity, previous_light_intensity, p_light, or a variable reference (@s0, @p0, @n0:1)

Definitions

Array

In Python, “array” is analogous to the list or tuple type, depending on usage.

Boolean

In Python, “boolean” is analogous to bool. Note that in JSON, true and false are lower case, whereas in Python they are capitalized (True and False).

Integer

In Python, “integer” is analogous to the int type.

Dependencies

When a command has dependencies, all dependent commands have to be used as well for a valid protocol and to ensure proper function.

Null

In Python, null is analogous to None.

Number

The number type is used for any numeric type, either integers or floating point numbers (int or float in Python).

Object

In Python, “objects” are analogous to the dict type. An important difference, however, is that while Python dictionaries may use anything hashable as a key, in JSON all the keys must be strings.

String

The string type, in Python str is used for strings of text. It may contain Unicode characters.