LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

FieldPoint Negative V Output Issue

CVI 2012, WinXP Pro.

cFP-AIO-610

 

The 4 Analog Output channels are set up in Max for -10.2 - +10.2 V output range.  IAK file saved.  The CVI app reads in this IAK file in the FP_Open call.

 

There does not seem to be any way to programatically set the output range via the FieldPoint driver.

 

Subsequent to FP_Open:

        // Setup the Console cFP subsystem Output Channels on the Analog Input/Output Module in Slot 4
        if ( (status = FP_CreateTagIOPoint (IAServerHandle, ConsoleCfp, Slot4DeviceName,
              "Output 0", &ConsoleAioOUT1Handle)) > 0)
              CfpError(functionName[2].string, status);

        if ( (status = FP_CreateTagIOPoint (IAServerHandle, ConsoleCfp, Slot4DeviceName,
              "Output 1", &ConsoleAioOUT2Handle)) > 0)
              CfpError(functionName[2].string, status);

        if ( (status = FP_CreateTagIOPoint (IAServerHandle, ConsoleCfp, Slot4DeviceName,
              "Output 2", &ConsoleAioOUT3Handle)) > 0)
              CfpError(functionName[2].string, status);

        if ( (status = FP_CreateTagIOPoint (IAServerHandle, ConsoleCfp, Slot4DeviceName,
              "Output 3", &ConsoleAioOUT4Handle)) > 0)
              CfpError(functionName[2].string, status);

 

Thin in the Numeric Control Callback function:

            GetCtrlVal(panel, control, &tempFloat);
            memcpy (ConsoleAioOUT1Buffer, &tempFloat, 4);
            
            if (status = FP_Write (IAServerHandle, ConsoleAioOUT1Handle, ConsoleAioOUT1Buffer, 8))
                 {
                CfpError(functionName[4].string, status);
                return -1;
                }

This works fine for positive values entered in the Numeric Control.  When a negative value is entered, I get (actually generate) the following error:  " FP_Write error: Desired value is outside the configured range."

 

Am I doing something wrong, or is it impossible for CVI and the FieldPoint driver to output negative voltages with this module?

0 Kudos
Message 1 of 2
(3,150 Views)

The module is rated for -10V – 10V, so negative voltages should certainly be possible. It may be worth comparing your code against some of the examples included with the FieldPoint drivers, which can be found in the samples folder under the LabWindows/CVI directory.

0 Kudos
Message 2 of 2
(3,128 Views)