LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I get memory issue messages while communicating to a serial card using Labview calls to a DLL.

Hi all,

Using a PXI-8176 controller, I more than often get a "reference memory could not be read" or "Labview memory is full" message when communicating to a ATC-SCC serial card (Transmit line looped back to Recieve line) through a third party DLL that runs well on its own.

This message usually occurs when I have the call DLL function node in a continuous loop but is not consistent as to which loop iteration it occurs in. It seems to happen when a Recieve request is made.

I have configured the call library node to Re-entrant. The DLL is specified to autosize the associated FIFO buffers but at this stage of development I am transmitting small amounts of data (18 - 1
80byte strings) before performing the Recieve operation which sometimes works OK.

Using Labview7 on Win2000 OS the task manager indicates memory usage of 135Mb with the program running. I am soon upgrading from 128Mb to 256Mb SDRAM but have my doubts if it will work since I tried increasing virtual/shadow memory to 300Mb (task manager then shows usage at 135Mb/300Mb).

The serial card is an Alphi Techology Corporation product; Quad channel Serial Comms Controller supproting RS232/422/485.

I have also read the discussion thread from Frenk (03/18/2004) - I suspect the DLL I use does not perform a CLEAR operation after its calling subvi finishes executing. Is this of significant impact??

Any advice please?

Many thanks in advance.
Kenos
0 Kudos
Message 1 of 3
(2,611 Views)
You need to provide the DLL function prototype and your call DLL node within it's vi in order to be of futher help. I suspect that it is the setup of the call. If you are returning the message from the call in a str *, the string buffer must be allocated in LabVIEW and be filled in by the DLL.
Stu
0 Kudos
Message 2 of 3
(2,611 Views)
Thanks alot for your help. Your suggestion was the solution - when I found out how to allocate the string buffer memory in LabV I didnt get the error.

Many thanks again.

For any others out there I found out how to do this in C:\Program Files\National Instruments\LabVIEW 7.0\examples\dll\data passing\Call DLL.vi; selected CHAR and pressed "Open example vi...." button.
0 Kudos
Message 3 of 3
(2,611 Views)