Professional Documents
Culture Documents
{
static int nReported = 0;
##if (1)
if ((nReported & 1) == 0) {
##if (1) // AC
if ((inAry[0] < -1.5) || (inAry[0] > 1.5)) {
strcpy(sErrMsg, "Warning! The input signal of Channel A0 of the A/D
converter is over the range of -1.5V to +1.5V. It will be limited to the limit.");
##else
if ((inAry[0] < 0.0) || (inAry[0] > 3.0)) {
strcpy(sErrMsg, "Warning! The input signal of Channel A0 of the A/D
converter is over the range of 0 to +3V. It will be limited to the limit.");
##endif
*pnErr = -10;
nReported |= 1;
if ((nReported & 0x40000) == 0) {
nReported |= 0x40000;
strcat(sErrMsg, "\n\nWarning! The input signal of ADC is over the
range!");
}
return;
}
}
##endif
##if (0)
if ((nReported & 2) == 0) {
##if (1) // AC
if ((0.0 < -1.5) || (0.0 > 1.5)) {
strcpy(sErrMsg, "Warning! The input signal of Channel A1 of the A/D
converter is over the range of -1.5V to +1.5V. It will be limited to the limit.");
##else
if ((0.0 < 0.0) || (0.0 > 3.0)) {
strcpy(sErrMsg, "Warning! The input signal of Channel A1 of the A/D
converter is over the range of 0 to +3V. It will be limited to the limit.");
##endif
*pnErr = -10;
nReported |= 2;
if ((nReported & 0x40000) == 0) {
nReported |= 0x40000;
strcat(sErrMsg, "\n\nWarning! The input signal of ADC is over the
range!");
}
return;
}
}
##endif
##if (0)
if ((nReported & 4) == 0) {
##if (1) // AC
if ((0.0 < -1.5) || (0.0 > 1.5)) {
strcpy(sErrMsg, "Warning! The input signal of Channel A2 of the A/D
converter is over the range of -1.5V to +1.5V. It will be limited to the limit.");
##else
if ((0.0 < 0.0) || (0.0 > 3.0)) {
strcpy(sErrMsg, "Warning! The input signal of Channel A2 of the A/D
converter is over the range of 0 to +3V. It will be limited to the limit.");
##endif
*pnErr = -10;
nReported |= 4;
if ((nReported & 0x40000) == 0) {
nReported |= 0x40000;
strcat(sErrMsg, "\n\nWarning! The input signal of ADC is over the
range!");
}
return;
}
}
##endif
##if (0)
if ((nReported & 8) == 0) {
##if (1) // AC
if ((0.0 < -1.5) || (0.0 > 1.5)) {
strcpy(sErrMsg, "Warning! The input signal of Channel A3 of the A/D
converter is over the range of -1.5V to +1.5V. It will be limited to the limit.");
##else
if ((0.0 < 0.0) || (0.0 > 3.0)) {
strcpy(sErrMsg, "Warning! The input signal of Channel A3 of the A/D
converter is over the range of 0 to +3V. It will be limited to the limit.");
##endif
*pnErr = -10;
nReported |= 8;
if ((nReported & 0x40000) == 0) {
nReported |= 0x40000;
strcat(sErrMsg, "\n\nWarning! The input signal of ADC is over the
range!");
}
return;
}
}
##endif
##if (0)
if ((nReported & 16) == 0) {
##if (1) // AC
if ((0.0 < -1.5) || (0.0 > 1.5)) {
strcpy(sErrMsg, "Warning! The input signal of Channel A4 of the A/D
converter is over the range of -1.5V to +1.5V. It will be limited to the limit.");
##else
if ((0.0 < 0.0) || (0.0 > 3.0)) {
strcpy(sErrMsg, "Warning! The input signal of Channel A4 of the A/D
converter is over the range of 0 to +3V. It will be limited to the limit.");
##endif
*pnErr = -10;
nReported |= 16;
if ((nReported & 0x40000) == 0) {
nReported |= 0x40000;
strcat(sErrMsg, "\n\nWarning! The input signal of ADC is over the
range!");
}
return;
}
}
##endif
##if (0)
if ((nReported & 32) == 0) {
##if (1) // AC
if ((0.0 < -1.5) || (0.0 > 1.5)) {
strcpy(sErrMsg, "Warning! The input signal of Channel A5 of the A/D
converter is over the range of -1.5V to +1.5V. It will be limited to the limit.");
##else
if ((0.0 < 0.0) || (0.0 > 3.0)) {
strcpy(sErrMsg, "Warning! The input signal of Channel A5 of the A/D
converter is over the range of 0 to +3V. It will be limited to the limit.");
##endif
*pnErr = -10;
nReported |= 32;
if ((nReported & 0x40000) == 0) {
nReported |= 0x40000;
strcat(sErrMsg, "\n\nWarning! The input signal of ADC is over the
range!");
}
return;
}
}
##endif
##if (0)
if ((nReported & 64) == 0) {
##if (1) // AC
if ((0.0 < -1.5) || (0.0 > 1.5)) {
strcpy(sErrMsg, "Warning! The input signal of Channel A6 of the A/D
converter is over the range of -1.5V to +1.5V. It will be limited to the limit.");
##else
if ((0.0 < 0.0) || (0.0 > 3.0)) {
strcpy(sErrMsg, "Warning! The input signal of Channel A6 of the A/D
converter is over the range of 0 to +3V. It will be limited to the limit.");
##endif
*pnErr = -10;
nReported |= 64;
if ((nReported & 0x40000) == 0) {
nReported |= 0x40000;
strcat(sErrMsg, "\n\nWarning! The input signal of ADC is over the
range!");
}
return;
}
}
##endif
##if (0)
if ((nReported & 128) == 0) {
##if (1) // AC
if ((0.0 < -1.5) || (0.0 > 1.5)) {
strcpy(sErrMsg, "Warning! The input signal of Channel A7 of the A/D
converter is over the range of -1.5V to +1.5V. It will be limited to the limit.");
##else
if ((0.0 < 0.0) || (0.0 > 3.0)) {
strcpy(sErrMsg, "Warning! The input signal of Channel A7 of the A/D
converter is over the range of 0 to +3V. It will be limited to the limit.");
##endif
*pnErr = -10;
nReported |= 128;
if ((nReported & 0x40000) == 0) {
nReported |= 0x40000;
strcat(sErrMsg, "\n\nWarning! The input signal of ADC is over the
range!");
}
return;
}
}
##endif
##if (0)
if ((nReported & 256) == 0) {
##if (1) // AC
if ((0.0 < -1.5) || (0.0 > 1.5)) {
strcpy(sErrMsg, "Warning! The input signal of Channel B0 of the A/D
converter is over the range of -1.5V to +1.5V. It will be limited to the limit.");
##else
if ((0.0 < 0.0) || (0.0 > 3.0)) {
strcpy(sErrMsg, "Warning! The input signal of Channel B0 of the A/D
converter is over the range of 0 to +3V. It will be limited to the limit.");
##endif
*pnErr = -10;
nReported |= 256;
if ((nReported & 0x40000) == 0) {
nReported |= 0x40000;
strcat(sErrMsg, "\n\nWarning! The input signal of ADC is over the
range!");
}
return;
}
}
##endif
##if (0)
if ((nReported & 512) == 0) {
##if (1) // AC
if ((0.0 < -1.5) || (0.0 > 1.5)) {
strcpy(sErrMsg, "Warning! The input signal of Channel B1 of the A/D
converter is over the range of -1.5V to +1.5V. It will be limited to the limit.");
##else
if ((0.0 < 0.0) || (0.0 > 3.0)) {
strcpy(sErrMsg, "Warning! The input signal of Channel B1 of the A/D
converter is over the range of 0 to +3V. It will be limited to the limit.");
##endif
*pnErr = -10;
nReported |= 512;
if ((nReported & 0x40000) == 0) {
nReported |= 0x40000;
strcat(sErrMsg, "\n\nWarning! The input signal of ADC is over the
range!");
}
return;
}
}
##endif
##if (0)
if ((nReported & 1024) == 0) {
##if (1) // AC
if ((0.0 < -1.5) || (0.0 > 1.5)) {
strcpy(sErrMsg, "Warning! The input signal of Channel B2 of the A/D
converter is over the range of -1.5V to +1.5V. It will be limited to the limit.");
##else
if ((0.0 < 0.0) || (0.0 > 3.0)) {
strcpy(sErrMsg, "Warning! The input signal of Channel B2 of the A/D
converter is over the range of 0 to +3V. It will be limited to the limit.");
##endif
*pnErr = -10;
nReported |= 1024;
if ((nReported & 0x40000) == 0) {
nReported |= 0x40000;
strcat(sErrMsg, "\n\nWarning! The input signal of ADC is over the
range!");
}
return;
}
}
##endif
##if (0)
if ((nReported & 2048) == 0) {
##if (1) // AC
if ((0.0 < -1.5) || (0.0 > 1.5)) {
strcpy(sErrMsg, "Warning! The input signal of Channel B3 of the A/D
converter is over the range of -1.5V to +1.5V. It will be limited to the limit.");
##else
if ((0.0 < 0.0) || (0.0 > 3.0)) {
strcpy(sErrMsg, "Warning! The input signal of Channel B3 of the A/D
converter is over the range of 0 to +3V. It will be limited to the limit.");
##endif
*pnErr = -10;
nReported |= 2048;
if ((nReported & 0x40000) == 0) {
nReported |= 0x40000;
strcat(sErrMsg, "\n\nWarning! The input signal of ADC is over the
range!");
}
return;
}
}
##endif
##if (0)
if ((nReported & 4096) == 0) {
##if (1) // AC
if ((0.0 < -1.5) || (0.0 > 1.5)) {
strcpy(sErrMsg, "Warning! The input signal of Channel B4 of the A/D
converter is over the range of -1.5V to +1.5V. It will be limited to the limit.");
##else
if ((0.0 < 0.0) || (0.0 > 3.0)) {
strcpy(sErrMsg, "Warning! The input signal of Channel B4 of the A/D
converter is over the range of 0 to +3V. It will be limited to the limit.");
##endif
*pnErr = -10;
nReported |= 4096;
if ((nReported & 0x40000) == 0) {
nReported |= 0x40000;
strcat(sErrMsg, "\n\nWarning! The input signal of ADC is over the
range!");
}
return;
}
}
##endif
##if (0)
if ((nReported & 8192) == 0) {
##if (1) // AC
if ((0.0 < -1.5) || (0.0 > 1.5)) {
strcpy(sErrMsg, "Warning! The input signal of Channel B5 of the A/D
converter is over the range of -1.5V to +1.5V. It will be limited to the limit.");
##else
if ((0.0 < 0.0) || (0.0 > 3.0)) {
strcpy(sErrMsg, "Warning! The input signal of Channel B5 of the A/D
converter is over the range of 0 to +3V. It will be limited to the limit.");
##endif
*pnErr = -10;
nReported |= 8192;
if ((nReported & 0x40000) == 0) {
nReported |= 0x40000;
strcat(sErrMsg, "\n\nWarning! The input signal of ADC is over the
range!");
}
return;
}
}
##endif
##if (0)
if ((nReported & 16384) == 0) {
##if (1) // AC
if ((0.0 < -1.5) || (0.0 > 1.5)) {
strcpy(sErrMsg, "Warning! The input signal of Channel B6 of the A/D
converter is over the range of -1.5V to +1.5V. It will be limited to the limit.");
##else
if ((0.0 < 0.0) || (0.0 > 3.0)) {
strcpy(sErrMsg, "Warning! The input signal of Channel B6 of the A/D
converter is over the range of 0 to +3V. It will be limited to the limit.");
##endif
*pnErr = -10;
nReported |= 16384;
if ((nReported & 0x40000) == 0) {
nReported |= 0x40000;
strcat(sErrMsg, "\n\nWarning! The input signal of ADC is over the
range!");
}
return;
}
}
##endif
##if (0)
if ((nReported & 32768) == 0) {
##if (1) // AC
if ((0.0 < -1.5) || (0.0 > 1.5)) {
strcpy(sErrMsg, "Warning! The input signal of Channel B7 of the A/D
converter is over the range of -1.5V to +1.5V. It will be limited to the limit.");
##else
if ((0.0 < 0.0) || (0.0 > 3.0)) {
strcpy(sErrMsg, "Warning! The input signal of Channel B7 of the A/D
converter is over the range of 0 to +3V. It will be limited to the limit.");
##endif
*pnErr = -10;
nReported |= 32768;
if ((nReported & 0x40000) == 0) {
nReported |= 0x40000;
strcat(sErrMsg, "\n\nWarning! The input signal of ADC is over the
range!");
}
return;
}
}
##endif
}
if (bRoutine) {
##if (1)
outAry[0] = oldVal[0];
##endif
##if (1)
outAry[1] = oldVal[1];
##endif
##if (1)
outAry[2] = oldVal[2];
##endif
##if (1)
outAry[3] = oldVal[3];
##endif
##if (0)
0.0 = oldVal[4];
##endif
##if (0)
0.0 = oldVal[5];
##endif
##if (0)
0.0 = oldVal[6];
##endif
##if (0)
0.0 = oldVal[7];
##endif
} else {
oldVal[nNo] = fVal;
}
}