×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Programming Mitsubishi A Series

Programming Mitsubishi A Series

Programming Mitsubishi A Series

(OP)
On a standard(ish) processing machine that we produce, I have several (maybe 20) sequence programs running simultaneously. To step through each sequence I arrange a group of flags into a shift register- 8,12 or 16 bits long.
The first flag in the group (the lowest) is forced on when the sequence begins, and that flag controls that `Step' in the sequence. When that step finishes I give a SFL K1 instruction (shift left 1 position), which turns that step flag off and the next one on. It works fine.
Sometimes however things don't go as planned, and a switch (or something else) doesn't make and the sequence stalls. What I need is and indicator to tell me which step of the sequences is on at any time, and what I'm looking for is an elegant way to return a number corresponding to the position in the sequence of the `on' flag - just as a (step) number. For example, `M251 K2' defines a set of (K)2x4 flags starting at M251, M251 being the first bit and M258 being the 8th. I want a function that will hold in say register D250 the value 1 to 8 depending on which flag is set. I eventually want to have a page on the MMI to report the status of all these Sequences. I haven't been able to figure a way out of how to do it `in the back-ground' while the sequence is running. All I've been able to come up with is to include a line in each step of the sequence to say `INC D250', and then zero it at the end of the sequence, but its a bit messy.
Has anybody any thoughts?, do other PLC's have a neat command for doing this (and how does it work)? (but I'm not going to change!).
Regards

RE: Programming Mitsubishi A Series

Not being familliar with Mitsubishi PLC's here is one way of doing it is:
Bit 1 is true it moves a 1 into the register
Bit 2 is true it moves a 2 into the same register
Etc. Etc.
Then if all bits are false move a 0 into it.
Then all you have to do is just display the value of that register.  I am sure that someone with more knowledge on your plc will be of more help.  Good luck.

RE: Programming Mitsubishi A Series

(OP)
Thanks for your reply Steve, and I'm sorry to have taken so long to respond. I've only just read it, and at first I thought it would be a very long winded way to do the job (but of course it will work). However, after a few minutes to allow the idea to sink in, I am sure I should be able to rig up a loop just to step through the no. of steps in that sequence.
Thanks again,
Bob

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources