tcio  V3.74.00
Function description
Functions
TopCon Function Engine (TFE) and handling AAP-Slopes

Functions

DLL_RESULT TC4GetFnBlockAmplitudeAndInputScalingAct (unsigned int type, double *pAmplitudeAct, double *pInputScalingAct)
 Get amplitude and AAP input scale actual values of a selected function block (e.g. if ramps active)
DLL_RESULT TC4GetFnBlockAmplitudeAndInputScalingRef (unsigned int type, double *pAmplitudeRef, double *pInputScalingRef)
 Get amplitude and AAP input scale reference value of a selected function block (e.g. if ramps active)
DLL_RESULT TC4GetFnBlockSettings (struct T_FnBlock *p_fnblock, unsigned int type)
 Amplitude -, offset - and AAP-input-scaling.
DLL_RESULT TC4GetFnSeqActionResult (int *p_result)
 Check state of last started FnSeqAction (e.g. loading, storing, deleting funtion sequences)
DLL_RESULT TC4GetFnSeqMaxSupportedVersion (unsigned int *pMaxVersion)
 This function allows to check the possibilities of the different TFE versions.
DLL_RESULT TC4GetFnSeqSettings (struct T_FnSeq *p_fnseq)
 Read header information.
DLL_RESULT TC4GetFuncgenActiveRampsBitmask (unsigned int *pActiveRampsBitmask)
 Determine if any funcgen ramp is active.
DLL_RESULT TC4GetFuncgenRampTimeAct (unsigned int RampSelector, double *pRemainingSeconds)
 Ramp time definition.
DLL_RESULT TC4GetIsAnyFuncgenRampActive (unsigned int *pIsActive)
 Determine if any funcgen ramp is active.
DLL_RESULT TC4SetFnBlockAmplitudeAndInputScalingRef (unsigned int type, double AmplitudeRef, double InputScalingRef)
 Set amplitude and AAP input scale reference value of a selected function block (e.g. if ramps active) Not passible if calculated SAS curve active.
DLL_RESULT TC4SetFnBlockSettings (struct T_FnBlock *p_fnblock, unsigned int type)
 Amplitude -, offset - and AAP-input-scaling.
DLL_RESULT TC4SetFnBlockUserDataStartAddr (unsigned int type)
 Storing user-defined AAP values
After copying of settings to flash, the slope values have to be stored also. The values are copied into flash memory. In order to provide empty space on reserved locations, the function TC4SetFnSeqActionStore does it.
DLL_RESULT TC4SetFnSeqActionLoad (unsigned int SeqNr)
 Loading a slope.
DLL_RESULT TC4SetFnSeqActionStore (unsigned int SeqNr, int copyUserData)
 Transfer of settings into flash.
DLL_RESULT TC4SetFnSeqCommand (unsigned int cmd)
 Start / Stop of a function sequence.
DLL_RESULT TC4SetFnSeqHeader (struct T_FnSeqHeader *p_header)
 Storing header information.
DLL_RESULT TC4SetFnSeqMaxUserCompatibleVersion (unsigned int MaxUserVersion)
 This function allows to check the possibilities of the different TFE versions.
DLL_RESULT TC4SetFnSeqSettings (struct T_FnSeq *p_fnseq)
 Storing header information.
DLL_RESULT TC4SetFuncgenRampTime (double p_ramptime)
 Ramp time definition.
DLL_RESULT TC4SetNextUserAAPData (unsigned int type, int *pInput, int *pAmplitude, unsigned int maxAmplitude, unsigned int writeSize)
 This function ist used to store user-defined AAP values into non-volatile flash memory.

Detailed Description

These functions belong to the TopCon Function Engine (internal function generator).


Function Documentation

DLL_RESULT TC4GetFnBlockAmplitudeAndInputScalingAct ( unsigned int  type,
double *  pAmplitudeAct,
double *  pInputScalingAct 
)

Get amplitude and AAP input scale actual values of a selected function block (e.g. if ramps active)

Parameters:
[in]typeselect the function block:
0: voltage
1: current
2: power
[out]pAmplitudeActphysical value of selected block type
[out]pInputScalingActas normalized vales 0.125 to 10.0 in percentage from 12.5% to 1000.0%
See also:
chapter Compatibility of TopCon Function Engine (TFE) and handling AAP-Slopes (function generator) functionality in the tcio documentation.
Returns:
DLL_SUCCESS for success or DLL_FAIL or other value if an error occurs
DLL_RESULT TC4GetFnBlockAmplitudeAndInputScalingRef ( unsigned int  type,
double *  pAmplitudeRef,
double *  pInputScalingRef 
)

Get amplitude and AAP input scale reference value of a selected function block (e.g. if ramps active)

Parameters:
[in]typeselect the function block:
0: voltage
1: current
2: power
[out]pAmplitudeRefphysical value of selected block type
[out]pInputScalingRefas normalized vales 0.125 to 10.0 in percentage from 12.5% to 1000.0%
See also:
chapter Compatibility of TopCon Function Engine (TFE) and handling AAP-Slopes (function generator) functionality in the tcio documentation.
Returns:
DLL_SUCCESS for success or DLL_FAIL or other value if an error occurs
DLL_RESULT TC4GetFnBlockSettings ( struct T_FnBlock *  p_fnblock,
unsigned int  type 
)

Amplitude -, offset - and AAP-input-scaling.

Parameters:
[out]p_fnblock
[in]type
See also:
chapter Compatibility of TopCon Function Engine (TFE) and handling AAP-Slopes (function generator) functionality in the tcio documentation.
Returns:
DLL_SUCCESS for success or DLL_FAIL or other value if an error occurs
DLL_RESULT TC4GetFnSeqActionResult ( int *  p_result)

Check state of last started FnSeqAction (e.g. loading, storing, deleting funtion sequences)

Parameters:
[out]p_result1: Unit busy, action not finished yet
0: Action completed, no errors
<0: Error while execution of action:
-1: Timeout during reading from flash
-2: Flash location not empty
-3: Sequence number doesn't exist
-4: Flash full - erase some unused slopes
-5: Requested action does not exist
-6: No function sequence avalable
-7: TCLIN is not responding
-8: Wrong context (precondition of requested action not fulfilled)
-9: Wrong version (action could not be executed because of an internel version conflict)
-10: Tried to confirm "DeleteAllFromFlash"-action after internal timeout (1s)
-11: Error on deleting all funcion sequences from flash
-12: Invalid internal header detected, execution aborted to ensure data consistency
-99: Reserved for internal porposes
-100: overall timeout
Note:
After loading, the internal structures T_FnSeqHeader, T_FnSeq und T_FnBlock are set with the new data values.
Returns:
DLL_SUCCESS for success or DLL_FAIL or other value if an error occurs
DLL_RESULT TC4GetFnSeqMaxSupportedVersion ( unsigned int *  pMaxVersion)

This function allows to check the possibilities of the different TFE versions.

Parameters:
[out]pMaxVersion
See also:
chapter Compatibility of TopCon Function Engine (TFE) and handling AAP-Slopes (function generator) functionality in the tcio documentation.
Returns:
DLL_SUCCESS for success or DLL_FAIL or other value if an error occurs
DLL_RESULT TC4GetFnSeqSettings ( struct T_FnSeq *  p_fnseq)

Read header information.

Parameters:
[out]p_fnseq
See also:
chapter Compatibility of TopCon Function Engine (TFE) and handling AAP-Slopes (function generator) functionality in the tcio documentation.
Returns:
DLL_SUCCESS for success or DLL_FAIL or other value if an error occurs
DLL_RESULT TC4GetFuncgenActiveRampsBitmask ( unsigned int *  pActiveRampsBitmask)

Determine if any funcgen ramp is active.

Parameters:
[out]pActiveRampsBitmask0…3 Voltage, 0=Amplitude, 1=Offset, 2=InputScaling, 3=OutputTransistion
4…7 Current, 4=Amplitude, 5=Offset, 6=InputScaling, 7=OutputTransistion
8…11 Power, 8=Amplitude, 9=Offset, 10=InputScaling, 11=OutputTransistion
See also:
chapter Compatibility of TopCon Function Engine (TFE) and handling AAP-Slopes (function generator) functionality in the tcio documentation.
Returns:
DLL_SUCCESS for success or DLL_FAIL or other value if an error occurs
DLL_RESULT TC4GetFuncgenRampTimeAct ( unsigned int  RampSelector,
double *  pRemainingSeconds 
)

Ramp time definition.

Parameters:
[in]RampSelector0…3 Voltage, 0=Amplitude, 1=Offset, 2=InputScaling, 3=OutputTransistion
4…7 Current, 4=Amplitude, 5=Offset, 6=InputScaling, 7=OutputTransistion
8…11 Power, 8=Amplitude, 9=Offset, 10=InputScaling, 11=OutputTransistion
12: SAS Irradiance
13: SAS Temperature
[out]pRemainingSecondstime in seconds
See also:
chapter Compatibility of TopCon Function Engine (TFE) and handling AAP-Slopes (function generator) functionality in the tcio documentation.
Returns:
DLL_SUCCESS for success or DLL_FAIL or other value if an error occurs
DLL_RESULT TC4GetIsAnyFuncgenRampActive ( unsigned int *  pIsActive)

Determine if any funcgen ramp is active.

Parameters:
[out]pIsActive
See also:
chapter Compatibility of TopCon Function Engine (TFE) and handling AAP-Slopes (function generator) functionality in the tcio documentation.
Returns:
DLL_SUCCESS for success or DLL_FAIL or other value if an error occurs
DLL_RESULT TC4SetFnBlockAmplitudeAndInputScalingRef ( unsigned int  type,
double  AmplitudeRef,
double  InputScalingRef 
)

Set amplitude and AAP input scale reference value of a selected function block (e.g. if ramps active) Not passible if calculated SAS curve active.

Parameters:
[in]typeselect the function block:
0: voltage
1: current
2: power
[in]AmplitudeRefphysical value of selected block type
[in]InputScalingRefas normalized vales 0.125 to 10.0 in percentage from 12.5% to 1000.0%
Note:
prior this function call the function TC4SetFuncgenRampTime to set the transition time to enter the new reference values
See also:
chapter Compatibility of TopCon Function Engine (TFE) and handling AAP-Slopes (function generator) functionality in the tcio documentation.
Returns:
DLL_SUCCESS for success or DLL_FAIL or other value if an error occurs
DLL_RESULT TC4SetFnBlockSettings ( struct T_FnBlock *  p_fnblock,
unsigned int  type 
)

Amplitude -, offset - and AAP-input-scaling.

Parameters:
[in]p_fnblock
[in]type
See also:
chapter Compatibility of TopCon Function Engine (TFE) and handling AAP-Slopes (function generator) functionality in the tcio documentation.
Returns:
DLL_SUCCESS for success or DLL_FAIL or other value if an error occurs
DLL_RESULT TC4SetFnBlockUserDataStartAddr ( unsigned int  type)

Storing user-defined AAP values
After copying of settings to flash, the slope values have to be stored also. The values are copied into flash memory. In order to provide empty space on reserved locations, the function TC4SetFnSeqActionStore does it.

Parameters:
[in]typeDefines the assignment of data to a function block:
0: voltage
1: current
2: power
Note:
Use this function to prepare the type of the data to storing.
See also:
The function TC4SetFnSeqActionStore, TC4SetNextUserAAPData
Returns:
DLL_SUCCESS for success or DLL_FAIL or other value if an error occurs
DLL_RESULT TC4SetFnSeqActionLoad ( unsigned int  SeqNr)

Loading a slope.

Parameters:
[in]SeqNrSequence number of the new datasetValue range: 1..1000
Note:
The DLL call returns immediately even if the slope has not been completely loaded. In order to check for the state of loading action, use the this DLL-function.
Returns:
DLL_SUCCESS for success or DLL_FAIL or other value if an error occurs
DLL_RESULT TC4SetFnSeqActionStore ( unsigned int  SeqNr,
int  copyUserData 
)

Transfer of settings into flash.

Parameters:
[in]SeqNrSequence number of the stored slope
[in]copyUserDataThis value has to be set to 0
Note:
This function stores the settings of
  • TC4SetFnSeqHeader
  • TC4SetFnSeqSettings
  • TC4SetFnBlockSettings
    into flash memory.
After calling this function the copy process will start immediately. Also reserves the necessary space in flash.
See also:
In order to check whether the storing process has already finished, use the TC4GetFnSeqActionResult function
Returns:
DLL_SUCCESS for success or DLL_FAIL or other value if an error occurs
DLL_RESULT TC4SetFnSeqCommand ( unsigned int  cmd)

Start / Stop of a function sequence.

Parameters:
cmdValid values:
1: stop Stops the function sequence
2: start Starts function sequence from beginning
3: pause Pauses the execution of the function sequence
4: resume continues the execution of the function sequence (if paused)
Attention:
DLL version V3.00.00 or greater required.
Note:
With firmware versions V4.11.44 and older only the start command is supported.
Other commands will be ignored.
If paused the actual function value is stored and the execution is stopped.
Returns:
DLL_SUCCESS for success or DLL_FAIL or other value if an error occurs
DLL_RESULT TC4SetFnSeqHeader ( struct T_FnSeqHeader *  p_header)

Storing header information.

Parameters:
[in]p_header
See also:
chapter Compatibility of TopCon Function Engine (TFE) and handling AAP-Slopes (function generator) functionality in the tcio documentation.
Returns:
DLL_SUCCESS for success or DLL_FAIL or other value if an error occurs
DLL_RESULT TC4SetFnSeqMaxUserCompatibleVersion ( unsigned int  MaxUserVersion)

This function allows to check the possibilities of the different TFE versions.

Parameters:
[in]MaxUserVersion0: first Version
1: additional FnBlock for AAP-Flags
2: additional FnBlock for AAP-Input-Scaling (std.)
3: user knows header extension version (for SAS-Option only)
See also:
chapter Compatibility of TopCon Function Engine (TFE) and handling AAP-Slopes (function generator) functionality in the tcio documentation.
Returns:
DLL_SUCCESS for success or DLL_FAIL or other value if an error occurs
DLL_RESULT TC4SetFnSeqSettings ( struct T_FnSeq *  p_fnseq)

Storing header information.

Parameters:
[in]p_fnseq
See also:
chapter Compatibility of TopCon Function Engine (TFE) and handling AAP-Slopes (function generator) functionality in the tcio documentation.
Returns:
DLL_SUCCESS for success or DLL_FAIL or other value if an error occurs
DLL_RESULT TC4SetFuncgenRampTime ( double  p_ramptime)

Ramp time definition.

Parameters:
[in]p_ramptimein [s]
See also:
chapter Compatibility of TopCon Function Engine (TFE) and handling AAP-Slopes (function generator) functionality in the tcio documentation.
Returns:
DLL_SUCCESS for success or DLL_FAIL or other value if an error occurs
DLL_RESULT TC4SetNextUserAAPData ( unsigned int  type,
int *  pInput,
int *  pAmplitude,
unsigned int  maxAmplitude,
unsigned int  writeSize 
)

This function ist used to store user-defined AAP values into non-volatile flash memory.

Parameters:
[in]typeIdentical to type-value of DLL function TC4SetFnBlockUserDataStartAddr
0: voltage
1: current
2: power
[in]pInputAAP-input value (voltage, current, power, depending on AAP_Input_Type)
All values normalized to system nominal data.
If AAPInputType:
0: 4000 equals system nominal voltage
1: 4000 equals system nominal current
2: 4000 equals system nominal power
See also the discription of Structure T_FnBlock
[in]pAmplitudeAmplitude value (voltage, current power according to type) Use normalized values (0…4000)
If type:
0: 4000 equals system maximum voltage
1: 4000 equals system maximum current
2: 4000 equals system maximum power
[in]maxAmplitudeMaximum value of all user-defined amplitudes of the used function block.
Use normalized values (0…4000) - Calculate like pAmlitude above.
See also the discription of Structure T_FnBlock
[in]writeSizeValue range:
1..8 up to 8 data points may be stored per one DLL-call.
If value is between 2..8, pInput and pAmplitude will be treated as an array with the size of writeSize.
If more than the writeSize values need to be saved, use this DLL-function repeatedly.
Example
Number of data points (UserDefNumPoints) = 20
1) Call DLL-function 20 times (once for each point) with writeSize = 1 or
2) Call DLL-function 2 times with writeSite = 8 und once with writeSize = 4
Precondition:
- The function TC4SetFnSeqActionStore must be called before.
  • After that the function TC4SetFnBlockUserDataStartAddr must be called.
  • Now the DLL and the device are ready for the function described here (one or more times, as necessary).
    Note:
    According to writeSize, the function has to be called once or several times.
    If attempting to store more values as previously defined in (UserDefNumPoints), the function will return DLL-FAIL and the actual function call has no effect. In this case call the DLL function again with the correct setting of writeSize value. If more than 1 function block with user-defined data does exist, the next block may now be stored by calling the DLL again but keep attention to use a different type value.
    After completion of data storage, the function sequence is ready to use.
    Returns:
    DLL_SUCCESS for success or DLL_FAIL or other value if an error occurs