FlexSEA Wiki


User Tools

Site Tools


Adding a new embedded variable to the Plan 4.0 GUI

This page will walk you through the process of editing a CSV Device Spec, processing it and creating a new GUI. Device Specs are used to stream data from Manage (Mn) to Plan. If you are trying to create a new command or expand an existing one (ex.: add a new control variable) this isn't the page you are looking for.


Folder structure

To update a variable, you must have these repositories within the same folder. If you do not, it is recommended you set up your system as described in Building fx_plan_stack from sources. This will ensure you have the correct folder structure. Also, you will have to build fx_plan_stack in step 3.

Embedded System

This page contains information about the computer side of things. This will only work if Manage (Mn) was compiled with the same Device Spec. As a reminder, here is what's needed to handle the embedded side.

  • The FlexSEA-Embedded-STM repository has flexsea-core as a submodule.
    • This allows it to be standalone (embedded programmers and controls engineers can clone only FlexSEA-Embedded-STM and not the entire FlexSEA repo and do their work.)
    • This means that you need to make sure that both copies of flexsea-core are using the same device spec.
  • Device Spec CSV - provided to you:
    • This means that you have the .csv, but also the .c/.h files
    • Compile it. If you don't have any errors you are done.
  • Device Spec CSV - you need to create it:
    • Follow the Step-by-step section below first, then what's above.

System Overview


1. Update Device Spec CSV

  1. Open flexsea-core\flexsea-system\device_specs_csv. This folder contains a csv file for each device. The contents of each file is self-explanatory.
  2. Open the file for the appropriate device and make your changes.


  • Variable names cannot have spaces in them (error message? Substitution?)
  • If your variable name has brackets ('[', ']') they will be converted to underscore ('_')
  • Do not change the file name. The build system matches CSV file names with projects names, changing it could prevent it from getting processed.
  • When you add a variable, make sure that the embedded system will have access to it by including the required headers.

2. Run the spec, pystruct, and struct Scripts

  1. Open \flexsea-build
  2. Run generateDeviceSpecsStructsAndPyClass.sh as shown. Use the -all command. This will update all the devices. You must be in the correct branch in in flexsea-core and fx_plan_stack repositories
  3. You will now have updated device specs and structs.

3. Compile Fx_Plan_Stack

  1. The updated structs must be compiled into libraries so they can be used by the GUI. To do this, you must compile Fx_Plan_Stack by running fx_plan_stack/stack_builder.sh as described in Building fx_plan_stack from sources.
  2. When building, make sure you are in the correct branch in the flexsea-core, flexsea-dephy and plan_3_0 repositories.Fx_plan_stack uses headers from flexsea-core and flexsea-dephy. The libs produced will be copied into plan_3_0.

4. Update Plan 3.0 GUI

A clean build of the GUI is all you need for your variable to be available in the Device Window, 2DPlot, and log. This can be done in QT or with the GUI Script as described in Compiling the GUI with GUI Script.

addingvarembdgui.txt · Last modified: 2020/10/19 15:13 by alayne