(17.05.2016 13:36 )VS_03 schrieb: ich erzeuge nun mit einer Karte einen Sinus und will mit einer anderen Karte synchron diesen mit der doppelten Abtastrate messen. Leider fängt die Datenaufnahme scheinbar zu spät an und nimmt immer etwas zwischen 65k und 67k samples auf statt 80k. Die Ausgabe soll die Aufnahme triggern über die RTSI-Line (ich komm ohne Triggerung zum selben Ergebnis an samples). Hat jemand einen Ansatz für die Problemlösung?
parallel die Anfrage auch hier im NI-Forum.
So you make your AO the master and AI the slave. Then you need to arm (Start Task) the slave before you enter the loop. Normally you arm the slave, then the master by using a flat sequence structure that goes over both tasks. In the first frame you use Start Task for the slave, in the second frame you set Start Taask for the master. Then you can go into the loop and aquire the data.
You also need to fill in the buffer for the AO task once before you start it, otherwise you cannot start a task on it as it will terminate immediately as it has all the available data already generated.
What happens now in your VI is that the data aqcuistion and data generation are actually generated asynchronously in the loop as the task are started implicitedly in a random order.
Synchronous data acquisition is always a bit of a tricky operation. But NI has several examples that show you good practice to do this. I always start from one of those examples when needing to do synchonrous DAQ, then modify it to my specific needs. Making it from scratch yourself is a hassle and lots and lots of trial and error without knowing exactly what is wrong. The LabVIEW examples finder is your friend here.