call C function in Scilab 5.0.2
Sébastien Barré
sb at sinusmess.de
Thu Nov 6 17:19:38 CET 2008
Dear Scilab users / Developpers,
I am currently working on the development of an interface between
measurement devices and the great Scilab machine.
The idea is to be able to command the devices connected to the computer
directly for the scilab command Line.
In this aim, I use the Scilab c_link function to link c function of a DLL,
then the Scilab call function.
It looks like this:
if (~c_link('QueryDevices'))
funcload = ['QueryDevices'];
link('SCILabIF.dll', funcload, 'c');
end
[NbrOfDevices] = call('QueryDevices', 'out', [1,1], 1, 'i');
if (NbrOfDevices <= 0) //error handling no devices found
rc = -1;
end
My problem is:
The command:
[Name, Channels] = call('GetChannelName', 0 , 1, 'i', 'out', [32, 1],
2, 'c', [1,1], 3, 'i');
works properly with version 4.1.2 of Scilab, but with Version 5.0.2 I
get the message
Warning !!!
Scilab has found a critical error (EXCEPTION_ACCESS_VIOLATION)
with "call" function.
Save your data and restart Scilab.
Warning: stack problem..., cleared.
Does anybody know why? and how could I solve it.
Thanks in advance,
Sébastien
--
Sébastien Barré
Sinus Messtechnik GmbH
Foepplstrasse 13
D-04347 Leipzig
Tel.: +49 341 244 29 28
More information about the users
mailing list