09-22-2023 02:08 AM
Hello, Community
I want to control KEYSIGHT B2912B using SCPI commands in lab view to measure the electrical conductivity. I am measuring the voltage when a current is applied, but the measurement range of the measured voltage is limited and I can only measure up to 2V. Attached below is the program I have created. I believe the problem is in the way the commands are controlled in labview, but I do not know the cause. Is it possible to set the measurement range on labview using SCPI commands?
Sorry if my english is wrong. Thank you in advance.
From kazunari
09-22-2023 02:30 AM
Hi kazunari,
@kazunari wrote:
the measurement range of the measured voltage is limited and I can only measure up to 2V. Attached below is the program I have created. I believe the problem is in the way the commands are controlled in labview, but I do not know the cause. Is it possible to set the measurement range on labview using SCPI commands?
When you are unsure about SCPI commands and their parameters then you should read the (programming) manual of your device…
That being said:
09-22-2023 02:34 AM
Besides the solution I recommend following:
1) Build code in a way that it fits the size of one screen. Constant scrolling is nasty and let's you lose overview.
2) When wanting to send several commands in a sequence, put the commands into an array and put the VISA Write into a FOR loop.
3) Use timing between commands. I don't think the Keysight device can cope with the commands flying in like crazy.
Hints concerning your problem:
Check the device's documentation. Your suspicion might be right. SENS:VOLT:RANG already seems such a command. So you limit to 3 V here, but it measures only up to 2, also on its display?
09-22-2023 11:57 AM
Why create your own VI when there is one available in IDnet?
Agilent B2900 Series - USB, Ethernet, IEEE 488.2 (GPIB) Driver for LabVIEW
09-22-2023 03:28 PM
As written your SCPI commands are sent out of proper sequence for the voltage range to exceed the default 2V value. You use ..
MEAS:CURR?
MEAS:VOLT?
These SCPI commands initiata the measurement and retrieving the data! So the following command..
SENSE:VOLT:RANGE 3
will not affect the measurement, since the instrument doesn't receive that command until after you have already made the measurement.
The proper sequence of SCPI commands for instrument programming takes careful reading of the manuals. I suggest you look at the example programs provided with the instrument (https://community.keysight.com/s/question/0D52L00005IdphcSAB/b2900-example-program-source-constant-v...), or download the IDNet LabVIEW driver as ZYOng suggested and look at their examples.
Craig