03-14-2013 09:52 AM
I am new to IVI so I am attempting to use the Teststand Example "IviStepTypes.seq" with a live 34401A with partial success. See NI I/O Trace messages below. The only change made to the sequence is a file global variable for the DMM name and the DMM Init step which I changed from Simulate=1 to Simulate=0. The DMM is set for RS232, 9600, 8 bit (no parity), SCPI. I am using the current ag34401 IVI driver from Agilent. Also, when I use the Soft Panel built into TestStand all messages starting with IVI_ work but ones starting with IVIDMM_ do not(error: function not supported). I am soooo confused. Could someone explain the errors? I get the feeling that there is a driver or newbie issue. Thanks!
Pat
1. IviDmm_InitWithOptions ("HPDMM", VI_FALSE, VI_FALSE, "Simulate=0,", 0x136960E4)
Process ID: 0x00001D4C Thread ID: 0x00002668
Start Time: 09:20:58.778 Call Duration 00:00:01.121
Status: 0 (VI_SUCCESS)
2. IviDmm_GetAttributeViInt32 (HPDMM, NULL, SPECIFIC_DRIVER_CLASS_SPEC_MAJOR_VERSION, 3)
Process ID: 0x00001D4C Thread ID: 0x000020E8
Start Time: 09:20:59.922 Call Duration 00:00:00.008
Status: 0 (VI_SUCCESS)
3. IviDmm_GetAttributeViString (HPDMM, NULL, GROUP_CAPABILITIES, 1000, "IviDmmBase,IviD...,IviDmmAutoZero")
Process ID: 0x00001D4C Thread ID: 0x000020E8
Start Time: 09:20:59.930 Call Duration 00:00:00.007
Status: 0 (VI_SUCCESS)
> 4. IviDmm_ConfigureMeasurement (HPDMM, 1, 10, 0.0001)
> Process ID: 0x00001D4C Thread ID: 0x000020E8
> Start Time: 09:20:59.937 Call Duration 00:00:02.019
> Status: 0x80000000
5. viWrite (hp34401a (0x11D08A10), "SENS:FUNC "VOLT".", 17, 17)
Process ID: 0x00001D4C Thread ID: 0x0000227C
Start Time: 09:20:59.941 Call Duration 00:00:00.002
Status: 0 (VI_SUCCESS)
6. viWrite (hp34401a (0x11D08A10), "SENS:FUNC?.", 11, 11)
Process ID: 0x00001D4C Thread ID: 0x0000227C
Start Time: 09:20:59.943 Call Duration 00:00:00.001
Status: 0 (VI_SUCCESS)
> 7. viRead (hp34401a (0x11D08A10), 0x1B9758C8, 4096, 0)
> Process ID: 0x00001D4C Thread ID: 0x0000227C
> Start Time: 09:20:59.944 Call Duration 00:00:02.008
> Status: 0xBFFF0015 (VI_ERROR_TMO)
8. viStatusDesc (hp34401a (0x11D08A10), 0xBFFF0015, "Timeout expired...tion completed.")
Process ID: 0x00001D4C Thread ID: 0x0000227C
Start Time: 09:21:01.952 Call Duration 00:00:00.000
Status: 0 (VI_SUCCESS)
> 9. IviDmm_CheckAttributeViInt32 (HPDMM, NULL, FUNCTION, 1)
> Process ID: 0x00001D4C Thread ID: 0x000020E8
> Start Time: 09:21:01.956 Call Duration 00:00:00.003
> Status: 0xBFFA0011 (IVI_ERROR_FUNCTION_NOT_SUPPORTED)
> 10. IviDmm_CheckAttributeViReal64 (HPDMM, NULL, RANGE, 10)
> Process ID: 0x00001D4C Thread ID: 0x000020E8
> Start Time: 09:21:01.959 Call Duration 00:00:00.003
> Status: 0xBFFA0011 (IVI_ERROR_FUNCTION_NOT_SUPPORTED)
> 11. IviDmm_CheckAttributeViReal64 (HPDMM, NULL, RESOLUTION_ABSOLUTE, 0.0001)
> Process ID: 0x00001D4C Thread ID: 0x000020E8
> Start Time: 09:21:01.962 Call Duration 00:00:00.005
> Status: 0xBFFA0011 (IVI_ERROR_FUNCTION_NOT_SUPPORTED)
03-15-2013 03:23 PM
Hi PatSpring,
The example you opened has a few prerequisites that need to be fulfilled before working. I have attached a screenshot of the dialog that pops up when the *.seq file opens. Were you able to run the example before modifying it? I think it would be helpful to do so in order to verify that all of the drivers and software are installed on your machine properly, as you had mentioned. I hope this helps!
Regards,
Jason D
Applications Engineer
National Instruments
03-18-2013 06:46 AM
As replied by Jason - you need to first configure your instrument in MAX.
The TestStand IVI step types uses the MAX setting to communicate with the instrument.
You should have got IVI driver from the instrument website.You can install that and later open up MAX to set it.
The instrument name as given in MAX need to be entered in the TestStand IVI step type for linking.
Hope this helps.
03-18-2013 03:10 PM
UPDATE: I got the DMM part of the Demo to work in simulation mode just to validate that the drivers were installed correctly and that NI MAX is configured right. One issue is the DMM soft panel sequence step. If it is executed the next step gets an error that I think is caused due to the soft panel messing up the session. This must mean there is still something flakey with my PC setup but for now I am skipping the soft panel step and successfully executing all other DMM steps. Thanks for the tip to get that part going first.
I am currently working with a real DMM and making a bit of progress. I will post what I find if I figure it out or I'll be asking more questions. Thanks!
03-20-2013 11:22 AM
Another update. I could not get the demo to work with my DMM (tried 2 34401A's just to make sure) so after learning a bit more about IVI I decided to reinstall and start from scratch. NI IVI Compliance Package 4.5 and Agilent 34401A IVI driver were reinstalled.
Using the demo (IviStepTypes.seq) with no changes (running is simulate mode) the sequence gets part way then show this runtime error:
An error occurred calling 'RunStep' in 'ISubstep' of 'zNI TestStand Ivi Step Types'
An error occurred while executing the step.
Component Works IVI Control Error: The IVI Read operation failed for logical name 'SampleDmm'.
Details: [IVI Error Code: BFFA1190]
Source: TSIviStepTypes[Error Code: -31100]
I next skipped the soft panel step and the simulated sequence completes with no errors. So I tried real hardware. Note that it is on RS232 and communicates fine with the VISA test panel.
So I changed to live mode by makeing 2 changes. The initiate step Simulate option was changed from 1 to 0. The session in Ni-Max was changed to "Don't simulate". I then get the following error.
An error occurred calling 'RunStep' in 'ISubstep' of 'zNI TestStand Ivi Step Types'
An error occurred while executing the step.
Component Works IVI Control Error: The IVI Configure operation failed for logical name 'SampleDmm'.
Details: Invalid procedure call or argument
Source: TSIviStepTypes[Error Code: -30000]
Here's the NI I/O Trace.
I haven't been able to figure it out. I am assuming that the demo was tested with simulated and real hardware so I am expecting there is something wrong with Ni-Max settings or ...? Thanks for any help.
Pat
03-20-2013 01:50 PM
I figured out the IVI_ERROR_FUNCTION_NOT_SUPPORTED error but don't understand it. I changed the Range setting from 10 volts to Autorange and now I can read a single sample without errors. Why does it have to be set to Autorange? I assume the meter
The error in the trace did not help me much. It shows that the Function, Range, and Resolution are all not supported. This is coming from an IVI newb so I'm probably just don't understand the errors yet. 🙂
Now I'm moving on to the Multipoint read. Currently it times out on this operation. I think it has to do with the trigger settings because the DMM is not taking any samples. I set it the Sample Trigger to Immediate, Trigger Count to 1, Sample Count to 10, Sample Interval to .1s, and Measurement Complete Destination to External. I'm not sure about the last setting.
03-20-2013 04:10 PM
For a multipoint read the Range also had to be set to Auto and the Measurement Complete Destination had to be set to None in this demo. The default settings did not work for the 34401A.
The "Gotcha's" in the TestStand IVI step types are the default settings for the functions. Like Auto Range, for example, is set to "Use setting". The setting was 10 which made me assume that the DC voltage range is going to be set to 10V. Wrong! *SLAP* That's an invalid setting! It can only be On, Off, Auto, 1, 0 (I think).
My conclusion is that you need to understand 488 commands, just a little bit, before you can use the IVI step dialogs. There is some flexability built into it that can get you into trouble. I think the .net driver is easier to use in the end even though more local parameters are used.