Control Architect Help Documentation
×
Menu
Index

Example Excel Workbook Data Source

 
Here is an example of a simple Microsoft Excel Workbook being used to update existing Control Module strategies.  This Excel Workbook is used as the DataSource to bind to target Control Module based strategies.
 
 
 
Here is an example where the Excel header row columns above where copied and pasted into a new Control Property Template to establish the source Control Property Template to use when defining the Control Binding Template.
 
 
Here is an example where another Control Property Template was added to a Solution project.  The Import Wizard was used to import parameters from an existing Control Module that contained a PID and DataAcq function block to establish the target Control properties that will be referenced in the Control Binding Template.  Notice that when importing from the Import Wizard where the properties are defined from an existing PKS Cxxx/ACE type Control Module, the IsCMType attribute for the new Control Property item is automatically checked based on whether the Property existing at the Control Module block itself. 
 
The Import Wizard will attempt to identify the Property type based on its current value.  Values such as 100 or 0 would be interpreted to be an Integer type where as a value such as 100.1 would be interpreted as a Double type.  The properties below for the PV type of parameters were imported as Int32 types and need to be changed to Double types manually after they have been imported.  We could have optionally changed the type within the Import Wizard prior to importing.
 
 
This is the same Control Property view as above, where we modified specific Property types to reflect double types and removed some default values.
 
 
 
Here is an example where a Control Binding Template was added to a Solution project that references the two Control Property Template files shown above as the source and target Control properties.  Double-click on the Template item to display the items detail data. 
You must define a specific Control Binding in the set of Control bindings as a Primary Key.  This Primary Key defines which source Control Property uniquely identifies the data found in the Excel DataSource.  In most cases this will normally be the entity name of the Strategy that is being edited.
 
 
Here we have modified the default generated Control Binding expression to transform the value for the target Property PVEXHILM based on the values of PVEULO/PVEUHI.  The default generated expressions simply pass through the value found in the DataSource to the target Property.  If a value requires transformation to another value based on the values of other referenced source or target Control properties, you will have to modify this default conversion expression.
 
 
 
Here we added a new Control Conversion Template to the Solution project that allows us to bind our Control Binding Template above to an Excel DataSource.
 
 
 
Here is an example of executing a Data Collection task using the Control Conversion Template defined above.
 
The Data Collection indicates that the referenced DataSource entities will be created as new because the Control Module strategies do not exist in the specified Output folder.
 
 
 
Here is another example of executing a Data Collection task using the Control Conversion Template defined above, but this time we placed the existing Control Module XML files in the Output folder in order to update the existing entities.
 
 
 
This is an example of defining a Workflow task using the Control Conversion Template above and its saved Data Collection results.  When this Workflow Control Conversion task is executed, the target of the conversion task is created or updated to reflect the changes that were defined in the Data Collection.
 
 
 
 
Here is the same Data Collection above that has been executed in a Workflow task.  The Parameter items that have been updated during execution of the Control Conversion task are shown here with the results of the edit operation.
 
 
 If we were to again execute a Data Collection task on the Strategy items that were just updated, we would validate that the target strategies are now updated to the values defined in the Excel DataSource as no Parameter item values are indicated as changed.
 
 
 
Here is the Solution workspace that was used to contain the Control template developed above.