Instrument Control (GPIB, Serial, VISA, IVI)

Showing results for 
Search instead for 
Did you mean: 

LabView, 4156c, unable to configure SMU3 or 4

I'm using LabView along with a 4156c to attempt to some some simple resistance measurement sweeps, preferably in the Van der Pauw configuration. However, if attempt to configure SMU3 or SMU4 I get an illegal command error as follows:


>>  Instrument reports

>>  +181,"Illegal setup. Invalid command"

>>  +0,"No error"


Where the no error is there because it reads the error buffer until it returns "No error."


If I change the exact same VI to affect SMU1 or SMU2 it works perfectly, but I am unable to configure 3 or 4. Does anyone have any insight into this problem?

0 Kudos
Message 1 of 17

Hi Beckermt,


Have you tried using NI Spy Capture? Below is a KB link on the procedure.


This should give you some insight into this issue.


I hope this helps.


Josh L.

Applications Engineer
National Instruments
0 Kudos
Message 2 of 17

I have not. Thanks for the link! I'll take a look at it right away!

0 Kudos
Message 3 of 17

Hi Beckermt


it could also be that VAR1 has been assigned twice, once from your sweep with 2 SMUs and also as a leftover from a previous measurement. When programming the 4156 from the front panel, this is not possible, but with remote commands this is possible.

To avoid that, program the unneeded SMUs as CONST.


Good luck,


0 Kudos
Message 4 of 17

That is definitely the problem I run into if I don't configure SMU3, as it seems to default to VAR1. However, I can't configure SMU3 at all, so it's stuck as VAR1. I'll report back with anyone from the NI SPY, hopefully today.

0 Kudos
Message 5 of 17

I had the same problem and tracked it down to the series resistance command in the ConfigureSMU VI (PAGE:.....SRES)

Agilent explained that the 4156C will not accept a series resistance for SMU 3 or SMU 4.

The following is a quote from an email from Agilent support:

This means that it should always work on SMU1.  It will work for SMU2 if you don’t have a 41501B expander frame.  However if you have a 41501B expander that adds SMU5, then the series resistance works with SMU5 instead of 2.  

For any NI people reading this, removing the offending command, or prohibiting it from sending SRES to SMU3 or SMU4, from the VI will allow the it to work without throwing errors.

Hope this helps.

0 Kudos
Message 6 of 17

Hello everyone, this post is 8 years old. But I am recently trying to do this and facing the same problem. I was wondering if you guys were able to solve this. Till last week, all my code was working perfect and all of a sudden, I started facing this problem. Till SMU 2, it is getting configured, but after that, it is running into this same issues. Please help out.  

0 Kudos
Message 7 of 17

Post your code and we can probably help, without seeing your code its just guessing.



0 Kudos
Message 8 of 17

Hi Craig,


Thanks for responding. So this is part of a bigger code. But the error begins in the configuration part after configuring SMU2. I have attached that part of the code only so it will be easier to debug I guess. 
Another thing, is this bigger code was all running perfectly. No problem at all. All of a sudden from last week I am getting this error (which I have attached as well). Thank you again for the help.   

Download All
0 Kudos
Message 9 of 17

Let me know if you need anything else. When I try to do manually on the instrument it is working. But as soon as I try to use three "configure SMU vi" consecutively, the error props up. 

0 Kudos
Message 10 of 17