A2: Various NC/PLC interface signals and functions
1.3 Functions
Basic Functions
Function Manual, 09/2011, 6FC5397-0BP40-2BA0
61
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.
• Singlebit 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 32bit 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 floatingpoint numbers is DOUBLE (64 bits) on the NCK, but only FLOAT (32 bits) on the PLC. The
format used for storage in the dualport RAM is FLOAT. Conversion takes place respectively before/after
storage in the dualport RAM.
If a read/write access is made from the NCK to a variable in the dualport 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)
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)
Block
number
Program code
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
Содержание SINUMERIK 828D Turning
Страница 34: ...Basic Functions 34 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...
Страница 146: ...A3 Axis Monitoring Protection Zones 2 6 Data lists Basic Functions 146 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...
Страница 328: ...F1 Travel to fixed stop 6 5 Data lists Basic Functions 328 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...
Страница 816: ...K2 Axis Types Coordinate Systems Frames 10 9 Data lists Basic Functions 816 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...
Страница 1198: ...P4 PLC for SINUMERIK 828D 14 6 Function interface Basic Functions 1198 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...
Страница 1752: ...Appendix 20 2 Overview Basic Functions 1752 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...
Страница 1774: ...Glossary Basic Functions 1774 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...