-- Tim Burgess
One thing that is bugging me overnight is that my python 263
installation is a windows precompiled binary. I don't know what tools
are used to build that binary.
To make the nidaq wrapper, I used the python263 source code for the
header (not worried about that) and the binary installer supplied
library to link Mingw (gcc) against.
This morning I have attempted to build a Mingw python binary and install
that - however python263 sources dont build with Mingw as supplied.
There needs to be some patching done - which I have yet to attempt,
because the patches only exist for python251.
I am wondering if a mismatch between the python windows binary supplied
library and the mingw/gcc generated library going to cause difficulty. I
can see that the symbols are being extracted from the python library in
the gcc build phase and I dont get any errors reported - so I guess I am
worrying about nothing. Or a change in calling conventions?
It's been a couple of days tinkering with this with only minor success -
so I guess I have started seeing ghosts. :-)
In your environment what python binary are you using?
> I can tell you
> that reporting C errors back up to Python through SWiG can be
> difficult at times. I have tried to trap most errors, with this code:
> /
> **********************************************************************
> * Convert DAQmx return codes to Exceptions
>
> **********************************************************************/
> %exception {
> $action
> if ( DAQmxFailed(result) ) { RaiseError(); SWIG_fail; }
> }
> %{
> static void RaiseError() {
> char errBuff[2048]={'\0'};
> DAQmxGetExtendedErrorInfo(errBuff,2048);
> SWIG_exception(SWIG_RuntimeError, errBuff);
> fail:
> return;
> }
> %}
>
> However, any C error that slips past that will just crash the Python
> interpreter.
>
I must say that each time I think about how to debug this I am left
wondering how it would be possible. Judging by the way the machine acts
following a crash, there is a several seconds pause in everything -
Windows stops responding and then away it goes again. It 'feels' like
the ni driver has been offended and it waits and then completely resets
itself and begins working again. This is seen in the national MAX and
for my code. So far reboots to return the nidaq code to a working state
have not been necessary, - perhaps the wrapper is whats dying...
> I will try re-running the Acq-IntClk example this weekend.
>
Perhaps if you could check all the examples - that would be nice to know
they are all confirmed working.
Would you be able to send or post, the wrapper and intermediate files
generated building the library (library files too please) A zip
containg the nidaqmx/build and nidaqmx/gcclib folders (or the entire
nidaqmx directory, would be real handy. So that I can test your working
build on my hardware.
I think a zip/tgz would be fairly small so I think would possibly be
able to email it to me directly.
Thanks again for your help
timb
--
Tim Burgess
TBITC Pty Ltd