Download Motion Control PMC
Transcript
14 Function library primo.lib MotorOff PMCprimo-Command: MO (Motor off) Function library: Positioncontrol Description: This function block switches off the controller release. All other functions remain active, the encoder signals are evaluated. In case the controller release is re-activated, the motor remains in the instantaneous position. In case of an open position control loop the setpoint signal is damped with 0V with the PMCprimo 2+2/16+ and the relay of the axis opens. This relay should be used as controller or drive release. The relay simultaneously damps the setpoint output with 0V. In case the motor controller is locked with the relay, the motor coasts freely. This function can also be used as alternative Stop-Command. With the function GlobalOff (see page 177) the function MotorOff can be executed at all axes at the same time. Input variables: bExecute (BOOL) usiNode (USINT) usiChannel (USINT) The motor is switched off in case of a change from 0 to 1 0 resets the function block and the output variables are set to False or 0 The node number in the linked system, 0 if only one unit or Host The axis number from 1 to n (depending on the system) Output variables: bDone (BOOL) Motor is switched off (True) or module is still under operation (False) bError (BOOL) True: an error has occurred; False: no error iErrorNumber (INT) Indicates the exact error cause (see GetError page 203) Connected function MotorOff und GlobalOff Examples: Declaration: INST: MotorOff; bVarBOOL1: BOOL; bVarBOOL2: BOOL; Example in IL: CAL LD ST INST(bExecute := bVarBOOL1, usiNode := 0, usiChannel := 1) INST.bDone bVarBOOL2 Example in ST: INST(bExecute := bVarBOOL1, usiNode := 0, usiChannel := 1); bVarBOOL2:=Inst.bDone; Example in FBD: Page 180 User Manual PMCprimo SoftPLC