Twinno T4058 Скачать руководство пользователя страница 8

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) 

17

Keypad descriptions

Keypad operation tips:

Short Press: Short Press means to release the key immediately after pressing. ((Default to 
short presses if not indicated below)
Long Press: Long Press is to press the button for 3 seconds and then release it.
Press and hold: Press and hold means to press the button, and accelerate after a certain 
time until the data is adjusted to the user's required value before releasing the button.

Confirmation options

Enter menu setting mode

Return to previous menu

Long press to return the measurements screen

Menu setting mode: press this key to loop down the menu options

Value input mode: current bit value change (loop)

Press this key to move menu options right (circle) 

6

MENU

ESC

Содержание T4058

Страница 1: ...021 61621099 Web www twinno net Add Building 6 No 166 Mindong Road Pudong New District Shanghai China Post code 201209 T4058 Online Dissloved Ozone Analyzer Operating Manual Shanghai Chunye Instrument Technology Co Ltd Operating Manual 8 025mg L T4058 Dissloved Ozone ...

Страница 2: ...This instrument is not suitable for use in harsh environment high temperature low temperature or strong magnetic field interference which may lead to instrument damage ӹ If there is any problem with the instrument please contact the dealer or the company Do not disassemble the instrument by yourself If disassembled the company will no longer be responsible for the warranty Notes 23 Table of Conten...

Страница 3: ...curity when the following situations occur 1 Apparent damage to the analyzer 2 The analyzer does not work properly or provides specified measurements 3 The analyzer has been stored for a long time in an environment where the temperature exceeds 70 C The analyzer must be installed by professionals in accordance with relevant local specifications and instructions are included in the operation manual...

Страница 4: ...concentration to observe whether the meter works normally If the meter works normally the concentration of the measured medium may exceed the range 6 Measurements display results fluctuate greatly Possible causes Sensor wiring error or low display rate setting Solutions Check wiring or increase display rate appropriately FAQ 21 Technical Specifications Measurement range Measurement theory Resoluti...

Страница 5: ... 5 mm 3 92 5 mm 10 mm 120 mm Installation of back cover with waterproofing seal 98 mm 98 mm MENU ESC Package Set Product Description 1 T4058 Online Dissloved Ozone Analyzer 2 Instrument Installation Accessories 3 Operating Manual 4 Qualification Certificate Quantity 1 1 1 1 Note Please check the complete set of instruments before use The company s other series of analytical instruments please logi...

Страница 6: ...he instrument may be damaged or its service life may be reduced 3 When cleaning the plastic shell of the instrument please use a soft cloth and a soft cleaner to clean the shell Be careful not to let moisture enter the inside of the instrument 4 Check whether display data of the instrument is normal or not 5 Check whether the wiring on the terminal of the instrument is firm Pay attention to discon...

Страница 7: ...e Pow ACL 85 265V Pow AC N Pow PE 18 Read instruction mode The communication protocol adopts MODBUS RTU protocol The content and address of the communication can be changed according to the needs of customers The default configuration is network address 01 baud rate 9600 even check one stop bit users can set their own changes Function code 0x04 This function enables the host to obtain real time me...

Страница 8: ...lbyte0 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 valu...

Страница 9: ... 0001101 B 24 So the exponential part is 4 plus 127 it becomes 131 and its binary representation is 10000011B Step 3 Calculate the tail number After removing 1 before the decimal point of 1 0001101B the final number is 0001101B because before the decimal point must be 1 so IEEE stipulates that only the decimal point behind can be recorded For the important explanation of 23 bit mantissa the first ...

Страница 10: ...put register number high bytes Input register number low bytes Hexadecimal 0x10 0x00 0x01 0x00 0x02 Function code Start Address Register number 1 byte 2 byte 2 byte 0x10 0x0000 0xffff 1 123 0x7B Figure 13 Examples of writing multiple register request and response frames 8 Menu structure If the monitor prompts you to enter the calibration security password press the key or Ӝ key to set the calibrat...

Страница 11: ...unction code is used to read the continuous block content of the holding register of the remote device Request the PDU to specify the start register address and the number of registers Address registers from zero Therefore the addressing register 1 16 is 0 15 The register data in the response information is packaged in two bytes per register For each register the first byte contains high bits and ...

Страница 12: ...s function is used to calibrate the five calibration points of the sensor It has been calibrated before delivery and users can use it directly If calibration is required prepare 5 suitable standard liquids with known range press the MENU key to enter the setting mode and select the calibration point Modify or enter the corresponding calibration value After setting the calibration value press ENT k...

Страница 13: ...document Binary display suffix B for example 10001B decimal display without any prefix or suffix for example 256 Hexadecimal display prefix 0x for example 0x2A ASCII character or ASCII string display for example YL0114010022 Command Structure The MODBUS application protocol defines the Simple Protocol Data Unit PDU which is independent of the underlying communication layer Figure 1 MODBUS Protocol...

Отзывы: