03-31-2025 02:30 PM
I have a question about how best to set up a structure in Labview to essentially send some SCPI commands to a keysight, gather that data into an array, and then send it back to be displayed/saved from Labview. Normally if I'm taking data points, I just set up a while loop, and each iteration will send the command to measure voltage, current, power, and then send it back via the read block in Labview.
I however, am trying to gather high speed data on the keysight so I need to send a command to start gathering data, do some transition, gather the data through the transition, and then once it reaches its target, go ahead and send all that recorded data at once.
Biggest issues I'm running into are: 1. What type of SCPI commands do I need to use (still researching this, like familiar with SCPI in general so if anyone knows what command structure i'm needing, that would be greatly appreciated for the Keysight EL34143 DC Electronic Load). 2. How would you set up the Labview side to do this, and not get timeout error and to also not lose the data during the transition period?
03-31-2025 06:03 PM
I have used Keysight instruments in general but not that specific one, so I can't be completely sure that it will follow this model. I'm not going to go read its entire manual. I did take a quick peek at its datasheet, which says "The EL30000 Series bench DC electronic loads can continuously log voltage, current, and energy to a datafile. The sample rate is adjustable from 20 microseconds to 60 seconds. Store the data file on the internal
non-volatile RAM or save it externally on a USB memory device as a .CSV file". So I am guessing you want to gather that sort of data, which does have internal logging. You might look for certain keywords from that datasheet quote in your device manual to isolate the parts you need.
First thing to do would be to set up the instrument in general. It sounds like you kind of figured that part already, and can take individual points one by one.
Next, you'll want to find some commands that involve setting up the data collection. Probably ones that set up the frequency or period of collection, what data to collect, and when to stop and start. The stop and start might be something that can be triggered externally, or timed, or it might be something that you start and stop manually, or some combination of all that. Depending on how it's set up, you might need to also clear any previous data.
Then you'll need to send it a signal to start. Depending on how it was all set up, this will either start immediately or start looking for a trigger event.
At this point you'll need to run a command that checks the progress of the measurement so you know when the gathering is done. There is a standard SCPI command for this, "*OPC?", but you may need to check your device manual to see if it applies, as it could be that the device you have either doesn't use it, or doesn't use it in the way that you want it to (it might say it's complete when the trigger occurs, rather than when all the data is collected, for instance). You might need to find an alternate command, such as one that lists how many samples are in memory or the current state of the device (capturing vs. not capturing). Using a "Check to see if done" command instead of a "Get data" command is how you (usually) avoid timeouts.
Whenever it is done, you'll need to download it all. There ought to be a command that will often end in ":DATA?" that you use to get all the data from the RAM or file system of the device.
03-31-2025 06:13 PM
Haven't done this in awhile, but there also may be status registers that you can continuously poll to see if the operation complete command has been set. The *OPC command will not run until after all data collected, the status register allows you to read it without worrying about a timeout.
03-31-2025 07:00 PM
@mcduff wrote:
Haven't done this in awhile, but there also may be status registers that you can continuously poll to see if the operation complete command has been set. The *OPC command will not run until after all data collected, the status register allows you to read it without worrying about a timeout.
Polling vs timeout. Name your poison. My personal preference is to temporarily extend the timeout while waiting for the instrument to put something in the output buffer. (Usually a 1 or something like that.)
04-01-2025 08:25 AM
Thanks for your time to respond to this. I've been going through a lot of the commands, and so I remember seeing a lot of those keywords or very similar, so I'll definitely dig into those a bit more. And your breakdown of the direction things need to be set makes a lot of sense, definitely something I haven't really come across in any tutorials or setups, as everywhere just wants to make a simple connect and read program. This helps a lot. Thanks!
04-01-2025 09:29 AM
Have you checked out the LabVIEW drivers available for that device? Keysight EL30000 Series Electronic Load - USB, IEEE 488.2 (GPIB), Serial Driver for LabVIEW - Nation...
Sometimes there are very useful functions that can save you time. Plus, the driver packages sometimes have nice example code that may get you started. If you don't see any examples in the palettes, check the folder in you instr.lib folder for the device...
04-01-2025 09:44 AM
I have actually. I updated everything and uploaded the drivers for it, and for whatever reason I've had lots of issues with them. Mainly things timeout, and their standard examples wouldn't work properly. This was a few months ago, so maybe they've updated since then, but me and a coworker independently had the same issues on two different machines and two different sets of test equipment. After spending some time on it, and nothing resolving the issues, kinda just decided to build everything from scratch, so a bit of a learning curve started with it.
04-01-2025 11:59 AM - edited 04-01-2025 12:00 PM
I have not used that specific device but in general when automating a task you need to first know how to do it manually. From your first post I gather you want the load to go through a series of load steps, gather data for each step, and retrieve all that data at once. You can't necessarily do that unless the instrument has that capability. You are probably going to end up sending a load step, taking measurements, save them, then move on to the next load step and repeat.
04-01-2025 12:41 PM
THere are 2 manuals, one for genreal operation of the DC Load and the other for programming, as well as a LabVIEW driver. I had a quick glance at the programming manual and you are going to need to setup the data logging features, then retrieve that data log. See pg 101 - https://www.keysight.com/ca/en/assets/9921-01404/user-manuals/EL34243-90000-User-Guide.pdf
Programmin Manual explains the commands - https://www.keysight.com/ca/en/assets/9923-02387/programming-guides/EL34243-90007-Programming-Guide....
Hope that helps. Post code if you get stuck.
Craig