Codification – Gentec-EO S-LINK User Manual
Page 59
S-
LINK User’s Manual Revision 2.4
54
8.1.2 CODIFICATION
JOULEMETER MODE
In Joulemeter Mode, the codification is unsigned. To get the measurement in Joules, apply this formula:
Measurement in Joules = Current Scale * Codification in Decimal/4096
Example: For 151 mJ on the 300 mJ scale on Channel 1
The S-LINK will send you: 2040 HEX VALUE, where:
20 =
0
0
100000
The first bit (0) is for Channel #1
The second bit (0) is the order of the MSB
100000 is the MSB of the codification
40 =
0
1
001101
The first bit (0) is for Channel #1
The second bit (1) is for the order so this is the LSB of the codification
The Total Codification is 100000001101, which is 2061 in decimal (2061/4096 * 300mJ = 150.989 mJ)
WATTMETER MODE
In Wattmeter Mode, the codification is signed, so the third bit of the first byte is the sign. To get the
measurement in Watts, apply this formula:
Measurement in Watt = Current Scale *Value in Decimal/2048
Example 1: For 151 mW on the 300 mW scale on Channel 1
The S-LINK will send you: 1046 HEX VALUE, where:
10 =
0
0
0
10000
The first bit (0) is for Channel #1
The second bit (0) is the order of the MSB
The third bit is the sign
10000 is the MSB of the codification
46 =
0
1
000110
The first bit (0) is for Channel #1
The second bit (1) is for the order so this is the LSB of the codification
The Total Codification is 10000000110, which is 1030 in decimal (1030/2048 * 300mJ = 150.878 mJ)
Example 2: For -151 mW on the 300 mW scale off Channel 1
The S-LINK will send you: 3046 HEX VALUE, where:
30 =
0
0
1
10000
The first bit (0) is for Channel #1
The second bit (0) is the order of the MSB
The third bit is the sign
10000 is the MSB of the codification
46 =
0
1
000110
The first bit (0) is for Channel #1
The second bit (1) is for the order so this is the LSB of the codification
The Total Codification is -10000000110, which is -1030 in decimal (-1030/2048 * 300mJ = -
150.878mJ)