|

楼主 |
发表于 1-6-2015 14:00:15
|
显示全部楼层
VCU2
variables
{
message VCU2 msg;
int a,b,c,d;
}
On envVar P
{
if(b == 0&&c == 0&&d == 0)
{
a = getValue(this);
msg.Shiftstate = a;
output(msg);
}
else
{
a = getValue(this)*5;
msg.AuxErrDetail = a;
output(msg);
}
}
On envVar N
{
if(a == 0&&c == 0&&d == 0)
{
b = getValue(this)*2;
msg.Shiftstate = b;
output(msg);
}
else
{
b = getValue(this)*5;
msg.AuxErrDetail = b;
output(msg);
}
}
On envVar D
{
if(b == 0&&a == 0&&d == 0)
{
c = getValue(this)*3;
msg.Shiftstate = c;
output(msg);
}
else
{
c = getValue(this)*5;
msg.AuxErrDetail = c;
output(msg);
}
}
On envVar R
{
if(b == 0&&c == 0&&a == 0)
{
d = getValue(this)*4;
msg.Shiftstate = d;
output(msg);
}
else
{
d = getValue(this)*5;
msg.AuxErrDetail = d;
output(msg);
}
} |
|