PLC status message display: SEND_MSG function. Schneider Electric Software PLC Application-Specific Functions, Micro/Junior/Pro, 4.5
Reklama
Reklama
Appendices
PLC status message display: SEND_MSG function
Introduction Status messages can be constructed from the PLC application by creating the send using internal words (%Mwi) as intermediaries to display them on a CCX17 console screen. This is the role of the SEND_MSG function.
Data to send parameter coding
Meaning
1
2
Word number
3
4 to P
P +1
P +2
P +3
P +4
P+5
P+6
P+7
P
The table below shows the significance of the different words which constitute the following parameter: Data to send (47 words maximum).
contains a marker of value 16#CC17, contains value 0 contains the length in bytes and the zone of the following words, contain the message text to send, this being the characters that are underlined representing the characters expected during the display of a variable. The maximum length of this text is 40 characters.
If the text is composed of an odd number of characters, the last byte is worth 0, if the text is of even length and if it is less than 39 characters, the last byte must contain the value 0, contains the line number where the message must be displayed, contains the column number where the start of the message must be displayed,
This two word zone (four characters) contains the message characteristics and is structured as follows:
Character 1
Character 2
Characters 3 and
4
This character (in capitals) corresponds to a video attribute: l l l l
B = blinking,
R = reverse video,
A = blinking and reverse video,
N = no attribute
This character (in capitals) corresponds to the character font size: l l
S = normal size,
D = double width or height corresponds to the printing option: l l
Y followed by a space = yes,
N followed by a space = no.
If you do not want to display a variable, the following word must be at 0 (in this instance, following parameters is ignored), otherwise the following parameters must be added: contains the position of the variable to display, counted in number of characters in relation to the start of the message.
contains the number of characters to display for the variable.
Number of words containing the text of the message to send (see line 4 to P).
332
TLX DS 37 PL7 xxE
Word number
P+8
P
Meaning
P+9
P+10 and 11 contain the type of entry field: l l l l l
BIT +space = bit type,
ANA + space = word type,
LNG + space = double word type,
DAY + space = date type,
HOU + space = hour type.
P+12 contains value 0.
P+13 contains a supplementary command: l l l
0: no command,
1: clear screen,
2: clear the line before the display.
contains the value 16#0030.
P+14 contains the type of variable to display: l l l
B +space = bit type,
W + space = word type,
DW = double word type,
Note: for a Date or Hour type, this word contains value 0.
contains: l l the address index of the variable to display for a bit, word or double word type, value –1 for a date or hour type.
Number of words containing the text of the message to send (see line 4 to P).
Appendices
TLX DS 37 PL7 xxE
333
Appendices
Word number
Meaning
P+15 and 16 contain the display format for the variable and are structured in the following ways:
Byte 1 specifies if the variable is signed (sign +), or not (space),
Bytes 2 and 3 specifies the display format:
Byte 2 Byte 2
ASCII or DIGITAL without decimal places the ASCII code for the space, that being 20
DIGITAL with less than ten decimal places
DIGITAL with at least ten decimal places the ASCII code for the space, that being 20 the ASCII code for the number of tens of decimal places the ASCII code for the number of decimal places the ASCII code for the number of decimal place units
P+17
P+18
Byte 4 specifies the display type: l l l
N = no format,
D = Digital,
A = ASCII define if the variable must be refreshed or not: l l
Y + space = yes,
N + space = no.
contains the value N + space,
P+19 to 25 contain the value 0 (7 words).
P Number of words containing the text of the message to send (see line 4 to P).
334
TLX DS 37 PL7 xxE
Example of use
Appendices
The example below shows the values corresponding to the word table %MW0:12
(data to send) of the SEND_MSG(ADR#0.0.4,%MW0:12,%MW100:4) function;
Value Comment Word number
%MW0
%MW1
%MW2
%MW3
%MW4
%MW5
%MW6
%MW7
%MW8
%MW9
%MW10
%MW11
15
ND
N sp
0
0
2 ur sp 4
16#CC17
0
18
Fo
Marker
Imposed value
Byte size of the following zone which includes nine words
Message text
Message text (continued)
Message text (end)
End of message mark
Message position (line number)
Message position (column number)
Message characteristics (no attribute or double font)
Message characteristic (no printing)
The message includes no variable
TLX DS 37 PL7 xxE
335
Stiahnuť
Reklama