Bachelorthesis/Modbus-CAPL/include/CAPL/DEU Power.can

147 lines
3.4 KiB
Text
Raw Normal View History

2014-06-20 12:46:06 +02:00
/*@!Encoding:1252*/
includes
{
}
variables
{
}
on sysvar sysvar::Airbus::ESS_DC1
{
if (@this)
2014-06-20 12:46:06 +02:00
{
@sysvar::Airbus::DEU223RH06::B_DC1_E=@this;
@sysvar::Airbus::DEU226RH06::B_DC1_E=@this;
2014-06-20 12:46:06 +02:00
}
}
on sysvar sysvar::Airbus::ESS_DC2
{
if (@this)
2014-06-20 12:46:06 +02:00
{
@sysvar::Airbus::DEU223RH06::B_DC2_E=@this;
@sysvar::Airbus::DEU226RH06::B_DC2_E=@this;
2014-06-20 12:46:06 +02:00
}
}
on sysvar sysvar::Airbus::NORM_DC1
{
if (@this)
2014-06-20 12:46:06 +02:00
{
@sysvar::Airbus::DEU223RH06::B_DC1_N=@this;
@sysvar::Airbus::DEU226RH06::B_DC1_N=@this;
2014-06-20 12:46:06 +02:00
}
}
on sysvar sysvar::Airbus::NORM_DC2
{
if (@this)
2014-06-20 12:46:06 +02:00
{
@sysvar::Airbus::DEU223RH06::B_DC2_N=@this;
@sysvar::Airbus::DEU226RH06::B_DC2_N=@this;
2014-06-20 12:46:06 +02:00
};
}
on sysvar sysvar::Airbus::DEU223RH06::B_DC1_E
{
if (@this)
2014-06-20 12:46:06 +02:00
@sysvar::Airbus::DEU223RH06::B_DC2_E=0;
2014-06-20 12:46:06 +02:00
update();
}
on sysvar sysvar::Airbus::DEU223RH06::B_DC2_E
{
if (@this)
2014-06-20 12:46:06 +02:00
@sysvar::Airbus::DEU223RH06::B_DC1_E=0;
2014-06-20 12:46:06 +02:00
update();
}
on sysvar sysvar::Airbus::DEU223RH06::B_DC1_N
{
if (@this)
2014-06-20 12:46:06 +02:00
@sysvar::Airbus::DEU223RH06::B_DC2_N=0;
2014-06-20 12:46:06 +02:00
update();
}
on sysvar sysvar::Airbus::DEU223RH06::B_DC2_N
{
if (@this)
2014-06-20 12:46:06 +02:00
@sysvar::Airbus::DEU223RH06::B_DC1_N=0;
2014-06-20 12:46:06 +02:00
update();
}
on sysvar sysvar::Airbus::DEU226RH06::B_DC1_E
{
if (@this)
2014-06-20 12:46:06 +02:00
@sysvar::Airbus::DEU226RH06::B_DC2_E=0;
2014-06-20 12:46:06 +02:00
update();
}
on sysvar sysvar::Airbus::DEU226RH06::B_DC2_E
{
if (@this)
2014-06-20 12:46:06 +02:00
@sysvar::Airbus::DEU226RH06::B_DC1_E=0;
2014-06-20 12:46:06 +02:00
update();
}
on sysvar sysvar::Airbus::DEU226RH06::B_DC1_N
{
if (@this)
2014-06-20 12:46:06 +02:00
@sysvar::Airbus::DEU226RH06::B_DC2_N=0;
2014-06-20 12:46:06 +02:00
update();
}
on sysvar sysvar::Airbus::DEU226RH06::B_DC2_N
{
if (@this)
2014-06-20 12:46:06 +02:00
@sysvar::Airbus::DEU226RH06::B_DC1_N=0;
update();
2014-06-20 12:46:06 +02:00
}
on sysvar sysvar::Airbus::TL_CUT_OFF
{
update();
2014-06-20 12:46:06 +02:00
}
void update()
{
@sysvar::Airbus::DEU223RH06::DC1_E = @sysvar::Airbus::DEU223RH06::B_DC1_E && @sysvar::Airbus::TL_CUT_OFF;
@sysvar::Airbus::DEU223RH06::DC1_N = @sysvar::Airbus::DEU223RH06::B_DC1_N && @sysvar::Airbus::TL_CUT_OFF;
@sysvar::Airbus::DEU223RH06::DC2_E = @sysvar::Airbus::DEU223RH06::B_DC2_E && @sysvar::Airbus::TL_CUT_OFF;
@sysvar::Airbus::DEU223RH06::DC2_N = @sysvar::Airbus::DEU223RH06::B_DC2_N && @sysvar::Airbus::TL_CUT_OFF;
@sysvar::Airbus::DEU226RH06::DC1_E = @sysvar::Airbus::DEU226RH06::B_DC1_E && @sysvar::Airbus::TL_CUT_OFF;
@sysvar::Airbus::DEU226RH06::DC1_N = @sysvar::Airbus::DEU226RH06::B_DC1_N && @sysvar::Airbus::TL_CUT_OFF;
@sysvar::Airbus::DEU226RH06::DC2_E = @sysvar::Airbus::DEU226RH06::B_DC2_E && @sysvar::Airbus::TL_CUT_OFF;
@sysvar::Airbus::DEU226RH06::DC2_N = @sysvar::Airbus::DEU226RH06::B_DC2_N && @sysvar::Airbus::TL_CUT_OFF;
if (@sysvar::Airbus::TL_CUT_OFF == -1) // value could not be read
{
@sysvar::Airbus::DEU223RH06::E = -1;
@sysvar::Airbus::DEU223RH06::N = -1;
@sysvar::Airbus::DEU226RH06::E = -1;
@sysvar::Airbus::DEU226RH06::N = -1;
}
else
{
@sysvar::Airbus::DEU223RH06::E = (@sysvar::Airbus::DEU223RH06::B_DC1_E || @sysvar::Airbus::DEU223RH06::B_DC2_E);
@sysvar::Airbus::DEU223RH06::N = (@sysvar::Airbus::DEU223RH06::B_DC1_N || @sysvar::Airbus::DEU223RH06::B_DC2_N);
@sysvar::Airbus::DEU226RH06::E = (@sysvar::Airbus::DEU226RH06::B_DC1_E || @sysvar::Airbus::DEU226RH06::B_DC2_E);
@sysvar::Airbus::DEU226RH06::N = (@sysvar::Airbus::DEU226RH06::B_DC1_N || @sysvar::Airbus::DEU226RH06::B_DC2_N);
}
2014-06-20 12:46:06 +02:00
}