6. RESULTADOS Y DISCUSIÓN
6.1. Bucle I Fase de caracterización del contexto educativo
6.1.1. Caracterización del marco institucional del Colegio La Gaitana IED
5.10.2.1
Tag name convention
The following Tags are available for standard eWON Inputs & Outputs access:
NOTE:
The button input (BI1) can be used during normal eWON operation, if it is pressed for more that 4 seconds while eWON is booting, the flash file system will be erased (please refer to chapter “Resetting the eWON” on page 198).
(1) The number of item depends of eWON type. See table Table 96 on page 118.
(2) From firmware 4.1S3 to 4.3, the CIx value wrapped at 1.000.000. Before 4.1S3, the CIx was misinterpreted as negative when value passes over 231.
IO Server configuration Comment
IO Server Name EWON
Topic Name Empty
Item Name DI# Digital Input (1) Boolean
CI# Counter Input (1) 0 to 2.147.400.000(2) Analog
FI# Counter Input 0 to 255 Analog
LI# Latched Counter Input (1) Analog
DO# Digital Output (1) Boolean
AI# Analog Input (1) Analog
BI# Button Input (1) Boolean
Example of use of SN_LO and SN_HI items in a Basic program:
For instance, you can define a Tag for the digital input 1 as follows: Server name: EWON - Topic: empty - Address: DI1
IO Server configuration Comment
IO Server Name EWON
Topic Name SYS
Item Name SN_LO Serial number, low part (see example of use below) Analog SN_HI Serial number, high part (see example of use below) Analog
SYS_UP Number of seconds since Power Up Analog
GSM_REG GSM Status: 1: Home network 2: Searching registration 3: Registration denied 4: unknown registration 5: Roaming 100: Not applicable 101: Registration in progress usually: 1 or 5: means registered
Other: not registered
Analog
GSM_LEV GSM level (antenna reception) Analog
Table 95: eWON IO server configuration parameters - SYS topic
a% = Int(SN_HI@ * 65536) + Int(SN_LO@) Rem Product code
b% = a% Mod 256 Rem Sequential number c% = Int(a% / 256) Mod 1024 Rem Week number
d% = Int(a% / 262144) Mod 64 Rem Year number
e% = Int(a% / 16777216) Mod 128 Print "SN: ";e%;" ";d%;"-";c%;"-"b% eWON500 eWON2001 eWON4001 eWON2101 eWON4101 eWON2005 eWON4005
DI1 Status of input 1 on connector Input/output (bottom side) CI1 Counter on input 1 on connector Input/output (bottom side) LI1 Latched counter on input 1 on connector Input/output DO1 Digital command of output 1 on connector Input/output
BI1 Status of button (reset) on front face Table 96: Available Items for eWON product type
5.10.2.2
Energy configuration with the LIx Tags
The following parameters can be added to the eWON IO server in order to activate the energy support (enter Energy:1, validate and the other parameters will be automatically added):
eWON4002 eWON4102
DI1... DI8 Status of input 1 to 8 on connector DI1-DI8 (top side) CI1... CI8 Counter on input 1 to 8 on connector DI1-DI8 (top side)
LI1... LI8 Latched counter on input 1 to 8 on connector DI1-DI8 (top side) DI9 Status of input 9 on connector Input/output (bottom side) CI9 Counter on input 9 on connector Input/output (bottom side) LI9 Latched counter on input 9 on connector Input/output (bottom) DO1... DO2 Digital command of relay 1 and 2 on relay connector (bottom side)
DO3 Digital command of output 1 on connector Input/output (bottom) BI1 Status of button (reset) on front face
AI1... AI4 Value of analog input 1 to 4
AI5... AI6 Value of analog input 5 to 6 (PT100 probes)
Parameter Default Value
Energy 0 or 1 Enabled or not
Once Energy is defined, the eWON will automatically add the other parameters with default value.
When 0, no energy computation at all are performed, saving eWON CPU resources. Debug 0 or 1 Not automaticaly
added When :1 all synchonisations are logged in the Real time event log.
RefTime This is the reference time to compute interval. Leaving this empty will start at 1/1/1970 00:00. You may enter a date with hour in the form 08/07/2002 11:15:00 to set a new reference (usually not required). IntTime 15 This is the integration time in MINUTES.
IntTolS 5
This is a tolerance on the integration time in SECONDS. If the measurment interval is shorter or longer than this number of seconds the period is considered as valid. For example IntTime=15 IntTolS =5 means "interval is valid if between 11.14:55 and 11.15:05".
SyncIO 5
This is the IO number for clock synchronization. 0 means no synchro available, 1..8 is the IO number. Synchonisation is based on the counter input associated with the digital input, each time the IO changes the eWON will try to perform a synchronization (see also SyncTolS)
SyncTolS 5
This is the tolerance for accepting the synchronization pulse in SECONDS.
If the synchronization pulse arrives outside the interval, the pulse is rejected. ERROR REPORT: the first time the pulse is rejected, an error is logged in the event log. Next errors are not logged (except in Real time log if Debug is enabled); When sync are accepted again, a trace is logged in the event file for the first accepted synchonization.
REM: Because the internal clock has a precision of 1 second, the time is only updated if the absolute value of the offset is greater than 1 (2 or more). Otherwise the offset jitters between -1 and +1 all the time.
Figure 91: eWON IO server default parameters 5.10.2.2.1 ENERGY TAGS
The following tags are available for energy management:
REM1: Energy tags are logged after each new period IF Logging is enabled, even if value has not changed since previous period. REM2: Even if Deadband is -1 and Interval is 0. If not you will have additional points and even maybe duplicate points.
(*) Important: See “Tags are stored as Float” on page 67 5.10.2.2.2 32 BIT COUNTER TAGS:
The eWON IO Server provides now 8 32 bits (*) counter tags named: CI1..CI8. These counter are writable but writing in these register affect the LIx inputs of the Energy IO server module.
(*) Important: See “Tags are stored as Float” on page 67
LI1..LI8 Latched input When the Integration Period expires, the number of pulses counted during the integration period are logged in the corresponding LIx.
ST1..ST4 Status variables:
ST1 This is the absolute time when counter were latched.
Expressed in seconds since 1/1/1970 minus 0x30000000 HEX (or 805306368 decimal). This huge value is substracted to maintain precision in the Float storage. (*)
Latch time - 0x30000000 ST2
0 means period is valid (within tolerance), 1 means period is invalid. Period status
ST3
Length of the period in second. Period length sec
ST4 This 32 bit counter counts is increased by 1 after each integration period. It can be used with ONCHANGE to perform operations when period expires.
5.10.2.3
Analog Input Value Range (eWON4002)
The Analog Inputs (AI1 to AI6) come from a 12 bits ADC. Then, the values read on a AI# tag go from 0 to 4095. 5.10.2.3.1 Configurable analog input AI1 to AI4
• In 0-10V mode
If you need to read the tag value converted in Volt, you can set a factor of 0.0024420 = 10/4095 with an offset of 0.
Figure 92: Tag’s configuration: reading the tag value in Volt • In 0-20 mA mode
The shunt resistor for measuring current is a 220 Ohm.
If you need to read the tag value converted in mA, you can set a factor of 0.011099 = 20/1802 with an offset of 0.
Figure 93: Tag’s configuration: reading the tag value in mA
AI# Volt 0 0 4095 10 AI# mA 0 0 1802 20
5.10.2.3.2 PT100 input AI5 and AI6
These two entries measure a Resistance value in Ohm.
As you can see, the slope is negative, and if you need to read the tag value converted in Ohm, you can set a factor of -0.02014774 = -82.505/ 4095 with an offset of 162.13.
Figure 94: Tag’s configuration: reading the tag value in Ohms If you need to convert in °C: temperature = AI * (-0.0523311) + 161.376.
The default range of PT100 in eWON is -50°C to 150°C.
Full range of ADC is: -52.92°C to 161.376°C (79.625Ohm to 162.13 Ohm). Note:
• eWON4002 prior to S/N 0517-xxxx-89 have a PT100 range from 0°C to 131.9°C and must apply the following formulas: Ohm = IOValue * (-0.012402) + 150.8
°C = IOValue * (-0.0322) + 131.9
• eWON4002 from S/N 0517-xxxxx-89 to S/N 0521-xxxx-89 have a PT100 range from -56°C to 151°C and must apply the following formulas: Ohm = IOValue * (-0.0195068) + 158.2 °C = IOValue * (-0.050677) + 151.2 AI# Ohm 0 162.13 4095 79.625
5.10.3
Setup
The Energy IO Server is based on the eWON IO Server. The configuration consists in advanced parameters from this latter IO Server. The following screen shot shows the standard empty eWON IO Server configuration page.
Figure 95: eWON IO server configuration page
5.10.3.1
Configuration of the counter pulse length
Pulse length for counter can be configured on all eWON types. The configuration must be entered in the eWON IO server edit area. The following parameters are used:
Example of configuration: MinInterval:40
MaxInterval:1000 ReverseCount:0
Counts pulse with length longer than 40 msec and shorter than 1000 msec, other pulses are ignored.
MinInterval: default=10, min=10
MaxInterval: default=268435455, max=268435455
MinInterval and MaxInterval are entered in milliseconds
ReverseCount: default=0
The pulse length must be between MinInterval and MaxInterval to be accepted, the measurement resolution is 5 msec (the precision of the pulse length measured is 5 msec)
ReverseCount can be used if pulses entered in the eWON are reversed, reversed means that signal is normally high on the eWON input and it goes low when the pulse occurs.