Skip to content

Switches

SGPro 4 and above have support for "switches" and allow you to toggle the state of said switches at various points in the sequence. Switches allow you to control almost any piece of equipment that maintains some sort of state. A couple examples of such a device might something simple with just an "on" and "off" state or something with many different states like you would expect setting intensity with states 0 through 100. Switch controls are located in the Control Panel in a tab labeled Switches. Currently SGPro supports switches that:

Currently, SGPro can:

  • Manually control the state of switches.
  • Set the state of multiple switches across multiple different devices, at:
    • Sequence start
    • Sequence end
    • More to come...

Switch state for various events in the sequence is also fully supported with Equipment Profiles.

Vocabulary

Switch

Essentially a named set of "states" (e.g. MySwitch1 with states "on" and "off" or MyOtherSwitch with states 0 through 100). Presumably altering the state of a switch does something, but strictly speaking, it doesn't have to.

Switch Device

A device that contains N individual switches. Essentially a parent grouping of switches that is usually defined by a device (e.g. PrimaLuce Eagle or Pegasus), but doesn't have to be.

In the control panel and Equipment Profile Manager, all of your switches will be grouped by Switch Device. In the screenshot below, you can see the ASCOM Switch Simulator Switch Device. After the name of the device, you will see a state for the device (not a switch) that indicates if SGPro has a stable connection to the switch device (i.e. Connected or Disconnected).

Connecting a Switch Device

You don't need to do anything to connect your switch devices. SGPro will display any switches it finds installed on your machine. If your switches don't show up, make sure to install their ASCOM driver. It may take up to 10 seconds for the control panel to show that it has a stable connection to your switch device.

Switch Device Options and Configuration

If a Switch Device has configurable options, you can access them by clicking on the gear icon next to the Switch Device's name. See the help entries in this category for details on specific devices.

Setting a Switch's State

In the switch grid (table) click on the State column for the switch you'd like to set. After clicking a dropdown menu will appear showing all of that switch's states. Simply click on the one you want to set for your switch.

Note

Note that if a switch has a gray background it has no user definable states and is only for display purposes.

Set a Switch's State for a Sequence Event

Current supported sequence events are sequence start and end. SGPro will set the states of your switches to the chosen values when these events occur. Choosing the event state is accomplished by clicking on the column for the desired sequence state (e.g. Start) and then choosing the desired state for that switch.

Start States

To set switch state for sequence start, locate the switch to manipulate and, in its Start column click once on Unchanged and a dropdown menu will appear. This dropdown will contain all possible states for that switch. Choose the one appropriate for sequence start.

End States

To set switch state for sequence end, locate the switch to manipulate and, in its End column click once on Unchanged and a dropdown menu will appear. This dropdown will contain all possible states for that switch. Choose the one appropriate for sequence end.

Switch Properties

Each individual switch in a Switch Device has its own set of optional properties that may be specified in order to enforce a particular state application order at sequence start or end. To access these properties, find the switch you want to alter and Right-Click:

Switch state delay for sequence START

The default number of seconds each switch will wait to set its desired state. In other words, if the value set here is 5 sec and the sequence starts at time T, this switch will not set state until T + 5 sec.

Switch state delay for sequence END

The default number of seconds each switch will wait to set its desired state. In other words, if the value set here is 5 sec and the sequence ends at time T, this switch will not set state until T + 5 sec.

Example

Both switch 1 and switch 2 attempt to set state on sequence start, but setting state for switch 2 will fail unless switch 1 state has been set and given ~5 sec to initialize. Because of this dependency, we'll want to leave the Switch state delay for sequence START at the default 0 sec (immediate) and then, in switch 2, right-click and enter a value of 5 for its Switch state delay for sequence START field.

Note

This dialog will also show you if the global switch properties have set a default delay value for either sequence START or END (i.e. what the delay will be for this switch if none is specified here).

Tip

Click the Open global switch properties link at the bottom for easy access.

Global Switch Properties

Global sequence properties can be used to introduce delays after closing a switch (i.e. allow time for gear to power on and initialize before attempting to connect), enforce a particular order of operations when multiple switches attempt to set state, and also reduce clutter by allowing you to hide switch devices you don't actually use.

Sequencing Delays

Delay sequence start by X seconds

Setting switch state for sequence start is always one of the very first actions taken when SGPro starts a sequence. This value is to be interpreted as the time delay between setting the state of the last switch and the sequence's start. This is typically used to allow sufficient time for equipment to initialize properly before attempting to connect.

Ordering Delays

These values are to be interpreted as the default time delays injected when state for switches is set. These delays, despite being represented in seconds, are typically used to enforce a specific ordering for setting the state. Alternatively, switches may define their own delays, but if none are defined, a switch will use delays as defined here.

Switch state delay for sequence START

The default number of seconds each switch will wait to set its desired state. In other words, if the value set here is 5 sec and the sequence starts at time T, ALL switches (unless overridden) will not set state until T + 5 sec.

Switch state delay for sequence END

The default number of seconds each switch will wait to set its desired state. In other words, if the value set here is 5 sec and the sequence ends at time T, ALL switches (unless overridden) will not set state until T + 5 sec.

Ignored Switches

This list displays all known (installed) switch drivers on the current system. For any that you do not use, or possibly do use but do not want SGPro to control, make sure they are checked.

Note

SGPro, when a sequence is opened, will attempt to momentarily connect with any switch devices in use. This is done in order to inventory the "switch list" so SGPro can display the individual switches (which cannot usually be known until a connection has occurred). Choosing to ignore certain switch devices will also prevent the initial connection attempt.

Adding Switch States to your Equipment Profiles

You can also add switch states for sequence events to your existing (or new) equipment profiles. In the Equipment Profile Manager, you will see a tab labeled "Switches" that contains a nearly identical switch grid.

Note

If your switches don't show up, make sure that you install the appropriate ASCOM driver.

Note

By default, both the ASCOM Switch Simulator and the PrimaLuce Eagle Switch Devices are shown. Either or both of these can be hidden by right-clicking anywhere in the switch table and unchecking the devices you no longer wish to see.