EasyManuals Logo

ALTUS Nexto Series User Manual

ALTUS Nexto Series
392 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #217 background imageLoading...
Page #217 background image
5. CONFIGURATION
and used a function block equivalent to PulsedCommand function of library LibRtuStandard. The PulsedCommandNexto()
function block shows up coded in ST language.
FUNCTION_BLOCK PulsedCommandNexto
VAR_INPUT
byCmdType: BYTE; // command type:
// 100 = status
// 101 = close/on
// 102 = trip/off
byPulseTime: BYTE; // Pulse duration (in hundredths of second)
ptDbpVarAdr: POINTER TO DBP; // DBP variable address (can be mapped)
stQuality: QUALITY; // DBP point quality(digital module)
END_VAR
VAR_OUTPUT
bON: BOOL; // Odd output mapped on Nexto DO module
bOFF: BOOL; // Even output mapped on Nexto DO module
byStatus: BYTE:= 7; // Function return:
// 1 = invalid command
// 2 = Time out of valid range (2..255)
// 3 = command changed in running time
// 4 = module did not answer to the command (absent)
// 5 = command started or running
// 6 = There is already an active command on this point
// 7 = pulse command finished with success
END_VAR
VAR
byState: BYTE; // Function block state
udiPulseEnd: UDINT; // Pulse end instant
END_VAR
// PulsedCommandNexto state machine
CASE byState OF
0: // Init state, ready to receive commands:
CASE byCmdType OF
100:// Just returns the last status
101: // Execute pulse ON:
// Valids the pulse duration
IF byPulseTime > 1 THEN
// Check if there is already an active command on this point
IF ptDbpVarAdr^.ON OR ptDbpVarAdr^.OFF THEN
// Returns that there is already an active command
byStatus:= 6;
ELSE
// Enables CLOSE output
ptDbpVarAdr^.ON:= TRUE;
ptDbpVarAdr^.OFF:= FALSE;
// Next state: execute pulse ON
byState:= byCmdType;
// Returns started command
byStatus:= 5;
END_IF
ELSE
// Returns the out of range pulse
203

Table of Contents

Other manuals for ALTUS Nexto Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ALTUS Nexto Series and is the answer not in the manual?

ALTUS Nexto Series Specifications

General IconGeneral
BrandALTUS
ModelNexto Series
CategoryComputer Hardware
LanguageEnglish

Related product manuals