04-30-2014 01:25 PM
I'm writing a Labview 2013 (SP1) vi to read single voltage values from an Agilent 34401A DMM within a time-delayed while loop and am having problems completing the 34401 Intialization vi that comes with Labview. Communication uses COM1 set at 9600, 8,1, N and I can communicate fine with the instrument through NIMax. It responds appropriately to *IDN?, *CLS, *TST and *RST commands. My Labview code sets up a VISA serial session using COM1 with the same communication parameters (using VISA configure serial port) and then calls the 34401 Initialization VI that comes with Labview. An error (-1073807339) is produced in this initialization vi by the 34401 Local/Remote Control subvi within it. However, the following subvis in the initialize vi execute normally, until the end of the Intialize vi itself, where the error code generated in the local/remote subvi, closes the DMM before I can read a measurement. The front panel of the 34401A does indicate that the 34401A has switched to remote mode.
I do not know how to proceed from here and any help would be appreciated.
Gary
04-30-2014 01:35 PM
04-30-2014 01:39 PM
The Initialize VI actually sets up the serial port, so you don't need to do that on your end.
The error you are reporting is a VISA Timeout Error. Make sure the Serial Configuration cluster input of the Initialize VI is correct, since that is the setting that will be set.
04-30-2014 01:41 PM
@Bulsan wrote:
I'm writing a Labview 2013 (SP1) vi to read single voltage values from an Agilent 34401A DMM within a time-delayed while loop and am having problems completing the 34401 Intialization vi that comes with Labview. Communication uses COM1 set at 9600, 8,1, N and I can communicate fine with the instrument through NIMax. It responds appropriately to *IDN?, *CLS, *TST and *RST commands. My Labview code sets up a VISA serial session using COM1 with the same communication parameters (using VISA configure serial port) and then calls the 34401 Initialization VI that comes with Labview. An error (-1073807339) is produced in this initialization vi by the 34401 Local/Remote Control subvi within it. However, the following subvis in the initialize vi execute normally, until the end of the Intialize vi itself, where the error code generated in the local/remote subvi, closes the DMM before I can read a measurement. The front panel of the 34401A does indicate that the 34401A has switched to remote mode.
I do not know how to proceed from here and any help would be appreciated.
Gary
So you have a VISA timeout. Could you post the code (or at least a simplified version demonstrating the problem) so we can see where you are going wrong? 🙂
04-30-2014 03:16 PM
I haven't tried the examples yet, but I eliminated the visa serial configuration vi before the 34401 initialization vi. In the process, I discovered the initialization vi sets the 34401 stop bits at 2 while I've been using 1. However, with that fixed (at 2), the initialization vi still gives the same error code, except now it occurs further down the chain of subvis. It now occurs in the 34401 reset subvi.
04-30-2014 03:36 PM