beautypg.com

Burkert Type SE56 User Manual

Page 50

background image

TECHNICAL MANUAL

Rev.

Pagine

50/52

Filling By

Checked By

03

PROFIBUS DP MODULE- DATA LINK

DESCRIPTION

Document Data

Date

Date

File name

ProfibusDP_emanual_Burkert_04.doc

19/03/08 19/03/08 19/03/08


50

Acyclic Index Write = 101(dec) Setting the value of the High Warning Threshold for the Flow
rate Control with Diagnostic and Alarm

bytes 0-3: High Warning Threshold (32 bit single precision IEEE floating point, MSB first) Flow rate in

technical unit

Acyclic Index Write = 102(dec) Setting the value of the Low Warning Threshold for the Flow
rate Control with Diagnostic and Alarm

bytes 0-3: Low Warning Threshold (32 bit single precision IEEE floating point, MSB first) Flow rate in

technical unit


Acyclic Index Write = 103(dec) Setting the value of the Low Alarm Threshold for the Flow rate

Control with Diagnostic and Alarm

bytes 0-3: Low Alarm Threshold (32 bit single precision IEEE floating point, MSB first) Flow rate in technical

unit


4.1 PROGRAMMING ALGORITHMS

The following algorithms can be applied to IBM™ compatible personal computers. The programs

demonstrated are written in BASIC and are supplied as examples only. The program lines are highlighted in

bold face and the comments are in italics.

4.2 NUMERICAL CONVERSION OF THE DATA RECEIVED

The numerical data contained in the blocks received must be concerted into a format compatible with the PC

format. The arrangement of bytes used to represent numerical values in IBM™ compatible PCs is in fact

inverted with respect to the one in the data received. The following programs illustrate several of the ways

that can be used for these conversions.

We presume that there are bytes to convert in the variable - type Bytes$ string.

· Converting a byte or a group of

ASCII characters: no conversion is necessary, the data are already in the

exact order and format.

· Converting

a

16 bit signed word: Bytes contains the two bytes that constitute the 16 bit number to

convert. One 16 bit signed word can represent values from -32768 to 32767. The instructions to use may be
the following:

NumIntSgn%=CVI(MID$(Bytes$,2,1)+MID$(Bytes$,1,1))

· Converting

a

16 bit unsigned word: Bytes contains the two bytes that constitute the 16 bit number to

convert. One 16 bit unsigned word can represent values from 0 to 65535. Not all BASIC versions can

correctly manage this type of variable; we therefore recommend assigning the converted value to a long
integer 32 bit type variable or to a single precision floating point. The instructions to use (for the long

integer) are:

NumInt&=CVL(MID$(Bytes$,2,1)+MID$(Bytes$,1,1)+ CHR$(0)+CHR$(0))

· Converting a 32 bit long integer: Bytes contains the four bytes that constitute the 32 bit number to convert.

A 32 bit integer may represent values from -2147483648 to 2147483647. The instructions to use may be the

following:

NumInt&=CVL(MID$(Bytes$,4,1)+MID$(Bytes$,3,1)+MID$(Bytes$,2,1)+MID$(Bytes$,1,1))