10-05-2012 07:58 AM
Hey guys, I am having problems with a speed issue concerning 7 cDAQ chassis, I am recording 800 thermocouples once a second for a set amount of time, but for some reason the code runs unbearably slow, we have tried using just 2 cDAQ's and the speed is perfect, but when more chassis are added the speed drops each time.
We have tried using simulated tasks and this issue is still there, has anyone had this situation or know of a likely reason why this is happening and how to counteract it?
Cheers,
10-11-2012 08:25 AM
Hi SheEti,
Would it be possible for you to clarify a few points to enable me to better investigate the matter:
If you could post the relevant section of your code, that would be helpful as I could try to replicate the issue.
10-11-2012 09:50 AM
The modules for the thermocouples are 9213 and yes we are logging these to a tdms file, it is logging at 1 sample per second.
In the attachment is a snippet of our code, using the boolean ok increments the indicator by 1, but it takes longer than it should do, this is replicated through our code.
If you could let us know if you have any idea why it is running so slow then that would be much appreciated.
Cheers,
Jason
10-11-2012 10:56 AM
Hi Jason,
I've looked at your code and I see that you're dynamically loading VIs and using notifiers. Is there a particular reason for this?
It may be useful to check your CPU usage in task manager to ensure that the CPU is not overloaded.
How many cores do you have on your CPU, and is one of the cores being overloaded?
10-11-2012 11:07 AM
Yea I have 2 cores on my pc, and it seems to be running at around 10% of the CPU.
We are using notifiers to transfer data and it shouldn't matter if we miss points. Like i said this is just a quick mock up of our whole code, this is just demonstrating the speed of the code.
When running the actual whole code we are reaching peaks of around 60%, but me and a few of the guys from my office have been scratching our heads over what the speed issue is.
Cheers,
Jason
10-11-2012 11:39 AM
Hi Jason,
Unfortunately I'm not able to replicate the issue due to the amount of devices you are using.
A few more pieces of information which may be useful:
It may also be useful to check your network traffic usage.
10-11-2012 02:59 PM - edited 10-11-2012 03:00 PM
In addition to what Chris has said.
Open Tools>>Profile>>Performance and memory
This is an often overlooked LabVIEW feature that will help isolate these kinds of issues and will definately identify the vi responsible for the slow performance.
As a side note:
I caught this snippet in one of your sub-vis. WWYT? (Yes there is just a "F" constant in the false case) wire the conditional terminal directly to the comparision and the case can be safely disposed of.
10-12-2012 03:32 AM
The speed seems to be consistently slow, but if I were to run the separate Vi's outside of the main program they run smoothly. It all seems to happen from the start of the program which is more or less the code that I have included before hand.
No when simulating the speed is actually better than using the actual physical devices.
No the RAM seems to be at a constant set, no where near maximum.
I have also looked over the performance and memory profile and nothing seems to be out of place.
Just so you know its not just my pc, this problem occurs on my colleagues who I am working on this project with.
cheers,
Jason
10-12-2012 11:16 AM
Hi Jason,
Apologies for the delay in getting back to you. Here are a couple more things that could affect your program:
If you could let me know if these have any effect. Based on this we will attempt to further investigate to resolve the issue.
10-12-2012 02:45 PM
@ChrisJones wrote:
Hi Jason,
Apologies for the delay in getting back to you. Here are a couple more things that could affect your program:
- Within VI Properties, navigate to the Execution category and select 'Shared clone reentrant execution'
- In your DAQ.vi, where you use Open VI Reference, set the 'option' as 40 (Enable simultaneous calls on reentrant VIs) rather than 8 (Prepare for reentrant run).
If you could let me know if these have any effect. Based on this we will attempt to further investigate to resolve the issue.
MAKE SURE yoo set the display mode to HEX first 0x40 or 0x08