Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

help with call library function node

Solved!
Go to solution

i've problem with call library function node as i try to use velleman k8061 dll file to get it work labview

 

all function i try get the same problem

but i choose one to explain it 

 

 

 

SetDigitalChannel
Syntax
PROCEDURE SetDigitalChannel(CardAddress: Longint; Channel: Longint);
Parameters
CardAddress: The address of previously opened card.
Channel: Value between 1 and 8 which corresponds to the output channel that is to be set.
Description
The selected digital output channel is set ON.
Example
BEGIN
SetDigitalChannel(0, 1);

 

 

now when i try to call  library function node to k8061.dll and set 2 parameters one for card address and other for channel

 card address type: numeric & dtat type : signed 32 bit intger

channel          type : numeric & data type :signed 32 bit intger

 

 

function prototype

void setdigitalchannel(int32_t address,intg32_t channel);

 

i also configure call library function node error checking to maximum

 

now as i run i get  error 1517 occurred and tell me that mismatch between the calling conventions ???

0 Kudos
Message 1 of 11
(7,114 Views)
1517

 

 

 

 


An error occurred in the Call Library Node processing. This error was most likely a configuration mismatch between the calling conventions of the Call Library Node and the function being called in the DLL.

0 Kudos
Message 2 of 11
(7,114 Views)
What is your lv version?
0 Kudos
Message 3 of 11
(7,113 Views)
Solution
Accepted by jhfgfuygiy

problem solved

thanx

0 Kudos
Message 4 of 11
(7,110 Views)

problem solved

thanx

0 Kudos
Message 5 of 11
(7,109 Views)
Glad that it got solved but can you explain the solution a little bit. There isnt much on the error explanation
0 Kudos
Message 6 of 11
(7,106 Views)
i was choosing c insted of stdcall
Message 7 of 11
(7,087 Views)
This widget could not be displayed.

Hi

I am also working on controlling K8061 board with LabView. Would you kindly share your VI with me? 

The program needs to be able to set output votages in 3 channels from 0-5 V.

Thanks a lot for your help in advance.

 

email: twu@optics.arizona.edu

0 Kudos
Message 8 of 11
(5,742 Views)

Thank you. It works now. You were right that I had wrong setting by choosing stdcall not c. I don't understand why some functions need to be set in c (like OpenDevice and CloseDevice) but some need to be set in stdcall (like OutputAnalogChannel)? I randomly try/ error to make it work but is there a reason for each setting? Thanks for any advice.

0 Kudos
Message 10 of 11
(5,725 Views)