UIE/UID conditional usage?

3 posts in this topic

All of the documentation for the UID/UIE set of instructions seem to indicate that they need to exist on a rung alone, is this the case?  I would like to conditionally execute the UID and UIE instructions based on logic conditions.  RSLogix 5000 allows me to add the instructions in this manner, but I am unsure if it works properly, or how to exactly test if they do work when this is done.

One help manual states that the UID boosts the priority of the current task and the UIE restores the priority, but using a GSV shows no difference between the priority values for the task when logged inside or outside the pair whether the pair is inside conditional statements or on separate rungs.

Does anyone know if they can be conditionally executed, or at least have an idea of how to test this?


Share this post

Link to post
Share on other sites

You won't see a change in the priority in the property box. The scan is too fast....also...

The UID doesn't raise the priority of the task that it is in, it merely prevents any interruption of the task until the UIE or (in the case of ladder logic), the last rung of the routine that the UID is in gets executed. In other words, that last rung is an implied UIE.

One task that CAN and WILL interrupt all tasks (even if a UIE is in effect) is the Fault Routine (if configured).

As far as I know, condition(s) can be placed in front of the UID.

Edited by Filthy McNasty

Share this post

Link to post
Share on other sites

Agreed Filthy, you won't see the change in the property box, I used a GSV to record the priority to 2 separate tags, there was no difference between them.  I am guessing that the priority boost may not be reflected in the GSV, (and the GSV simply returns what is in the property box).

Also, I did find reference before my original post that the UID accomplished this blocking of being interrupted by raising the priority.  I am confident I found this in one of the AB manuals, but cannot remember where I saw that, nor can I re-find it (of course :disgust:)

Either way, Logix allows conditions ahead of the UID/UIE instructions and I am changing my code back to having logic ahead of them (yes I had it that way to begin with) and I will see if the problem that caused me to use the instruction pair comes back.


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now