Skip to main content
Posted in

Action Scripting

The OpenMoco Timelapse Engine supports the storage of up to sixteen pre-recorded actions that can be called at motor, camera, or time keyframes or during a camera repeat cycle.  These actions provide control over most of the aspects of the currently running program.

There are three core types of actions:

  • Camera
  • Motor
  • Program

These actions correspond to the controls they make available.

Each action is indexed, starting at zero.  The index position allows you to call it from any number of keyframes, delete, or overwrite.

If you add an action at an index position that has already been used, it will overwrite the previously recorded action, allowing you to use more than sixteen by overwriting ones that are no longer needed.

 

Camera

A camera action allows you to execute any of the following controls:

Enable / Change Interval

If the camera has been disabled, this control allows you to re-enable it.  It also allows you to set a new interval time, in seconds, from 1-65,536

 

Disable

This control disables the camera

 

Set Exposure

This control allows you to set the exposure time for the camera in mS, from 0 to 65,536. (65.5 seconds)

 

Multiply Exposure

This control allows you to multiply the current exposure time, from .000001x to 65,536x

 note: exposure multiplication actions are modified by the global parameter 'exposure action modifier' - this allows you to specify how much to divide the value used for multiply/divide actions.  E.g., if set to 10, and you call a multiply action of 1, the current exposure time would be set to ( exposure * (1/10) ), or 1/10th of the current exposure time.

 

 

Motor

 

Motor:

A motor action always requires you to define the motor number to operate against.

Direction/Enable:

Every motor action requires you to set the direction of the motor (0, 1, reverse, or unchanged), and enable value (on, off, inverted, unchanged) for the given motor.

The following additional controls are provided in addition to setting direction and enable/disable:

Change Steps

This control allows you to set the number of steps for the given motor, from 0 to 65,536.

 

Move Now

This control allows to tell a given motor to move a given number of steps each time this action is called.  Steps are 0 to 65,536.

 

Start Down Ramp

This causes the given motor to immediately begin executing its downward ramp.  This is especially useful if you have not defined a maximum number of steps to take for the given motor, and instead use a keyframe to control when the motor will begin its downward ramp.

 

 

Program

A program action allows you to execute any of the following controls:

 

Start Program

Start a paused/stopped program

 

Pause Program

Pause the currently running program

 

Stop Program

Stop/Clear the currently running program