LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Difficulty Importing a DCS-103E Light Controller Library

Hi everyone,

 

I'm working on a project in which I need to be able to programmatically communicate with the the DCS-103E light controller. In their current application, this is done via C#. 

On the product's page, there is a variety of downloads for this products.

The DCS-100E103E_SDK-2.0.0-win64-cpp software development kit contains two header files, DCS_Info.h and DCS100.h as well as a library. These are C++ files.  Their C# download includes a dll file DCS.dll.

I suppose therein lies my issue - trying to use the import wizard by using the C++ header file and the C# dll file. But anyway, here's is what I've tried.

Call library function node - no luck. This was expected since there is no installer that actually places these dlls into the assembler.

When I tried to import the dll and header files, here is the message I get:

 

Issue importing the DCS controller:

class DCS_EXPORT DCS_100

    {

    public:

       

        class DCS_EXPORT DCS_Channel

        {

        public:

            double current() const;

The following symbols are not defined:

Channel;

Undefined symbols can prevent the wizard from recognizing functions and parameters. To correct this problem, check the header file to determine if you must add preprocessor definitions. Click the Back button to return to the previous page of the wizard to add a preprocessor definitionsl (for example, "NIAPI_stdcall = __stdcall" or "NIAPIDefined = 1").

 

The following header file was not found in the specified header file or one of the referenced header files:

-  string

-  cinttypes

-  vector

-  iostream

-  exception

 

To fix, click the Back button to go to the previous page and add the header file path to the Include Paths list.

 

Granted there are the issues described above, it also doesn't seem to discover all the functions defined in the header file.

TheresaM_0-1635967083617.png

 

I'm not really sure how to overcome this or if there is a way to import this into LabVIEW at all. I've attached both the header file and dll file, but you can access all the downloads in the link I mentioned earlier. Any help is appreciated. Thank you.

Download All
0 Kudos
Message 1 of 3
(2,393 Views)

The Call Library Node only can call exported (global) functions, not C++object methods. As such it is not an option for the interface described in your header file.

 

But your DLL seems to export a .Net Interface. This means you have to interface to it through the LabVIEW .Net functions instead.

 

Place a .Net Constructor on your diagram and right click on it and then select "Select Constructor". In the dialog push the Browse button and move to where you have that DLL located and select it. You should then get a list of creatable objects. Most likely you want to select the DCS100() or DCS100(string where, ushort port) constructor to start working. The resulting refnum can then be connected to property nodes and method nodes to call the according object. From here on you are on your own. you will have to consult the developer documentation what methods and properties to use to get it all operating.

 

I can't load the .Net DLL on my system as it is missing several sub components that are probably installed by your driver installer on your machine. But the DLL is not obfuscated and could "easily" be reimplement in pure LabVIEW using the TCP/IP nodes.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 2 of 3
(2,354 Views)

Hi Rolf,

 

I've tried going through a .NET palette, but it never populates any methods. I checked and have all the drivers installed to my best knowledge.

Regardless, the controller has UDP communication available, so I will approach the problem that way. It should just be turning a few lights on and off, so hopefully not too much hassle.

 

Thanks,

 

Theresa 

0 Kudos
Message 3 of 3
(2,330 Views)