06-01-2018 06:35 AM
The lower "Waveform Array" on the ARB Channel node can be used to close the reference. This returns the object once the property node has finished working on it.
06-05-2018 04:33 AM
I have some good news and some bad news.
Good news first: I have narrowed the problem down to the following marked part of the VI. It is at the expected part of the "WaveformStruct" Object. There the created Labview Array is converted into the .NET object array and sent to the device.
The bad news is that adding 'Close reference' did not resolve the problem of the memory overflow.
Is there anything else I can do at this part to resolve this issue?
06-05-2018 05:14 AM
Does the reference offer a destroy method?
06-05-2018 05:25 AM
I am not sure if it does.
There is limited information about the objects and classes. But I have a small documentation about which reads the following:
06-05-2018 05:49 AM - edited 06-05-2018 05:50 AM
@QU-1 wrote:
The Error out and Error descriptions should be Local variables. The Error out should be wired through the other nodes and Close ref's so you don't close e.g. ARBChannel before ATError. Why do you create a new WaveformStruct each time? I think this is the biggest cultprit and it isn't closed! (Corrections, it's closed on the output side which is probably the same, but are you sure? Probe the arrays and check the references) Create it on 1st call then reuse it, it should also improve performance some. Also, i think it's better to simply use a Build Array on the reference to the Waveforms input.
/Y
06-05-2018 06:50 AM
06-05-2018 08:54 AM - edited 06-05-2018 08:55 AM
You'll use the First Call primitive, a Case with the constructor in True , and a feedback node that reuses it in False. 🙂
In this case you probably don't want to close it, as you'll want it to stay alive until next time.
/Y
06-11-2018 09:23 AM
It seems like I have found the solution now. It was indeed the empty .NET array as seen in the red marked part in the picture above.
However creating a 'First Call primitive' was giving me an error at the VI execution.
Therefore I created the .NET variables (WafevormStruct and the empty array) in my main VI and fed them into the subVI. The main VI is running continously but creates those variables only on the first run.
What I still can not understand is why the 'Close Reference' call did not work properly. I thought this should have solved the problem as well.
06-11-2018 10:36 AM
I bet someone will correct me, but LV don't forcibly close the refs, if it suspects it's used it'll wait. I've had the same thing happen to me, by opening .net refs it basically 'leaked' 4 bytes each time. After a while things crashed as it was only allowed to open 1 million of them. ^^
/Y