12-18-2024 09:30 AM
I have noticed that I when checking this box
I will receive this error from a DAQmx read for an AI card inside of a Timed While Loop
Unchecking the show front panel when called box will not cause this error to show up. I'm thinking that the show front panel when called functionality is taking up a lot of cpu or memory usage which may be leading to slower execution times for the Timed While Loop and is making it to where the DAQmx Read call is not able to read fast enough.
Does this feature use a lot of cpu and memory usage? How can I check this? How can I see how much this is affecting the execution speed more specifically?
12-18-2024 10:29 AM
Showing the front panel requires additional memory and UI thread usage to update the indicators and poll the controls.
If the front panel is very busy (graphs with huge amounts of points, overlapping controls, etc.). it can be taxing. Do you need to show the front panel?
In any case, the bottleneck could be elsewhere and the front panel is just enough to push it over the cliff. So the reason could be inefficient overall architecture.
I assume this is running on a PC, right?
What does the program do? Can you show us some code? What else is happening inside the timed loop? What is the loop rate?
12-18-2024 10:43 AM
You would select Show Panel when Called if you want the sub vi to open for user interface update/ interaction.
If your subvi is just acquiring data, it is just slowing your process.
12-18-2024 10:45 AM - edited 12-18-2024 11:21 AM
This is inside of my Real-Time Model DQMH module. It is a timed loop which is responsible for reading/writing to ai,bridge input, ao, di, and do cards with the values that are in an array that gets populated from a csv inside the INIT MODEL VI.
The issue I'm having is the WRITE TO DO VI is causing an error -200714 to occur. To see exactly where this error was occurring I was showing the front panel of the EXECUTE MODEL. I was curious if showing the front panel of the EXECUTE MODEL was causing the error -200714 to occur so I commented out the WRITE TO DO VI and observed the same error.
So now, showing the front panel with WRITE TO DO disabled causes the error and not showing the front panel with WRITE TO DO enabled both cause the same error. I'm looking into the WRITE TO DO by itself now because the end product doesn't require the EXECUTE MODEL's VI to show its front panel (that was just for debugging). I'm currently thinking that I don't have any DAQmx timing setup for the DO card explicitly so that may be causing some issues that are leading to the error.
The Start Card.vi is where the tasks are created for all the cards. The project is being built for a PXIe-8861 with a NI Linux Real-Time operating system.