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

Easy book
Hide thumbs Also See for SIMATIC S7-1200:
Table of Contents
10.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 10- 32 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 10- 33 Parameters for the MC_ReadParam instruction
Parameter and type
ENABLE
PARAMETER
VALID
BUSY
ERROR
ERRORID
ERRORINFO
VALUE
Easy Book
Manual, 03/2014, A5E02486774-AF
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
Motion control is easy
10.5 Motion control instructions
Description
You use the MC_ReadParam
instruction to read single status
values, independent of the cycle
control point.
241

Hide quick links:

Table of Contents
loading

Table of Contents