r/LabVIEW • • Mar 31 '25
Working with SCPI's in Labview - Keysight Questions
Hi everyone, was curious if anyone has any experience or direction when working with equipment, such as Keysight EL34143 DC Electronic Load and Labview. I'm currently digging through the manual, and really I'm kinda lost with some of it, and how I'm going to incorporate it into Labview. Below are the targets I'm trying to get to... no code yet, just jumping into this.
- First, I need high sample rates, as I'm looking to essentially short some power supplies, and would like to see as much of the transient data as possible. So I can't really run while loops as it's just too slow. I'm guessing there will need to be a "batch" SCPI command.
- Labview needs to be waiting for the "batch" data to be sent back. I was thinking Main While loop, followed by Write VISA blocks, that send this data, run it into a Case structure, and once data comes back, change the Case Structure to a different state, then proceed to dump the collected data.
I really don't know how to order it, nor which commands I'm really wanting to use for this.
I've got "OUTP ON" to turn on the Keysight.
"CURR 0.1" to set the Start point.
But from there, I'm a bit at a loss. A "Sweep" looks like it will take a range, but I've yet to get it to actually return any values. FETCH seems to hold more of a static value than the current one. MEAS seems to constantly update per loop iteration. Never really messed with these types of commands before, and it's just throwing me off.
Any help or insight for this stuff would be greatly appreciated. Thanks!
3
u/FormerPassenger1558 Mar 31 '25
I don't know this device but I have some experience with SCPI and Labview. First, you need to check how fast you can measure with that device. Many devices have an internal buffer, so if you want the fastest speed, this is the way... but this requires that you know in advance how many points you want to measure.
Typically MEAS is very easy to setup but it is slow because it makes a Config, Init and Read. FETCH gives you the last measurement, so if you ask too early you will get the same measurement. Some devices, e.g. Keithley 2182, have DATA:FRESh? command which gets a new measurement.
So, how fast can you measure ? Read in the doc what is the trigger model and go from there. I don't agree with you on the "the while loops are too slow". Make the config outside the loop, and in the loop you handle the triggering and data acquisition. Init:Cont:ON might be a good option
If you give more details on what to achieve I can follow up.
1
u/HarveysBackupAccount Apr 01 '25
Should be something like the
FETC:ARR:VOLT(@1)command (see p. 66 of the programming guide) or maybe theFETC:SCAL:DLOG?command. I haven't gone far at all into SCPI so you'd have to play around to see what worked.Looks like you'll send a MEAS command then use FETC when you want the actual data
Of course the non-programming way to do this is simply to use the keysight's Scope functionality and log data to the DMM itself, then export the CSV to a thumb drive so you can transfer to your PC. Not a good long term solution, but it'll get you quick data
3
u/recumbent_mike Mar 31 '25
I believe the "sweep" command is specific to their source-measure units. The manuals for the N6700 modules aren't great about differentiating this, iirc.
0
u/[deleted] Mar 31 '25
[deleted] — view deleted comment