05-16-2024 02:05 PM - edited 05-16-2024 02:05 PM
Hello all,
I'm brand new to LabVIEW and I'm currently attempting to create a VI that will conduct a sweep for current and voltage for taking electrical characterization measurements. I am currently running into this error when running what I have:
Possible reason(s):
Instrument reports:
+181,"Illegal setup. Invalid command."
+181,"Illegal setup. Invalid command."
+0,"No error"
Complete call chain:
Agilent 4156.lvlib:Error Query.vi
Agilent 4156.lvlib:Configure Constant Output.vi
LabVIEW report: Error -1074000000
In the design you will see that I have 2 types of SMUs one from the 4156 driver and another from another discussion board that I will attach. I will get passed initializing the SMU's and then once I get to the "Configure Constant Output" cluster the VI fails. If anyone has any tips or anything to set me in the right direction that would be greatly appreciated!!
05-17-2024 03:15 PM
I'll have a look if you down convert the attached VIs to LabVIEW 2020. 🙂
To be clear the 4156 is not a straight forward instrument to program. It's antique and it expects commands to be issued in a specific order (based on the on-screen :PAGE; setup) and if you omit a command it throws an error.
My bet is you didn't name variables correctly, but I'll wait for the VIs in 2020 to see.
Craig
05-20-2024 11:08 AM
Thank you for taking a look!
05-21-2024 12:16 PM
I thought recognized that hp415x_ConfigueSMU_FIXED vi! I can't find the post where that code came from a link here that would be good.
I made that fix years ago to address a bug I ran into in the driver code here - https://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=015E42A1245448B2E0440003BA7CC...
It should be noted that it can be use with the Hp4156 driver as well - https://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=5D13BA2F1F47284FE0440003BA7CC...
I don't think that code fix is relevant or needed in your use case, as it was only an issue when the Hp415x had the pulse expander module Hp41501B installed. But it would be good if you described your setup a bit further to see if you are using this module.
Now the code you attached has some problems, mainly in understanding how the instrument functions, and as a result some code structure problems.
I assume you are new to SMUs and HP4156 as well as LabVIEW? The Hp4156 will perform a sweep (I or V) on one or more channels, while also measuring on one or more channels. Once that sweep it complete all the data measured can be transferred to the PC. Knowing this, the procedure for coding is to set the instrument into the state to perform the sweep, let the instrument perform the sweep and do the measurements, the retrieve the data.
You should look in the Examples folder of the drivers (either linked above) as they have a simple Sweep and Measure example that should work for you.
With regards to your code..
1 - The sequence structure isn't required, you should review LabVIEW's dataflow model.
2 - There's need for a while loop, the instrument does the sweep internally. What you have programed there is multiple repeats of setting up the instrument communications, defining the measurement, retrieving data, closing communications in a loop.
3 - If you did want to do repeated sweeps using a while loop, you would want to take the instrument initialization/close and instrument setup code out of the loop. The loop would only trigger the measurement and retrieve the data. You would use shift registers to accomplish multiple plots.
Have a look at the simple sweep and then let me know if you need further assistance. If so you will need to be more descriptive.
05-21-2024 01:06 PM
In terms of the error messages you are seeing, I can't tell exactly why they are happening based on the setup saved with your code. Its not clear from the front panel settings what each SMU is doing. It shows that the default for all SMUs are Function VAR1 but you configure sweep mode and then configure each SMU as constant. Those are conflicting settings. One SMU should act as the voltage source for the sweep, it should be configured as Var1 and then the sweep parameters defined. The other SMUs should be set to function Constant, and configured as constant voltage sources. Eg.
SMU1 - Var1 - sweep 0V..to..5V in steps of 0.1V.
SMU2 - constant - V2=1V
SMU3 - constant - V2=5V
SMU4 - constant - V2=0V
In this setup you would supply voltage on 4 SMUs and be able to measure current at all 4 SMUs. Only the voltage on SMU1 is varying.
Now, if you want to supply a constant voltage on 4 SMUS and see how current varies over time on all 4 SMUs without and voltage sweep, then you are looking to setup a "Sampling" measurement, not a "Sweep" measurement. The Manual does a great job of decribing the difference and the limitations of both - https://www.keysight.com/ca/en/assets/9018-04951/user-manuals/9018-04951.pdf?success=true
Hope that helps,
Craig