PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Add For Loop

Hi,
I have got this signal generating and acquisition vi where if I click on the "Save and add 10kHz" button the digital data from my picked up signal are saved and the generator adds 10kHz on the next driving signal (this works fine). I would like to automate this vi so that I don't have to click on the "Save and add 10kHz" button for each sample. Therefore, I have added around the whole vi a For Loop in order to repeat the clicking 10 times. Unfortunately, I have received an error message " 1074130544 at niFgenClose.vi". So I have removed this For Loop. Is there a way how I could repeat what the "Save and add 10 kHz" button does?
Thank you,
Ninskaya
0 Kudos
Message 1 of 2
(2,811 Views)
Hi Ninskaya,

The problem you are seeing, I think, is due to trying to close an already closed nifgen session. You have a nifgen close at the beginning of the for loop and another at the end. When you loop around for the second time you will try to close the session you closed at the end of the first loop.

Hope this helps,

Nick
0 Kudos
Message 2 of 2
(2,806 Views)