03-18-2014 05:47 AM
Hello again,
I got more wierd things, now it works, but it gives an error when i wait untill the generation is done. It mentions a buffer underflow.
03-18-2014 08:27 AM
Question back to you: When is a continuous output "done"????
Norbert
03-18-2014 09:43 AM
I got it... never.
I am stuck with a hardware buffer of 4096 samples, so in order to get a pauzing mechanism in i upped my analog output sample frequency to 4096, now the pause takes about 1200 ms... I also redesigned the whole thing and put an extra loop at the back with a node checking if TotalSampPerChanGenerated, when that goes to zero then it can stop the analog output, i only have to catch an "underflow" error there. Now i understand why it works with you simulated device, it has no hardware buffer.
03-18-2014 09:47 AM
If you require an immediate pause of ao at *any* time, you might want consider to use external clocking via a counter. Configure the counter to generate the pulse train and configure a pause trigger for it.
Please note that, depending on the general setup, you can receive timeout errors while pausing output.....
Norbert
03-18-2014 10:14 AM
Do i need to hardwire a counter to an input then?
Regards,
Thijs
03-18-2014 10:22 AM
No, you can use an internal connection. If you want to configure that, you should configure an DAQmx Terminal control to display Advanced Terminals in the IO filtering.
Norbert
03-19-2014 02:14 AM
Euhm... can you send me a little example? Or is there an example in the example finder?
03-19-2014 02:39 AM - edited 03-19-2014 02:40 AM
I know what i have to do but i don't know how exactly (PS, thank you very much for all the effort you are putting into this!)
I have to pause the outputbuffer and also stop the filling the buffer at the same time (the last thing is easy). Then when i resume, i have to start reading the buffer again and also fill it to complete the rest of the generation. I'm already searching for solution to hold the buffer and i know i have to use some sort of trigger... but exactly how? I don't know yet...
Regards
03-19-2014 03:30 AM
I almost got it!! There was a realy good example on the forum and i am redesigning it to my needs... It is this example:
03-19-2014 05:11 AM
I figured it out and it works! There's still some work to do, i would also like to pause in when the last loop is running, or somehow eliminate this whole loop...