AMI Momentaries

Power Down and Power Up events that are within the AMI momentary threshold are considered momentary. If a Power Down call comes in, then a Power up comes in 2 minutes later, with the threshold set to 5 minutes, the Power Down call is not created. The default threshold is 1 minute.

The momentary threshold is handled in the RXINT_AMI_CALLS_TO_SUBMIT_VW view.

To change this in SQL, using SQL Server Management Studio, right click on the view then select Script View As > ALTER To > New Query Editor Window.

locate DATEADD(MINUTE, -1, GETDATE() in the following section:

WHERE MEVNT.eventtype IN (1,2)
        AND (DATEADD(HOUR, DATEDIFF(HOUR,SYSUTCDATETIME(), SYSDATETIME()),MEVNT.EVENTTIME) 
	 	 	BETWEEN DATEADD(HOUR, -2, GETDATE()) AND DATEADD(MINUTE, -1, GETDATE()))
        AND MEVNT.METERID = CUST.METER
        AND CUST.feeder_id is not null
        AND CUST.connect_status < 2

Then change to the desired time. For example, if the threshold needs to be set to 10 minutes, change it to:

DATEADD(MINUTE, -10, GETDATE()

To change it in Oracle, if using SQL Developer right click on the view and choose Edit.

Look for this section:

WHERE MEVNT.eventtype IN (1,2)
AND (CAST((FROM_TZ(CAST(MEVNT.EVENTTIME AS TIMESTAMP),'+00:00') AT TIME ZONE 'US/Mountain') AS DATE)
BETWEEN (SYSDATE - TO_DSINTERVAL('0 02:00:00')) AND (SYSDATE - TO_DSINTERVAL('0 00:01:00')))
AND MEVNT.METERID = CUST.METERAND CUST.feeder_id is not null
AND CUST.connect_status < 2

For a 5 minute threshold, change the following line:

BETWEEN (SYSDATE - TO_DSINTERVAL('0 02:00:00')) AND (SYSDATE - TO_DSINTERVAL('0 00:01:00'))) 

To:

 BETWEEN (SYSDATE - TO_DSINTERVAL('0 02:00:00')) AND (SYSDATE - TO_DSINTERVAL('0 00:05:00')))
QR Code is a registered trademark of DENSO WAVE INCORPORATED in Japan and other countries.

Was this helpful?