Technology instructions
9.3 Motion control
S7-1200 Programmable controller
478 System Manual, 03/2014, A5E02486680-AG
MC_WriteParam (write parameters of a technology object) instruction
You use the MC_WriteParam instruction to write a select number of parameters to change
the functionality of the axis from the user program.
Table 9- 50 MC_WriteParam instruction
Parameter:=_variant_in_,
Value:=_variant_in_,
Execute:=_bool_in_,
Done:=_bool_out_,
Error:=_real_out_,
ErrorID:=_word_out_,
ErrorInfo:=_word_out_);
You use the MC_WriteParam
instruction to write to public
parameters (for example,
acceleration and user DB values).
STEP 7 automatically creates the DB when you insert the instruction.
2
In the SCL example, "MC_WriteParam_DB" is the name of the instance DB.
You can write to the parameters that are public. You cannot write to "MotionStatus" and
"StatusBits". The valid parameters are listed in the table below:
DynamicDefaults.Acceleration
DynamicDefaults.Deceleration
Actor.DriveParameter.PulsesPerDriveRevolution
Sensor[1].ActiveHoming.Mode
DynamicDefaults.EmergencyDeceleration
Sensor[1].ActiveHoming.SideInput
Sensor[1].ActiveHoming.Offset
PositionLimitsHW.MaxSwitchedLevel
Sensor[1].ActiveHoming.SwitchedLevel PositionLimitsHW.MinSwitchedLevel
Sensor[1].PassiveHoming.Mode
Sensor[1].PassiveHoming.SideInput PositionLimitsSW.MinPosition
Sensor[1].PassiveHoming.SwitchedLevel
PositionLimitsSW.MaxPosition
DynamicLimits.MinVelocity
DynamicLimits.MaxVelocity
Homing.ReferencingVelocity