4. Configuration
161
Regulating Step Command (C_RC_NA)
Setting Point Command, normalized Value (C_SE_NA )
Setting Point Command, scaled Value (C_SE_NB )
Setting Point Command, short floating point Value (C_SE_NC )
Table 4-101. Variables Declaration to IEC 60870-5-104
Notes:
Regulating Step Command: The C_RC_NA’s object states Lower and Higher are associated
respectively to ON and OFF internal DBP type states.
Step Position Information: According to iten 7.3.1.5 of Standard IEC 60870-5-101, this 8 bit
variable is compose by two fields: value (defined by the 7 bits less signficatives) and transient (
defined as the most significant bit, which indicates when the measured device is transictioning).
Below, there is a code example for fields manipulation in an usint type variable. Attention, because
this code doesn’t consist if the value is inside the range, therefore this consistency remains at user’s
charge.
PROGRAM UserPrg
VAR
usiVTI: USINT; // Value with transient state indication, mapped for the Client
siValue: SINT; // Value to be converted to VTI. Must be between -64 and +63
bTransient: BOOL; // Transient to be converted to VTI
END_VAR
usiVTI := SINT_TO_USINT(siValue) AND 16#3F;
IF siValue < 0 THEN
usiVTI := usiVTI OR 16#40;
END_IF
IF bTransient THEN
usiVTI := usiVTI OR 16#80;
END_IF
PROFIBUS: Except by the digital objects, the protocol IEC 60870-5-104's analog and counters
objects data types are different from PROFIBUS analogs and counters modules data types, not being
possible to map such PROFIBUS variable types directly to IEC 60870-5-104 clients.
In these cases it is needed to create an intermediary variable, to be maped in the IEC 60870-5-104
client, and properly convert the types, as can be observed on the example’s code below.
PROGRAM UserPrg
VAR
iAnalogIn: INT;
iAnalogOut: INT;
diCounter: DINT;
END_VAR
// Analog input conversion from WORD (PROFIBUS) to INT (IEC104)
iAnalogIn:= WORD_TO_INT(wNX6000in00);
// Analog output conversion from INT(IEC104) to WORD (PROFIBUS)
wNX6100out00:= INT_TO_WORD(iAnalogOut);
// Counter conversion from WORDs high+low (PROFIBUS) to DINT (IEC104)
diCounter:= DWORD_TO_DINT(ROL(WORD_TO_DWORD(wNX1005cnt00H), 16) OR wNX1005cnt00L);
Double Points
The double digital points are used to indicate equipment position, such as valves, disjunctors and
secctioners, where the transiction between open and close states demand a determined time. Can thus
indicate an intermediary transiction state between both final states.
Double digital points are also used as outputs and, in an analogous way, it is necessary to keep one of
the outputs enabled for a certain time to complete the transiction. Such actuation is done through