04-17-2008 05:15 AM
04-18-2008 10:40 AM
04-23-2008 07:07 AM
Sorry for my late response.
This SubVI is supposed to open the device and return a handle to it. There also is a Close Device SubVI, so I believe it will stay open until the close SubVI is used.
This part is in a sequence that is used as the init for the VI. It is only to open the device if there is one. (theres is a subVI that returns the number of devices found, 1st device being Nr 0). The Open SubVI just returns -1 as handle when it isn't opened in labview. When it is opened it returns the handle as it should.
The SubVI not working when it isn't loaded in labview does seem like some kind of memory problem. But I don't see it return the handle for a short moment, which it might just show after executing and before removing it from memory again.
04-24-2008 12:10 PM
04-25-2008 10:34 AM
The DLL is only for communicating with the PCI card, so not graphical things.
I've added a screeny to make it more easy to see.
The third picture is the part that loads the DLL. Whenever the frontpanel of this VI is opened (or a VI where it is called directly), it works fine.
When i would close it it basically is out of memory because of the Call By Reference Node. At least until i want to use the DLL, which is what I intended. Now when it is closed, labview still runs the Called VI that opens the dll, but the result is an error.
05-02-2008 11:40 AM
05-04-2008 04:23 PM
@Barkey wrote:
The DLL is only for communicating with the PCI card, so not graphical things.
I've added a screeny to make it more easy to see.
The third picture is the part that loads the DLL. Whenever the frontpanel of this VI is opened (or a VI where it is called directly), it works fine.
When i would close it it basically is out of memory because of the Call By Reference Node. At least until i want to use the DLL, which is what I intended. Now when it is closed, labview still runs the Called VI that opens the dll, but the result is an error.
05-06-2008 03:11 AM
05-06-2008 04:51 AM
Of course there is a way but you do need to make it smarter.
@Barkey wrote:
The reason why i wanted to do it this way was to make it work even if the dll would not be on the PC. If the card wasn't installed, the dll wouldn't be needed either.So I guess this isn't going to work the way i wanted it to. Is there any way of only opening the dll if the card is detected and then keep it open?Although I might as well just not use the Call by reference as it would only slow things down like you said. The VI being faster when the clock is less accurate wouldn't make much difference anyway.
05-07-2008 10:10 AM