PHA5539302-04

Using protected command interface

To issue a meter command using the protected command interface, you must have a command semaphore.

To get a semaphore, read the semaphore Modbus register. The power meter will return a zero or a nonzero number.

  • If the meter shows zero, someone else owns the semaphore. You must wait for the semaphore to be available before sending a command.

  • If the meter shows a nonzero number, you own the semaphore. Semaphore is provided once until it is released or has been inactive for approximately 4 minutes. Once you have the semaphore, subsequent reads of the semaphore register will return zero until you release the semaphore or it times out.

To send a meter command using the protected command interface:

  1. Read the semaphore register and record the meter response. This is your semaphore.

  2. Build the packet to be written to the command block.

  3. Write the packet as a Modbus block write (enter the command number, semaphore, and parameters at the same time).

    Protected command block example

    Command block Register number
    Command 2039
    Semaphore 5
    Parameters 1

  4. Monitor the meter response registers for validity and completion.

    Protected meter response example

    Meter response Register number
    Status 2039
    Result 0
    Data 1

  5. Write the semaphore back to the semaphore register to release it for another master to use.

QR Code is a registered trademark of DENSO WAVE INCORPORATED in Japan and other countries.

Was this helpful?