Data Scaling Configuration
Introduction
The RediGate primarily polls data from field devices and reports to hosts, such as MQTT. However, it can also do various mathematical operations or other logic on the data stored in Realtime Databases (RTDBs). This tutorial shows how to use POD logic to perform scaling or other mathematical operations on the data.
Pre-Requisites
A RediGate 100 or 400 series device with network connectivity
Completion of the Getting Started Guide for your respective RediGate device (See RediGate 100 Series Getting Started Guide or RediGate 400 Series Getting Started Guide)
Instructions
Using ACE, Open the default configuration you used in the "Getting Started Guide".
Download and open RediGate-Scaling-Demo.xml from the http://redigate.elecsyscorp.com/examples site within the same ACE window as your default configuration.
The example is located under Other Example Configurations → Math/Scaling Example Configuration.If you have already completed one of the other example configurations to obtain a "SimData" field unit with simulated data, you may skip to the next numbered step.
Otherwise, copy and paste the following objects from the RediGate-Scaling-Demo.xml config into your default configuration:FieldUnitInternalMast2 (paste under NullCircuit)
Data Simulator (paste under Internal Channel 15)
Edit the "Internal Channel 15" object so that it contains a scan record for FieldUnitInternalMaster2 (Unit Address 2), poll record 1, with a Scan Period of 1 second:
Copy and paste the following objects from the RediGate-Scaling-Demo.xml config into your default configuration:
Internal Channel 14 (paste under Master Channels)
(NOTE: Verify that the Instance number of the channel is 14 after being pasted. If you already had a Channel 14, a different channel number will be assigned, which should be used in step 'b' below.)
The Internal Channel 14 includes a Field Unit named "Math-Scaling Demo Unit." This is an internal unit that copies data from another RTDB (in this case, the Minutes, Seconds, and Year values from the SimData unit), then performs some math on the values and copies the modified values back to the original RTDB.Scale Data Sample (paste under SerialMMI)
If the Internal Channel (pasted in step a above) is something other than 14, edit the Report Table to change the "Channel" column to match the channel's Instance number.
In the RTDB ("RtdbMod") under the "SimData" field unit (child object under Channel 15 → FieldUnitInternalMast2), modify the Database Definition to have 20 registers each.
Load and deploy the configuration to your RediGate. After the RediGate finishes restarting, log in to the 'user' menu.
Select option '3' for Diagnostic Services.
Select option '535' for View Custom Report.
Enter a number of seconds to refresh the display.
The Custom Report shows the original and scaled values of the Internal unit.
3/16/18 21:07:39 : <<< Scaled_Data : Changes-Enabled >>>>*30001=22 *40001=71*30002=39 *40002=13000*30003=2018 *44001=20.18*39101=100E'xit N'ext P'rev T'op B'ottom H'elp 'C'hange(Ch14/Rtu1/@30001) 1/7In this example, register 39101 contains a divisor for the 3rd calculation (2018 / 100 = 20.18).
To change the scaling factor:
Enter 'B' to move the cursor to the last entry.
Enter 'C' to change the register value.
Enter the new divisor.
Enter 'Y' to write the value into the register.E'xit N'ext P'rev T'op B'ottom H'elp 'C'hange(Ch14/Rtu1/@39101) 7/7 cEDIT Chan14/Rtu1/39101 (*39101) IEEE[100] 10(10) for Chan14/Rtu1/39101 (*39101).......End of List...Okay to write current entries? (y/n) y
The new scaling factor should appear in the list, and the register 44001 should be divided by the new number.*30003=2018 *44001=201.8>*39101=10