![Twinno T6000 Operating Manual Download Page 7](http://html1.mh-extra.com/html/twinno/t6000/t6000_operating-manual_1184527007.webp)
Instrument connection
Power
connection
V+
V-
A1
B1
V+
V-
A2
B2
Cur1
Com
Cur2
A3
B3
G
TX
RX
P+
P-
NO1 COM
NO2 COM
NO3 COM
AC L
AC N
PE
Temp
Temp
CELL1
CELL2
CELL3
CELL4
Ref1
Input1
Temp1
Temp1
SEN-
SEN+
Ref2
Input2
Temp2
Temp2
GND
CE
RE
WE
Temperature sensor input
Temperature sensor input
Conductivity sensor input 1
Conductivity sensor input 2
Conductivity sensor input 3
Conductivity sensor input 4
pH measurement 1
pH reference 1
Temperature 1
Temperature 1
DO /Membrane residual chlorine sensor-
DO /Membrane residual chlorine
pH measurement 2
pH reference 2
Temperature 2
Temperature 2
Grounding (for testing)
Residual chlorine
Residual chlorine
Residual chlorine
Digital input channel 1
Digital input channel 1
Digital input channel 1
Digital input channel 1
Digital input channel 2
Digital input channel 2
Digital input channel 2
Digital input channel 2
Analog output 1
Analog output common
Relay B
Digital RS485 output
Digital RS485 output
Digital RS232 output
Digital RS232 output
Digital RS232 output
Power input 9~36VDC
Power input 9~36VDC
Relay 1
Relay 2
Relay 3
Live wire
Neutral wire
Earth wire
5
Electrical connection
Connection between instrument and pH or ORP sensors: Connection of power supply, output
signal, relay contacts and instrument baseplate. The cable length of sensors is usually 5-10
meters. There are labeled inserts at the end of the cable, which can be inserted into the terminal
with the same digital symbols on the instrument roof and tightened.
18
If it is large-end storage mode, after executing the above statement,
the data stored in outdata of address unit is 0x41
O 1 stores data as 0x8D
address unit (o 2) stores data as 0x00
address unit (o 3) stores data as 0x00
2. If the compiler used by the user does not implement the library function of this function, the
following functions can be used to achieve this function:
void memcpy(void *dest,void *src,int n)
{
char *pd = (char *)dest; char *ps = (char *)src;
for(int i=0;i<n;i++) *pd++ = *ps++;
}
And then make a call to the above memcpy(outdata,&floatdata,4);
Example: Compile binary floating-point number 0100 0010 0111 1011 0110 0110 0110 10B to
decimal number
Step 1: Divide the binary floating-point number 0100 0010 0111 1011 0110 0110 0110B into symbol
bit, exponential bit and mantissa bit.
0 10000100 11110110110011001100110B
1-bit sign + 8-bit index + 23-bit tail sign bit S: 0 denotes positive number
Index position E
:
10000100B =
1×2
7
+0×2
6
+0×2
5
+0×2
4
+ 0 × 2
3
+1×2
2
+0×2
1
+0×2
0
=128+0+0+0+0+4+0+0=132
Mantissa bits M
:
11110110110011001100110B =8087142
Step 2: Calculate the decimal number
D = (
−
1)
𝑆
×(1.0 + M/2
23
)×2
𝐸
−
127
= (
−
1)
0
×(1.0 + 8087142/2
23
)×2
132
−
127
= 1×1.964062452316284×32
= 62.85
Reference Code:
float floatTOdecimal(long int byte0, long int byte1, long int byte2, long int byte3)
{ long int realbyte0,realbyte1,realbyte2,realbyte3; char S;
long int E,M;
float D;
realbyte0 = byte3; realbyte1 = byte2; realbyte2 = byte1; realbyte3 = byte0;
if((realbyte0&0x80)==0)
{ S = 0;//positive number }
else { S = 1;//negative number }
E = ((realbyte0<<1)|(realbyte1&0x80)>>7)-127;
M = ((realbyte1&0x7f) << 16) | (realbyte2<< 8)| realbyte3;
D = pow(-1,S)*(1.0 + M/pow(2,23))* pow(2,E);
return D; }
Function description: parameters byte0, byte1, byte2, byte3 represent 4 bytes of binary floating point
number
(
The decimal number converted from the return value
For example, the user sends the command to get the temperature value and dissolved oxygen value
to the probe. The4 bytes representing the temperature value in the received response frame are 0x00,
0x00, 0x8d and 0x41. Then the user can get the decimal number of the corresponding temperature
value through the following call statement.
That is temperature = 17.625.
float temperature = floatTOdecimal( 0x00, 0x00, 0x8d, 0x41)