Jump to content

Self sealing / latching a bit in an MI using an RLO?


Recommended Posts

I'm just wondering if this is valid, or if there is an easier way to do this?

Let's say I have a bit in an MI that I would like to set.  With an MB, I would do something such as:


 

COMMENT: Enter Sets MB 10
MB 10 stays set until ESC is pressed


SB ENTER Key              MB 10
--|   |------|P|----------(     )
                       |
                       |
  MB 10   SB ESC Key   |
--|   |-----| \ |-------



Would the following work with an RLO and an MI? Is there another way to accomplish this?
 

COMMENT:
Store state of MI 400 Bit 10 in MB 100


             ____________
------------| TEST BIT   |----------
            |            |       
   MI 400   | A        C | MB 100 
            |            |
            |            |
   # 10     | B          |
            |____________|    




COMMENT:
Enter Key is pressed.  One shots the RLO.
Next scan comes around, updates MB 100 with the state of
MI 400, Bit 10.
MI 400 Bit 10 stays on until ESC is pressed.

SB ENTER Key                       ______________
--|   |------|P|------------------|     RLO      |
                       |          |              |
                       |   MI 400 | A            |     
  MB 100  SB ESC Key   |          |              |
--|   |-----| \ |-------          |              |
                            #10   | B            | 
                                  |______________|

Thanks.

Link to comment
Share on other sites

Joe,

This is related to the valve program I mentioned in my other post.

Basically I want the status / config of each valve to reside in an MI.

However some of the logic uses bits common to each instance of the loop, and needs to do a check (read the new MI so to speak) before performing certain actions.

I also like to avoid using set / reset if I can avoid it.

Example (psudeocode):

If VALVE OUTPUT BIT = 1

AND

CLOSE CMD = 0

Then VALVE OUTPUT BIT = 1

In this case the OUTPUT BIT is a buffered output that resides in my valve word (MI).

Eventually this bit will go to a corresponding O address.

Link to comment
Share on other sites

  • 3 weeks later...

Hi Joe,

So I seemed to have figured out the answers to my questions during my debug process.  My code is 90% finished, I just need to write some data logging.

In case you are interested in seeing what I was trying to accomplish, here is my code. It is for lifecycle testing up to 12 valves.  It logs if the valve has failed based on failure to see (or not see) flow downstream of each valve via a flowswitch.  I indirectly loop through all (up to) 12 valves and store their configuration and status in bits in an MI register.  
 
During each loop I:
use RLO to set or latch bits in the MI indirectly.
used Test Bit to look at the status of each bit 
pass the output status to the output (O) register for the valve.
 
There is a bunch of other stuff going on but those things were basically the root of my questions.

Thanks for the help.
Kris

Valve Testing.vlp

Link to comment
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
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.