11-24-2023 01:01 AM
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
Solved! Go to Solution.
11-24-2023 01:05 AM
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?
11-24-2023 01:33 AM
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
11-24-2023 01:46 AM
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.
Maybe you forgot to present the whole picture while focusing on a small item inside your whole program?
11-24-2023 01:55 AM
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
11-24-2023 02:00 AM
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!