Variables

Variables in Galago allow you to store and manage system-wide configuration values, protocol parameters, and runtime data that can be shared across different components of your automation setup.

Table of Contents

  1. Overview
  2. Managing Variables
    1. Variable Types
    2. Using Variables
  3. Best Practices

Overview

Managing Variables

Creating Variables

1
Navigate to the Variables page
2
Click "Add New Variable"
3

Define the variable properties:

  • Name - a unique identifier for the variable
  • Type - data type (string, number, boolean, etc.)
  • Default value - initial value if not specified
  • Scope - where the variable can be accessed

Variable Types

Type Description Example
String Text values "Sample_01"
Number Numeric values 42.5
Boolean True/false values true
Array List of values [1, 2, 3]
Object Complex data structure {"x": 10, "y": 20}

Using Variables

In Protocols

Reference variables in protocol steps to make protocols more flexible and reusable.

In Scripts

Access variables from custom scripts to integrate with your automation logic.

Through API

Read and write variables programmatically using the Galago API.

Dynamic Updates

Update variable values during runtime to adapt to changing conditions.

Best Practices

Organization

  • Use clear, descriptive naming conventions (e.g., temperature_incubator_1)
  • Group related variables with consistent prefixes
  • Document the purpose and usage of each variable
  • Set appropriate scopes to limit access where needed

Security

  • Control access permissions to sensitive variables
  • Validate input values to prevent errors
  • Monitor variable usage for unexpected changes
  • Perform regular audits of variable definitions

Note: Variables with global scope are accessible throughout the entire system. Use global scope sparingly and only for truly system-wide settings.

Tip: You can export and import variable definitions between Galago instances using the export/import functionality on the Variables page.