Hi again!
Actually I used the "while(1)" loop without using the keyboard interrupt in my application and it worked fine. What I'm confuse about is that even if I don't use the interrupt procedure in the main function and the code of the interrupt is still in my source code, but never used, just code that is never called, because I don't install it, the program gives me the same results as I've explained in the first post, with zeros inserted in the buffer, and voltages greater then 10V.
The timing is not the problem, I can say that for sure, because I've made a tricky one: I installed the keyboard interrupt in another program, that is a TSR. This TSR is activated by the keyboard and it sends all the data I need (in my case: the reference, the ESC fla
g and the CR flag, that memorize if these are pressed) to my NI-DAQ application (I've implemented some code of inter-process comunication). In this case the results are completely the expected one. And this is just because I don't have an interrupt procedure in the same program with NI-DAQ functions.
Neither the interrupt procedure is not the problem, because it's the same in the TSR, and it works fine.
Yet, another program I've done used the timer interrupt, and basically it does the same thing. At every two int 0x08 calls (a sample interval of 110ms) I do this (in the my0x08 procedure):
- AI_VRead...
- do the numeric PI algorithm to the data.
- AO_VWrite...
The result was still the same.
I'm using Borland C++ 3.1 for DOS. Now I'm asking if the problem is not from the compiler. Maybe the segment model I use (although I've tried all of them)or how the compiler is generating the code declared with the prototype:
void far interrupt my_0x09(void);