EmCan Protocol Specification

PORTYPE frame dim Parameter

Last updated 17 April 2013

This document describes the dim parameter to the EmCan PORTYPE frame. 

Dim is a 16 bit integer ID for the physical property that the port value represents.  All IDs not listed below are reserved and may be defined in the future. 

Data values with dim of 2 or more should have the port scale and offset applied before interpretation.  To get the true port value in those cases, multiply the raw numeric value by the scale, then add the offset. 

When a particular physical value with specific units is being represented (dim ≥ 4), then a change of 1 means a change of one unit before the port scale and offset are applied.  For example, the port data could be the 10 bit reading from a analog to digital converter with a input range of 0 to 5 Volts.  In that case, dim should be 8 (Volts), the scale factor 5 / 1023 = 0.004888, and the offset 0.  If this voltage is coming from a weight scale with a range of ±10 N and the 0 value at 2.5 V, then dim should be 7 (Newtons), scale 20 / 1023 = 0.01955, and the offset -10. 

The defined dim values are:

0: Unspecified

The port data can not be interpreted within the EmCan framework as anything more than a collection of bits with unknown meanings. 

1: Unscaled numeric

The port bits form a numeric value according to the dform parameter, but the meaning of the resulting numeric value is not specified further.  The port scale and offset are not applied, and must be specified to be 1.0 and 0.0, respectively.  This dim value is appropriate, for example, for inherently integer values. 

2: Unspecified numeric

The port bits form a numeric value according to the dform parameter and the port scale and offset should be applied, but the meaning of the resulting numeric value is not specified further. 

3: Dimensionless

4: Length, meters

5: Mass, kilograms

6: Time, seconds

7: Force, Newtons

8: EMF, Volts

9: Electric current, Amperes

10: Frequency, 1/second