LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

My TCP/IP connection return randomly a "Not enough memory to complete this operation"

I have a program running a data acquisition loop on a PC. (PIII 700, 128 Meg RAM). This program send all the data reads from the system to a UI in another PC via a TCP/IP connection.

Everything works fine.. but, sometime, I receive a message "not enough memory to complete this operation". This is ramdom and cannot always be reproduce. I run often days without this problem and he show up 2 or three times the next day.

The memory usage in the system is constant and the number of handles used is also constant. I am using LV run-time version 5.1.1. I cannot upgrade to 6.X for many reasons.

Can somebody has any idea of the cause of this message. I only see one message like thi
s in the previous post and it doesn't looks like been solved.

Thanks,

Stephane
0 Kudos
Message 1 of 21
(5,728 Views)
Hi Stephane,

I do not have the time to get into all of the details but,
Have you tried running the two PC on an issolated LAN segment?
If it runs OK in this configuration, you maybe queuing up TCP/IP packets faster thatn they can be transmitted due to collisions with other network traffic.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 21
(5,728 Views)
Hi Ben,

Thanks for your reply. I have try to simulate traffic on the network by copying a lot of data of the server during transaction. Nothing crash. I "generally" run on an insulated network but I have never see this error myself. Only some people have see it and they not remember for the network. What you say about packet collision is, in this case, possible. I will continue to look in this direction.

Thanks,

Stephane
0 Kudos
Message 3 of 21
(5,728 Views)
Looks like not a problem with TCP/IP paquet coollision. I run off the network since a few days and I still get this random message.

Does somebody has any other thoughts?
0 Kudos
Message 4 of 21
(5,728 Views)
Stephanie:

What operating system? NT?

Does the server poll the client all the time?

If you re-start the system does the problem go away? (have seen this with Windows 9X but not enough experience with NT)

My e-mail is korpi@starband.net if I did not properly change my config.

Thanks,

Dave
0 Kudos
Message 5 of 21
(5,728 Views)
I see the same message when I change the packet length in the TCP Read function in an application client-server. If I change more/less than four the system hangs.
0 Kudos
Message 21 of 21
(5,256 Views)
Stephane,
Are you sure this error is occurring during a TCP/IP function (ie: TCP Read or Write)? When you run off the network, does the error still occur?
What vi's are you using to do your data acquisition? AI Config, AI Start, AI Read? or AI Continuous Scan? If using AI Continuous Scan, you need to make sure that the "clear acquisition" terminal is wired to a false constant, otherwise the "not enough memory.." error will appear.
-Melissa
Message 6 of 21
(5,728 Views)
Hi Melissa,

The program I have cannot run without TCP/IP communication. All the configuration and all the command are send by an external computer.

The hardware we are using is all access via VISA layer (VXI and GPIB) or by direct call to third party DLL. We don't have any AI XXX function / DAQ function call. I have monitor many internal status during the program running and the number of handle used stay constant over the time. For the memory, when the error happen, the amount of free memory is around 40 Megs has a normal run.

The discussion at

http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RNAME=ViewQuestion&HOID=506500000008000000AB3A0000&ECategory=LabVIEW.LabVIEW+General

is also pointing to TCP/IP issue. My error handler is
also pointing to TCP/IP server command in.

Thanks for your help, it's very hard to give all the details about this problem. Look like related to TCP/IP but very hard to reproduce and my program is too big to be share.

Stephane
0 Kudos
Message 7 of 21
(5,728 Views)
Stephane and Melissa:

I have not been able to find the text string "Not enough memory to complete this operation" anywhere... Who sent the message? LabVIEW or Windows?

Note LabVIEW's general error handler substitutes the word "perform" for "complete"

A big hint as to why this happens should be why does it NOT happen in Windows 9X and only happen in Windows NT. I have seen it on service pack 4 and service pack 6.

On AI COntinuous Scan: I am not using that either.

Here is what the message looks like in the attachment. A short jpg of the error message.

Please advise where the error comes from and why this does nto happen in Win 9X. Doing so might lead to determining the source of the problem.

Thanks,

Dave Korpi

korpi@starband.
net
0 Kudos
Message 8 of 21
(5,728 Views)
Hi Dave,

I cannot give you any source for the error message. My homemade error manager give me an error 2 after this message box in my TCP/IP command server in... pointing to a vi where I call only TCP write, TCP read and a encryption decoding (a loop appllying logical operation on all the bytes of the message to generate a magic number.)

This error, has we discuss in a previous e-mail we exchange can be only a side effect. I don't know. I have not test my program on Win 9X. I don't have any license of the OS in the buiding. Even if than solve the problem, I can trust 9X OS. Probably the same for you if your application is critical.

I wonder if you can provide the kind of instrumentation you are interacting with. My list is the following:


VXI card HP 1413, (VISA layer and configuration DLL from HP)
VXI card HP 1415, (VISA layer and configuration DLL from HP) [disable]
GPIB/ENET100 (VISA) [diseable]
PCI Ballard ARINC card (Ballard DLL) [disable]
ENET connection with the TCP/IP layer... not the socket one.
I am running from a VXIpc-872 from NI in a NI VXI chassis. I have try to different VXI controller (with different CPU speed) and also with an HP chassis. Same result. [Diseable] mean the code is not called. I run with the minimal system I can support 1 VXI Card and 1 SCP and still the same problem happen.

Does you, Melissa G and Eric Dalaire (on the other thread) have the same type of hardware?
If my assumption is good, the AI Continious Scan is probably using DMA? Do they? I also use DMA in my VXI access. Do you use DMA too Dave?

Stephane
0 Kudos
Message 9 of 21
(5,728 Views)