LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with the implementation of below DLL in LabVIEW Call Lib function

Solved!
Go to solution

Here is the list of C functions in the doc that I have but I'm not getting the exact output.

 

I need a help only to understand these functions and how to configure it in LabVIEW

 

Parameters


voltType
[in]Specifies a voltage sensor to get value from. It can be one of the flags
VCORE (1<<0)
V25 (1<<1)
V33 (1<<2)
V50 (1<<3)
V120 (1<<4)
VSB (1<<5)
VBAT (1<<6)
VN50 (1<<7)
VN120 (1<<8)
VTT (1<<9)
retval
[out]Point to a variable in which this function returns the voltage in Volt.
Typesupport
[out]
If the value is specified as a pointer (non-NULL) to a variable, it will return the types of available sensors in flags bitwise-ORed
Return Value
TRUE (1) indicates success; FALSE (0) indicates failure.
Remarks
Call the function first with a non-NULL typesupport to know the available fan sensors and a following call to get the voltage required.

0 Kudos
Message 1 of 7
(2,875 Views)

If you have access to header file of the DLL, Import Shared Library can be very useful.

 

If not, there is a great example that ships with LabVIEW, 

<LabVIEW>\examples\Connectivity\Libraries and Executables\External Code (DLL) Execution.vi


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 2 of 7
(2,842 Views)

@ManLD wrote:

Here is the list of C functions in the doc that I have but I'm not getting the exact output.

 

I need a help only to understand these functions and how to configure it in LabVIEW

 

Parameters


voltType
[in]Specifies a voltage sensor to get value from. It can be one of the flags
VCORE (1<<0)
V25 (1<<1)
V33 (1<<2)
V50 (1<<3)
V120 (1<<4)
VSB (1<<5)
VBAT (1<<6)
VN50 (1<<7)
VN120 (1<<8)
VTT (1<<9)
retval
[out]Point to a variable in which this function returns the voltage in Volt.
Typesupport
[out]
If the value is specified as a pointer (non-NULL) to a variable, it will return the types of available sensors in flags bitwise-ORed
Return Value
TRUE (1) indicates success; FALSE (0) indicates failure.
Remarks
Call the function first with a non-NULL typesupport to know the available fan sensors and a following call to get the voltage required.


The parameter describtion you show is useless. It tells absolutely nothing about the actual data types used nor how those parameters are exactly supposed to be passed. Show us at least the function prototype too!

Rolf Kalbermatter
My Blog
0 Kudos
Message 3 of 7
(2,811 Views)

..Ooopss..!!

 

Sorry I missed that.

 

Here is the proptotype

 

BOOL SusiHWMGetVoltage(DWORD voltType, float *retval, DWORD *typeSupport = NULL);

 

From here it is clear that the voltType and typeSupport are 32 bit integer but i'm not getting output in LabVIEW.It may be due to wrong implementation.

0 Kudos
Message 4 of 7
(2,788 Views)

And how did you configure the Call Library Node? From the description with the first call with typeSupport being non-NULL anbd then NULL you will have to configure two different Call Library Nodes for this to implement.

Rolf Kalbermatter
My Blog
0 Kudos
Message 5 of 7
(2,769 Views)
Solution
Accepted by topic author MangeshD

Thanks everyone...!!

 

I have resolved this issue.

 

There was a problem in configuring the VoltType. It needs to have a cluster of bits.

 

Here is the screenshot.

 

🙂

0 Kudos
Message 6 of 7
(2,741 Views)

That looks quite a bit like a Rube Goldberg solution. Most likely the code you show is equivalent to this:

 

No Rube Goldberg.png

Rolf Kalbermatter
My Blog
0 Kudos
Message 7 of 7
(2,720 Views)