270
Manual – IPOSplus®
18
Compiler programming frame
Compiler – Examples
/*=============================================
= Function: fnJogMode()
= Jog axis. With 2 inputs, the axis can be moved to the right and to the left.
= If the jog mode is not set, the drive remains in hold control. If the jog mode is activated when
the drive is released
= the main state machine would spring to state 99.
===============================================*/
fnJogging()
{
// Instructions for entering the main state "Jogging"
// Acknowledge mode
_BitSet(lPE_StatusWord,11);
_BitClear(lPE_StatusWord,12);
// cyclical processing as long as the main state is set to "Jogging"
do
{
// Import PO data
_GetSys( tPA.BusType ,GS_PODATA );
if (MY_JOG_PLUS&&(!MY_JOG_MINUS))
{
tPosVelocities.CW = tPosVelocities.CCW = tPA.PO2;
_SetSys( SS_POSSPEED, tPosVelocities );
TargetPos = ActP 409600;
}
if (MY_JOG_MINUS&&(!MY_JOG_PLUS))
{
tPosVelocities.CW = tPosVelocities.CCW = tPA.PO2;
_SetSys( SS_POSSPEED, tPosVelocities );
TargetPos = ActPos_Mot - 409600;
}
if ((MY_JOG_MINUS && MY_JOG_PLUS)¦¦((!MY_JOG_MINUS)&&(!MY_JOG_PLUS)))
_AxisStop(AS_PSTOP);
}
while
(lGlobalStateMachine==JOGGING);
// Instructions for leaving the main state "Jogging"
// Stopping the drive
_AxisStop(AS_PSTOP);
// Clear mode
_BitClear(lPE_StatusWord,11);
_BitClear(lPE_StatusWord,12);
}// end fnJogging()
P
i
f
kVA
Hz
n
P
i
f
kVA
Hz
n