SEW伺服电机IPOS典型控制程序文档格式.docx
- 文档编号:21995540
- 上传时间:2023-02-02
- 格式:DOCX
- 页数:23
- 大小:19.32KB
SEW伺服电机IPOS典型控制程序文档格式.docx
《SEW伺服电机IPOS典型控制程序文档格式.docx》由会员分享,可在线阅读,更多相关《SEW伺服电机IPOS典型控制程序文档格式.docx(23页珍藏版)》请在冰豆网上搜索。
DI20IPOSInput(StartCycleSignalStacking)
DI21IPOSInput(StopCycleSignal)
DI22IPOSInput(MotorRight/Halt,ArmUpHand)
DI23IPOSInput(MotorLeft/Halt,ArmDownHand)
DI24IPOSInput(VacuumManMode)
DI25IPOSInput(ReleaseManMode)
DI26IPOSInput(VacuumCupIn/OutManMode)
DI27IPOSInput(StackerMode)
(Automatic=1)
(ManualMode=0)
DI30IPOSInput(LoadingCycleStart)
DI31IPOSInput(StartRackReference)
DI32Spare
DI33Spare
DI34Spare
DI35Spare
DI36Spare
DI37Spare
BinaryOutputsBaseUnit
DB00ConfiguredwithBrake
P620DO01DriveReady
P621DO02DriveFault
BinaryOutputOptionCard1
P630DO10IPOSOutput(ArmDown)
P631DO11IPOSOutput(ConvReleaseInTransport)
P632DO12IPOSOutput(StackerFault)
P633DO13IPOSOutput(BasicPosition)
P634DO14IPOSOutput(ConvReleaseOutTransport)
P635DO15IPOSOutput(VacuumCupExtended)
P636DO16IPOSOutput(RackReferencePosition)
P637DO17IPOSOutput(VacuumFault)
OutputOptionCard2
DO20IPOSOutput(VacuumCupExtendSol)
DO21IPOSOutput(VacuumCupRetractSol)
DO22IPOSOutput(VacuumOnSol)
D023IPOSOutput(VacuumOffSol)
DO24IPOSOutput(BlowOffOn)
DO25IPOSOutput(Spare)
DO26IPOSOutput(Spare)
DO27IPOSOutput(Spare)
P941IPOSGeberquelle=MotorEncoderonTerminalX15
AnwenderprogrammmitfolgendenFunktionen:
-------------------------------------------
1)AllgemeinerManualModeeinespositioniergeregeltenAntriebs.
-黚erzweiEingangsklemmenkannderAntriebmiteinerfesten
GeschwindigkeitinbeideRichtungengefahrenwerden.
-DieLageregelungistdabeiaktiv.
-EinevorherigeReferenzfahrtistnichtnotwendig.
2)BetriebsartAutomatic
****************************************************************************/
#include<
const.h>
io.h>
//=================FahrVariables===========================================
#pragmaglobals200250
longV_MotorRight,V_MotorLeft;
//=================ZielPosition-Variables==============================
#definePosition_0H0
#definePosition_1H1
#definePosition_2H2
#definePosition_3H3
#definePosition_4H4
#definePosition_5H5
#definePosition_6H6
#definePosition_7H7
#definePosition_8H8
#definePosition_9H9
#definePosition_10H10
#defineRef_PosH11
#definePosition_6aH12
#defineAuto_Speed_0H20
#defineAuto_Speed_1H21
#defineAuto_Speed_2H22
#defineRef_Speed_0H23
#defineAuto_Speed_3H24
#defineMan_Speed_0H25
#defineAuto_Speed_4H26
#defineAuto_Speed_5H27
#defineAuto_Speed_6H28
#definePosition_WindowH30
#defineM_StateH31
#defineM_FaultH32
#defineM_MerkerH33
#definePos_0H35
#defineM_LoadingH36
#defineM_StackingH37
#defineLoad_Pos_0H40
#defineLoad_Pos_1H41
#defineLoad_Pos_2H42
#defineLoad_Pos_3H43
#defineLoad_Pos_4H44
#defineLoad_Pos_5H45
#defineLoad_Pos_6H46
#defineLoad_Pos_7H47
#defineLoad_Pos_8H48
#defineLoad_Pos_9H49
#defineLoad_Pos_10H50
#defineLoad_Pos_11H51
#defineLoad_Pos_12H52
#defineLoad_Pos_6aH53
#defineBustypH100
#defineLe_PA_DATAH101
#definePA1H102
#definePA2H103
#definePA3H104
#defineLe_PE_DATAH110
#definePE1H111
#definePE2H112
#definePE3H113
//=================INPUTS=========================================
//OnboardInputs
#defineE_DriveEnableDI00
#defineE_DriveRelDI01
#defineE_Touchp_1DI02
#defineE_Touchp_2DI03
#defineE_Spare_1DI04
#defineE_Spare_2DI05
//InputsCardDIO11A
#defineE_CupExtendedProxDI10
#defineE_CupRetractedProxDI11
#defineE_VacuumSwitchDI12
#defineE_Spare_3DI13
#defineE_Spare_4DI14
#defineE_Spare_5DI15
#defineE_Spare_6DI16
#defineE_Spare_7DI17
//InputsFieldBus
#defineE_Start_Cycle((PA1&
0b1)!
=0)
#defineE_Stop_Cycle((PA1&
0b10)!
#defineE_ArmRight((PA1&
0b100)!
#defineE_ArmLeft((PA1&
0b1000)!
#defineE_VacManMode((PA1&
0b10000)!
#defineE_RelManMode((PA1&
0b100000)!
#defineE_CupInOutManMode((PA1&
0b1000000)!
#defineE_AutoMode((PA1&
0b10000000)!
#defineE_LoadCycleStart((PA1&
0b100000000)!
#defineE_ReferenceRack((PA1&
0b1000000000)!
#defineE_Continue_Cycle((PA1&
0b10000000000)!
#defineE_Reset_Cycle((PA1&
0b100000000000)!
#defineE_Resume_Cycle((PA1&
0b1000000000000)!
#defineE_Vacuum_On_Auto((PA1&
0b10000000000000)!
//=================OUTPUTS=========================================
//OnboardOutputs
#defineA_DriveReadyDO01
#defineA_DriveFaultDO02
//OutputsCardDIO11A
#defineA_CupExtendSol0//DO20
#defineA_CupRetractSol1//DO21
#defineA_VacuumOnSol2//DO22
#defineA_VacuumOffSol3//DO23
#defineA_BlowOffSol4//DO24
//OutputsFieldbus
#definePE1_OutputPE1
#defineA_StackerArmDown0
#defineA_ConvRel1//((PE1&
#defineA_StackerFault2//((PE1&
#defineA_HomePosition3//((PE1&
#defineA_ConvRelOut4//((PE1&
#defineA_CupExtendSwitch5//((PE1&
#defineA_ArmReferencePos6//((PE1&
#defineA_VacuumFault7//((PE1&
#defineA_ArmProbePos8//((PE1&
#defineA_CupRetractSwitch9//((PE1&
#defineA_VacuumConfirm10//((PE1&
#defineA_RelCrosstrREV11//((PE1&
//=================Festwerte===============================================
#pragmalist
/*===========================================================================
Subroutines
===========================================================================*/
/*================================================
SubroutineforInitializingtheSystem.
==================================================*/
Initialize()
{
_AxisStop(AS_RSTOP);
OptOutpIPOS=0;
//allOutputsOff
ControlWord=0;
//IPOSControlWordOff
Pos_0=1000;
Auto_Speed_0=15000;
//TouchProbeSearching
Auto_Speed_1=19500;
//DriveDownStacking
Auto_Speed_2=5000;
Auto_Speed_3=10000;
Auto_Speed_4=15000;
//DriveUPStacking
Auto_Speed_5=1500;
//MedPeeloffspeed
Auto_Speed_6=100;
//SlowPeeloffspeed
Ref_Speed_0=29000;
Man_Speed_0=5000;
Position_1=250000;
M_State=0;
M_Fault=0;
M_Loading=0;
M_Stacking=0;
Bustyp=3;
//Value3=Fieldbus
Le_PA_DATA=3;
//Value3=RrocessInputWords
Le_PE_DATA=3;
//Value3=RrocessOutputWords
}//EndInitialize()
/*=================================================
InterruptSubroutine
=================================================*/
Interrupt()
_TouchProbe(TP_DIS1);
M_State=4;
Position_2=H507;
Position_3=H507+10000;
//VacuumOn10000
Position_4=H507+345834;
//345834
Position_5=H507+140000;
//VacCupsRet200000
Position_6=H507+320000;
//SlowSpeed400000
Position_6a=H507+363000;
//VacCupExt411000
Position_7=H507+421000;
//VacRelvorher250000//425000
Position_8=H507+438000;
//Blow-offoff438000
Position_9=H507+850000;
//ConvRel850000
Position_10=H507+870000;
//870000
Ref_Pos=H507+415000;
//275000
Load_Pos_0=H507-10000;
Load_Pos_1=H507+80000;
//VacCupsRet
Load_Pos_2=H507+200000;
//SlowSpeed
Load_Pos_3=H507+230000;
//VacCupsExtVacOn
Load_Pos_4=H507+280000;
//
Load_Pos_5=H507+250000;
//RetVacCup
Load_Pos_6=H507+248000;
//LowSpeed
Load_Pos_6a=H507+220000;
//MedSpeed
Load_Pos_7=H507+185000;
//HiSpeedExtVacCup
Load_Pos_8=H507+70000;
Load_Pos_9=H507+40000;
//VacRel
Load_Pos_10=H507+2000;
//ConvRel
return;
}//EndInterrupt()
/*****************************************************************
CyclingSubroutine.
******************************************************************/
Cycling()
if(!
E_DriveRel)
{
_BitClear(PE1_Output,A_ArmProbePos);
_BitClear(PE1_Output,A_ArmReferencePos);
_AxisStop(AS_RSTOP);
TargetPos=SetpointPos;
}
}//EndCycling
ManualModeSubroutine
******************************************************************/
ManualMode()
//StackerArmUpandDown
if(E_ArmRight||E_ArmLeft)
_AxisStop(AS_ENABLE);
V_MotorRight=V_MotorLeft=Man_Speed_0;
_SetSys(SS_POSSPEED,V_MotorRight);
if(E_ArmRight&
&
(!
E_ArmLeft))//Klemmenabfragen
_GoAbs(GO_NOWAIT,(ActPos_Mot+409600));
if(E_ArmLeft&
E_ArmRight))
_GoAbs(GO_NOWAIT,(ActPos_Mot-409600));
if(!
E_ArmRight&
!
E_ArmLeft)
//VacuumandRelease
if(E_VacManMode)
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- SEW 伺服 电机 IPOS 典型 控制程序
![提示](https://static.bdocx.com/images/bang_tan.gif)