Siemens SINUMERIK 828D Function Manual page 61

Hide thumbs Also See for SINUMERIK 828D:
Table of Contents

Advertisement

Supplementary conditions
The user's programming engineer (NCK and PLC) is responsible for organizing the DPR memory area. No
checks are made for inconsistencies in the configuration.
A total of 1024 bytes are available in the input and output directions.
Single­bit operations are not supported and must be linked back to byte operations by the user (programming
engineer).
Since the contents of variables are manipulated directly in the communications buffer, the user must
remember that intermediate changes in values occur as a result of multiple access operations where a
variable is evaluated several times or when variables are linked (i.e. it may be necessary to store values
temporarily in local variables or R parameters or to set up a semaphore).
The user's programming engineer is responsible for coordinating access operations to the communications
buffer from different channels.
Data consistency can be guaranteed only for access operations up to 16 bits (byte and word). The user's
programming engineer is responsible for ensuring consistent transmission of 32­bit variables (double and
real). A simple semaphore mechanism is provided in the PLC for this purpose.
The PLC stores data in 'Little Endian' format in the DPR.
Values transferred with $A_DBR are subject to data conversion and hence to loss of accuracy. The data
format for floating­point numbers is DOUBLE (64 bits) on the NCK, but only FLOAT (32 bits) on the PLC. The
format used for storage in the dual­port RAM is FLOAT. Conversion takes place respectively before/after
storage in the dual­port RAM.
If a read/write access is made from the NCK to a variable in the dual­port RAM, the conversion is performed
twice. It is impossible to prevent differences between read and written values because the data are stored in
both formats.
Example
Bypassing the problem by means of comparison on "EPSILON" (minor deviation)
Block
Program code
number
N10
DEF REAL DBR
N12
DEF REAL EPSILON = 0.00001
N20
$A_DBR[0]=145.145
N30
G4 F2
N40
STOPRE
N50
DBR=$A_DBR[0]
N60
IF ( ABS(DBR/145.145-1.0) < EPSILON ) GOTOF ENDE
N70
MSG ( "error" )
N80
M0
N90
END:
N99
M30
Activation
The maximum number of simultaneously writable output variables is adjustable via:
MD28150 $MC_MM_NUM_VDIVAR_ELEMENTS (number of elements for writing PLC variables)
Basic Functions
Function Manual, 09/2011, 6FC5397-0BP40-2BA0
A2: Various NC/PLC interface signals and functions
1.3 Functions
61

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840d sl

Table of Contents