EasyManuals Logo

Siemens MCP 398C Function Manual

Siemens MCP 398C
2184 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #42 background imageLoading...
Page #42 background image
Detailed description
2.2 Functions
Basic logic functions: Various NC/PLC interface signals and functions (A2)
36 Function Manual, 11/2006, 6FC5397-0BP10-2BA0
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)
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
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)
Example
A WORD is to be transferred from the PLC to the NC.
The position offset within the NCK input (PLC output area) should be the fourth byte. The
position offset must be a whole-number multiple of the data width.
Writing from PLC:
Program code (extract) Comment
. . .
CALL FC21 (
Enable :=M10.0,
;if TRUE, then FC21 active
Funct :=B#16#4,
S7Var :=P#M 104.0 WORD1,
IVAR1 :=04,
IVAR2 :=-1,
Error :=M10.1,
ErrCode :=MW12);
. . .
)

Table of Contents

Other manuals for Siemens MCP 398C

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens MCP 398C and is the answer not in the manual?

Siemens MCP 398C Specifications

General IconGeneral
BrandSiemens
ModelMCP 398C
CategoryControl Systems
LanguageEnglish

Related product manuals