Hmm, it would be easier to help if you can show us your actual code. Probably a Producer/consumer (events) could be ok to use.
"I will try to combine the counter and DAQ while loops together. " I meant that to combine the "Device control" and "counter" loops. I guess you make some kind of steps with your hardware using an array constant?