Configure Temperature Measurement Alarm in Expert Mode

Temperature measurement is mainly applied to the electric and industrial automation fields, which provides accurate and stable temperature measurement for the mid-to-high end manufacturers (e.g., intelligent robot) to realize the process control, automatic detection, and status monitoring of electromechanical devices. You can set the temperature measurement to expert mode to measure the temperature according to areas or presets during the industrial production. When the measured temperature does not meet the configured temperature threshold, the alarm will be triggered and uploaded to monitoring center if configured. And then, you can receive the alarm.

  • Make sure you have called NET_DVR_Init to initialize the development environment.

  • Make sure you have called NET_DVR_Login_V40 to log in to the device.

Figure 1 Programming Flow of Configuring Temperature Measurement Alarm in Expert Mode

  1. Optional: Call NET_DVR_GetSTDAbility , set the dwAbilityType to NET_DVR_GET_THERMAL_CAPABILITIES (value: 3634), and set condition parameter lpCondBuffer in the structure of NET_DVR_STD_ABILITY to "NULL" for getting the thermal capability to check if the following functions are supported.

    The thermal capability (XML_ThermalCap) is returned by the output parameter lpOutBuffer in the structure of NET_DVR_STD_ABILITY.

  2. Configure functional mutex parameters.
    1. Optional: Call NET_DVR_GetSTDAbility, set the dwAbilityType to NET_DVR_GET_THERMINTELL_CAPABILITIES (value: 6711), and set condition parameter lpCondBuffer in the structure of NET_DVR_STD_ABILITY to 4-byte channel No. for getting the functional mutex capability to check if it is supported.

      The functional mutex capability (XML_Cap_ThermIntell) is returned by the output parameter lpOutBuffer in the structure of NET_DVR_STD_ABILITY.

    2. Optional: Call NET_DVR_GetSTDConfig with NET_DVR_GET_THERMINTELL (command No.: 6712) and set the condition parameter IpCondBuffer in the structure of NET_DVR_STD_CONFIG to 4-byte channel No. for getting the existing or configured functional mutex parameters for reference.

      The functional mutex parameters (NET_DVR_THERMINTELL_PARAM) are returned by the output parameter lpOutBuffer in the structure of NET_DVR_STD_CONFIG.

    3. Call NET_DVR_SetSTDConfig with NET_DVR_SET_THERMINTELL (command No.: 6713), set the condition parameter IpCondBuffer and input parameter lpInBuffer in the structure of NET_DVR_STD_CONFIG to 4-byte channel No. and NET_DVR_THERMINTELL_PARAM for setting functional mutex parameters.
  3. Configure temperature measurement mode.
    1. Optional: Call NET_DVR_GetSTDAbility, set the dwAbilityType to NET_DVR_GET_THERMOMETRY_MODE_CAPABILITIES (value: 6764), and set condition parameter lpCondBuffer in the structure of NET_DVR_STD_ABILITY to 4-byte channel No. for getting the capability of temperature measurement mode configuration.

      The capability of temperature measurement mode configuration (XML_Cap_ThermometryMode) is returned by the output parameter lpOutBuffer in the structure of NET_DVR_STD_ABILITY.

    2. Optional: Call NET_DVR_GetSTDConfig with NET_DVR_GET_THERMOMETRY_MODE (command No.: 6765) and set the condition parameter IpCondBuffer in the structure of NET_DVR_STD_CONFIG to 4-byte channel No. for getting the existing or configured temperature measurement mode for reference.

      The temperature measurement mode (NET_DVR_THERMOMETRY_MODE) are returned by the output parameter lpOutBuffer in the structure of NET_DVR_STD_CONFIG.

    3. Call NET_DVR_SetSTDConfig with NET_DVR_SET_THERMOMETRY_MODE (command No.: 6766), set the condition parameter IpCondBuffer and input parameter lpInBuffer in the structure of NET_DVR_STD_CONFIG to 4-byte channel No. and NET_DVR_THERMOMETRY_MODE for setting the temperature measurement mode to "expert".
  4. Call NET_DVR_PTZPreset_Other to set a preset.
  5. Configure linkage between temperature measurement information and preset.
    1. Optional: Call NET_DVR_GetSTDAbility, set the dwAbilityType to NET_DVR_GET_THERMOMETRY_SCENE_CAPABILITIES (value: 3623), and set condition parameter lpCondBuffer in the structure of NET_DVR_STD_ABILITY to 4-byte channel No. for getting the configuration capability of linkage between temperature measurement information and preset.

      The configuration capability of linkage between temperature measurement information and preset (XML_Cap_ThermometryScene) is returned by the output parameter lpOutBuffer in the structure of NET_DVR_STD_ABILITY.

    2. Optional: Call NET_DVR_GetSTDConfig with NET_DVR_GET_THERMOMETRY_PRESETINFO (command No.: 3624) and set the condition parameter IpCondBuffer in the structure of NET_DVR_STD_CONFIG to NET_DVR_THERMOMETRY_COND for getting the existing or configured linkage parameters between temperature measurement information and preset for reference.

      The linkage parameters (NET_DVR_THERMOMETRY_PRESETINFO) are returned by the output parameter lpOutBuffer in the structure of NET_DVR_STD_CONFIG.

    3. Call NET_DVR_SetSTDConfig with NET_DVR_SET_THERMOMETRY_PRESETINFO (command No.: 3625), set the condition parameter IpCondBuffer and input parameter lpInBuffer in the structure of NET_DVR_STD_CONFIG to NET_DVR_THERMOMETRY_COND and NET_DVR_THERMOMETRY_PRESETINFO for linking the temperature measurement information to the preset.
  6. Configure rules of temperature alarm or temperature difference alarm.
  7. Configure arming schedule for temperature measurement alarm.
    1. Optional: Call NET_DVR_GetSTDAbility, set the dwAbilityType to NET_DVR_GET_THERMOMETRY_SCHEDULE_CAPABILITIES (value: 6750), and set condition parameter lpCondBuffer in the structure of NET_DVR_STD_ABILITY to 4-byte channel No. for getting the arming schedule configuration capability to check if it is supported.

      The arming schedule configuration capability (XML_Schedule) is returned by the output parameter lpOutBuffer in the structure of NET_DVR_STD_ABILITY.

    2. Optional: Call NET_DVR_GetSTDConfig with NET_DVR_GET_THERMOMETRY_SCHEDULE (command No.: 6751) and set the condition parameter IpCondBuffer in the structure of NET_DVR_STD_CONFIG to 4-byte channel No. for getting the existing or configured arming schedule parameters for reference.

      The arming schedule parameters (NET_DVR_EVENT_SCHEDULE) are returned by the output parameter lpOutBuffer in the structure of NET_DVR_STD_CONFIG.

    3. Call NET_DVR_SetSTDConfig with NET_DVR_SET_THERMOMETRY_SCHEDULE (command No.:6752), set the condition parameter IpCondBuffer and input parameter lpInBuffer in the structure of NET_DVR_STD_CONFIG to 4-byte channel No. and NET_DVR_EVENT_SCHEDULE for setting arming schedule.
  8. Configure linkage action for temperature measurement alarm.
    1. Optional: Call NET_DVR_GetSTDAbility, set the dwAbilityType to NET_DVR_GET_EVENT_TRIGGERS_CAPABILITIES (value: 3501), and set condition parameter lpCondBuffer in the structure of NET_DVR_STD_ABILITY to "NULL" for getting the linkage action configuration capability to check if it is supported.

      The linkage action configuration capability (XML_EventTriggersCap) is returned by the output parameter lpOutBuffer in the structure of NET_DVR_STD_ABILITY.

    2. Optional: Call NET_DVR_GetSTDConfig with NET_DVR_GET_THERMOMETRY_TRIGGER (command No.: 3632) and set the condition parameter IpCondBuffer in the structure of NET_DVR_STD_CONFIG to NET_DVR_THERMOMETRY_TRIGGER_COND for getting the existing or configured linkage action parameters for reference.

      The linkage action parameters (NET_DVR_EVENT_TRIGGER) are returned by the output parameter lpOutBuffer in the structure of NET_DVR_STD_CONFIG.

    3. Call NET_DVR_SetSTDConfig with NET_DVR_SET_THERMOMETRY_TRIGGER (command No.: 3633), set the condition parameter IpCondBuffer and input parameter lpInBuffer in the structure of NET_DVR_STD_CONFIG to NET_DVR_THERMOMETRY_TRIGGER_COND and NET_DVR_EVENT_TRIGGER for setting linkage action.
    Note:

    To receive the alarm in platform or system, the linkage action must be set to "center" (upload to alarm center).

  9. Optional: Receive the temperature measurement alarm (i.e., temperature alarm and temperature difference alarm) in arming mode (see Receive Alarm/Event in Arming Mode) or listening mode (see Receive Alarm/Event in Listening Mode) when alarm is triggered.
    Note:

    The command lCommand to receive related temperature measurement alarm should be set to COMM_THERMOMETRY_ALARM (command No.: 0x5212) or COMM_THERMOMETRY_DIFF_ALARM (command No.: 0x5211) in the APIs of NET_DVR_SetDVRMessageCallBack_V50 and NET_DVR_StartListen_V30. For alarm details, refer to the structure NET_DVR_THERMOMETRY_ALARM or NET_DVR_THERMOMETRY_DIFF_ALARM.

Call NET_DVR_Logout and NET_DVR_Cleanup to log out and release the resources.