Numeric Parameters - LabWindows/CVI Call Parameters

Numeric Parameters

The following settings are available in the Data Type ring control when you select Numeric for the category type:

Numeric Data Type Setting Equivalent C Data Type
Signed 8-bit Integer char
Unsigned 8-bit Integer unsigned char
Signed 16-bit Integer short
Unsigned 16-bit Integer unsigned short
Signed 32-bit Integer long
Unsigned 32-bit Integer unsigned long
Signed 64-bit Integer long long, __int64
Unsigned 64-bit Integer unsigned long long, unsigned __int64
32-bit Real Number float
64-bit Real Number double

Pass by Value or by Reference

When you select the Numeric category for a parameter, the LabWindows/CVI Adapter displays the Pass control. This control specifies whether TestStand passes the value of the argument you specify in the Value Expression control or passes a pointer to the argument. If you select By Reference (by pointer) , the LabWindows/CVI Adapter passes a pointer to the argument value.

If you choose to pass a pointer, the argument you specify in the Value Expression control must be the name of a variable or property. When you select the Numeric category for the return value, you may leave the Value Expression control empty or specify the name of a variable or property.

Note You can pass NULL to a Number pointer parameter by passing an empty ActiveX reference or the constant Nothing . Do not pass the constant 0 .

Result Actions

The LabWindows/CVI Adapter displays the Result Action ring control and the Set Error.Code to Value option for return values and parameters you pass by pointer. Depending on the settings of these controls, TestStand can automatically set the Error.Occurred and Error.Code properties of the step according to the value in the numeric argument when the function returns.

Use the Result Action ring control to configure TestStand to set the Error.Occurred property to True when the return value or parameter value after the call is greater than zero, less than zero, equal to zero, or not equal to zero. Use the Set Error.Code control to request TestStand to assign the output value of the argument to the Error.Code property.

Note When you set the parameter type to Signed 64-bit Integer or Unsigned 64-bit Integer, the Set Error.Code control is not visible to prevent setting a 64-bit integer value to the Error.Code property of the step. The Error.Code property is a double-precision, floating-point number and you cannot always store 64-bit integers precisely in a double-precision, floating-point number because of limitations of the double-precision, floating-point format.

Enumeration Parameters

When you select a Numeric parameter that accepts an enumerated type from a code module that has a type library, the Value Expression control becomes a combo box where you select elements of the enumeration. You can also enter an enumeration name or the corresponding numeric value for the enumeration directly into the Value Expression or Function Call controls.

See Also

Enumeration Parameters

Mapping Parameters