104
Manual – IPOSplus®
8
Cyclical process data
IPOSplus
®
and Fieldbus
8.3.2
Cyclical user-specific process data
Users have the option of choosing the description of the cyclical process data them-
selves. To do so, assign the parameter setting PO data for the output data or PI data for
the input data in the process data configuration. In this case, process output data is not
evaluated directly by MOVIDRIVE
®
but must be copied to the IPOS
plus®
variables using
the commands GETSYS (PO data) or SETSYS (PI data). The variables are decoded in
the IPOS
plus®
program. In this way, the user can, for example, transfer position setpoints
in user units (for example, motor revolutions) by multiplying or dividing the value trans-
mitted by the fieldbus before it is used for positioning.
Example
Six process data items with user-specific description should be transferred
(P870-877 = IPOS PI-DATA or IPOS PO_DATA). At output word 2, 3, the PLC transfers
the position setpoint to the drive, at input word 3, the drive sends the drives sends the
actual position in modulo format 1/10° (0.0° ... 360.0).
Compiler
#include <const.h>
// Process data data structures
GSPODATA10 tPA; //Output data (PLC -> Drive)
SSPIDATA10 tPE; //Input data (Drive -> PLC)
/*=============================================
Main function (IPOS initial function)
===============================================*/
main()
{
/*-------------------------------------
Initialization
--------------------------------------*/
// Initialize fieldbus variables for Getsys and Setsys commands
tPA.BusType = GS_BT_FBUS;
//Process data operation via fieldbus interface see above
tPA.Len = tPE.Len = 6; //PD length 6 words
/*-------------------------------------
Main program loop
--------------------------------------*/
while(1)
{
// Import PO data
_GetSys( tPA, GS_PODATA );
// Copy double word 2,3 to modulo target position
ModTagPos = (tPA.PO3 & 0xFFFF) + (tPA.PO2 & 0xFFFF)<<16; //PO2,PO3
// .....
//Regenerate process input data and send to PLC
tPE.PI3 = 3600* ModActPos/ 65536; //Actual position in 1/10 degree
at word 3
_SetSys( SS_PIDATA, tPE ); //Send PD
} //End while (1)
} // Ende main=========================================================
P
i
f
kVA
Hz
n
P
i
f
kVA
Hz
n