ADJUST function. Schneider Electric Software PLC Application-Specific Functions, Micro/Junior/Pro, 4.5
Annons
Annons
Built-in DOP functions
ADJUST function
Role This function is used to adjust (read and write) language objects (one object at a time) from a CCX 17 or a MAGELIS, by controlling internal words in the PLC memory.
The language objects which can be adjusted are: l l l internal bits (%Mi), internal words or double words (%MWi, %MDi), rack or remote inputs/outputs (%I, %Q, %IW, %QW, %ID, %QD).
l l l
Note: It is strongly advised: to only execute one instance of the ADJUST function per cycle, to only execute the ADJUST function every n cycles.
to assign parameters to the ADJUST function with consecutive words, so as to optimize the reading of internal words on CCX 17 and MAGELIS.
Activating the function (EN)
Read / Write
(R_W)
This parameter is used to execute the ADJUST function.
l l
The types of objects assigned to this parameter may be: an internal bit (%Mi), an internal word extract bit (%MWi:Xj).
This parameter defines the type of operation to be carried out: l l l l read: bit = 0, write: bit = 1.
The types of objects assigned to this parameter may be: an internal bit (%Mi), an internal word extract bit (%MWi:Xj).
TLX DS 37 PL7 xxE
321
Built-in DOP functions
Type of object
(TYPE)
This parameter defines the type of object to be read or written.
The types of objects assigned to this parameter may be: l an internal word (%MWi), l an immediate value.
The table below shows the different types of objects which can be controlled using the ADJUST function.
Type of object
%Mi
%MWi
%MDi
%I
%Q
2
3
4
0
1
Value of internal word or immediate value
Type of object
%IW
%QW
%ID
%QD
7
8
5
6
Value of internal word or immediate value
322
TLX DS 37 PL7 xxE
Built-in DOP functions
Object address
(ADR)
This parameter contains the address of the object to be read or written.
The object type assigned to this parameter is a table of eight internal words (%MWi).
The table below shows the content of the different words in the table.
This word contains… Possible values of the word Word order number
Word 0
Word 1
Word 2
Word 3
Word 4
Word 5
Word 6
Word 7 the rack number where the language object concerned is situated the number corresponding to the position in the rack of the I/O module or of the processor in which the language object concerned is situated
0 : bit objects, internal words or double words, I/O objects whose operations function is registered in rack 0.
n : other rack I/O objects.
0 : bit objects, internal words and double words, I/O objects whose operations function is associated to channels 1 and
2 of the processor registered at position 0 in the rack.
1 : I/O objects whose operations function is associated to channels 1 and 2 of the processor registered at position 1 the rack.
n : other rack I/O objects.
the channel number in the module where the language object concerned is situated
0 : bit objects, internal words and double words.
1 : I/O objects whose operations function is associated to channel 1 of the processor (communication functions with
PCMCIA).
2 : I/O objects whose operations function is associated to channel 2 of the processor (FIPIO link).
n : other rack I/O objects.
the rank of the I/O object or the number of the internal language object concerned.
0 or n : bit objects, internal words or double words, I/O objects with significant rank.
0 : Other I/O objects.
the connection point number of the device on the FIPIO bus or the rank of the NANET object.
n : NANET or FIPIO objects.
0 : not significant.
the position of the FIPIO module.
0 : basic or not significant module.
1 : extension module the channel number in the FIPIO module or the slave bit on the AS-i bus.
n : AS-i or FIPIO objects.
0 : not significant.
the slave number of the AS-i and NANET buses.
n : AS-i or NANET objects.
0 : not significant.
Value to write
(VAL)
This parameter contains the value to write in the object.
The object type assigned to this parameter is a double word (%MDi).
TLX DS 37 PL7 xxE
323
Built-in DOP functions
Set at 1, or
Incrementation
(SINC) l l
Depending on the type of object to be written, this parameter is used: to set the bit value (%Mi, %Q), to increment by 1 the value of the word or double word (%MWi, %MDi, %QW,
%QD).
Note: the R_W parameter must be set to 1.
The object type assigned to this parameter is an internal bit (%Mi).
Set to 0 or
Decrementation
(RDEC) l l
Depending on the type of object to be written, this parameter is used: to clear the bit value (%Mi, %Q), to decrement by 1 the value of the word or double word (%MWi, %MDi, %QW,
%QD).
Note: the R_W parameter must be set to 1.
The object type assigned to this parameter is an internal bit (%Mi).
This parameter contains the parameter value which has just been read.
The object type assigned to this parameter is a double word (%MDi).
Value of the object read
(VRET)
Management parameters
(GEST)
Examples
The object type assigned to this parameter is a table of 24 internal words (%MWi).
The illustration below shows an example of ADJUST function entry.
Display the call
ADJUST( %MW20:X0.%MW20:X1.%MW21.%MW22:8.%MD30.%MW20:X2.%MW20:X3.%MD32.%MW34:24 )
324
To read the internal double word %MD12, the following values would need to be entered:
Parameter Language object
EN
R_W
TYPE
%MW20:X0
%MW20:X1
%MW21
1
0
Value to be entered
:
2
Comment
Executing the ADJUST function
Read operation
Type of object: %MD
TLX DS 37 PL7 xxE
TLX DS 37 PL7 xxE
Parameter
ADR
VAL
SINC
RDEC
VRET
MAN
Language object
%MW22
%MW23
%MW24
%MW25
%MW26
%MW27
%MW28
%MW29
%MD30
%MW20:X2
%MW20:X3
%MD32
%MD34:24
Built-in DOP functions
0
0
0
0
0
0
0
0
12
0
0
Value to be entered
:
Comment
Not significant
Not significant
Not significant
Object number (%MD12)
Not significant
Not significant
Not significant
Not significant
Not significant
Not significant
Not significant
Value of the object read
Buffer parameter for receiving and sending requests
To write value 15 in the rack output word %QW3.2, the following values need to be entered:
Parameter Language object
EN
R_W
TYPE
ADR
VAL
%MW20:X0
%MW20:X1
%MW21
%MW22
%MW23
%MW24
%MW25
%MW26
%MW27
%MW28
%MW29
%MD30
0
0
0
0
0
15
3
2
6
0
1
1
Value to be entered
:
Comment
Executing the ADJUST function
Write operation
Type of object: %QW
Rack number
Module position
Channel number
Not significant
Not significant
Not significant
Not significant
Not significant
Value to write
325
Built-in DOP functions
Parameter
SINC
RDEC
VRET
MAN
Language object
%MW20:X2
%MW20:X3
%MD32
%MD34:24
0
0
Value to be entered
:
Comment
Not significant
Not significant
Value of the object read
Buffer parameter for receiving and sending requests
To increment the output word on FIPIO %QW\1.2.12\0.1, the following values would need to be entered:
Parameter Language object
EN
R_W
TYPE
ADR
VAL
SINC
RDEC
VRET
MAN
%MW20:X0
%MW20:X1
%MW21
%MW22
%MW23
%MW24
%MW25
%MW26
%MW27
%MW28
%MW29
%MD30
%MW20:X2
%MW20:X3
%MD32
%MD34:24
0
0
0
0
0
1
0
12
1
2
6
0
1
1
Value to be entered
:
Comment
Executing the ADJUST function
Write operation
Type of object: %QW
Not significant
Processor address
Channel number of built-in FIPIO link
Not significant
Connection point number
Module number: Standard
Channel number
Not significant
Not significant
Incrementing the word value by 1
Not significant
Not significant
Buffer parameter for receiving and sending requests
326
TLX DS 37 PL7 xxE
TLX DS 37 PL7 xxE
Built-in DOP functions
To set to 0 the output bit on the AS-i %Q\105.0\7.2 bus, the following values need to be entered:
Parameter Language object
EN
R_W
TYPE
ADR
VAL
SINC
RDEC
VRET
MAN
%MW20:X0
%MW20:X1
%MW21
%MW22
%MW23
%MW24
%MW25
%MW26
%MW27
%MW28
%MW29
%MD30
%MW20:X2
%MW20:X3
%MD32
%MD34:24
0
1
7
0
0
2
0
0
5
0
4
1
1
1
Value to be entered
:
Comment
Executing the ADJUST function
Write operation
Type of object: %Q
Rack number
Module position
Channel number
Not significant
Not significant
Not significant
Bit rank (slave input/output)
Slave number
Not significant
Not significant
Output RESET
Not significant
Buffer parameter for receiving and sending requests
To decrement the output word on NANET %QW\4.0\2.1, the following values would need to be entered:
Parameter Language object
EN
R_W
TYPE
%MW20:X0
%MW20:X1
%MW21
1
1
Value to be entered
:
6
Comment
Executing the ADJUST function
Write operation
Type of object: %QW
327
Built-in DOP functions
Parameter
ADR
VAL
SINC
RDEC
VRET
MAN
Language object
%MW22
%MW23
%MW24
%MW25
%MW26
%MW27
%MW28
%MW29
%MD30
%MW20:X2
%MW20:X3
%MD32
%MD34:24
0
0
0
2
1
0
0
0
1
0
4
Value to be entered
:
Comment
Rack number
Module position
Channel number
NANET object rank (word number)
Not significant
Not significant
Not significant
Slave number
Not significant
Not significant
Decrementing the word value by 1
Not significant
Buffer parameter for receiving and sending requests
328
TLX DS 37 PL7 xxE
Ladda ner
Annons