Greetings all,
I am trying to communicate between two VIs using VI server.
The first VI is used to acquire signals. The second VI is used to dynamically call the first one and display the acquired datas. These two VIs run on the same machine. The first VI use an AI Sample Channel.vi in a while-loop structure. It achieves single-channel single-point acquisition in every cycle. The Sample periond is 1ms with software timing. The second VI invoke "Run VI" method to make the first VI run, then it invoke "Get Control Value" method in a while-loop structure to read the acquired data. the cycle period of this while-loop is alse setted as 1ms. When this while-loop stop, "Set Control Value" is invoked to stop the first VI.
When I run the second VI, the first one can be called to run to acquire signal, and the first VI can perform properly. In its front panel, a sine wave is displayed. But in the second VI the Waveform chart always displays 0, that is, the data get from the first VI is always 0,this is Why??
when I set the cycle periods of the two while-loop both as 5ms, the problem alse exists.
When I use sine function to generate a sine wave to replace the DAQ functions in the first VI, then the problem is solved, the Waveform chart in the second VI displays a sinewave. This is why?? Is there conflict between DAQ function with
the VI server? or the "Get Control Value" cannot be used with DAQ functions?
thanks!!