Convert to phys.vi, Convert to phys.vi -12 – National Instruments CAN 372139B-01 User Manual

Page 38

Advertising
background image

Chapter 5

Automotive Diagnostic Command Set API for LabVIEW

Automotive Diagnostic Command Set User Manual

5-12

ni.com

Convert to Phys.vi

Purpose

Converts a binary representation of a value into its physical value using a type descriptor.

Format

Input

type descriptor is a cluster that specifies the conversion of the binary
representation to its physical value:

Start Byte gives the binary representation start byte in the data in
record.

Byte Length is the binary representation byte length.

Byte Order is the byte ordering of the data in the binary
representation:

0: MSB_FIRST (Motorola)

1: LSB_FIRST (Intel)

Data Type is the binary representation format:

0: Unsigned. Only byte lengths of 1–4 are allowed.

1: Signed. Only byte lengths of 1–4 are allowed.

2: Float. Only byte lengths of 4 or 8 are allowed.

Scale Factor defines the physical value scaling:

Phys = (Scale Factor) * (binary representation) + (Scale Offset)

Scale Offset (refer to Scale Factor)

data in is the data record from which physical values are to be extracted.

Output

value is the physical value extracted from the record.

Advertising