EasyManua.ls Logo

Schweitzer Engineering Laboratories SEL-2020 - SET M Examples

Schweitzer Engineering Laboratories SEL-2020
470 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Date Code 20010518 Settings 6-37
SEL-2020 Instruction Manual
SET M EXAMPLES
0 = 1:METER:IA Store the port 1 IA value to the first location in the User
region; if the value is stored as a floating-point value, it
will be converted to integer.
1 = 1:METER:VA/100 Divide the port 1 VA value by 100 and store it to the
second location in the User region; if the value is stored
as a floating-point value, it will be converted to an
integer after the division.
2,f = 2:2800h,f;6 Starting from the port 2 address 2800h, copy 6 values to
the User region, starting at the third register; treat both
the source and destination values as floating-point
values, so each copy will move two registers.
14 = 123H Store the value 123h (291) in the fifteenth register of the
User region.
15,C = 1:GLOBAL:0;40 Copy FID string into a packed character format.
55;C;DEAD_COUNTER=5 Store a 5 in the 56
th
register of the User region and treat
it as a counter with the label “DEAD_COUNTER”.
60:0 = X Store the value of Global Element X to bit 0 of the 61st
register in the User region.
60:0;;GLOBALS += Y Use Logical OR to OR the value of Global bit Y with
the current value of bit 0 in the 61st User region register.
Store the result to bit 0 in the 61st User region register
and give that register the label “GLOBALS”.
122:14 = 1 Set bit 14 of the 123rd register in the User region to 1.
97:4;I;TAR_WRD = !3:52A Store the inverted value of the Port 3 relay 52A element
to bit 4 of the 98th User region register and treat it as a
16-bit signed integer with the label “TAR_WRD”.
1 += 1:METER:VB Add the Port 1 VB value to the value in the second
register of the User region and store the result in the
second register of the User region.
ASCII HEXADECIMAL DATA CONVERSION EXAMPLE
Assume that region D1 on port 1 contains the string “A5F0” in registers 4 and 5. A VIEW
command displays the following:
VIEW 1:D1:4 NR 2
4135h 4630h
The objective is to convert to the integer value A5F0 (42,480). Use the SET M functions
described above to convert as illustrated below:
0 = 1:D1:5,H1L # convert and store first half of low byte
0 += 1:D1:5,H1H*16 # convert, shift, and add second half of low byte
0 += 1:D1:4,H1L*256 #convert, shift, add low 4 bits of upper byte
0 += 1:D1:4,H1H*4096 #convert, shift, and add upper 4 bits

Table of Contents

Related product manuals