Power Relay

Introduction

Relay board top view
Relay board top view
Relay board bottom view
Relay board bottom view
  • Record up to 50 switch action steps
  • Run steps in cyclic or one-shot manner
  • 24 days max delay for each step
  • 1 microsecond min delay resolution for each step
  • Control switch on/off/toggle by command
  • Calibration for delay timer is available

compatible hardware version1.*
firmware version1.0
USB portmicro-B
Serial port speed115200
USB voltage5V
USB current100mA

Examples

If you are not sure how to connect to your device, you can follow this Getting Started page.

Switch on the relay
    
> write on

Make sure you don't have recorded steps running. This command will interrupt the running recorded steps.

Switch off the relay
    
> write off

Make sure you don't have recorded steps running. This command will interrupt the running recorded steps.

Toggle the relay
    
> write toggle

Make sure you don't have recorded steps running. This command will interrupt the running recorded steps.

Read current switch state
    
> read state

Set normal state of the switch to be closed
    
> write config.normally=closed

If you connect the relay on COM and NC, then the default normally state of the relay is closed. > write on will keep the relay closed. > write off will activate the relay and open the switch.

Set normal state of the switch to be open
    
> write config.normally=open

If you connect the relay on COM and NO, then the default normally state of the relay is open. > write on will activate the relay and close the switch. > write off will keep the relay open.

Repeatedly turn on the switch for 1s and then turn it off for 1s
    
> write step.1.state=on
> write step.1.delay=1000
> write step.2.state=off
> write step.2.delay=1000
> write process.end_step=2
> write process.mode=cycle
> write process.run

Record 2 steps. Step 1 turns on the switch for 1s. Step 2 turns off the switch for 1s. Set the end step index of the process to be 2. A process is a sequence of steps to run. Use cyclic run mode. Finally, start to run the process.

Pause the running process
    
> write process.run=false

Interrupt the running steps. The steps will run from start, if you set the step.run to true again.

Continue to run the current process
    
> write process.run=true

Restart the process
    
> write process.restart

Tune the delay timer to be 1% faster
    
> write calibration.timer.scale=1.01

Read current step index
    
> read process.current_index

If you have recorded steps running, this command shows the index of the current step.

Read current step delay countdown
    
> read process.countdown

If you have recorded steps running, this command shows the delay countdown of the current step in microseconds. If the countdown reaches 0, the next step will start to run.

Commands

Read

Read the state of the switch.

> read step.[step_index].state

[step_index] should be in the range of [1, 50].

The output data type is bool.

Read the delay of the current step in microseconds.

> read step.[step_index].delay

[step_index] should be in the range of [1, 50].

The output data type is uint.

The value range of this property is [1, 2147483647].

Read the process execution mode.

> read process.mode

The output data type is enum.The value can be one of {cyclic, once}.

Read the end step index (inclusive) of the process to run.

> read process.end_step

The output data type is uint.

The value range of this property is [0, 50].

Read the run flag.

> read process.run

The output data type is bool.

Read the current step index.

> read process.current_index

The output data type is uint.

Read the current step delay countdown.

> read process.countdown

The output data type is uint.

Read the current state of the switch.

> read state

The output data type is bool.

Read the scale coefficient of the delay timer.

> read calibration.timer.scale

The output data type is float.

The value range of this property is [0.5, 2].

Read the normally state of the switch.

> read config.normally

The output data type is enum.The value can be one of {closed, open}.

Read the URL to the Exaberry.org.

> read device.exaberry

The output data type is string.

Read the URL to the documentation.

> read device.documentation

The output data type is string.

Read the name of the device.

> read device.name

The output data type is string.

You can customize the device name by writing to this property.

Read the system ticks since powered up.

> read device.systick

The output data type is uint.

The systick is approximately the number of microseconds since power up.

Read the device ID.

> read device.id

The output data type is hex.

The device ID is unique for each device.

Read the type ID of the device.

> read device.type_id

The output data type is string.

The type ID is unique for different API and hardware design combination.

Read the firmware version.

> read device.firmware.version

The output data type is string.

Read the hardware version.

> read device.hardware.version

The output data type is string.

Write

Write to the state of the switch.

> write step.[step_index].state={bool}

[step_index] should be in the range of [1, 50].

The input data type isbool.

The updated value of the step's state will take effect the next time this step is current.

Write to the delay of the current step in microseconds.

> write step.[step_index].delay={uint}

[step_index] should be in the range of [1, 50].

The input data type isuint.

The value range of this property is [1, 2147483647].

The updated value of the step's delay will take effect the next time this step is current.

Write to the process execution mode.

> write process.mode={enum}

The input data type isenum.

The value of {enum} should be one of {cyclic, once}.

Write to the end step index (inclusive) of the process to run.

> write process.end_step={uint}

The input data type isuint.

The value range of this property is [0, 50].

The updated value of end_step will take effect at the process restart or running process step change.

Write to the run flag.

> write process.run={bool}

The input data type isbool.

The default value of process.run is True. > write process.run is equivalent to > write process.run=True

The relay will come back to off state after the process finishes.

Write to the flag to restart the process.

> write process.restart={bool}

The input data type isbool.

The default value of process.restart is True. > write process.restart is equivalent to > write process.restart=True

Write to the current state of the switch.

> write state={bool}

The input data type isbool.

Writing to the state property will pause any running process.

Write to the flag to turn on the switch.

> write on={bool}

The input data type isbool.

The default value of on is True. > write on is equivalent to > write on=True

Writing to the on property will pause any running process.

Write to the flag to turn off the switch.

> write off={bool}

The input data type isbool.

The default value of off is True. > write off is equivalent to > write off=True

Writing to the off property will pause any running process.

Write to the flag to toggle the switch.

> write toggle={bool}

The input data type isbool.

The default value of toggle is True. > write toggle is equivalent to > write toggle=True

Writing to the toggle property will pause any running process.

Write to the scale coefficient of the delay timer.

> write calibration.timer.scale={float}

The input data type isfloat.

The value range of this property is [0.5, 2].

Write to the normally state of the switch.

> write config.normally={enum}

The input data type isenum.

The value of {enum} should be one of {closed, open}.

Changing the normally property will change the state of the relay immediately.

Write to the name of the device.

> write device.name={string}

The input data type isstring.

The length of the {string} should be less than 16.

Write to the switch of restarting the device.

> write device.restart={bool}

The input data type isbool.

The default value of device.restart is True. > write device.restart is equivalent to > write device.restart=True

Hardware

Dimensions

dimension image
A:18mm
B:64mm
C:2mm
D:12mm
E:2.54mm

Firmware

The Firmware flashing page documents the steps for downloading the firmware to the device.

Links