Master Controller Hatting: A review and understanding of the Master Controller Setup Process

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Master Controller Hatting: A review and understanding of the Master Controller Setup Process

NEAL SINGH
Administrator

 

 

A review and understanding of the Master Controller Setup Process

23 Nov. 19

Master Controller Setup

There are two tools available to configure the MC;

The MasterControllerSim and MC_Server application – both written by Koch.

The MasterControllerSim uses MPC Ini files with data configured to correctly setup the MC. It uses the MQTT methods publish/subscribe to communicate via the MQTT broker that Koch has setup on the linux server.

The MC_Server Application is the solution that will grow into the full management system of the MC in regards to its setup and processing of data.

Both these mechanisms serve the same purpose with regards to configuration of the MC, but we will discuss the MC setup from the perspective of the MC_Server Application.

MC_Server Application

This is a application written in Python that runs on the Linux Server (102.130.113.60)  using a mySQL database (‘smartfuel’). There are three major processes;

  1. Configuration of the Master Controller
  2. Decoding of the raw data sent from the Master to the Server and storing them into their secondary respective tables for easier access for other Web/ Mobile app functions.
  3. Processing of the data in the secondary tables to derive events/Alarms/ flow rates and tank levels.

How to setup a MC

Let looking at new device or one that needs to be reconfigured, we have these options of what we can configure the purpose of the MC;

  1. STATIONARY MODE – Homebases/ Service Station Control System
  2. MOBILE MODE – Mobile Bowser
  3. GENERATOR MODE – GenSet Project.

The LCD is not always available in each of these Modes, so there is an alternate configuration method that involve using switches on the main board. [to be discussed in more details later.

We shall work now with the keypad/lcd method.

JUAN_NOTE : We possible need to add a keypad password access to expose the 16Byte Unique ID and the SiteID to the LCD Display

If this MC has been used before, we need to find its 16Byte Unique ID and the SiteID it was assigned and to do this we need to use the Debug Console;

 

 

The Debug Port (P13) must be connected to a terminal application with Pin2 (Ground) and Pin5 (Tx) and once powered up, this is the data you will be looking for;

20312051505747473134303131303135 is the 16 Unique ID

This device has configured and to reconfigure, the INIT CODE must be cleared.

INIT_CODE_CONFIGURED   =  0xAA    // This code indicates that the device is fully configured for working

INIT_CODE_BLOCKED    =   0x00    // This code blocks the device

The INIT CODE must be set to Zero using command 0x64 using the Sim

Once the command has been received on the MC, you will hear a  beep if the Tag reader is connected and this is what you will once you do a reset on the MC.

 

 

Next we need to check the Server setup.  How to access this database is covered in other docs.

We can see that the Site ID# and the SiteID is in the Site Registration table.

Now to setup the MC, several instructions are required and the first 4 must be done in sequence. The Event Manager tables controls what events are interacted with the MC from the Server.

The StateID must be set to 3 for the Event to be Active, else set to 1. Should the update be successful, then it will be set for 4 and 5 means it failed.

NB: An Event  Manager_Repository Table holds all the Events for each Command, this make the setup process easier as it can be copied over in the correct format.

NB: How this mechanism works and how to setup the entries are covered in other docs that I will add to here later:

Each of these messages are package in a precise format before being sent to the MC  and that is done by the DataPushTable.

How each message is sent is carefully managed by the format defined in this table.

 

Each of the SyncID represents a command code that is understood by the MC and that is found in the Event_Code table

 

 

The Sim can setup to assist in understanding the Process we are about to start and subscribing to these topics will be useful

Once you Press Menu and Enter 1221 twice and the #, the configuration process will start and you will notice the following MQTT traffic.

 

 

 

This is the type of message that will be seen on the LCD

Once complete, you will get this message;

 

 

 


image001.emz (2K) Download Attachment
A review and understanding of the Master Controller Setup Process.docx (668K) Download Attachment