Herunterladen Inhalt Inhalt Diese Seite drucken

Beschreiben Einer Variablen Über Sbus - SEW IPOS plus Handbuch

Inhaltsverzeichnis

Werbung

n
n
kVA
kVA
Compiler – Beispiele
18
f
f
MoviLink-Befehl
i
i
P
Hz
Hz
P
18.6.2 Beschreiben einer Variablen über SBus
254
/*=========================================
Variable H200 of inverter connected via
SBus is written depending on DI17 in task 1:
DI17 = 0 ->
-1000
DI17 = 1 ->
1000
=========================================*/
/*=========================================
IPOS Source file
=========================================*/
#include <constb.h>
#include <iob.h>
// Definition of MOVLNK structures
MOVLNK tBus;
MLDATA tBusData;
/*=========================================
Main program
=========================================*/
main ()
{
// Initialization of MoviLink for bus transfer
tBus.BusType
= ML_BT_SBUS1;
tBus.Address
= 10;
tBus.Service
= ML_S_WRV;
tBus.Index
= 11200;
tBus.DPointer
= numof(tBusData); // data buffer
// Main program loop
while(1)
{
if( DI17 )
{
tBusData.WritePar = 1000;
_MoviLink( tBus );
}
else
{
tBusData.WritePar = -1000;
_MoviLink( tBus );
}
}
}
// bus type SBus1
// SBus address 10
// write volatile
// variable H200
Handbuch – IPOSplus®

Quicklinks ausblenden:

Werbung

Inhaltsverzeichnis
loading

Inhaltsverzeichnis