Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Digital Matter Site
  • Contact Us

Set Digital Input Counters on the Hawk - 0x0103

Written by Iman Kareem

Updated at March 7th, 2025

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Contact Support
  • Home
  • Device Manager (OEM Server)
  • Device Manager API
  • Device Control - Asynchronous Messages

Table of Contents

Before you start Description Request Example Data Payload: Example: Set Baseboard Dig In to 400 and Reset Card Dig In 1 to 0. Confirming Message Processing

Before you start

Ensure you have reviewed:

  • Welcome to the Device Manager API
  • Device Manager ASYNC Messaging Architecture

A full list of API calls can be found at: https://api.oemserver.com/swagger/index.html.

 

Description

NB: Not available for all device/card firmware versions. It is recommended to update to the latest version. Check release notes for details. 

This can be used to set the Digital Input Counter value on the Hawk when used in Pulse Counting applications. i.e. to reset a count back to 0, or to set an initial/offset value. 

Request Example

Data Payload: 

Offset

Length

Data Type

Description

0

1

BYTE

Change Mask. Only set counts for selected digital inputs

 

Hawk

b0 – Baseboard DIG1

b1 – Reserved

b2 – Reserved

b3 – Card Digital Input 1

b4 – Card Digital Input 2

b5 – Card Digital Input 3

b6 – Card Digital Input 4

b7 – Card Digital Input 5

1

1

BYTE

Reserved

2

4

UINT32

Count of b0 digital input

6

4

UINT32

Count of b1 digital input

10

4

UINT32

Count of b2 digital input

14

4

UINT32

Count of b3 digital input

18

4

UINT32

Count of b4 digital input

22

4

UINT32

Count of b5 digital input

26

4

UINT32

Count of b6 digital input

30

4

UINT32

Count of b7 digital input

Example: Set Baseboard Dig In to 400 and Reset Card Dig In 1 to 0.

 

{
    "MessageType":259,
    "CANAddress":4294967295,
    "Data":[9,0,144,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
    "ExpiryDateUTC":"2024-11-25T18:25:43.511Z"
}

 

A screenshot of a computer code

Description automatically generated

9 - represents the change mask – Essentially selecting which digital input counters you would like to target with the async.

In this case we are targeting the baseboard Digin (b0) and Card Dig in 1 (b3)

00001001 = 9

0 – Reserved byte

144,1,0,0 – This UINT32 value is made up of 4 bytes. 400 in 32bit binary is 00000000 00000000 00000001 10010000. This can be written as 0,0,1,144. This is big endian, and the async payload structure is little endian.Therefore, it is written as 144,1,0,0.

0,0,0,0 and 0,0,0,0 – These represent the count of b1 and b2. Because we aren’t changing these, we can write whatever we want here, but we do need to write the 8 digits. 

0,0,0,0 – This represents the count of b3. Because we are setting it to 0, keep them all zeros.

Confirming Message Processing

The success of the message will be apparent in the next device data upload. 

 

digital inputs configure counters

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • Device Manager API - ASYNC Messaging Architecture
  • Resync Device Slots - 0x001
  • Remote Restart - 0x002
  • Activate Recovery Mode via the API - 0x003
  • Turn a Digital Output on/off - 0x004

Subscribe to Partner News

Subscribe to our mailing list to receive Digital Matter news, product and tehnical updates, and more.

Subscribe

Copyright © Digital Matter . All Rights Reserved.

Privacy Contact Support

Knowledge Base Software powered by Helpjuice

Expand