ThySetter Manual 09 2014
ThySetter Manual 09 2014
ThySetter Manual 09 2014
PC SOFTWARE
SETTING AND CONFIGURATION GRAPHICAL
USER INTERFACE FOR THYTRONIC PROTECTIVE
RELAYS
PREFACE
The ThySetter sw is a browser of data (setting, measure, etc..); it implements an engine that is
afford to rebuild the menu set up and the relationships to data concerning all Thytronic protective
relays by means of XML les.
Following operations are performed by means ThySetter:
Open-store of setting les;
ASCII or Excel export reports;
Open/close communication;
Send settings, read settings and oscillography.[1];
PLC - Programmable Logic Controller[1].
Firmware upgrades;
Session level selection and log enabling (log les);
After the device selection Thysetter allows to:
Set the relay reference data;
Set the communication parameters (Modbus address, TCP-IP address and parameters);
Set the rated nominal values (relay nominal current, primary CTs nominal currents, etc..);
Set the common parameters (self-test relays, circuit breaker commands and diagnostic, CT moni-
toring, binary input allocation, relays and LEDs conguration);
Set proles (A e B);
Read info, measures, etc... (protections state, binary input states, output relays state, counters,
etc...);
Read oscillography;
Acquire data concerning stored Faults and Events;
Run commands (reset, send default setting, clock, etc.);
Start-stop settings.
The latest release of ThySetter can be downloaded free of charge from the www.thytronic.it site
(Prodotti / Software - Area Download)[2].
Note 1 The tool is available as an option; contact Thytronic for the purchase of the license
Note 2 The software consists of two les (ThysetterSetup_Vxxx.exe and ThysetterTemplates_Vxxx.exe)
Setup
As soon as the right version is available, the sutup may be start (eg: ThySetterXP_360.exe and Thy-
setterTemplates_V111.exe).
If an older version is already present, a suitable message will ask user to remove the oldest before
proceeding.
After completion the following directory was created: \Programs\Thytronic\Thysetter.
ON LINE
Communication[2]
The following operation may be performed when the communication with device is active:
Automatic connection mode in which the communication with the device is automatically activated
without having to select the device family.
Non automatic connection mode in which communication with the device is activated after select-
ing the device family.
Standing connection
The communication must be open with the Communication->Open command or with a click of
the button and and select the mode for the connection (Serial or Network).[3]
The communication port must be congured (Procedure upper panel):
RS232 whenever the serial port (RS232 or RS485) is used.
Network whenever the Ethernet network is used.
Correspondingly, a subsequent windows is proposed for the concerning parameters; if the Auto-
matic procedure is selected only the COM serial number for the serial port and the IP address for
the Ethernet port are required, whereas, with Manual selection (removing the tick on the Automatic
parameter) the followings may be adjusted:
data rate, data bit number, stop bit number, Modbus address, as well as several timer parameters
useful for RS485 communication,
IP address, TCP port, as well as several timer parameters useful for network communication.
Note 1 Windows 95, Windows 98 rst edition or Millennium edition are not supported.
Note 2 In case of communication problems follow the procedure as described in the appendix of this document
Note 3 The availability of communication ports (serial and / or network) is different for families of devices. Refer to the concerning manuals
For both the operating modes the conguration le must be saved (e.g.: NA60 -CA0-c_xxxxxx where
xxxxxx stands for the serial number).
Upon completion the device type is highlighted (left side on the bottom of desktop; the Online ses-
sion is highlighted over a green eld.
Note 1 The shown images explain some menu levels; all examples are indicatives and unrealistic.
The Paperduck le can be modied with Thysetter commands, with the well-described proce-
dures for Online mode (except for the Start/End change setting commands not required) .
After having completed construction of the desired le, with the device connected, it is possible to
download it over the relay by means of the Send data command which may be accessed from the
Procedures menu, or by means of the button (Download data to device) in the upper command
bar (see previous paragraph).
File
Within the File drop down menu, besides all the usual Windows commands for opening and sav-
ing les, there is the command which allows exporting data relating to readings reports in ASCII and
Excel formats (Export Report File in ASCII Format or Export Report File in Excel Format).
Communication
Within the Communication drop down menu are available the open and close communication com-
mands.
Procedure
Within the Procedures drop-down menu, or by means of the button (Download data to Device),
button (Upload data from Device) buttons, the settings les from a Personal computer to the relay
may be transferred and vice versa.
Upgrade
The Upgrade->Device firmware command or by means of the button (Device rmware) al-
There are also functions that allow you to capture data concerning to failures and the events and
setting changes (Events reading, Faults reading, Setting variations reading) of the Smart-line relay
family (NA011 and NA016), the functions of copying control parameters from one bank to another
(Copy group settings), the conversion of calibration les (Settings File conversion) and export to
ASCII or Excel I/O Report).
Modules
The procedure to enable / disable the ThyBus modules is described below
Copy settings
The procedure to copy the settings of Group A conguration parameters in Group B or vice versa is
as follows:
Highlight with the mouse of settings that you want to copy (eg: Set \ Profile A)
right click -> Set source group
Highlight with the mouse on the target groups of settings (eg: Set \ Parameters Configuration B)
right click -> Set destination Group
provide the Copy group settings command found in the drop-down procedures.
To see the updated conguration, you must close and reopen the le.
I/O report
You can automatically get a list of the settings input and output signals (Association of logic inputs,
LEDs and output relay for protection and control functions) in ASCII or Excel.
Functions
Currently, the menu includes the 87T differential protection for transformers element, and therefore
relevant to the NT10 device.
Upgrade
The Upgrade->Device firmware command or by means of the button (Device rmware) al-
lows upgrading the relay rmware.
You can upgrade the microcontroller fw (Upgrade-> Device firmware), active in off-line mode
and the DSP fw (Upgrade-> DSP), activewith connected device (On-line).
Optional functions
Inside the Optional functions menu the Disturbance and PLC[1], options are available (inclusive of
licences activation) and for ModBus scan tool.[2]
Preference
Note 1 For the procedure for activating please contact Thytronic
Note 2 The description on Modbus scan functionality is described in the RS485 section
Enable Log
When the log is enabled all operation are recorded.
With the intent that to make easier the le hint, it is advisable to:
Erase the old le; the le ThySetter.log is located inside the same directory of the Thysetter
(c:\Programs\Thytronic\ThySetter).
Start ThySetter
Tick on the Enable log command The operating procedure is started with the Preference->En-
able log command or with a click of the button (Enable log).
Run all ThySetter functions; all operations are automatically recorded (le ThySetter.log); the le
may be shown by means any text editor, or with a click of the button (Show log le).
To ask for technical support it is advisable to send by e-mail the log le.
Reset Conguration
You can reset the settings for the communication parameters. The command is useful when the
parameters concerning to the PC serial communications have been changed by other applications,
thereby making it impossible to communicate from ThySetter and protective relays.
Color Preference
Color layout may be customized.
Language
The menu language may be selected.
Toolbar
The icon dimensions may be adjusted.
Password
Nota 1 The session level is concerning the Thysetter sw; for network connections, the session level is common for all devices on the same net
MENU
For any operating mode (Online or Ofine), the following element are provided inside the menu tree,
common for all the Pro-N devices:[2]
Read
Set
Oscillography
Communication
Commands
Test
Start/End settings.
Read
Inside the Read menu all states and measurements are available.
Nota 1 If the password is lost, a new installation of the ThySetter must be performed
Note 2 The shown images explain some menu levels; all examples are indicatives and unrealistic.
Read \ Clock
Inside the submenu the data and time are available. The parameters may be adjusted with Real
Time Clock command (Commands menu).
Read \ Measures
All the measures are available; they are set in the following order:
Direct, Calculated, Displacement, Sequence, Power, 2nd harmonic, 3rd harmonic, 4th harmonic, 5th
harmonic, Demand phase, Demand power, Energy.
Read \ Protections
For every protection element, the following information is available:
Start state
Trip state
Logical block (Block1) state
Selective block (Block2) state
Cold load pickup state
Example of reading concerning the Phase overcurrent - 50/51 protective element; similarly for all the
protection elements.
Measuring unit
Menu Parameter
Parameter label Value Refresh
Read \ Protections \
CT supervision - 74CT
The start, trip and logical block state of the 74CT element are available.
Read \ PLC[1]
Read \ PLC \ User software
The name, version and compilation date informations are available.
Note 1 The menu is only available on relay protection Pro-N; the PLC function is not available on devices NA0x (NA011, NA016, NC020, NV021), the relay
NVA100X-D, NVA100X-T, and on the fault detectors SMExx
Read \ Counters
For every protective element two set of counters are available (Partial counters and Total counters);
the partial counters can be cleared by the user level, while the Total counter reset can be achieved
with password (Session Level 1).
Every partial counter is reset to zero when ten thousand count is passed.
All partial counters can be cleared by means a single command; for this purpose the Reset partial
counters command must be issued (Commands \ Reset submenu).
Partial counters
xx Start partial counter 0...9999
xx Trip partial counter 0...9999
xx Block1 partial counter 0...9999
xx Block2 partial counter 0...9999
Total counters
xx Start total counter 0...9999
xx Trip total counter 0...9999
xx Block1 total counter 0...9999
xx Block2 total counter 0...9999
Example of reading concerning the Phase overcurrent - 50/51 protective element.
Block2 output
To acquire the data stored in the fault relay the following sequence must be activated:
Double click on Faults recording menu
Right-click on Fault reading
click on Send Command
Note 1 Data concerning the fault recorder are stored in Flash memory, so they are not lost when auxiliary power supply goes OFF.
Note 2 Fault 0 is the newest fault, while the fault 19 is the oldest
Note 3 Counter is updated at any new record; it may be cleared by means ThySetter
Similarly, you can clear all stored faults or reset the fault identier.
Similarly as described for the acquisition of faults, to capture the event data stored in the relay the
following sequence must be activated:
Double click on Events recording menu
Right-click on Events reading
click on Send Command
save the le that will also include data concerning events (the le can also be viewed off-line by
opening the saved le).
Note 1 Event 0 is the newest event, while the Event 299 is the oldest event
Note 2 Counter is updated at any new record; it may be cleared by means ThySetter
Some setting are commons to both proles (Prole A and Prole B):
Base
Inputs
Relays
LEDs
Self-test Relay
MMI
Prole selection
PLC
Circuit Breaker supervision
VT supervision - 74VT
CT supervision - 74CT
Remote tripping
Pilot wire diagnostic
Demand measures
while some settings are independently adjustable for any setting prole.
Set \ Base
Inside the submenu the Relay reference name may be entered (free editing eld), the nominal fre-
quency and current may be set and the reading mode may be selected.
Set \ Inputs
Inside the submenu the operating logic (Active-ON/Active-OFF), the timers (IN1 tON, IN1 tOFF, IN2
tON, IN2 tOFF) and the matching for the binary input may be set.[2]
The state of the input is acquired after tON and tOFF delays.
The activation timer denes the time interval following the OFF-ON transition of the input signal
elapsed before the binary input state is acquired.
The de-activation timer denes the time interval following the ON-OFF transition of the input signal
elapsed before the binary input state is acquired.
Note 1 For any change of settings the Start/End settings sequence must be performed .
Note 2 According to the Thybus active external modules (MID16, the concerning binary inputs are available
Set \ LEDs
Inside the submenu the setting parameters concerning the operation mode of LEDs (Latched/No-
latched) are available.
Set \ Self-test Relay
Inside the submenu the setting parameters concerning the Self-test relay (Latched/No- latched) are
available.
Any relevant diagnostic alarm may be associated to a Self-test relay; minor fail alarms may be also
associated to the same relay (K1...K6,...).[2]
Set \ MMI
You can enable or disable changes by MMI; for this purpose it is necessary to operate at Level 1
with password. With ON setting all changes are enabled, with By Password setting changes are
enabled by entering a password, while with OFF setting the changes are disabled.
The parameters concerning the auxiliary modules of the Pro-N devices (MID16, MRI, etc..) may be
displayed if the option to view data for all modules is enabled.
Note 1 According to the Thybus active external modules (MRI), the concerning output relays are available
Note 2 The Energized logic and No-latched operating mode may be set for the self-test relay; other function must not be associated to the same
relay.
Set \ Prole A
Inside the submenu are sorted all parameters concerning the Prole A; a tree structure is provided.
Note 1 If the double setting is not used , the Prole A is the default conguration; the Prole B data is not required
Note 2 If the double setting is not used , the Prole A is the default conguration; the Prole B data is not required
The change in progress is highlighted by a red eld up to completion of the setting session.
Carry out the changes no the output association (LED and output relays)
Close the setting session with End settings command (menu or by means click on the icon); the
setting session state is shown inside a message (Programming state: Close).
Switches
Inside the menu the state of switches may be read and/or changed.
Timers
Inside the menu the state of timers may be read and/or changed.
Note 1 Number and type of protective elements are different for any Pro-N devices
Note 2 The menu is only available on relay protection Pro-N; the PLC function is not available on devices NA0x (NA011, NA016, NC020, NV021), the relay
NVA100X-D, NVA100X-T, and on the fault detectors SMExx
CB Diagnostic
Four diagnostic criteria are implemented.
1) Number of trips. If the trip count value overcomes an user-dened threshold, an alarm is issued.
The Number of trips procedure may be enabled (ModeN.Open ON) and the N.Open threshold
may be set.
2) Summation of tripping current (ModeSumI). If the summation overcomes an user-dened
threshold, an alarm is issued. The summation of tripping current procedure may be enabled
(ModeSumION) and the SumI threshold may be set.
3) Summation of tripping energy (ModeSumI^2t). If the summation overcomes an user-dened
threshold, an alarm is issued. The I2t or Joule integral is a measure of the thermal stress or thermal
energy let through by the CB during fault current interruption. It is the integral of the square of the
current over a given time and is expressed in ampere square seconds. The energy calculation
is based on phase current measures acquired when the trip commands is issued and the CB
opening time (user-programmable according the manufacturer data). The summation of tripping
energy procedure may be enabled (ModeSumI^2t ON), the tbreak CB opening time and the
SumI^2t threshold may be set.
4) CB operating time. If the delay elapsed from the trip command and the CB open state acquisition
overcomes an user-dened threshold, an alarm is issued. The CB operating time procedure may
be enabled (Mode-tOpen ON) and the tbreak threshold may be set inside the Set \ Circuit
Breaker supervision \ CB Diagnostic submenu. The the delay elapsed from the trip command and
the CB open state acquisition is calculated from trigger of a selectable relay (Ktrig-break param-
eter matched with K1...Kx.
The four criteria can be singly or contemporaneously used; N.Open-K, SumI-K, SumI^2t-K,
tbreak-K (output relays) and/or N.Open-L, SumI-L, SumI^2t-L, tbreak-L (LED) matching may
be assigned to the alarm..
Oscillography
Upon trigger of tripping/starting of any protective function or external command, the device records,
in COMTRADE format:[1]
Oscillography with instantaneous values,
RMS value of fundamental components,
Logic states (binary inputs and output relays.
Records are automatically created and stored in sequential order until the allocated RAM[2] memory
if overll; after which the oldest records are overwritten.
The following parameters must be set:
Buffer alarm enable; the alarm output a warning so the user may download the RAM data and then
erase it avoiding to lose oldest records.
Pre-trigger and post trigger time intervals.
Sampled measures.
Analog channels allocation (1...12).
Digital channels allocation (1...12).
Trigger setup.
Note 1 The oscillographic recorder requires a licence; to purchase it please contact Thytronic.
Note 2 data are stored in RAM, them are lost when power supply goes OFF.
Trigger setup
Recording start when a binary input and/or an output relay switches.
Settings:
Pre-trigger time
Post-trigger time
Trigger from outputs enabling (output relays)[2]
Trigger from inputs enabling (binary inputs)[1]
Alarm output enabling (80% buffer)
According to pre-trigger and post-trigger setting and number of measurements, the maximum num-
ber of records is dened.
Note 1 According to the Thybus active external modules (MID16 and/or MRI), the concerning binary inputs and output relays are available.
Manual activation
For diagnostic purposed may be useful to trigger manually the oscillographic recording.
After trigger setup, and setting of the post-trigger time (default 50 ms)[1] the manual trigger may be
started by means the Man. trigger command inside the Upload disturbance records (Optional
functions->Disturbance top down menu.
Note 1 The Man rec. width is the post trigger time when a manual trigger is issued, whereas the pre trigger time must be adjusted inside the Oscillog-
raphy \ Set trigger menu
Record displaying
The desired le may be visualized with a click on File button inside Options->Disturbance->Upload
disturbance visualization top down menu.
The desired .cfg le may be selected; so the measures to display may be selected. The visualization
starts with a click on OK.
Several tools are available (markers, zoom, colors, ecc..).
Snapshots can be stored in JPEG format.
Inside the drop-down Optional functions menu the ModbusScan tool is available; the devices con-
nected to the RS485 Modbus bus may be check.
Within the page there are forms for selection of the parameters and variables which you want to
access (read and / or change):
Device ID address of the device you want to query
IDX address of the variable you want to read or modify
Dim size in bytes of the variable you want to read or modify
TX Data (hex) eld where to insert the value of the parameter you want to send
RX Data (hex) eld containing the parameter value received
Example:
Reading of NA80-MM0-j serial number.
From Modbus manual (fw 2.60) shows that the variable has:
dimension 2,
address 7
typ3 3x:InputRegister.
After entering the above parameters and activation of the Open command (opening serial port), and
the Execute command, the desired value is displayed in the Date field RX (the decimal value cor-
responding to the serial number of the example is 00F1 (hex) that is 241 (decimal).
If the Autonegotiation parameter is set to ON the connected devices rst share their capabilities
as for these parameters and then choose the fastest transmission mode they both support..
IP test
A very simple check over the IP address may be performed with following PC commands:
Open a DOS session: Start -> Programs -> Prompt MS-Dos;
Type ping -n 10 200.1.1.225 -> Enter
If the response is Reply from..., the communication is active; vice versa, if the response is Re-
quest timed out the Ethernet setting must be corrected.
The presence of synchronization is indicated by the value of the state parameter (about the protocol
IEC61850)
Network management
Within the menu you can read and change settings concerning to network parameters, particularly
the type of transmission may be selected:
Multicast
Broadcast
With Multicast selection the message is simultaneously sent information to a group of addressed
devices. An address that refers to a group of destinations, in turn, is a multicast address.
With Broadcast selection the message is sent to all devices on a network.
RPC
Default setting
The factory settings (default) can be loaded: available with Level 1 password only.
Circuit breaker
Open or Close command may be send: available with Level 1 password only.
Reclose[2]
The include/exclusion command of the automatic reclosing function can be sent.
Real Time Clock
Timing may be adjusted.
Once the correct values of the parameters Day, Month, Year, ..., press the meal right click and select
Send the command.[3]
Note 1 The command may be send with a right mouse click over the selected item and a click on the Send command.
Unlike all the setting, the commands may be sent without the Start setting and End setting sequence.
Note 2 The menu is only available on devices with the function of automatic reclosing
Note 3 with a Send command without setting the date and time values, the device is set with default values, ie 01/01/2000 00:00:00
The procedure should only be activated in case of real need in accordance with the instructions
WARNING provided by Thytronic.
Incorrect operation can cause serious damage to the operation of the device!
Preliminary operations
If the rmware update involves the transition from one software version to another where the data-
base is changed the settings must be saved, so you can restore it:
Read data
A form will be submitted where you can enter the name of the le where data are saved.
Close communication
Firmware upgrade
Procedure activation
Select the Upgrade->Update firmware menu.
Conrm
Device initialization
If the data base on the updated version is not compatible with the current data base the default must
be send to the relay.
The situation is highlighted by the ashing of the LED ON and diagnostic messages.
Proceed with the steps:
Open communication:
Nota 1 Il tipo di le (estensione .bin, .hex, .thy, .out) dipende dal dispositivo; in base alla selezione della famiglia (PRON, NA0X, PRONEXT,...) viene pro-
posto il tipo di le corrispondente (.bin, .out, .thy,...)
Select Default settings, press the right mouse button and select Send command
Following the "default settings" command you must wait at least 2 minutes before restarting
WARNING the device or begin a setting session.
Incorrect operation can cause serious damage to the the operation of the device!
Select the Read->Serial number directory, and set the value noted previously.
Select the Parametri di comunicazione directory ed aggiornare Ip host address ed IpGate-
way
Select the Network services->NTP>General directory and set Enable=ON and NTP synchro-
nization led=L4
Close communication
Close the le (no save)
Restart the device (required for the acquisition of the serial number).
Open communication
Settings restore
Select the Procedure->Setting File conversion menu,
Select the source le saved before (reading data section),
Select the destination le saved before (read new settings section),
Push Start and verify the report displayed on the screen to check for updates,
Save the changes (will be saved in the destination le),
Select the Procedure->Send data menu
Push the File button,
Select the destination le saved before,
Push the Configura porta button,
Select Network,
Push the Start button and nally Confirm new data
Now the device is active with the updated rmware and old settings (before the update).
Pro-N modules
The Thybus modules may be set inside the Procedure menu (or by means a click on the icon).
After installation, the modules must be enabled (working with level 1 session level).
Following up any module conguration an automatic reset is issued and the I/O devices are included
inside the device menu. [1] When two MID16 modules are enabled, the hardware address must be
set; the dip-switch layout is showed inside the INSTALLATION section
A little example stands for a preliminary example of a programmable user dened logic embedded
inside ThySetter and Pro_N protective devices.[1]
Development environment
The IL programming language for the PLC device may be carried out, according to the IEC61131-3
standard, by means of any editor or the ThysSetter IDE, while the compilation and sending opera-
tions must be performed by means of ThySetter.
The development environment may be started inside the Option -> PLC -> Develop menu, or by means
of a click on the icon.
Compilation
and sending program
Following operation must be performed:
Open communication
Open the PLC IDE
Load the program le
Compile
Send the le (S-record) to device
Note 1 For the PLC function a licence is required; call Thytronic for purchasing.
Note2 With ThySetter V3.4.3 and IEC 61131-3 V1.2.7 compiler releases, the IL language is implemented (Instruction List);
other languages, according to standard IEC 61131 (ST (Structured Text)), LD (Ladder Diagram), FBD (Function Block Diagram),
SFC (Sequential Functional Chart), will be available in the next
Example
For training aid a simple example is shown; the gioco.il is a PLC program where the LED START,
TRIP, 1, 2, 3, 4, 5 and K1 relay are driven; the full listing is placed in the end of this section.[1]
The I/O circuit by the PLC function (LED START, TRIP, 1, 2, 3, 4, 5 and the K1 relay), must be enabled
inside the Set \ PLC \ Setpoints menu.
IL IEC61131-3 Compiler
The embedded PLC compiler is compliance to IEC61131-3 standard; presently the IL (instruction
list) is implemented.
Typical format of a generic program:
pragma denition
Function (FUN) denition
Function (FUB) denition
Program (PROGRAM) denition
Conguration (CONFIGURATION) denition
pragma
The beginning of program holds some pragma, (compliler directives):
{Preemptive }
{Name gioco}
{Watchdog 1000}
{Device 0}
{Options -NMI}
with meaning:
The PLC scheduler is placed in preemptive mode that is an high priority task can stop a lower
priority or background task[2]
The program name is gioco
The watchdog interval is 1000 ms
The 0 code (universale) is assigned to device
Function (FUN)
Some functions may be included (none in the example).
SetRele: allows to switch ON/OFF the selected relay, this FUB is a FUB SetIO support
SetIO: allows to switch ON/OFF the selected IO.
Pgm1: a range of IO is managed; the state is toggled when the function is called, in circular
mode
Pgm2: the watchdog refresh is performed.
CONFIGURATION
The following specications are dened:[1]
Global variables
Conguration resources, task and program-task association.
the cyclic task T1 that powers the LED 1, 2, 3 with 1000 ms cycle is dened
the cyclic task T2 that powers the LED 4, 5 with 500 ms cycle is dened
the cyclic task T3 that powers the LED START, TRIP with 250 ms cycle is dened
the cyclic task T4 that toggles the K1 relay with 1000 ms cycle is dened
the background program that operates the watchdog refresh is dened
Listing
{Preemptive }
{Name gioco}
{Watchdog 1000}
{Device 0}
{Options -NIM}
(*************************************************************************)
(* FUB: SetRele (Imposta lo stato dei rele) *)
(*************************************************************************)
FUNCTION_BLOCK SetRele
VAR_INPUT
rele : BYTE; (* Rele da attivare*)
state : BOOL; (* stato del rele - TRUE: aperto, false chiuso *)
END_VAR
VAR_EXTERNAL
RELE1 : BOOL;
RELE2 : BOOL;
RELE3 : BOOL;
RELE4 : BOOL;
RELE5 : BOOL;
RELE6 : BOOL;
END_VAR
LD rele
EQ BYTE#1
JMPC ON_RELE1
LD rele
EQ BYTE#2
JMPC ON_RELE2
LD rele
EQ BYTE#3
JMPC ON_RELE3
LD rele
EQ BYTE#4
JMPC ON_RELE4
LD rele
EQ BYTE#5
JMPC ON_RELE5
LD rele
EQ BYTE#6
JMPC ON_RELE6
JMP END
ON_RELE1: LD state
ST RELE1
JMP END
ON_RELE2: LD state
ST RELE2
JMP END
ON_RELE3: LD state
ST RELE3
JMP END
ON_RELE4: LD state
ST RELE4
JMP END
ON_RELE6: LD state
ST RELE6
END: RET
END_FUNCTION_BLOCK
(*************************************************************************)
(* FUB: SetIO (Imposta lo stato del led) *)
(*************************************************************************)
FUNCTION_BLOCK SetIO
VAR_INPUT
element : BYTE; (* Led da accendere *)
state : BOOL; (* stato del led - TRUE: acceso, false
spento *)
isLed : BOOL; (* Indica se lelemento e un led *)
END_VAR
VAR_EXTERNAL
START : BOOL;
TRIP : BOOL;
LED1 : BOOL;
LED2 : BOOL;
LED3 : BOOL;
LED4 : BOOL;
LED5 : BOOL;
END_VAR
VAR
rele : SetRele;
END_VAR
LD isLed
EQ FALSE
JMPC GST_RELE
LD element
EQ BYTE#1
JMPC ON_START
LD element
EQ BYTE#2
JMPC ON_TRIP
LD element
EQ BYTE#3
JMPC ON_LED1
LD element
EQ BYTE#4
JMPC ON_LED2
LD element
EQ BYTE#5
JMPC ON_LED3
LD element
EQ BYTE#6
JMPC ON_LED4
LD element
EQ BYTE#7
JMPC ON_LED5
JMP END
ON_START: LD state
ST START
JMP END
ON_LED1: LD state
ST LED1
JMP END
ON_LED2: LD state
ST LED2
JMP END
ON_LED3: LD state
ST LED3
JMP END
ON_LED4: LD state
ST LED4
JMP END
ON_LED5: LD state
ST LED5
JMP END
END: RET
END_FUNCTION_BLOCK
(*************************************************************************)
(* Program Pgm1 *)
(*************************************************************************)
PROGRAM Pgm1
VAR_INPUT
minEle : BYTE; (* IO piu basso il cui stato deve essere
cambiato *)
numEle : BYTE; (* numero elementi da gestire *)
valEle : BYTE; (* elemento a cui cambiare stato *)
isLed : BOOL; (* indica se lelemento e un led (TRUE) o
un rele (FALSE) *)
END_VAR
VAR_OUTPUT
next : BYTE; (* prossimo led da accendere *)
END_VAR
VAR
leds : SetIO; (* FUB utilita per set stato led *)
count : BYTE;
END_VAR
LD minEle
ST count
LD count
ADD BYTE#1
ST count
LE numEle
JMPC LOOP_OFF
LD valEle
LT minEle
JMPC RESET
LD valEle
ADD BYTE#1
ST valEle
JMP TURN_ON
LD minEle
ST valEle
LD valEle
ST next (* salva il valore per il prossimo giro *)
CAL leds(
element := valEle,
state := TRUE,
isLed := isLed
)
END: RET
END_PROGRAM
(**************************************************************************
****)
(* Program Pgm2
*)
(**************************************************************************
****)
PROGRAM Pgm2
VAR_EXTERNAL
M_FLAG_WatchdogTrg : BOOL;
END_VAR
VAR
pippo : BYTE;
END_VAR
(* Gestione watchdog *)
LD TRUE
ST M_FLAG_WatchdogTrg
RET
END_PROGRAM
(**************************************************************************
****)
(* Configuration Cfg1
*)
(**************************************************************************
****)
CONFIGURATION Cfg1
VAR_GLOBAL
(* Variabili globali per la gestione dei led *)
(* FLAG MEMORY *)
END_VAR
(* Gestione watchdog *)
END_RESOURCE
END_CONFIGURATION
10.5. Verify that the serial port is the one to which the device is connected
10.6. By means of the Configure command set thebaud rate:
10.6.1. 9600 Baud/s for SIF
10.6.2. 19200 Baud/s for PRO-N and NA0XX
11. Push the Start button
12. If at the end of the procedure, the device is not recognized and connected the following opera-
tions must be performed:
12.1. Push the Show log file icon ( )
12.2. Push the Save icon
12.3. Type the name of the le