EasyManua.ls Logo

SEW-Eurodrive IPOS plus - Page 110

SEW-Eurodrive IPOS plus
384 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
110
Manual – IPOSplus®
9
Synchronous operation with a DRS option card
IPOSplus
®
and Synchronized Motion
Sample program
with IPOS
plus®
Compiler
/*==================================================================
IPOS source file
==================================================================*/
#include <const.h>
#include <io.h>
/*----- Define inputs --------------------------------------*/
#define E_Free running DI10 // Input DI10
#define E_Set zero point DI11 // Input DI11
/*----- Define outputs --------------------------------------*/
#define A_DRS_OUTP0 0 // Output DRS X40:9
/*----- Define control bits in IPOS control word ---------------*/
#define _DRS_Set zero point 22 // Bit 22
*===================================================================
Subprograms
==================================================================*/
Free running_On()
{
/* Free running is activated over the external jumper between X40:9 and X40:0
by setting the output X40:9. */
_BitSet( DRS_Ctrl, A_DRS_OUTP0 );
}
/*================================================================*/
Free running_Off()
{
/* Free running is deactivated over the external jumper between X40:9 and X40:0
by deleting the output X40:9. */
_BitSet( DRS_Ctrl, A_DRS_OUTP0 );
}
/*================================================================*/
DRS_Zero point()
{
_BitSet( ControlWord, _DRS_SetZeroPoint );
// Set zero point via control word
_Wait( 15 ); // Response time in ms
_BitClear( ControlWord, _DRS_Set zero point ); // Delete bit
}
/*==================================================================
Main function (IPOS initial function)
==================================================================*/
main()
{
if( E_Free running ) // E_FreeRunning input (here DI10)
Free running_On(); // Switches between
else // Free running and synchronous operation
°°Free running_Off();
if( E_Set zero point ) // The function "Set zero point"
DRS_zero point(); // is called
}
P
i
f
kVA
Hz
n
P
i
f
kVA
Hz
n

Table of Contents