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?

Store state of MI 400 Bit 10 in MB 100

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

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            | 


Link to comment
Share on other sites


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):





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.

Valve Testing.vlp

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...