LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with shared memory using a PCI 7041 RT board

Hi!
I'm have a system that uses a PCI 7041 RT board installed in a PC. I'm communicating RT program with host program through shared memory, using the "RT Incremental single read/write" method. I've used the example provided by LabVIEW to develop my communication module and now I have two parallel loops running together in the host program: one of them manages the user interface and main calculations and operations, and the other contains the communication operations, such as shared memory read and write. Both loops pass information between them through global variables.
This system works correctly the first time I run host program but it doesn't in later executions. I mean: I run the RT target program in the PCI-7041 and then I run the host program in the PC. The whole system works perfectly. But if I close host program and later I run it again I can't communicate with RT program running in RT target although I know this program is still running. I have to restart RT program and then restart host again to make the system work properly again.
What is the problem? What can I do to have a normal communication between applications through shared memory?
0 Kudos
Message 1 of 3
(2,691 Views)
Hi pablomendana,
I have run the shared memory example 'Incremental Read and Write' on my 7041 board and I have no problems when I stop the host vi, close LV and re-open the host vi. Are you recieving any specific error messages? Are you perhaps sending a stop command to your RT vi when you close your host?
Perhaps you could post your code here so that we might be able to replicate your problem.
0 Kudos
Message 2 of 3
(2,687 Views)
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.
0 Kudos
Message 3 of 3
(2,679 Views)