Quantcast
Channel: LabWindows/CVI topics
Viewing all articles
Browse latest Browse all 5339

Unable to set parameters on XDL35-5P

$
0
0

I am using a Sorenson XDL35-5P with CVI and IVI drivers through TCPIP connection.


I can connect and query the instrument just fine so communication is working.


I am unable to set ANY parameters. It either gives me errors through the driver or runs and returns status=0 but does not change the instrument. If I access through the webpage of the device it all works fine.


Not sure what I am missing.

 

Thanks

void main()
{

ViRsrc AG34972_VISA_Name_1 = "TCPIP0::172.16.12.248::inst0::INSTR";
ViRsrc PSU_VISA_Name_1 = "TCPIP0::192.168.1.138::inst0::INSTR";
ViStatus status;
ViChar buffer[1024] = "";
ViUInt32 retCount;
ViInt32 Hours,Mins;
ViReal64 Seconds;
ViInt32 n=0;
double Resistance;
double Voltage=12;
double Current;
ViBoolean Status = VI_FALSE;
char Error[256] = "";
ViChar Version[256];
ViChar Message[256];

status = viOpenDefaultRM(&defaultRM);

// status = viOpen(defaultRM,AG34972_VISA_Name_1,VI_NULL, VI_NULL,&AG34972_handle);
status = viOpen(defaultRM,PSU_VISA_Name_1,VI_NULL,VI_NULL,&PSU_Handle);


// status = Ag34970_init (AG34972_VISA_Name_1, VI_TRUE, VI_TRUE, &AG34972_handle);



// status = Ag34970_SystemGetSystemTime(AG34972_handle,&Hours,&Mins,&Seconds);

// status = Ag34970_RouteSetClose(AG34972_handle,301,Status);

// status = Ag34970_MeasureDCVoltMeasure(AG34972_handle,"301",100,-103,1,Voltage,n);


// status = Ag34970_MeasureResistanceMeasure(AG34972_handle,"301",-105,-103,1,&Resistance,&n);

// status = TQLP_InitWithOptions(PSU_VISA_Name_1,VI_TRUE,VI_TRUE,"Simulate=0,RangeCheck=1,QueryInstrStatus=1,Cache=1",PSU_Handle);

status = TQLP_init(PSU_VISA_Name_1,VI_TRUE,VI_TRUE,&PSU_Handle);
// status = TQLP_ResetWithDefaults(PSU_Handle);
// status = TQLP_SetAttributeViInt32(PSU_Handle,"1","RANGE",1);
// status = TQLP_SetAttributeViReal64(PSU_Handle,"1",TQLP_ATTR_VOLTAGE_LEVEL,10.0);


status = viWrite(PSU_Handle,"V1 14",6,VI_NULL);
TQLP_error_message(PSU_Handle,status,&Error);

// status = TQLP_ConfigureVoltageLevel(PSU_Handle,"1",Voltage);
// status = TQLP_ClearStatus(PSU_Handle);
// TQLP_SetAttributeViReal64(PSU_Handle,"1", TQLP_ATTR_RANGE_SETTING,1);
// TQLP_SetAttributeViReal64(PSU_Handle,"1", TQLP_ATTR_VOLTAGE_LEVEL,12.0);
// status = TQLP_ConfigureOutputRange (PSU_Handle, "1",TQLP_VAL_RANGE_VOLTAGE, 12.0);
// status = TQLP_error_message(PSU_Handle,status,&Error);



// status = TQLP_ConfigureVoltageLevel(PSU_Handle,"1",(ViReal64) 24.0);
// TQLP_ConfigureCurrentLimit(;
// status = TQLP_ConfigureOutputEnabled(PSU_Handle,"1",VI_TRUE);
status = TQLP_error_message(PSU_Handle,status,&Error);



TQLP_close(PSU_Handle);


// Ag34970_close(AG34972_handle);

}


Viewing all articles
Browse latest Browse all 5339

Trending Articles



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