PLC checked status message entry: ASK_MSG and GET_MSG function. Schneider Electric Software PLC Application-Specific Functions, Micro/Junior/Pro, 4.5
Pubblicità
Pubblicità
Appendices
PLC checked status message entry: ASK_MSG and GET_MSG function
Introduction Checked 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 ASK_MSG and GET_MSG functions.
Data to send parameter coding
Meaning
1
2
Word number
The table below shows the significance of the different words which constitute the following parameter: Data to send (47 words maximum).
3
4 to P
P +1
P +2
P +3
P +4
P+5
P+6
P contains a marker of value 16#CC17, contains the command type: l l
33 = command number for ASK_MSG,
6 = command number for GET_MSG, 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.
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).
336
TLX DS 37 PL7 xxE
Word number
P+7
P+8
P+9
P+10
P+11
P+12
P+13
P+14
P+15
P
Appendices
Meaning contains a supplementary command: l l
0: no command (ASK_MSG synchronized entry),
24: free entry authorized after display (GET_MSG multiple entry).
contains the value 16#0030.
contain the type of entry field (in Upper case): l l l
BIT +space = bit type,
ANA + space = word type,
LNG + space = double word type.
contains value 0.
contains the type of variable to display (in Upper case): l l l
B +space = bit type,
W + space = word type,
DW = double word type, contains the address index of the variable to display.
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 3
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
Byte 4 specifies the display type: l l l
N = no format,
D = Digital,
A = ASCII
Number of words containing the text of the message to send (see line 4 to P).
TLX DS 37 PL7 xxE
337
Appendices
Word number
Meaning
P+16
P+17 defines whether or not the variable must be updated: l l
Y + space = yes,
N + space = no.
defines the field attributes: l l
I + space = increment,
L + space = others.
P+18 and 19 define the limit type: l l l l
0 = unlimited,
1 = minimum limit only,
2 = maximum limit only,
3 = minimum and maximum limit.
P+20 and 21 contain the minimum limit value.
P+22 and 23 contain the maximum limit value.
P+24 and 25 contain the increment value.
P Number of words containing the text of the message to send (see line 4 to P).
338
TLX DS 37 PL7 xxE
Example of use
Appendices
The example below shows the values corresponding to the word table %MW0:38
(data to send) of the GET_MSG(ADR#0.0.4,%MW0:38,%MW100:4) function;
Value Comment
%MW14
%MW15
%MW16
%MW17
%MW18
%MW19
%MW20
%MW21
%MW22
%MW23
%MW24
%MW25
%MW26
%MW27
%MW6
%MW7
%MW8
%MW9
%MW10
%MW11
%MW12
%MW13
Word number
%MW0
%MW1
%MW2
%MW3
%MW4
%MW5
%MW28
%MW29
NS
N sp
15
3
24
16#0030
AN
A sp
0
W sp
10 espesp
°C
0
3
11 e esp
= sp
__
_ sp mp er at ur
16#CC17
6
70
Te sp D
Y esp
Marker
Command number for GET_MSG
Byte size of the following zone which includes 35 word
Message text
Message text (continued)
Message text (continued)
Message text (continued)
Message text (continued)
Message text (continued)
Message text (continued)
Message text (continued)
Message text (continued)
Message text (end)
End of message mark
Text position (line number)
Text position (column number)
Message characteristics (no attribute or double font)
Message characteristic (no printing)
Position of the variable from the start of the message
Number of characters to display
Additional command (entered after display)
Reserved value
Type of entry field (AN = start of ANA)
Type of entry field (continued)
Reserved value
Type of variable to display (W = word type variable)
Address index for the variable to display (%MW10)
Display format (sp for a non signed variable, sp for the start of the decoding of decimal places after the point)
Display format continued (sp for the end of the coding of the number of digits after the point, D for the decimal format)
The variable must be updated
TLX DS 37 PL7 xxE
339
Appendices
Word number
%MW30
%MW31
%MD32
%MD34
%MD36
Value
0
0
I esp
0
50
Comment
Entry is incremental
The variable is not limited
Minimum limit value
Maximum limit value
Increment value
340
TLX DS 37 PL7 xxE
Scarica
Pubblicità