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

HP 6632A - set voltage - Labwindows CVI

$
0
0

Hello everyone,

 

I am trying to set the voltage of HP 6632A using Labwindows CVI. The initialization succeeds (1) if no id query and no reset command is send and fails (2) if both is send (Bus error occurred during transfer) (see update below); alos when I try to configure/set the output using the function below, I get an error code BFFF0038 - Bus Error occurred during transfer (1) or BFFF000E  - Invalid session handle (2).

 

I checked tha MAX and the GPIB address there matches with what is shown on the power supply. It also responds to the id query there.  I am using the Instrument driver provided by NI to talk to the device through USB-GPIB converter from NI.

 

Am I missing a step here? Do I need to configure the device in a certain way before using it?

 

Thanks!

 

 

// Initialization (sending Id request and reset command)
    int error_int = hpe363xa_init( "GPIB::0", VI_ON, VI_ON, &g_instrumentHandle1 );
    char error_string[100];
    Fmt( error_string, "%x", error_int );

    MessagePopup( "Return Value Init", error_string );  // <- ERROR BFFF0038  Bus error occurred during transfer

// Config to enable output
    error_int = hpe363xa_configOutput3632( g_instrumentHandle1, VI_OFF );
	
    Fmt( error_string, "%x", error_int );
    MessagePopup( "Return Value Config", error_string );  // <- ERROR BFFF000E  Invalid session handle

// Set Voltage to 12 V	
    error_int = hpe363xa_outputSetOperate3632( g_instrumentHandle1, VI_OFF, 12.0, 1.0, VI_ON );
	
    Fmt( error_string, "%x", error_int );
    MessagePopup( "Return Value Set", error_string );  // <- ERROR BFFF000E  Invalid session handle

 

 

 

Device: HP 6632A DC Power Supply via Labwindows CVI.

Connection: NI GPIB-USB connection cable

Driver: Labwindows Plug&Play

Language: Labwindows 2013

OS: Windows 7

 

Edit1:

I just realized that I am not sending an id query and an reset command when initializing the device. I updated the code above. Unfortunately I get an error code if I do this and the devicehandle is not set! The set functions following are failing subsequently.

 

 

 

 

 


Viewing all articles
Browse latest Browse all 5565

Trending Articles



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