float all_off;
int first;
/* 0 = empty, 1 = lead on, 2 = lag on */
main()
{
if (first == 0)
{
lead = 0; /* preset channel 0 as lead */
lag = 1;
/* preset channel 1 as lag */
lead_on = 12;
lag_on = 15;
all_off = 6;
state = 0;
first = 1;
}
if (state == 0)
{
if (read_uaf(input,0,0) > lead_on)
{
write_uaf(output,0,lead,on);
state = 1;
}
}
if (state == 1)
{
if (read_uaf(input,0,0) > lag_on)
{
write_uaf(output,0,lag,on);
state = 2;
}
if (read_uaf(input,0,0) < all_off)
{
write_uaf(output,0,lead,off);
state = 0;
if (lead == 0)
{
lead = 1;
lag = 0;
}
else
{
lead = 0;
lag = 1;
}
}
}
if (state == 2)
{
if (read_uaf(input,0,0) < all_off)
{
write_uaf(output,0,lead,off);
write_uaf(output,0,lag,off);
state = 0;
if (lead == 0)
{
16-20
SCADA 3000 User’s Manual
Содержание Sensaphone SCADA 3000
Страница 1: ...Sensaphone SCADA 3000 User s Manual Version 2 34...
Страница 6: ...vi SCADA 3000 User s Manual...
Страница 10: ...x SCADA 3000 User s Manual...
Страница 30: ...1 6 SCADA 3000 User s Manual...
Страница 48: ...4 6 SCADA 3000 User s Manual...
Страница 70: ...9 8 SCADA 3000 User s Manual...
Страница 122: ...12 8 SCADA 3000 User s Manual...
Страница 190: ...15 30 SCADA 3000 User s Manual...
Страница 211: ...lead 1 lag 0 else lead 0 lag 1 16 21 Chapter 16 Programming in C...
Страница 212: ...16 22 SCADA 3000 User s Manual...
Страница 236: ...21 8 SCADA 3000 User s Manual...
Страница 248: ...22 12 SCADA 3000 User s Manual...
Страница 258: ...23 10 SCADA 3000 User s Manual...
Страница 274: ...25 8 SCADA 3000 User s Manual...
Страница 288: ...27 8 SCADA 3000 User s Manual...
Страница 294: ...28 6 SCADA 3000 User s Manual...
Страница 296: ...A 2 SCADA 3000 User s Manual...
Страница 302: ...D 2 SCADA 3000 User s Manual...
Страница 318: ...I 2 SCADA 3000 User s Manual...
Страница 320: ...J 2 SCADA 3000 User s Manual...
Страница 322: ...K 2 SCADA 3000 User s Manual...
Страница 335: ...Test Log...
Страница 336: ......