Hello DavidT.
In first place, thanks for answering my question.
I'm not getting any error message and I'm sure that VI in the RT target continues running after I close host VI (I have a user LED blinking intermittently when program is running). The only problem is that it looks like there was no communication between both VIs, as if host VI couldn't read or write in shared memory or if it used other memory positions.
In summary, after closing host VI, RT VI running in PCI-7041 continues executing but when I run host VI again, it's impossible to share data with RT target, so I can't control program execution.
My code is quite big and chaotic so it would be difficult to understand and probably too heavy to transfer. I'm not going to send you a complete version because I find it quite useless. I'm going to send you a simplified version in order to make used architecture easy to understand. I hope it will be clear enough to let you find the problem. I haven't tested this code because I haven´t here the PCI-7041, so maybe it has some errors and doesn't work properly. Please, let me know if you have any problem.
Thank you very much.