Global
Commissioning
The PfwLib_TempControl.lib library is divided into six main structures.
- ST_TcPfw_TempCtrlInput
This structure contains all linkable input variables. - ST_TcPfw_TempCtrlOutput
This structure contains all linkable output variables. - ST_TcPfw_TempMparamFromHmi_Itf
All machine parameters are stored in this structure. - ST_TcPfw_TempPparamFromHmi_Itf
All product parameters are stored in this structure. - ST_TcPfw_SupplyParam
Settings for PWM output are made in this structure. - ST_TcPfw_TempToHmi_Itf
This structure shows the current states of the temperature controller.
For successful commissioning of the temperature controller, the PfwLib_TempControl.lib library must be included in the project. The following steps must then be carried out:
Creating an instance of the function block FB_TempCtrlMainBody_TcPfw and declaring the variables
Variable | Short description | Example value |
---|---|---|
ConfigEnable | Signals the validity of the parameters. | TRUE |
Callback_Enable | Enables background communication with the I/O terminals. | TRUE |
Looptest_Enable | Activates the power monitoring of the heating tapes. | FALSE |
tCycle | Cycle time (A cycle time unequal to the mains frequency is recommended). | 0.025s |
Simu_Enable | Starting a simulation. | FALSE |
Simu_DisCharge | Reset simulation to initial value. | FALSE |
Simu_DisCharge | Reset simulation to initial value. | FALSE |
![]() | The temperature library contains two simulations:
|
Constant definition
Variable | Short description | Type | Example value |
---|---|---|---|
cnPfwTempCtrlFirst | Number of the first zone (usually 1). | INT | 1 |
cnPfwTempCtrlLast | Number of the last zone. | INT | 32 |
cnPfwAppSupplyFirst | Number of the first supply group. | INT | 1 |
cnPfwAppSupplyLast | Number of the last supply group. | INT | 3 |
cnPfwTempTrendFirst | cnPfwTempTrendFirst and cnPfwTempTrendLast specify the number of samples for trend acquisition. | INT | 1 |
cnPfwTempTrendLast | cnPfwTempTrendFirst and cnPfwTempTrendLast specify the number of samples for trend acquisition. | INT | 100 |
cnPfwTempTrend_sPH | Period value of the sampling time in ms. | INT |
|
cnPfwBoolOutSwapFirst | Initial index of the array out_SwappedDigitalOut. | INT | 1 |
cnPfwBoolOutSwapLast | End index of the array out_SwappedDigitalOut. | INT | 2 (When not in use) |
cnPfwBoolInSwapFirst | Initial index of the array in_SwappedDigitalIn. | INT | 1 |
cnPfwBoolInSwapLast | End index of the array in_SwappedDigitalIn. | INT | 2 (When not in use) |
cnPfwScopeSampleFirst | cnPfwScopeSampleFirst and cnPfwScopeSampleLast specify the number of samples for scope acquisition. | INT |
|
cnPfwScopeSampleLast | cnPfwScopeSampleFirst and cnPfwScopeSampleLast specify the number of samples for scope acquisition. | INT |
|
bPfw_UseTempControl | The feedback is active and thus the reading of actual values is possible. | BOOL | TRUE |
bPfw_UseRtScope | The acquisition of scope data is active. | BOOL | FALSE |
bPfw_UseTempTrend | The acquisition of trend data is active. | BOOL | FALSE |
cnst_pfw_selRelAlarm | Via a TRUE, the selected setpoint is used for the relative alarms. With a FALSE the internally ramped setpoint is used. | BOOL | FALSE |
cnPfwLoopTestTimer | Time in ms in which the power measurement measures. | LREAL | 0.4 s |
cnPfwLoopTestCycle | Time in ms which is available for the controller before the next zone is checked. | LREAL | 9.999 s |
cnst_PfwParamFilePath_CE | Folder path on a CE operating system. | STRING |
|
cnst_PfwParamFilePath_XP | Folder path on an XP/ Win7 operating system. | STRING |
|
cnst_PfwSubDir_Logging | Subfolder for log files. | STRING |
|
cnst_PfwSubDir_Product | Subfolder for product files. | STRING |
|
cnst_PfwSubDir_Machine | Subfolder for machine files. | STRING |
|
cnst_PfwSubDir_Supply | Subfolder for supply files. | STRING |
|
bPfw_UseEnergyRecording | Activation of a theoretical energy acquisition. | BOOL | FALSE |
bPfwRunOn_WinCE | A TRUE activates the folder path for a CE operating system. | BOOL | TRUE |
![]() | Please note that the constants of the timer as well as the alarm visualization must also be taken into account. |
![]() | A heating zone in this library is an actuator (Solid State Relay - SSR or contactor), one or more heating tapes and a temperature sensor. If a calculated temperature is regarded as an actual value, this must be done in the application. |
Sample project
The loading and saving of product and machine parameters as well as the general handling of the temperature library will be explained in more detail using the sample project. To start the application it is necessary to include the PfwLib_TempControl.lib and to adjust the path for saving and loading the parameters.