SceneControllerModule

The purpose of the SceneControllerModule is to support the setup, triggering, data collection and montoring of complex computer vision applications. The module has the following capabilities:

  • Control of camera, with different camera types and configurable image and pixel formats.

  • Control of lighting controller (CCS) with up to 8 channels (controlling 24V lights) with 256 levels of light intensity.

  • Configuration of scenes, that define individual light settings

  • Configuration of sequences, that define workflows of steps and activities, where a complex computer vision application can be designed. This covers image acquireing, scene control, data I/O, cloud upload and other functionality.

  • Automatic integration to other data collector modules, by supporting both read and write operations.

  • Monitoring of computer vision application, by logging detailed information about the processes.

The way to operate the SceneControllerModule is to set a sequence workflow, that is a set of information that in combination with the module twin, configures the SceneController. To configure the SceneController with sequence workflows, use the Direct Command "SetSequences" to upload and save the sequences. After validation, the workflows are saved in persistant storage on the edge device, such that the sequence workflows are always loaded on startup.

Interfaces

The SceneController module has multiple interfaces, where it interacts with other components. The different interfaces are:

  • Blob Storage: The localblobstorage module is used for persistant storage. This includes the sequence configuration, that is stored in the "config" container, under the path <deviceId>/SceneControllerModule/sequence.json. The localblobstorage is also used for uploading images and analyses results to Cloud.

  • CameraInterfaceService: The CameraInterfaceService runs directly on the Linux host, and provides a REST web API interface for controlling a connected camera.

  • OrchestratorModule: The OrchestratorModule is used for executing custom models, that implement the computer vision analyses on the captured images. The OrchestratorModule custom models are triggered by the SceneControllerModule, that calls a direct method (ExecuteModel) from the computer vision sequence workflow. The workflow activity "ExecuteModel" is used to trigger the desired custom model.

  • Lighting Controller: The SceneControllerModule is able to control a CCS lighting controller using TCP communication.

  • DataCollector modules: Sequence workflows can be triggered by tag measurments, coming from other data collector modules. A trigger can be based on measurement changes or symbolic equation results. The sequence workflows are also able to read and write measurements from tags, for example coming from factory control systems. Measurements can be used in the workflow execution, as input parameters to custom models or, for example, provide context to an analysis. The result of the analyses can be written back to data collectors, for integration to control system (for example accept/reject).

SceneController setup context

Architecture

The SequenceConfiguration is the collection of sequences defined in the SceneControllerModule. Every time a new sequence configuration is saved, it is also saved into a blob file 'sequences.json' in the container 'config' in the localblobstorage. This means, that the last saved sequence configuration is always loaded upon module restart.

The SceneController module uses the Workflow services in the Tricloud.Edge.Common project, that is part of the edge module C# SDK used for developing custom modules. The Workflow functionality is used to implement the Sequences, which means that the SequenceConfiguration is automatically converted into a Workflow.

Functionality that maintains the workflow state, both by subscribing to measurements and executing workflow steps, are part of the Workflow services.

The sequencerservice is part of of the SceneControllerModule and responsible for interfacing between the common generic Workflow service and the Scene Controller implementation. The SequenceConfiguration is converted into a WorkflowConfiguration, and the SequencerService is responsible for triggering the Workflow and returning the results.

Scene Controller Services

The Workflow functionality in the Tricloud.Edge.Common project has several pre-built Activities that are used for implementing the sequences. However, some specific Activities only relate to the SceneControllerModule, like SetSceneActivity, AcquireImageActivity and UploadFolderActivity. Those activities are defined in the SceneControllerModule project, but are automatically imported and loaded into the WorkflowService upon module initialization (by reflection). This means, that the Activities can easily be extended by implementing new custom ones.

Last updated

Was this helpful?