LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help reading from BK Precision 2831E multimeter in MAX and LabVIEW 2015

Solved!
Go to solution

I need help as I am unable to read measurements from a BK Precision 2831E in
MAX and LabView 2015. (in Windows 10)

 

It seems I can write to the meter, but not read from it.

 

1. First, I went into the 2831E system menu and set Baud Rate = 9600, termination
char = LF, and return = off.

 

2. In MAX, the resource is COM3.
*IDN?\n (as a query) works w/o error and returns the meter's model number and
version number.  It also puts the meter into "remote" mode.

 

FUNC\s\RES\n (as a write) works w/o error and sets the meter into the OHM mode,
with autoranging

 

:MEAS:RES?\n (as a query): the write operation does not give an error in MAX,
but on the meter the message "BUS: BAD COMMAND" appears.  A Timeout error appears in MAX for the read operation, with the code VISA(Hex0xBFF0015)

 

sending :MEAS:RES?\n (as a write), followed by a read attempt, gives the same result

 

:MEAS:VOLT:DC?\n (as a query) gives similar results to :MEAS:RES?\n

 

*RST\n (as a write) works without error and takes the meter out of "remote" mode.

I am not sure if there is something wrong with my communications settings, or
if I'm using the SCPI commands wrong. 

 

In the first screen shot, you can see some of the communications settings and also what
versions of the software are installed.  It looks like NI Package Manager is not installed;
could this be the problem? If so, I'll try getting a sys admin to install it.

 

In the second screen shot, you can see more of the communications settings. 
I also tried the above queries and writes with the "Enable termination character"
box unchecked, but it didn't seem to make a difference.

 

In the 3rd screen shot you can see the timeout error (0xBFFF0015). 

 

In the 4th shot you see the error message when I try to read the status byte.

 

3. I obtained similar results with the LabView 2015 programs found with this driver:
http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=2B46AD9B332B2DC6E05490E2BA35FC...

 

4. I made a simple VI that shows the timeout error, Error -1073807339, which occurs
at the 2nd read command.  If I disable that command, the rest of the VI works without error. This VI was based on the example programs from the driver in step 3, plus VI's posted in previous topics on the 2831E meter.

0 Kudos
Message 1 of 9
(5,196 Views)

What strikes me as odd is that the working command FUNC\s\RES\n is a simple command while the :MEAS:RES?\n is a SCPI style command. It's certainly not impossible that the BK device has such a strange implementation, but I haven't worked with devices that mix and match SCPI and non-SCPI commands randomly.

 

Have you tried out the instrument driver that is available here? according to that driver there exists a :FUNC RES command, but no :MEAS:RES? command. Instead you need to send the FETC? command to read a measurement for the previously configured measurement function.

Rolf Kalbermatter
My Blog
Message 2 of 9
(5,176 Views)

Thanks for the info!  I tried using the FETC? command in MAX, and was able to read the resistances perfectly.  I then tried it in my VI, but still get the timeout error.  However, if I turn on "Highlight Execution", the VI works!  Does this suggest anything to you?  Thanks again.

0 Kudos
Message 3 of 9
(5,142 Views)
Solution
Accepted by topic author Margie7829

Yes you should also change the timeout for the VISA session to some useful value. DMMs are slow devices. They have typicallly a high precision, integrating ADC device and when you send the FETC? command a measurement is triggered and then returned but the time between when the measurement is started until the device will return the measurement value can be quite long. So add an additional property to the VISA session where you set the baudrate and everything and set this to a value of 10000 or something. That should let the VISA Read return with the actual measurement value.

But you saw the link in my previous message? The driver in there should be ready made and give you all you need, without having to bother about such details.

Rolf Kalbermatter
My Blog
Message 4 of 9
(5,139 Views)

Thank you very much!  The driver on the BK Precision site didn't work the first time I tried it -- (it had the same timeout error)-- but seems to be working now.  Problem solved -- thanks again!

0 Kudos
Message 5 of 9
(5,094 Views)

Hello guys,

I have tried every single step from solution here, but i still can not read from BK 2831 E. The problem is reading value from FETC? is FETC? too.

What should i do? 

 

Thank you..


Day@
Certified LabVIEW Associate Developer
0 Kudos
Message 6 of 9
(4,822 Views)

Dear Rolf, 

 

I'm planning to read around 100 voltage value using the MUXs connected to a DMM like BK Precision. The requirement of the task is the duration for reading all 100 pin should less than 2 minutes. I have not been practiced in control remotely a DMM with Labview like that before. Can we meet this requirement? 

 

Many thank,

Kien

 

0 Kudos
Message 7 of 9
(3,874 Views)

Well, I would say, start calculating the timings. You have a MUX that you need to somehow control and that needs to be able to maintain your requirements about accuracy, linearity and what else. For 100 channel I would guess this gets a pretty expensive device! That multiplexer has some settling times too, which however should be almost neglible if you control them with some communication interface. If you use NI Switch with integrated relay or solid state devices from NI (for instance in a PXI chassis) then you certainly have to account for that too. After that you have the BK device which has a certain measurement time that consists of settling time, sampling and conversion time. I don't know what device you are using and don't plan to dig up the data sheet for those devices, so you'll have to check yourself.

 

Basically 100 channels in 2 minutes will leave you around 1s per channel. That could certainly get tight with many integrating DMM type measurement devices with high resolution/accuracy!

Rolf Kalbermatter
My Blog
0 Kudos
Message 8 of 9
(3,856 Views)

The only way I have been able to get this to work is to *not* wire the error handling thread to the FETCH VI. Try that as an inelegant but workable fix.

0 Kudos
Message 9 of 9
(3,678 Views)