MCO 305 Befehlsreferenz
Abbildungen
Offset (Bytes)
Offset (Bytes)
CodeVersion >= 5
CodeVersion < 5
0
0
COD_VERSION (0)
2
1
CodeVersion
4
2
COD_PRGHDR (119 / 0x77) - (0x77 0x00) (CodeVersion >= 5)
6
3
Size of Header information in Bytes
8
5
MaxVars (number of Variables defined in Aposs + 20)
10
7
Stacksize (size of stack defined in Aposs)
12
9
First command of the application program
14
10
........... more code .............
...
...
...............
n
n
COD_ENDE (127 / 0x7F) - (0x00 0x7F) (CodeVersion >= 5)
0
0
Filename[0] - 1st character of file name (s = strlen)
1
1
Filename[1] - 2nd character of filename
..
..
more characters
s-1
s-1
Filename[s-1] - last character of fname
s
s
Filename[s] - terminating \0 character
?
?
Extra \0 if length of filename was odd
0
0
FirmwareVersion (long - 4 bytes)
4
4
Minfw (Minimum Firmware Version) (long 4 - bytes)
8
8
Cmpvers (Compiler Version) (long 4 - bytes)
12
12
filtime.dwHighDateTime (long 4 - bytes)
16
16
filtime.dwLowDateTime (long 4 - bytes)
20
20
InfoSize (in bytes) - l(long 4 bytes -- PC notation, LSB first)
24
24
0x55FF44EE - marks end of information section (LSB first)
All longs in the info section are in PC notation which means LSB first.
All longs in other sections are MSB first, for Codeversion < 7 which means firmware < 6.7.0
For firmware >= 6.7.01 Codeversion 7 is used and the Integers are ordered corresponding to the CPU.
That means MSB first for Motorola and LSB first for DSP.
162
__ Anhang __
Illustrations: Bin File Map (Compiler >= 6.7.0)
®
MG.34.R1.03 – VLT
ist ein eingetragenes Warenzeichen von Danfoss.
CodeVersion is as follows
2 - firmware < 6.04.00 exesize had to be smaller than 65000
3 - firmware < 6.06.00
4 - new fp commands and optimizing commands
5 - firmware < 6.06.00 - commands and parameters are always 2 bytes , all jumps are
4 bytes.
6 - firmware >= 6.06.00 - firmware supports new posints and posintio (axes specific)
OnStatbit does support axes now.
This section is only present (for compatibility with old versions) if MaxVars > 112.
This number is calculated as 92 + 20, where 92 is the number of variables in old
controllers and 20 is the number of temporary registers. This number was fix in old
controllers. And those controllers do not understand the PRGHDR command.
Size of program header in bytes including command and sizeinfo.
7 - for CodeVersion < 5
8 - for CodeVerision >= 5 (all commands are now 2 bytes)
Since version 6.06.00 (Codeversion >= 5) all commands
and parameters have at least 2 bytes. Therefore the end of
a program looks like 0x7f 0x00 now.
The complete filename is appended. The size of this block
is always even. There may be two \0 at the end if
necessary.
a number like 60650 means 6.06.50
minimum firmware version required for binary program
Compiler version used to produce binary code (i.e. 60520 means 6.05.20)
"File time" is the number of 100-nanosecond intervals that have elapsed
since 12:00AM, January 1, 1601 (UTC). This can be converted back to a
"nice" local time using the functions FileTimeToSystemTime() and
SystemTimeToTzSpecificLocalTime().
Size of info section - at the moment this is (s+1+20 or s+2+20)
BinFileMap_6_5.vsd
2009-08-31-bi