Mc_Readparam Instruction (Read Parameters Of A Technology Object) Instruction - Siemens S7-1200 System Manual

Hide thumbs Also See for S7-1200:
Table of Contents

Advertisement

Technology instructions
9.3 Motion control
9.3.5.13

MC_ReadParam instruction (read parameters of a technology object) instruction

You use the MC_ReadParam instruction to read a select number of parameters that indicate
the current position, velocity, and so forth of the axis defined in the Axis input.
Table 9- 53
MC_ReadParam instruction
LAD / FBD
STEP 7 automatically creates the DB when you insert the instruction.
1
In the SCL example, "MC_ReadParam_DB " is the name of the instance DB.
2
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 9- 54
Parameters for the MC_ReadParam instruction
Parameter and type
ENABLE
PARAMETER
VALID
BUSY
ERROR
ERRORID
ERRORINFO
VALUE
480
SCL
"MC_ReadParam_DB"(
Enable:=_bool_in_,
Parameter:=_variant_in_,
Value:=_variant_in_out_,
Valid:=_bool_out_,
Busy:=_bool_out_,
Error:=_real_out_,
ErrorID:=_word_out_,
ErrorInfo:=_word_out_);
Data type
IN
Bool
IN
Variant
OUT
Bool
OUT
Bool
OUT
Real
OUT
Word
OUT
Word
INOUT Variant
Description
Start the instruction. Default value: FALSE
Pointer to the TO-parameter that is to be read
If TRUE, the value has been read. Default value: FALSE
If TRUE, the instruction is operating. Default value: FALSE
If TRUE, an error occurred. Default value: FALSE
ID of the error. Default value: 0
Related information to the ERRORID. Default value: 0
Pointer to the location where the read value is stored
Description
You use the MC_ReadParam
instruction to read single status
values, independent of the cycle
control point.
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG

Advertisement

Table of Contents
loading

Table of Contents