LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error Memory Full


@Credible  ha scritto:

These are two of your subVIs:

They are IDENTICAL!

Instead of creating several copies of the same code you should just use the very same VI!

Please check all your subVIs for identical code and remove copies…


Will do! Thank you. However I am not sure, why they are the same. They shoul (as is my understanding) control different motors, so shouldnt they be different then?


They are almost identical, differing only in the indexGroup value. Instead of having a separate subVI for each motor, you can have the same subVI with the indexGroup as an input. Then make that input into a ring. This allows you to associate the indexGroup to a name.

Message 11 of 28
(533 Views)

Hi Basjong,

 


@Basjong53 wrote:
They are almost identical, differing only in the indexGroup value.

Good catch!

Yes, this should be an input to a subVI…

 


Credible wrote:

And how could u see all of the case frames next to each other?


These are sequence frames, not cases.

And you can right-click a stacked sequence and convert it to a flat sequence! (And you can merge frames of a flat sequence.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 12 of 28
(525 Views)

Just a small comment to the screenshots of the ADS connetion vis.

 

You are using .NET calls and never close the references to the .NET objects. 

This causes a memory leak as labview does not deallocate the opened .NET references.

So each time you are opening a reference is is stucked in the memory till you close your program.

 

This may cause a memory problem. 

 

On the other hand from my point of view sometimes the massages in the error descriptor are not 100% correct. I also have sometimes some GBIP error  which has absolutely noting to do with GBIP. (If I rememeber correctly I have had it once with a queue but i cant remember exactly what the origin was.)

 

 

Gernot Hanel
IONICON Analytik Gesellschaft m.b.H.
Message 13 of 28
(517 Views)

@Basjong53 wrote:

As said, there are many things to improve about the code, but if your boss is happy with its functionality, don't waste time refactoring the code. Focus on the problem given to you and try to fix just the error.

 

Some questions: Which subvi, and more specifically, which function inside that subVI, is giving the error? What is the actual error code and description?


Here are some of the Error messages. I cant click through all of them, bc suddenly Labview crashes

Download All
0 Kudos
Message 14 of 28
(516 Views)

The first massage is some ATI graphics card driver issue which should not have any influence to the Labview program.

 

How log does the program run till you see the message. 

 

I would try to use some diagram disables and check the real origin of the problem.

Or use probes and  breakpoints to come down to the origin.

 

 

 

 

Gernot Hanel
IONICON Analytik Gesellschaft m.b.H.
0 Kudos
Message 15 of 28
(509 Views)


So a memory access violation. It probably has to do with the opening and closing of the all the .net nodes as @nottilie said. You should open it once when the program starts and close once when it stops.

 

The Catalyst Control Center warning is not related, it is your graphics card driver.

 

Message 16 of 28
(512 Views)

@nottilie wrote:

Just a small comment to the screenshots of the ADS connetion vis.

 

You are using .NET calls and never close the references to the .NET objects. 

This causes a memory leak as labview does not deallocate the opened .NET references.

So each time you are opening a reference is is stucked in the memory till you close your program.


I guess the ".NET calls" are all the TcAdsClient blocks in the sub vi? Again, I am total new to this. How could I close the .NET references. Because memory issue is the exact problem.

 

 

 

0 Kudos
Message 17 of 28
(509 Views)

@Basjong53 wrote:


They are almost identical, differing only in the indexGroup value. Instead of having a separate subVI for each motor, you can have the same subVI with the indexGroup as an input. Then make that input into a ring. This allows you to associate the indexGroup to a name.


That seems reasonable to me. How do I make those inputs into a ring? is this a block? Or do i have to adjust one of those vis and instead of the 32 bit integer have a array or something with the different values?

0 Kudos
Message 18 of 28
(500 Views)

@nottilie wrote:

 

How log does the program run till you see the message. 

 

I would try to use some diagram disables and check the real origin of the problem.

Or use probes and  breakpoints to come down to the origin.

 


The program runs about 15 to 20 minutes.

 

What do you mean by diagram disables?

Same goes for probes/breakpoints. How?

 

I am terribly sorry that I don't know any of that stuff and have to ask so much

0 Kudos
Message 19 of 28
(490 Views)

I am really sorry to tell this but the code is very strage.

 

As I see you are connection to a beckhoff PLC and reading data.

Typically to do this you just need a single TcADSClient or if you are happy some more.

 

At the prgram start you need to create this client and use it for all your PLC reads.

In your case you open about 30 TCADSclients and run the loop in 10ms timing. 

But it is not possible to run all this code in 10ms as connection to the PLC needs longer. And you connect about 30times per loop iteration without closing the .NET references.

 

It will be really hard to fix this existing program so it is running as the fundament is not perfect.

 

My suggestion once more is

 

Open the ADSconnection once before you enter the continous run loop.

Prepare all your needed readers and writers at the beginning.

Reuse all reusable references to the .NET objects without new creation.

If you need to create new the close the unneeded.

Read and write your needed data inside the loop. (ideally with a good timing)

Close the ADS connection when you close the program.

 

This is the schematic which needs a few hours to implement and then a few days to fix the problems 😉

 

 

 

 

Gernot Hanel
IONICON Analytik Gesellschaft m.b.H.
0 Kudos
Message 20 of 28
(478 Views)