From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Communication Stops with Modbus Device

Dear All,

 

Let me explain my set up first:

 

I am communicating with 3 modbus devices paralllely, means i have 3 while loops in parallel to read register.

 

After reading these register i am inserting the values in the database.

 

I am using 3 different vis for all 3 loops ( not reentrant).

 

Also i am opening & closing the visa and database connection in the loops.

 

The monitored the cpu usage and the memory, they are not increasing and are steady.

 

Problem: While i am running the above setup for a day then after about 16-20 hrs the program stops,

i am not understaning as 3 parallel loops are running with different vis, then also all the 3 loops does'nt respond.

 

Can anyone suggest anything,

 

Thank you in advance. 

 

Regards,

 

Shrek

Message 1 of 4
(2,291 Views)

Have you considered NOT opening and closing the resources within the loops?  If you are doing something repeatedly, then constantly opening and closing resources may be causing problems like a memory leak.

 

Are all 3 VI's accessing the same resource?  If so, you might want to create a VI that is a single point of access for a given resource and let the 3 parallel VI's all interact with that.

0 Kudos
Message 2 of 4
(2,274 Views)

I'm giving a kudos for adverb invention.

0 Kudos
Message 3 of 4
(2,270 Views)

Thanks for the reply,

________________________________________________________________________________________________________________________________________

Have you considered NOT opening and closing the resources within the loops?  If you are doing something repeatedly, then constantly opening and closing resources may be causing problems like a memory leak.

________________________________________________________________________________________________________________________________________

 

 

In some of the document from NI only i have read that the connection opened should be closed or the memory size will increase.

 

I am experiencing the problem of memory size increase when i am not closing the connection (in other application).

 

________________________________________________________________________________________________________________________________________

Are all 3 VI's accessing the same resource?  If so, you might want to create a VI that is a single point of access for a given resource and let the 3 parallel VI's all interact with that.

______________________________________________________________________________________________________________________________________

 

All the 3 loops contains Modbus master vi which polls for a specific device and inserts that value in the same database. I tried doing it with reentrant vi,

Calling the same (reentrant) vi in all the loops but the modbus comm. was giving error.

 

 

Regards,

 

Shrek

 

 

 

 

 

 

0 Kudos
Message 4 of 4
(2,257 Views)