Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Programming 4110 power supply in Visual Basic.Net

Hello,
 
I am trying to control a PXI-4110 power supply in Visual Basic.NET using a wrapper. I have tried using two wrappers - the one from the website and the one that came with the driver.
 
Here is my code, but I know there must be more to it because it dumps me before it returns an intrument handle assignment. Also, there is a difference in this code in both wrappers. In the wrapper that came with the driver, there isn't a parameter listed for the instrument handle but there is one I got from the internet. Either way, I can't get it to work.
 
Using DCpower = New IviDCPwr(PXI1Slot6, True, True, Instrument_Handle)
                DCpower.ConfigureOutputRange(channel, IVIDCPWR_VAL_RANGE, 15)
                DCpower.ConfigureCurrentLimit(channel, Behavior, Limit)
                DCpower.ConfigureVoltageLevel(channel, Level)
                DCpower.Initiate()
End Using
 
Any help or pointing in the right direction would be GREATLY appreciated.
 
Mike
0 Kudos
Message 1 of 2
(2,821 Views)

Hi Mike,

The difference in the wrappers could be attributed to you having a different version of NI-DCPower.  What version are you using?

Also, I would suggest that you implement error handling in your code so that you can see where things are going wrong.

0 Kudos
Message 2 of 2
(2,805 Views)