Herunterladen Inhalt Inhalt Diese Seite drucken

Compiler - Beispiele Scom-Kommunikation; Sender - SEW IPOS plus Handbuch

Inhaltsverzeichnis

Werbung

18.7.2 Sender

Die Variablen H208 und H209 werden zyklisch alle 10 ms an einen anderen Umrichter
gesendet. Die Werte von H208 und H209 können mit dem Eingang DI17 verändert wer-
den.
DI17 = 0: H208 = 111111 / H209 = 222222
DI17 = 1: H208 = 222222 / H209 = 444444
Task 2 ist in diesem Beispielprogramm nicht implementiert.
/*=========================================
Variables H208 and H209 are sent cyclic
every 10 ms to another inverter via SBus.
The values of H208 and H209 can be altered
with input DI17.
DI17 = 0: H208 = 111111 / H209 = 222222
DI17 = 1: H208 = 222222 / H209 = 444444
SHELL settings:
P813 SBus Address ->
P816 SBus Baudrate ->
=========================================*/
/*=========================================
IPOS Source file
=========================================*/
#include <constb.h>
#include <iob.h>
// Definition of SCOM structures
SCTRCYCL tBusTr;
// Definition of variables
#define Data_Var1 H208
#define Data_Var2 H209
/*=========================================
Main program
=========================================*/
main ()
{
Handbuch – IPOSplus®
1
500 kBaud
// Initialization of SCOM transfer object
tBusTr.ObjectNo
= 1025;
tBusTr.CycleTime
= 10;
tBusTr.Offset
= 0;
tBusTr.Format
= 8;
tBusTr.DPointer
= numof(Data_Var1);
tBusTr.Result
= 1111;
// Initialize variables
Data_Var1 = 111111;
Data_Var2 = 222222;
// Start SCOM
_SBusCommDef( SCD_TRCYCL,tBusTr );
_SBusCommState( SCS_START1 );
// _SBusCommOn(
);
// Start cyclic communication MOVIDRIVE A
Compiler – Beispiele
SCOM-Kommunikation
// object number
// cycle time
// offset
// 8 byte
// data buffer
// default value for control
// Start cyclic communication MOVIDRIVE B
n
n
kVA
kVA
18
f
f
i
i
P
Hz
Hz
P
257

Quicklinks ausblenden:

Werbung

Inhaltsverzeichnis
loading

Inhaltsverzeichnis