// Declaration Part PROGRAM MAIN VAR fbXtsEnvironment : FB_TcIoXtsEnvironment; stXtsEnvironmentConfiguration : ST_XtsEnvironmentConfiguration; nEnvironmentState : INT:=1; END_VAR
//----------------------------------------------------------------------------------------------------
// Programm Part CASE nEnvironmentState OF
1: //Enable init items //Enable init Info Server if needed stXtsEnvironmentConfiguration.bEnableInitInfoServer := TRUE;
//Enable init CA Group if needed stXtsEnvironmentConfiguration.bEnableInitCaGroup := TRUE;
//Set configuration of XtsUtility init fbXtsEnvironment.P_XtsEnvironmentConfiguration := stXtsEnvironmentConfiguration;
//Next Step nEnvironmentState:=2;
2://Init //Start init IF fbXtsEnvironment.Init(TRUE) THEN //Stop init fbXtsEnvironment.Init(FALSE);
//Next Step nEnvironmentState:=3; END_IF
3: //Check if init succeeded //Check IsInitialized property IF fbXtsEnvironment.P_IsInitialized THEN
//Next Step nEnvironmentState:=4; END_IF
4: //Init done ;
END_CASE
|