EasyManua.ls Logo

Siemens SIMATIC S7-1200 - Page 759

Siemens SIMATIC S7-1200
1614 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
Loading...
Technology instructions
10.3 Motion control
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
759
The MC_ReadParam instruction works on an enable behavior. As long as the input "Enable"
is true the instruction reads the specified "Parameter" to the "Value" storage location.
The "MotionStatus" "Position" value updates at each Cycle Control Point (CCP) based upon
the current HSC value.
The "MotionStatus" "Velocity" value is the command velocity at the end of the current
segment (updated ~10ms). The MC_ReadParam can also read this value.
If an error occurs, the instruction switches to an error state that can only be reset by a new
rising edge at the input "Enable".
Table 10- 81 Parameters for the MC_ReadParam instruction
Parameter and type
Data type
Description
ENABLE
IN
Bool
Start the instruction. Default value: FALSE
PARAMETER IN Variant Pointer to the TO-parameter that is to be read
VALID
OUT
Bool
If TRUE, the value has been read. Default value: FALSE
BUSY
OUT
Bool
If TRUE, the instruction is operating. Default value: FALSE
ERROR
OUT
Real
If TRUE, an error occurred. Default value: FALSE
ERRORID
OUT
Word
ID of the error. Default value: 0
ERRORINFO
OUT
Word
Related information to the ERRORID. Default value: 0
VALUE
INOUT
Variant
Pointer to the location where the read value is stored
Table 10- 82 Condition codes for ERRORID and ERRORINFO
ERRORID
(W#16#...)
ERRORINFO
(W#16#...)
Description
0
0
Successful read of a parameter
8410
0028
Invalid parameter (incorrect length)
8410
0029
Invalid parameter (no TO-DB)
8410
0030
Invalid parameter (not readable)
8411
0032
Invalid parameter (wrong value)
TO parameters
The axis "MotionStatus" consists of four values. You will want to monitor changes in these
values, which can be read while the program is running:
Variable name
Data type
Readable through
MC_ReadParam
MotionStatus:
Structure
No
Position
REAL Yes
Velocity
REAL Yes
Distance
REAL Yes
TargetPosition
REAL Yes

Table of Contents

Other manuals for Siemens SIMATIC S7-1200

Related product manuals