Examples of explicit exchange saturation detection. Schneider Electric PL7 Micro/Junior/Pro - Communication applications, volume 2
Anúncio
Anúncio
FIPIO Programming
Examples of explicit exchange saturation detection
Introduction The following examples are given in structured text language, but they can be translated into all the PL7 languages.
They only have to be taken into account if the PL7 application may activate more that 24 explicit functions at the same time and if you want to reiterate a request in the event of explicit exchange saturation.
Management of the READ_STS module
IF (NOT (%MW\0.2.1\0.MOD:x0)) THEN (*no request in progress*)
SET %M0; (*request latch*)
(*bit reset to 0 indicating saturation of explicit exchanges*)
%SW116:=%SW116 AND 2#1111111111111011;
READ_STS %CH\0.2.1\0.MOD;
IF (%SW116:x2) THEN
RESET %M0; (*READ_STS retried, saturation has occurred*)
(*%MW\0.2.1\0.MOD.2:x1 signals a functional error*)
END_IF;
END_IF;
IF(%M0 AND NOT (%MW\0.2.1\0.MOD:x0)) THEN
(*%MW\0.2.1\0.MOD.2 can be used*)
RESET %M0;
END_IF;
TLX DS COM PL7 xxE
285
FIPIO Programming
Management of the READ_STS channel
IF (NOT (%MW\0.2.1\0.0:x0)) THEN (*no request in progress*)
SET %M1; (*request latch from channels 0 to 7*)
(*bit reset to 0 indicating saturation of explicit exchanges*)
%SW116:=%SW116 AND 2#1111111111111011;
READ_STS %CH\0.2.1\0.0;
IF (%SW116:x2) THEN
RESET %M1; (*READ_STS retried, saturation has occurred*)
(*%MW\0.2.1\0.0.2:x6 signals a communication error*)
END_IF;
END_IF;
IF(%M1 AND NOT (%MW\0.2.1\0.0:x0)) THEN
(*%MW\0.2.1\0.0.2 can be used*)
RESET %M1;
END_IF;
READ_PARAM at connection point 02
IF (NOT (%MW\0.2.2\0.0:x2)) THEN (*no request in progress*)
SET %M2; (*request latch from channels 0 to 7*)
(*bit reset to 0 indicating saturation of explicit exchanges*)
%SW116:=%SW116 AND 2#1111111111111011;
READ_PARAM %CH\0.2.2\0.0; (*request from the parameters*)
IF ((%MW\0.2.2\0.0.1:x) AND (%SW116:x2)) THEN
(*exchange refused*)
RESET %M2; (*saturation of explicit exchanges*)
END_IF;
END_IF;
IF(%M2 AND NOT (%MW\0.2.2\0.0:x2)) THEN
(*reading finished parameters*)
RESET %M2;
END_IF;
286
TLX DS COM PL7 xxE
FIPIO Programming
WRITE_PARAM at connection point 02
IF (NOT (%MW\0.2.2\0.0:x2)) THEN (*no request in progress*)
SET %M3; (*request latch from channels 0 to 7*)
(*bit reset to 0 indicating saturation of explicit exchanges*)
%SW116:=%SW116 AND 2#1111111111111011;
WRITE_PARAM %CH\0.2.2\0.0, (*parameter transmitting*)
IF ((%MW\0.2.2\0.0.1:x2) AND (%SW116:x2)) THEN
(*exchange refused*)
RESET %M3; (*saturation of explicit exchanges*)
END_IF;
END_IF;
IF(%M3 AND NOT (%MW\0.2.2\0.0:x2)) THEN
(*end of parameter transmission*)
RESET %M3;
END_IF;
WRITE_CMD at connection point 02
IF (NOT (%MW\0.2.2\0.0:x1)) THEN (*no request in progress*)
SET %M3; (*request latch from channels 0 to 7*)
(*bit reset to 0 indicating saturation of explicit exchanges*)
%SW116:=%SW116 AND 2#1111111111111011;
WRITE_CMD %CH\0.2.2\0.0; (*command transmitting*)
IF ((%MW\0.2.2\0.0.1:x1) AND (%SW116:x2)) THEN
(*exchange refused*)
RESET %M3; (*saturation of explicit exchanges*)
END_IF;
END_IF;
IF(%M3 AND NOT (%MW\0.2.2\0.0:x1)) THEN
(*end of command transmission*)
RESET %M3;
END_IF;
TLX DS COM PL7 xxE
287
FIPIO Programming
288
TLX DS COM PL7 xxE
Download
Anúncio