18.6.3 Lesen eines Parameters über SBus
/*=========================================
Process data configuration of inverter
connected via SBus is written to variable
lPDData in task 1.
The received values correspond to the
following process data configuration:
0 = PARAM + 1PD
1 = 1PD
2 = PARAM + 2PD
3 = 2PD
4 = PARAM + 3PD
5 = 3PD
6 = PARAM + 6PD
7 = 6PD
8 = PARAM + 10PD
9 = 10PD
=========================================*/
/*=========================================
IPOS Source file
=========================================*/
#include <constb.h>
#include <iob.h>
// Definition of MOVLNK structures
MOVLNK tPD;
MLDATA tData;
// Definition of variables
long lPDData;
/*=========================================
Main program
=========================================*/
main ()
{
}
Handbuch – IPOSplus®
// Initialization of MoviLink for bus transfer
tPD.BusType
= ML_BT_SBUS;
tPD.Address
= 10;
tPD.Format
= ML_FT_PAR;
tPD.Service
= ML_S_RD;
tPD.Index
= 8451;
tPD.DPointer
= numof(tData);
// Main program loop
while(1)
{
// Read PD configuration
_MoviLink( tPD );
lPDData = tData.ReadPar;
}
Compiler – Beispiele
MoviLink-Befehl
// bus type SBus
// SBus address 10
// only parameters
// read
// P090 PD data config
// data buffer
n
n
kVA
kVA
18
f
f
i
i
P
Hz
Hz
P
255