LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

call dll to control electro-valves

Hello,
it was necessary to call DLL (Functions pallets>> Advanced>> Call Library Function) to make function my board APCI RELAY8/IN8 and to be able to control electro-valves (analogical order).

My first question is first of all to configure this DLL, how to fill the boxes:
- calling Conventions
- parameter
- type
- Run in UI Thread or Reentrant
explain me that?

My second question is then to know how to control the opening and the closing of the valves using this DLL. I sought examples in the assistance of Labview 7.1 but I found only one example with a array.

Thank you for your answers and councils.
0 Kudos
Message 1 of 2
(2,250 Views)
a. Calling convension, parameters/types and return value are all defined by the makers of the DLL. You'll need to check the driver documentation and/or header file (.h) supplied with the board.

b. UI Thread or Reentrant - that depends on the DLL again. If you select UI Thread, than LV only calls the DLL with a single thread (the UI thread). This means that (a) only one thread is in the DLL at a time and (b) LV can't update the UI while the DLL is running. If you pick reentrant, then LV picks one of its threads to call the DLL, and if you end up with two calls to the DLL executing at the same time, then two or more LV threads can enter the DLL at the same time. Whether the DLL can handle this reentrancy depends on the DLL.

c. I am not sure how to answer this one. It sounds like a question about the driver. However, you might want to look over "Using External Code in LabVIEW", which is part of the LV doc set.
Message 2 of 2
(2,234 Views)