User Tools

Site Tools


seb2net:seb2_.net

SEB2 .net DLL

.net DLL to connect with SEB2 to perform measurements.

Library Details

  • .net Version: 4.6.1
  • File Name: seb2 library.dll

Version History

  • 1.0.1.0
    • Release: 23.04.2018
    • Initial Release

Introduction

This .net DLL is meant to leverage force measurements with DriveTest SEB2 devices in customer applications. It can perform measurements with SEB2 devices. As a result of a measurement, the Peak and RMS values are returned. Also, the course of values is available.

The library is not capable of changing the configuration of SEB2 devices. For this purpose use the program DriveTest PinchPilot. SEB2 .net DLL assumes that the SEB2 device is correctly configured.

Theory of Operation

seb2library follows an event based approach to account for the asynchronous process of measurements.

  1. Create SEB2 Object
  2. Hook Event Handler for event MeasurementStateChange. Use it to reflect SEB2 status changes in your application, like end of measurement
  3. Hook Event Handler for event UpdatedData. Use it to reflect SEB2 data changes in your application, like incoming result data
  4. Connect to SEB2 device
  5. Start Measurement. It is not required to stop the measurement. This happens automatically after the force threshold level has been exceeded and sensor force decays
  6. Monitor data changes with event handler. Read result properties (Peak_value, Rms_value, course_of_values) after data updated
  7. Monitor status changes with event handler to know when SEB2 device is ready for next measurement
  8. Optional: Abort measurement before it stopped automatically. E.g. when measurement did not start after a time
  9. Disconnect SEB2 device

Functions, Properties and Events

Functions

SEB2

  • Constructor
  • Parameters:
    • string COMport: Name of COM Port that SEB2 device is attached to or creates (SEB2 with USB), e.g. “COM1”
  • Return value: none

Connect

  • Establish connection
  • Parameters
  • Return value: Boolean
    • true: Connection to SEB2 successfully established
    • false: Connection could not be established. Check COM Port, SEB2 power status and connection cable

StartMeasurement

  • Start Measurement
  • Parameters: none
  • Return value: Boolean
    • true: Measurement process was started
    • false: Not possible to start measurement process. Possible reason: no sensor attached when Connect() was called.

AbortMeasurement

  • Abort a running measurement process prematurely.
  • Parameters: none
  • Return value: Boolean
    • true: Abort command was successfully send
    • false: Could not send command. Possible reason: SEB2 device not connected.

Disconnect

  • End running measurement process and close the connection to SEB2 device
  • Parameters: none
  • Return value: Boolean
    • true: Closed connection successfully
    • false: Connect close failed. Possible reason: connection was not open.

Events

UpdatedData

Fires when one of the following Properties changed:

  • Calibration_date
  • Course_of_values
  • Error
  • Sampling_rate
  • Sensor_serial_number
  • Seb2_serial_number
  • Software_version
  • Peak_value
  • Rms_value

Use this event to react on data changes, like incoming result data of a measurement.

Event Arguments:

  • sender: SEB2 object
  • updatedData: enum seb2_library.updated_data, Property of SEB2 object, that changed its value
    • peak_value
    • rms_value
    • software_version
    • calibration_date
    • sensor_serial_number
    • seb2_serial_number
    • course_of_values
    • error
    • sampling_rate

MeasurementStateChange

Fires when Property MeasurementState changed. Use this Event to monitor the state of a measurement/SEB2.

Event Arguments:

Properties

Calibration_date

  • Data Type: String
  • Format: YYYY-MM-DD
  • Updates on: Function Connect() initiates reading of Calibration_date once
  • Meaning: Calibration date of force sensor attached to SEB2 device

Course_of_values

  • Data Type: List of float
  • Format: Force values in Newton
  • Updates on: end of transmission after end of measurement
  • Meaning: All force samples acquired during measurement
  • Remark: Determine time between samples via Property “Sample_rate”

Error

Possible Error values:

  • communication_checksum: Transmission failure. Check quality of physical connection.
  • communication_protocol: Data received from SEB2 does not match expected format. Make sure firmware/library versions are compatible
  • communication_sequence: Telegram sequence counter duplicate
  • device_not_connected: SEB2 device is not connected
  • general: No specific error inforamtion available
  • none: No error error occured
  • no_sensor_connected: A sensor is not connected to SEB2 device
  • unknown: SEB2 communicated error information not known to library

The SEB2 device does not check the presence of a sensor before starting a measurement. It is not guaranteed that correct error information matching the situation is passed from the SEB2 device to the library.

Measurement_State

Measurement_State possible values:

  • failure: Measurement failed
  • measurement_ended: Measurement has ended
  • measuring_in_progress: Measurement is running (trigger threshold has been exceed)
  • ready: Device is ready to start a measurement
  • unknown: Measurement state is not known because not information from SEB2 came in yet
  • waiting_for_trigger: Measurement was started, trigger threshold has not been exceeded yet

Peak_value

  • Data Type: float
  • Format: Force value in Newton
  • Updates on: end of measurement
  • Meaning: Maximum force value in measurement

Rms_value

  • Data Type: float
  • Format: Force value in Newton
  • Updates on: end of measurement
  • Meaning: Root Means Square value measurement, starting after threshold value is reached
  • Remark: This value is different to the RMS value of Course_of_values, as it contains values before threshold is reached.

Seb2_serial_number

  • Data Type: String
  • Format: xxxx.zzzz.u (with x=device class, z=running number, u=life cylce)
  • Updates on: Function Connect() initiates reading of Seb2_serial_number once.
  • Meaning: Serial Number of SEB2 device

Sensor_serial_number

  • Data Type: String
  • Format: xxxx.zzzz.u (with x=device class, z=running number, u=life cylce)
  • Updates on: Function Connect() initiates reading of Sensor_serial_number once
  • Meaning: Serial number of force sensor attached to SEB2 device

Software_version

  • Data Type: String
  • Format: M.m.b (M=major version, m=minor version, b=build)
  • Updates on: Function Connect() initiates reading of Software_version once.
  • Meaning: Firmware version of SEB2 device
seb2net/seb2_.net.txt · Last modified: 2018/05/18 14:56 by fabian