LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to assign higher priority for labview while running other applications.

HI,
I am performing 2 time critical counter operations. I am using software time due to the hardware limitation of PCI6013(I have tried all other options). My problem is that I get a erractic value when I use mouse, keyboard or change to other application.

I found the following link providing a method to provide maximum priority to labview application.But even regular labview users are asked not to use this application. I am not even a regular LABview user.Is there any precaution that I should take to use this VI. I am in need of such an application very badly. Please Help.

http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=506500000008000000F5880000&UCATEGORY_0=_1
5_&UCATEGORY_S=0&USEARCHCONTEXT_TIER_0=0&USEARCHCONTEXT_TIER_S=0&USEARCHCONTEXT_QUESTION_0=priority&USEARCHCONTEXT_QUESTION_S=0
0 Kudos
Message 1 of 9
(3,655 Views)
> I am performing 2 time critical counter operations. I am using
> software time due to the hardware limitation of PCI6013(I have tried
> all other options). My problem is that I get a erractic value when I
> use mouse, keyboard or change to other application.
>

If your app yields time and isn't running continuously, raising the
priority of a given execution system or of the LV app in general may
help with your jitter. On the otherhand, if you don't have sleeps to
yield time to the OS and other apps, your high priority tasks could
starve out the OS itself and lead to problems, that is roughly what was
being warned against I believe.

If you want to affect priorities, the easiest way is to move the top
level VI to a different priority. If you determi
ne that it is the LV UI
thread that is causing the jitter, then consider elevating the priority
of the LV process itself.

If you have further questions, please include more details about what
you are doing and where the jitter is coming from.

Greg McKaskle
0 Kudos
Message 2 of 9
(3,654 Views)
"Is there any precaution that I should take to use this VI."

Yes many,

When you start to experiment with settings priorities in an attempt to avoid the affects of mouse clicks, then you should brace yourself for the application appearing hung. This would happen if LV had a higher priority than the mouse interupt service routine.

Same applies to the other conditions you mentioned.

If you go this route, backup before you experiment! Some strange things can happen to your file system.

I have talked to you about this challenge of yours in another thread. This is what I recomend.

1) If you can live with your readings being made on only one gear at a time, AND the sample rate being aperiodic, then you MAY be able to use DAQ Occurances and two session. I
have not done this myself, and AM NOT SURE if it can be done or if you hardare supports it, but maybe;
a) Open two references to your and configure A so it uses hardware timing (like you already said works good) to count gear A using the other counter as the gate. On the other session you are counting gear B.
b) Configure both of the above to fire occurances when done.
c)Start only session A.
d) When A occurance fires start B.
e) When B fires start A, etc.

This will give you determinism on the counts and effectively shift the indeterminism to the update interval.

If this is not good enough then there is another option. Can you get yourself a nice solid external reference that you can apply as an external gate to both counters? If so you will be using hardware timing and you should be on the right track.

If these do not work out, you may end up having to go to different hardware.

Just trying to help,

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 9
(3,654 Views)
Disclaimer:
None of my comments should be concidered over Greg's reply. If there is a conflict between what I said and Greg said, Greg's opinion should over-ride mine. We just happened to post at the same time.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 9
(3,654 Views)
HI Greg,
Thank you for your reply. I have included lot of sleep times in my application and hence I believe that the OS will have sufficient time. I would like to know if this process of changing priority would be temprorary while running my Labview application or would it permenantly change the priority of windows activities.

Thanks,
0 Kudos
Message 5 of 9
(3,654 Views)
Hi Ben. Thanks for your mail. I remember your earlier mail regarding this problem.My current problem is that I have finsihed designing the control panel .I am thus thinking of attending this problem through software. I have your suggesion on hardware timing as my next option.
Thank you for your latest suggestion of having two sessions. This was similar to what I vaguely thought I could try.
0 Kudos
Message 6 of 9
(3,654 Views)
> Thank you for your reply. I have included lot of sleep times in my
> application and hence I believe that the OS will have sufficient time.
> I would like to know if this process of changing priority would be
> temprorary while running my Labview application or would it
> permenantly change the priority of windows activities.
>

I haven't looked closely, but only administrator priveledges should
allow for permanently boosting something. Your call should have effect
only while that LV session is running. You shold be able to verify this
if you have the MS documentation for the calls being made.

Greg McKaskle
0 Kudos
Message 7 of 9
(3,654 Views)
Hi Ben,

I have implemented your idea of interlinking gate to the output of the other counter to measure frequency.
This works fine and I read one gear at a time and the other gear after 1 sec.Thanks.

I am trying your plan B to using external trigger to measure these two gears togeather.I am using measure
period(DAQ_STC).vi for this purpose.

I have few points on which I request your suggesion.my questions are based on measure period(DAQ_STC).vi


1)Can I replaced source configuration from internal timebase to external PFI source signal.

2)If I replace my source signal from internal timebase to the pulse generated from my gear drive then would at the end of 1 sec (when the counter is disarmed due to change of trigger signal state and
hence end of while loop) will the count attribute contain the count of my ttl edges?


Thanks in advance for your reply.

Bye,

Balaji
0 Kudos
Message 8 of 9
(3,654 Views)
Hi Balaji,

I suggest you re-post these Q's as new one to both LV General and the Counter/Timer forum to get a wider audience.

As to your Q's.

"1)Can I replaced source configuration from internal timebase to external PFI source signal.
"

I would suspect yes but this is hardware dependent and I do not have all of NI boards memorized. Check the PDF on the board or contact NI support and ask them "Can I do this with this and if so can you point me at an example?" They are pretty good about answering Q's of this type. You will probably have a working example in about 15 minutes.

")If I replace my source signal from internal timebase to the pulse generated from my gear drive then would at the end of 1 sec (when the counter is disarmed due
to change of trigger signal state and hence end of while loop) will the count attribute contain the count of my ttl edges?
"

I believe so, plus or minus a count. This will get pretty bad as you approach 0 RPM's.

Like I said before, re-post these Q's and get other's opinions.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 9 of 9
(3,654 Views)