Quantcast
Channel: Instrument Control (GPIB, Serial, VISA, IVI) topics
Viewing all articles
Browse latest Browse all 5625

BFFA0060 : Insufficient location information or resource not present in the system.

$
0
0

Hello,

I'm looking to communicate to a PCIe using a thunderbolt cable in order to use an integrated PXI module.

The PCIe manufactrer has provided an IVI driver based as you can see the UserManual attached below.

With the following C/C++ program desplayed below :

int main() { cout << "SimpleAcquisition\n\n"; //ViSession session = VI_NULL; ViSession session; viOpenDefaultRM( &session ); ViChar search[] = "PXI?*::INSTR"; ViFindList find = VI_NULL; ViUInt32 count = 0; ViChar rsrc[256]; ViStatus status = viFindRsrc( session, search, &find, &count, rsrc ); if( status==VI_SUCCESS && count>0 ) { do { PXI_Port = rsrc; printf( "Found: \"%s\"\n", rsrc ); status = viFindNext( find, rsrc ); } while( status==VI_SUCCESS ); //viClose( find ); } else if( count==0 ) { printf( "No PXI instrument found\n" ); } //viClose( session ); // Initialize the driver. See driver help topic "Initializing the IVI-C Driver" for additional information. //ViSession session=rm; ViBoolean const idQuery = VI_TRUE; ViBoolean const reset = VI_FALSE; // Setup IVI-defined initialization options ViConstString standardInitOptions ="Cache=true, InterchangeCheck=false, QueryInstrStatus=true, RangeCheck=true, RecordCoercions=false,Simulate=false"; checkApiCall( AqMD3_InitWithOptions( rsrc, idQuery, reset, standardInitOptions, &session ) ); cout << "Driver initialized \n"; //ViSession session=rm; // Read and output a few attributes. ViChar str[128]; checkApiCall( AqMD3_GetAttributeViString( session, "", AqMD3_ATTR_SPECIFIC_DRIVER_PREFIX, sizeof( str ), str ) ); cout << "Driver prefix: " << str << '\n'; checkApiCall( AqMD3_GetAttributeViString( session, "", AqMD3_ATTR_SPECIFIC_DRIVER_REVISION, sizeof( str ), str ) ); cout << "Driver revision: " << str << '\n'; checkApiCall( AqMD3_GetAttributeViString( session, "", AqMD3_ATTR_SPECIFIC_DRIVER_VENDOR, sizeof( str ), str ) ); cout << "Driver vendor: " << str << '\n'; checkApiCall( AqMD3_GetAttributeViString( session, "", AqMD3_ATTR_SPECIFIC_DRIVER_DESCRIPTION, sizeof( str ), str ) ); cout << "Driver description: " << str << '\n'; checkApiCall( AqMD3_GetAttributeViString( session, "", AqMD3_ATTR_INSTRUMENT_MODEL, sizeof( str ), str ) ); cout << "Instrument model: " << str << '\n'; checkApiCall( AqMD3_GetAttributeViString( session, "", AqMD3_ATTR_INSTRUMENT_INFO_OPTIONS, sizeof( str ), str ) ); cout << "Instrument options: " << str << '\n'; checkApiCall( AqMD3_GetAttributeViString( session, "", AqMD3_ATTR_INSTRUMENT_FIRMWARE_REVISION, sizeof( str ), str ) ); cout << "Firmware revision: " << str << '\n'; checkApiCall( AqMD3_GetAttributeViString( session, "", AqMD3_ATTR_INSTRUMENT_INFO_SERIAL_NUMBER_STRING, sizeof( str ), str ) ); cout << "Serial number: " << str << '\n'; ViBoolean simulate; checkApiCall( AqMD3_GetAttributeViBoolean( session, "", AqMD3_ATTR_SIMULATE, &simulate ) ); cout << "\nSimulate: " << ( simulate?"True":"False" ) << '\n'; // Configure the acquisition. ViReal64 const range = 1.0; ViReal64 const offset = 0.0; ViInt32 const coupling = AqMD3_VAL_VERTICAL_COUPLING_DC; cout << "\nConfiguring acquisition\n"; cout << "Range: " << range << '\n'; cout << "Offset: " << offset << '\n'; cout << "Coupling: " << ( coupling?"DC":"AC" ) << '\n'; checkApiCall( AqMD3_ConfigureChannel( session, "Channel1", range, offset, coupling, VI_TRUE ) ); cout << "Number of records: " << numRecords << '\n'; cout << "Record size: " << recordSize << '\n'; checkApiCall( AqMD3_SetAttributeViInt64( session, "", AqMD3_ATTR_NUM_RECORDS_TO_ACQUIRE, numRecords ) ); checkApiCall( AqMD3_SetAttributeViInt64( session, "", AqMD3_ATTR_RECORD_SIZE, recordSize ) ); // Configure the trigger. cout << "\nConfiguring trigger\n"; checkApiCall( AqMD3_SetAttributeViString( session, "", AqMD3_ATTR_ACTIVE_TRIGGER_SOURCE, "Internal1" ) ); // Calibrate the instrument. cout << "\nPerforming self-calibration\n"; checkApiCall( AqMD3_SelfCalibrate( session ) ); // Perform the acquisition. ViInt32 const timeoutInMs = 1000; cout << "\nPerforming acquisition\n"; checkApiCall( AqMD3_InitiateAcquisition( session ) ); checkApiCall( AqMD3_WaitForAcquisitionComplete( session, timeoutInMs ) ); cout << "Acquisition completed\n"; // Fetch the acquired data in array. ViInt64 arraySize = 0; checkApiCall( AqMD3_QueryMinWaveformMemory( session, 16, numRecords, 0, recordSize, &arraySize ) ); vector<ViInt16> dataArray( static_cast<size_t>(arraySize) ); ViInt64 actualPoints, firstValidPoint; ViReal64 initialXOffset[numRecords], initialXTimeSeconds[numRecords], initialXTimeFraction[numRecords]; ViReal64 xIncrement = 0.0, scaleFactor = 0.0, scaleOffset = 0.0; checkApiCall( AqMD3_FetchWaveformInt16( session, "Channel1", arraySize, &dataArray[0],&actualPoints, &firstValidPoint, initialXOffset, initialXTimeSeconds, initialXTimeFraction,&xIncrement, &scaleFactor, &scaleOffset ) ); // Convert data to Volts. cout << "\nProcessing data\n"; for( ViInt64 currentPoint = 0; currentPoint< actualPoints; ++currentPoint ) { ViReal64 valueInVolts = dataArray[static_cast<size_t>(firstValidPoint + currentPoint)]*scaleFactor + scaleOffset; } cout << "Processing completed\n"; // Close the driver. checkApiCall( AqMD3_close( session ) ); cout << "\nDriver closed\n"; return 0; }

I'm getting the error :  BFFA0060 : Insufficient location information or resource not present in the system.

Also, the PCIe is not displayed in Ni Max as you can see in the attatched image.

chaimoss_0-1672838712623.png

I can't see the cause of the resource's absence.

Any help will be appreciated.


Viewing all articles
Browse latest Browse all 5625

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>