Skip to content

Simulating a control system

Will Rogers edited this page Oct 7, 2019 · 6 revisions

For testing, it can be useful to simulate a control system.

This has various benefits:

  • It allows one to test without access to a running control system.
  • It allows one to test extreme states of the control system.
  • It allows one to test setting values that one would not want to in a control system.

A high level design doc.

The control system simulation consists of:

  • A component run within the browser that provides updates to process variables
  • A DSL that defines those process variables that should be simulates
  • A DSL that defines how process variables should be updated.
  • A mechanism whereby these DSLs can be specified.

Possible values

The types that are used in the cs-web-proto repo are VTypes, which are an implementation of EPICS normative types (see the wiki page). This implementation is copied from Java: part of the epicsCoreJava repo here.

Related reading

Epics 7 provides a process variable introspection interface it might make sense to copy this.

Beyond scope

This simulation might be useful for functional testing.

One could imagine quite complicated interactions with a control system (mocking the interaction with the control system). One could imagine mocking this value out.

Clone this wiki locally