LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI 9147 / NI 9476 Slow Variable Connection via Ethernet

Solved!
Go to solution

Hello,

 

I am operating an NI9476 digital I/O module connected to an NI 9147 controller card. This module is directly linked to a Windows PC via Ethernet. Each access of a DI/O (Digital Input/Output) operation is currently taking between 50ms and 150ms. Given that I require over 100 readings and write operations during a process, this speed is considerably slow. Is this performance typical? Are there potential ways to improve the speed? See picture of current variable acccess.

 

Thanks,

Dirk

0 Kudos
Message 1 of 6
(441 Views)

Hi Dirk,

 


@Dirk_1971 wrote:

this speed is considerably slow. Is this performance typical? Are there potential ways to improve the speed?


Why do you need to open and close the variable reference with each call?

Why don't you open once before the loop, do all your stuff within the loop and close once after the loop?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(438 Views)

Hi GerdW,

 

I've attempted to open all inputs and outputs and close them after all operations are completed. However, opening all IOs also takes 1-2 seconds, and somehow the IOs are closed again as soon as the VI stops.

 

 

Dirk

0 Kudos
Message 3 of 6
(413 Views)

Hi Dirk,

 


@Dirk_1971 wrote:

I've attempted to open all inputs and outputs and close them after all operations are completed. However, opening all IOs also takes 1-2 seconds, and somehow the IOs are closed again as soon as the VI stops.


  • Opening the IO references is a one-time operation, so 2s should be irrelevant at start of executable.
  • The VI should only stop when your executable stops. And you should also implement the closing of the references in your own state machine (?) and don't rely on LabVIEW's automatic cleanup behaviour…

Maybe you forgot to present the whole picture while focusing on a small item inside your whole program?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(395 Views)

Hi GerdW,

 

In our company, we refrain from using executables to ensure constant access to the code. Instead, we utilize a Main VI that references all sub-VIs. However, I've encountered difficulty in keeping the IOs open and utilizing them across various VIs.

 

Thanks,

Dirk

0 Kudos
Message 5 of 6
(386 Views)
Solution
Accepted by topic author Dirk_1971

Hi Dirk,

 


@Dirk_1971 wrote:

In our company, we refrain from using executables to ensure constant access to the code.


That is your decision - and you need to handle the consequences of that decision...

 


@Dirk_1971 wrote:

Instead, we utilize a Main VI that references all sub-VIs. However, I've encountered difficulty in keeping the IOs open and utilizing them across various VIs.


The "difficulty" I see from your images is: there is no loop to keep the VI running.

LabVIEW will not close the references as long as the VI is running.

 

So again: it is your design decision and you need to handle the consequences!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 6
(377 Views)