Jetter AG
Identification and Configuration | 7
User Manual – JetControl 365MC
74 / 148
Updating the OS from within the application program
The file functions included in the STX language scope let you carry out a pro-
gram-controlled OS update from an OS file for a JX2 module connected to the
JX2 system bus, or for a JX3 module connected to the JX3 system bus.
Performing the
update
ü
An OS file for the module is available in the file system of the controller.
ü
The operating system of the controller and the application program are run-
ning.
ü
The controller has initialized the system bus including the connected modules
without errors.
ü
Make sure the controller remains energized during the operating system up-
date.
ü
The modules are and remain switched on.
1.
Copy the operating system file into a file with any name and the file extension
*.os
in the directory
/System/
JX2
-Slave/OS/
, or
/System/
JX3
-Module/OS/
2.
If you want to update other modules, repeat step 1.
3.
To activate the updated OS, for example by writing to the system command
register, re-boot the controller.
STX program
Var
SourceName:
String
[
100
];
DestinationName:
String
[
100
];
UpdateIt:
Bool
;
End_Var
;
//*****************************************************
// Name: OSupdate
// 1. Enable tracing in
JetSym
// 2. Sett the name of the source file in 'SourceName'
// 3. Setting the name of the target file in 'DestinationName'
// 4. Sett the flag 'UpdateIt'
//*****************************************************
Task
OSupdate
Autorun
Var
ResCopy: Int;
End_Var
;
Loop
UpdateIt :=
False
;
When
UpdateIt
Continue
;
ResCopy := FileCopy(SourceName,
DestinationName);
Trace(
'Result : '
+ IntToStr(ResCopy) +
'$n'
);
End_Loop
;
End_Task
;