![]() |
TopCon API
1.1.0
.Net API to control TopCon devices
|
This class implements the FunctionEngine that resides inside of the TopCon device (physically in the TopCon or in the virtual correspondant). It is derived from the CurveList as it contains the More...
Public Types | |
enum | FnBlockDefinition : uint { FnBlockDefinition.VOLTAGE = 0, FnBlockDefinition.CURRENT = 1, FnBlockDefinition.POWER = 2 } |
Public Member Functions | |
FunctionEngine (ReDev.TopCon topCon) | |
This class is the FunctionEngine, an extended list of the CurveList. It includes a pointer to the currently activated TFECurve might be null what means that it references the curve with number 9999 the last used curve in the TopCon. More... | |
void | CopyCurveFromTopConFlashToTopConFlash (UInt32 fromNumber, UInt32 toNumber) |
This method uses an internal copy of the curve with number FromNumber in the TopCon flash memory and copies it as curve with number ToNumber in the TopCon flash. Throws interrupt if 'from'curve does not exist or if 'tocurve' still exists. Use DeleteCurveInTopConFlashWithNumber to delete the target (if already existing). Remark on the duration of this action: the time needed for this method varies a lot depending on the state of the flash. Writing data to the TopCon triggers a copying of all curves from one flash page to another. The curve that has to be written down is added to this new flash page. It is obvious that the time needed for copying all curves to the second flash page is depending on the number and length of the already existing curves in the flash page (as they all need to be copied as well). Side effect: The internal curve pointer is set to the resulting curve. More... | |
CurveContainer | GetCurveContainerFromTopConFlashWithNumber (UInt32 curveNumber) |
This method fetches a CurveContainer from the TopCon device. The CurveContainer contains the curve with the number given as parameter to the method. More... | |
void | StoreCurveContainerToTopConFlash (CurveContainer curveContainer) |
This method stores the given CurveContainer on the TopCon device. The CurveContainer contains the curve to be stored on the TopCon. The function stores the curve as curve with number given in the internal CurveHeader. Use the method setCurveNumber() of the CurveContainer object to change the identifying number. More... | |
void | DeleteCurveInTopConWithNum (UInt32 curveNumber) |
This method deletes a curve in the TopCon flash memory. The function will throw an interrupt, if the curve cannot be deleted. More... | |
void | DeleteInFlashAllCurves () |
This method deletes all curves in the TopCon flash memory. The function will throw an interrupt, if the curves cannot be deleted. More... | |
Boolean | IsFunctionEngineEnabled () |
Returns the enable state of the TopCon Function Engine (TFE). More... | |
void | SwitchToCurve (UInt32 curveNumber) |
This method has to be used to switch from one curve to another one. An interrupt is thrown if curve does not exist or exceeds the valid range. More... | |
void | LoadCurveListFromTopCon () |
Loads the list of TopCon function from the TopCon device into this object. Typical use: More... | |
Boolean | IsListNumberAlreadyUsed (UInt32 listNumber, Boolean reloadFunctionHeader) |
This method checks if a curve with the number given as parameter is already available in the TopCon device. More... | |
UInt32 | GetNumberOfActivatedCurve () |
This method returns the number of the activated curve. More... | |
void | SetCurveTransitionTime (Double transitionTime) |
This method sets the curve transition time (in TopControl: Ramp time). This curve transition time is the time to be used to switch from one curve to another. This allows for a smooth, linear transition between two curves. Please refer to the TopCon programming documentation for further investigation on how this works. More... | |
Double | GetCurveTransitionTime () |
This method reads the curve transition time (in TopControl: Ramp time). This curve transition time is the time to be used to switch from one curve to another. This allows for a smooth, linear transition between two curves. Please refer to the TopCon programming documentation to fully understand the transition process. More... | |
void | SetSasIrradianceReference (Double irradiance, Double duration) |
This method allows to change the irradiance of the currently executed CALCULATED SASCurve to a new irradiance. More... | |
Double | GetSasIrradianceActual () |
This function returns the current value of the irradiance setting (when using a CalculatedSASCurve). More... | |
Double | GetSasIrradianceRampTimeRemaining () |
This function returns the remaining time of the currently running Irradiance ramp. More... | |
Double | GetSasIrradianceReference () |
This function returns the reference value of the More... | |
Double | GetSasIrradianceRampTimePlanned () |
This function returns the planned time of the currently running Irradiance ramp. More... | |
void | SetSasTemperatureReference (Double temperature, Double duration) |
This method allows to change the simulated temperature of the solar array, represented by a CALCULATED SASCurve. More... | |
Double | GetSasTemperatureActual () |
This function returns the current value of the temperature setting (when using a CalculatedSASCurve). More... | |
Double | GetSasTemperatureRampTimeRemaining () |
This function returns the remaining time of the currently running temperature ramp. More... | |
Double | GetSasTemperatureReference () |
This function returns the reference value of the temperature of the solar array. More... | |
Double | GetSasTemperatureRampTimePlanned () |
This function returns the planned time of the currently running temperature ramp. More... | |
RegaSAS.MPPData | GetSasMppData () |
This method reads the MPP data as it is used at that moment (this means: when changing amplitude or inputScaling with a CustomSASCurve or irradiance or temperature with a CalculatedSASCurve, this value mirrors the dynamic change of the MPP). This method automatically switch to TC.LIN system values if supported and attached to TC.P or TC.MAC. More... | |
void | SetSasAmplitudeReference (Double amplitude, Double duration) |
This method allows to change the amplitude of the currently executed CUSTOM SASCurve to a new amplitude value. The transition lasts for the time given as second parameter. Side effect: a currently running inputScaling ramp will be stopped and remains on the current level. More... | |
Double | GetSasAmplitudeActual () |
This function returns the SAS amplitude (y-value) of the currently running amplitude ramp. More... | |
void | SetSasInputScalingReference (Double inputScaling, Double duration) |
This method allows to change the inputScaling (x-axis) of the currently executed CUSTOM SASCurve to a new value of an inputScaling. The transition lasts for the time given as second parameter. The inputScaling ramp follows a 1/x function. Side effect: a currently running Amplitude ramp will be stopped and remains on the current level. More... | |
Double | GetSasInputScalingActual () |
This function returns the SAS inputScaling (= x-value) of the currently running inputScaling ramp. More... | |
void | SetSasAmplitudeAndInputScalingReference (Double amplitude, Double inputScaling, Double duration, bool restoreDurationTime=false) |
This method allows to change the amplitude (y-axis) and the Inputscaling (x-axis) of the currently executed CUSTOM SASCurve to new values of an inputscaling. The change transition starts at the current values and lasts for 'duration' (third parameter). The Amplitude is a linear ramp, the inputScaling follows a 1/x specification. More... | |
void | GetSasAmplitudeAndInputScalingActual (ref Double amplitude, ref Double inputScaling) |
This method returns the amplitude and inputScaling values, recorded during a single controller cycle, as reference parameters.Hence it allows to work with truely synchronized data from one single controller cycle. More... | |
![]() | |
CurveList (ReDev.TopCon topCon) | |
This class is a List of TFECurves. It includes a pointer to the currently activated TFECurve (might be -null- what means that it references the curve with number 9999 / the last used curve in the TopCon.). More... | |
void | UpdateCurveListFromTopCon () |
This is a convenience function for calling updateCurveListFromTopCon(true) More... | |
void | UpdateCurveListFromTopCon (Boolean onDateErrorUseNewCreationDate) |
This method updates this function engine List oft TFECurves with the actual list of curve headers being stored in the flash memory of the TopCon. Remark: Not all parts of the functions are fetched from the TopCon device, only the TFECurve headers (= number, name, creation date and some internals) are transferred. This keeps the amount of data to be transmitted small. The curve with number 9999 (automatically saved by TFE) is ignored and not uploaded. More... | |
Boolean | IsCurveNumberUsedInList (UInt32 curveNumber) |
This method checks if a curve with the number given as parameter is already available in the uploaded list. More... | |
static string | GetLastError () |
Static Public Attributes | |
const Double | LowestIrradiationAllowed = 0 |
Lowest value of irradiance: 0.0 W/m2 More... | |
const Double | HighestIrradiationAllowed = 2000 |
Maximum value of irradiance: 2000.0 W/m2 More... | |
const Double | LowestTemperatureAllowed = -100.0 |
Lower limit of temperature range -100.0 degree Celsius More... | |
const Double | HighestTemperatureAllowed = 120.0 |
Upper limit of temperature range 120.0 degree Celsius More... | |
const Double | ShortestRampTimeIrradiation = 1.0 |
Smallest duration of an irradiation transition 1.0 s More... | |
const Double | LongestRampTimeIrradiation = 34500.0 |
Biggest duration of an irradiation transition 34500.0s More... | |
const Double | ShortestRampTimeTemperature = 1.0 |
Smallest duration of a temperature transition 1.0s More... | |
const Double | LongestRampTimeTemperature = 34500.0 |
Biggest duration of a temperature transition 34500.0s More... | |
const Double | LowestInputScaling = 0.125 |
Smallest value of InputScaling 0.125 = 12.5% percentage factor, used with AAP + SAS curves More... | |
const Double | MaxInputScaling = 10.0 |
Highest value of InputScaling 10.0 = 1000 % percentage factor, used with AAP + SAS curves More... | |
const Double | ShortestRampTimeGeneral = 0.001 |
Shortest duration of a transition when switching between two curves, changing amplitude and or input scaling 0.001s More... | |
const Double | LongestRampTimeGeneral = 86400.0 |
Longest duration of a transition when switching between two curves, changing amplitude and or input scaling 86400.0 s More... | |
This class implements the FunctionEngine that resides inside of the TopCon device (physically in the TopCon or in the virtual correspondant). It is derived from the CurveList as it contains the
|
strong |
CH.Regatron.HPPS.TFE.FunctionEngine.FunctionEngine | ( | ReDev.TopCon | topCon | ) |
This class is the FunctionEngine, an extended list of the CurveList. It includes a pointer to the currently activated TFECurve might be null what means that it references the curve with number 9999 the last used curve in the TopCon.
topCon | the calling TopCon (if available; might not be 'null' ) |
void CH.Regatron.HPPS.TFE.FunctionEngine.CopyCurveFromTopConFlashToTopConFlash | ( | UInt32 | fromNumber, |
UInt32 | toNumber | ||
) |
This method uses an internal copy of the curve with number FromNumber in the TopCon flash memory and copies it as curve with number ToNumber in the TopCon flash.
Throws interrupt if 'from'curve does not exist or if 'tocurve' still exists. Use DeleteCurveInTopConFlashWithNumber to delete the target (if already existing).
Remark on the duration of this action: the time needed for this method varies a lot depending on the state of the flash. Writing data to the TopCon triggers a copying of all curves from one flash page to another. The curve that has to be written down is added to this new flash page. It is obvious that the time needed for copying all curves to the second flash page is depending on the number and length of the already existing curves in the flash page (as they all need to be copied as well).
Side effect: The internal curve pointer is set to the resulting curve.
fromNumber | Number of the origin curve (curve must exist). |
toNumber | Number of the curve to be created. |
void CH.Regatron.HPPS.TFE.FunctionEngine.DeleteCurveInTopConWithNum | ( | UInt32 | curveNumber | ) |
This method deletes a curve in the TopCon flash memory.
The function will throw an interrupt, if the curve cannot be deleted.
curveNumber | Number of the curve to be deleted. [1...999] |
void CH.Regatron.HPPS.TFE.FunctionEngine.DeleteInFlashAllCurves | ( | ) |
This method deletes all curves in the TopCon flash memory.
The function will throw an interrupt, if the curves cannot be deleted.
CurveContainer CH.Regatron.HPPS.TFE.FunctionEngine.GetCurveContainerFromTopConFlashWithNumber | ( | UInt32 | curveNumber | ) |
This method fetches a CurveContainer from the TopCon device. The CurveContainer contains the curve with the number given as parameter to the method.
curveNumber | Number of the curve to be loaded from the TopCon [1...999] |
Double CH.Regatron.HPPS.TFE.FunctionEngine.GetCurveTransitionTime | ( | ) |
This method reads the curve transition time (in TopControl: Ramp time).
This curve transition time is the time to be used to switch from one curve to another. This allows for a smooth, linear transition between two curves. Please refer to the TopCon programming documentation to fully understand the transition process.
UInt32 CH.Regatron.HPPS.TFE.FunctionEngine.GetNumberOfActivatedCurve | ( | ) |
This method returns the number of the activated curve.
Double CH.Regatron.HPPS.TFE.FunctionEngine.GetSasAmplitudeActual | ( | ) |
This function returns the SAS amplitude (y-value) of the currently running amplitude ramp.
void CH.Regatron.HPPS.TFE.FunctionEngine.GetSasAmplitudeAndInputScalingActual | ( | ref Double | amplitude, |
ref Double | inputScaling | ||
) |
This method returns the amplitude and inputScaling values, recorded during a single controller cycle, as reference parameters.Hence it allows to work with truely synchronized data from one single controller cycle.
amplitude | Pointer to the memory where the actual amplitude value is to be stored. |
inputScaling | Pointer to the memory where the actual input scaling value is to be stored. |
Double CH.Regatron.HPPS.TFE.FunctionEngine.GetSasInputScalingActual | ( | ) |
This function returns the SAS inputScaling (= x-value) of the currently running inputScaling ramp.
Double CH.Regatron.HPPS.TFE.FunctionEngine.GetSasIrradianceActual | ( | ) |
This function returns the current value of the irradiance setting (when using a CalculatedSASCurve).
Double CH.Regatron.HPPS.TFE.FunctionEngine.GetSasIrradianceRampTimePlanned | ( | ) |
This function returns the planned time of the currently running Irradiance ramp.
Double CH.Regatron.HPPS.TFE.FunctionEngine.GetSasIrradianceRampTimeRemaining | ( | ) |
This function returns the remaining time of the currently running Irradiance ramp.
Double CH.Regatron.HPPS.TFE.FunctionEngine.GetSasIrradianceReference | ( | ) |
This function returns the reference value of the
RegaSAS.MPPData CH.Regatron.HPPS.TFE.FunctionEngine.GetSasMppData | ( | ) |
This method reads the MPP data as it is used at that moment (this means: when changing amplitude or inputScaling with a CustomSASCurve or irradiance or temperature with a CalculatedSASCurve, this value mirrors the dynamic change of the MPP).
This method automatically switch to TC.LIN system values if supported and attached to TC.P or TC.MAC.
Double CH.Regatron.HPPS.TFE.FunctionEngine.GetSasTemperatureActual | ( | ) |
This function returns the current value of the temperature setting (when using a CalculatedSASCurve).
Double CH.Regatron.HPPS.TFE.FunctionEngine.GetSasTemperatureRampTimePlanned | ( | ) |
This function returns the planned time of the currently running temperature ramp.
Double CH.Regatron.HPPS.TFE.FunctionEngine.GetSasTemperatureRampTimeRemaining | ( | ) |
This function returns the remaining time of the currently running temperature ramp.
Double CH.Regatron.HPPS.TFE.FunctionEngine.GetSasTemperatureReference | ( | ) |
This function returns the reference value of the temperature of the solar array.
Boolean CH.Regatron.HPPS.TFE.FunctionEngine.IsFunctionEngineEnabled | ( | ) |
Boolean CH.Regatron.HPPS.TFE.FunctionEngine.IsListNumberAlreadyUsed | ( | UInt32 | listNumber, |
Boolean | reloadFunctionHeader | ||
) |
This method checks if a curve with the number given as parameter is already available in the TopCon device.
listNumber | Number of the curve that is checked for existance. |
reloadFunctionHeader |
void CH.Regatron.HPPS.TFE.FunctionEngine.LoadCurveListFromTopCon | ( | ) |
Loads the list of TopCon function from the TopCon device into this object. Typical use:
Device.TopCon myTopCon = new Device.TopCon();
myTopCon.Connect(port);
...
TFE.CurveList curveList = new TFE.CurveList();
curveList.LoadCurveListFromTopCon();
void CH.Regatron.HPPS.TFE.FunctionEngine.SetCurveTransitionTime | ( | Double | transitionTime | ) |
This method sets the curve transition time (in TopControl: Ramp time).
This curve transition time is the time to be used to switch from one curve to another. This allows for a smooth, linear transition between two curves. Please refer to the TopCon programming documentation for further investigation on how this works.
transitionTime | The transition time to be used for a switch between two curves[s]. |
void CH.Regatron.HPPS.TFE.FunctionEngine.SetSasAmplitudeAndInputScalingReference | ( | Double | amplitude, |
Double | inputScaling, | ||
Double | duration, | ||
bool | restoreDurationTime = false |
||
) |
This method allows to change the amplitude (y-axis) and the Inputscaling (x-axis) of the currently executed CUSTOM SASCurve to new values of an inputscaling. The change transition starts at the current values and lasts for 'duration' (third parameter).
The Amplitude is a linear ramp, the inputScaling follows a 1/x specification.
amplitude | Target value of the amplitude to be used [A], valid range: [0...maxCurrent], determined automatically). |
inputScaling | Target percentage value of the functional input [ true factor ] valid range: [0.125 ...10] - This is the spreading / shrinking value (1/100 of the percentage value that is to be inserted in TopControl) in relation of the base value of the curve.) |
duration | Duration to shift the curve from the old value to the new value [s], range: [0...345600] |
restoreDurationTime | false: the duration time set with this method, remains on the device (recommended). true: the value stored on the device before calling this method is restored at the end of this call. |
void CH.Regatron.HPPS.TFE.FunctionEngine.SetSasAmplitudeReference | ( | Double | amplitude, |
Double | duration | ||
) |
This method allows to change the amplitude of the currently executed CUSTOM SASCurve to a new amplitude value. The transition lasts for the time given as second parameter.
Side effect: a currently running inputScaling ramp will be stopped and remains on the current level.
amplitude | Target value of the amplitude [A] (currently limited to MaximumSystemCurrent) |
duration | Duration to shift from the old amplitude to the new value in [s], range: [0...345600] |
void CH.Regatron.HPPS.TFE.FunctionEngine.SetSasInputScalingReference | ( | Double | inputScaling, |
Double | duration | ||
) |
This method allows to change the inputScaling (x-axis) of the currently executed CUSTOM SASCurve to a new value of an inputScaling.
The transition lasts for the time given as second parameter.
The inputScaling ramp follows a 1/x function. Side effect: a currently running Amplitude ramp will be stopped and remains on the current level.
inputScaling | Target percentage value of the functional input [ true factor ] (valid range: [0.125 ... 10] - This is the spreading / shrinking value (1/100 of the percentage value that is to be inserted in TopControl) in relation of the base value of the curve.) |
duration | Duration to shift the curve from the old value to the new value [s], range: [0...345600s] |
void CH.Regatron.HPPS.TFE.FunctionEngine.SetSasIrradianceReference | ( | Double | irradiance, |
Double | duration | ||
) |
This method allows to change the irradiance of the currently executed CALCULATED SASCurve to a new irradiance.
irradiance | Target value of the irradiance [W/m2] |
duration | Duration to shift from the old irradiance to the new value [s] |
void CH.Regatron.HPPS.TFE.FunctionEngine.SetSasTemperatureReference | ( | Double | temperature, |
Double | duration | ||
) |
This method allows to change the simulated temperature of the solar array, represented by a CALCULATED SASCurve.
temperature | Target value of the temperature [degree Celsius]. |
duration | Duration of the transition to the new temperature in [s]. |
void CH.Regatron.HPPS.TFE.FunctionEngine.StoreCurveContainerToTopConFlash | ( | CurveContainer | curveContainer | ) |
This method stores the given CurveContainer on the TopCon device. The CurveContainer contains the curve to be stored on the TopCon. The function stores the curve as curve with number given in the internal CurveHeader. Use the method setCurveNumber() of the CurveContainer object to change the identifying number.
curveContainer | CurveContainer that contains the curve to be stored on the TopCon. |
void CH.Regatron.HPPS.TFE.FunctionEngine.SwitchToCurve | ( | UInt32 | curveNumber | ) |
This method has to be used to switch from one curve to another one.
An interrupt is thrown if curve does not exist or exceeds the valid range.
curveNumber | Number of the curve to be switched to [1...999]. |
|
static |
Maximum value of irradiance: 2000.0 W/m2
|
static |
Upper limit of temperature range 120.0 degree Celsius
|
static |
Longest duration of a transition when switching between two curves, changing amplitude and or input scaling 86400.0 s
|
static |
Biggest duration of an irradiation transition 34500.0s
|
static |
Biggest duration of a temperature transition 34500.0s
|
static |
Smallest value of InputScaling 0.125 = 12.5%
percentage factor, used with AAP + SAS curves
|
static |
Lowest value of irradiance: 0.0 W/m2
|
static |
Lower limit of temperature range -100.0 degree Celsius
|
static |
Highest value of InputScaling 10.0 = 1000 %
percentage factor, used with AAP + SAS curves
|
static |
Shortest duration of a transition when switching between two curves, changing amplitude and or input scaling 0.001s
|
static |
Smallest duration of an irradiation transition 1.0 s
|
static |
Smallest duration of a temperature transition 1.0s