Hardware interfacing

This dialog is opened by pressing shortcut key CTRL+C or via menu Options->Configuration and selecting the Hardware interfacing tab

 

The hardware interfacing feature makes it possible to connect external development boards and similar devices and have NGX Data Server send strike data and close alarm status to the board over a serial connection. Possible uses include, but are not limited to, custom built external sound alarms, relays that can turn off electronic equipment when lightning storms are nearby or integration with other weather sensors.

 

 

Serial port configuration

Transmit port - Lets you select the serial port of the external device. The drop-down list will contain all active ports.

 

Baud rate - Sets communication speed. The baud rate should be set the same in NGX Data Server and on the external device. The latter is normally done via coding.

 

Enable - Check/uncheck this option to enable/disable communications with the external device.

 

Refresh port list - If the external device was not connected when you first opened this dialog you can click on this button to perform a re-scan for active COM ports after you have connected the device.

 

Serial messages

NGX Data Server can transmit two types of messages, a Periodic status message which is sent at predefined intervals, and a Strike event message which is sent every time NGX Data Server receives a strike data event from NexStorm over inter-process communications.

 

The default message format, as shown in the screenshot above, can be changed to any text string. To include variable values in the message there are two parameters for periodic status messages denoted @P1 and @P2 which will be replaced by values as defined below.

 

@P1 - Current close alarm range in either kilometers or miles.

@P2 - Close alarm active status; 0 for not triggered, 1 for triggered.

 

For strike events there is one parameter, @P1, containing the distance, either kilometers or miles, to the latest received strike.

 

Distance units used in these messages as well as close alarm range are configured in the Alarm settings dialog.

 

Strike event messages are optional and can be enabled or disabled by checking the Enable option.

 


Below are two examples of the NGX Data server serial output and how it would look at the receiving device. In the examples we assume that the Distance Units option (Alarm settings tab) is set to kilometers.

 

Example serial output, status message:

 

$R:25,C:0

 

Explanation: $R indicates a periodic status message containing the configured close alarm range, here it is set at 25 km radius (in this case kilometers because that is our currently selected distance unit). C:0 means that the close alarm is not triggered, i.e. no close lightning has been detected. If the close alarm on the other hand had been triggered this part of the message would have indicated this by shown this as C:1.

 

Example serial output, strike event message

 

$S:676

 

Explanation: $S indicates this is a strike message. A strike was detected and 676 tells us the distance to the strike, in this case measured in kilometers.

 


Arduino Uno example code

A simple example sketch (source code) for the Arduino Uno board demonstrating how to blink the on-board LED whenever a strike event message is received from NGX Data server over serial can be downloaded here