All,
I have created a vi to read 4 voltage rails and 2 differerential voltages for current draw readings across resistors. When I run this vi in labview I get the expected results from my UUT. I then setup the outputs on the connect pane and create a dll. When I call this dll from my Visual Basic app, the return values for the current/voltage readings are always the default values (i.e. 0). The dll returns the error code -2491 when call from VB as well.
This section of code is how I declare the dll in VB:
Public Declare Function ReadRails Lib "C:\0714Testset\DLL\GateDriver.dll" _
(ByRef Current5V As Double, ByRef Current12V As Double, ByRef CTPSU As Double, _
ByRef FAULT_OUT As Double, ByRef Rail5V As Double, ByRef UUT_SUPPLY As Double) _
As Integer
I then call the dll using this function:
error = ReadRails(Current5V, Current12V, CTPSU, fault, vcc, uutSupply)
I have also attached my vi.
Any ideas what causes this?
Thanks!