How do I Pass Error Clusters Between LabVIEW and my DLL's?

Updated Jan 31, 2019

Reported In

Software

  • LabVIEW

Issue Details

I have written a LabVIEW library and would like to return an error cluster.

I am writing a LabVIEW DLL library and would like to be able to take in and return an error cluster.

I am writing a C/C++ DLL and would like to be able to take in and return LabVIEW error clusters.

Solution

talIf you are defining an error cluster in C/C++ you must use the underlying LabVIEW datatypes, and not standard C/C++ datatypes. The error cluster definition is:
struct {
LVBoolean status;
int32 code;
LStrHandle error;
} LVErrorClustet;


It is preferable to not use this method, and instead to use a wrapper VI to take the output from the library and bundle it into an error cluster within LabVIEW, which ensures the correct datatype is used.

The following code takes the output from a library and bundles it into a LabVIEW error cluster.

WAS THIS ARTICLE HELPFUL?

Not Helpful