LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

why can't I initialize hp34401a?

I can initialize hp34401a through 'communicate with instrument' of Measurement & Automation Explorer ,but I can't initialize use my LabWINDOWS workspace.Why?
0 Kudos
Message 1 of 5
(3,661 Views)
Hi,
What happens when you run the code? do you get an error message? If you put a breakpoint on one of your init calls, does it get there?

Personally I'dsay you've gone a bit overboard on your case statements... why not use the idQuery and resetDevice variables as parameters to the init function call? and while you're at it, why not bring out the option to set the gpib address from you're UIR too?
for example...

char resourseDescriptor[20];
int gpibAddr;

GetCtrlVal(panelHandle, PANEL_GPIB_ADDR, &gpibAddr);
GetCtrlVal(panelHandle, PANEL_IDQUERY, &IDQuery);
GetCtrlVal(panelHandle, PANEL_RESETDEVICE, &ResetDevice);

Fmt(resourceDescriptor,"%s<:>
(hp34401a_init (resourceDescriptor, IDQuery, ResetDevice, &InstrumentHandle);

jus
t a thought, as the init calls are repeated a bit unecessarily... the more duplication of code you have,the more changes you need tomake if you find a bug... bitter experience 😉

If you can postsome more infop regarding how yourcode fails to initialise the meter, I'll try and help.
Regards
John
0 Kudos
Message 2 of 5
(3,661 Views)
Hi,I am glad to know that you are working on chip test.Can you give me your email,I want to get advice for existing program(its size is 14.1M ).Waiting your reply.thank you very much!My email is yuxiaowei2000@163.com
Msn is yxw_zju@hotmail.com
0 Kudos
Message 3 of 5
(3,661 Views)

hp34401a_init( "GPIB::22::INSTR", VI_TRUE, VI_TRUE, &vi) works on my development PC.  I built a distribution kit and installed my app on the target PC, where it doesn't work.  I can communicate with the 34410A DMM through MAX and get the expected response from *IDN?, but hp34401a_init() fails.  hp34401a_error_message() does not return an error string.  I will rebuild to capture the error code, but it's probably -1. 

 

Is there something missing from my distribution kit?  hp34401a_32.dll is included in the Dependencies list.

 

Thanks for any help or suggestions.

Joe

0 Kudos
Message 4 of 5
(3,346 Views)

I should have mentioned, the target PC and DMM are also communicating through the GPIB interface.  There is no other connection to the instrument.

 

Joe

0 Kudos
Message 5 of 5
(3,344 Views)