Calling Mitsubishi Q-Series Programs

Steve Etter

Lifetime Supporting Member + Moderator
Join Date
Apr 2002
Location
Morristown, TN
Posts
965
Hi All.

I am trying to do something here that I am beginning to think Mitsubishi won't let me. It seems it ought to be possible but I can't seem to find an instruction for it.

I am working with a Q02 series Mitsubishi PLC. The machine is functioning well with 13 programs each called in sequence as per the hard configuration in the PLC Parameter/Program settings.

Proglist.JPG


Working that way, I have no problem. Now, however, I have been asked to make a major modification to the machine such that 3 of the 13 programs are substancially changed and the machine's function is significantly different. Again, no problem, except with our in-house approval system, I would like to set up the machine such that I can switch back-and-forth between the existing programs and the new ones while testing and waiting for the final approval.

What I would like help with is finding an instruction, if there is one, that will allow me to call a program (not a sub-routine) from within another. If I can do that, I can add 3 new programs to the list, modify my PLC Parameter/Program settings, and write a small bit of code to select which programs to run.

Anybody know of such a beasty?

I know I could easily write a sub-routine for each of the modified programs, but where is the fun in that? I really want to do it this way, if I can, if for no other reason than to expand my own capabilities.

Thanks in advance

Steve
 
Hi Steve,

Not sure if this is what you consider a 'sub-routine' but... this is how ours are enabled

subrou.jpg
 
just take the program out of scan list, add pointer at the top (it's added to the left side of the ladder power rail) and use call instruction with pointer number.
 
Hi Guys,
Just inherited a line which is 100% Mitsubishi, All the programs are just 1 very long ladder program. I asked the tech who used to maintain the line about program organisation and he said subroutines etc wasnt supported?

The CPU's in question are Q series and newer FX's

Could someone explain how to create,call etc subroutines.

Thanks Steve

Apologies to the thread starter for the hijack
 
STL,

I'm not working today, but if you PM me your email or send me a email ( [email protected] ) I can send you some Q series programs you may get a few ideas from them on other things as well or what not to do, but they are stable programs...

I did not write these like you I inherited them, they were wrote by a Japanese company so the english is as bad as mine :)
 
STL,

No problem on the highjack. Thanks to GIT I was able to resolve my issue even though I couldn't quite do it the way I originally wanted.

While I was able to effectively use MCR's to bypass entire programs, I eventually went back and simply added a bypass bit in each rung where I modified the code. Not eligant, but it works. The reason I finally chose this route was two fold; first, I ran into a memory limitation such that I couldn't put in all the additional programs and, then, once I managed to get all the necessary code in, my original programs no longer functioned as before. With production waiting on me, I decided it was time to reload the original code and to go back to the office and rewrite my changes.

Thanks all for the input.

Steve
 
In the Q, add commands to one of the programs you intend to leave on full time to turn on and off scan programs. PSCAN will turn a wait program into a scan program, and PSTOP will turn a scan program into a wait program. You can enable and disable entire programs that way.

As for the subroutines question, they are most definately available in both FX and Q. FX still only allows one big ladder, but the subroutines go at the end after the FEND instruction. Q allows the ladder to be broken into multiple programs.
 
Hi Guys,
Seems any Q series below the model Q02 doesnt support using multiple programs :( when you try to add another,the software wants to overwrite the existing main program.

Looks like ill have to stick with the P (pointer) call method,would have been nice to select the various routines from the left program tree instead of looking in the device comment area.

GIT - thanks for the sample code - very helpful mate

Steve
 
Thought i'd revive this thread :)

Due to a lack of space i'm going to upgrade a Q01 to Q02 and take advantage of the multiple program system, I've been looking into PSCAN/PSTOP which crossbow mentioned.

How do you set up Parameter/Program if you are using PSCAN/PSTOP?

I see options for execution type - wait,scan,initial,low speed + fixed scan.

if i select scan surely all the programs execute unconditionally even if you use PSCAN/PSTOP? wait maybe?

unfortunately i dont have a CPU to test this at the moment.
 
Last edited:
Hi STL,

The programs you want to call using PSCAN must be designated as wait programs in your program list. From there, to run the program you must latch on the PSCAN instruction. The name of the program must appear in the instruction as an ASCII string

M1

| |
| |-----------------------[ PSCAN "CRANK"]
| |
 

Similar Topics

Hello friends; I am new with Mitsubishi system. I need some example to handle the 4-20mA by using FX-2n-4AD which is attached with FX-1N-14M...
Replies
5
Views
3,541
I have a mitisubishi fx2n plc i am trying to change timer values but the change tc settings button under edit is blanked out,maybe when you go...
Replies
6
Views
2,326
This is the first time I am working with Simatic Manager Step7 as I started my siemens journey with TIA which is pretty easy and do a lot of stuff...
Replies
3
Views
117
I am looking to get an AB series 1774 (PLC1) from the 1970's up and running. I have all the parts, and it powers up just fine without errors if I...
Replies
12
Views
2,316
Hello all, I’ve recently begun using Automation Studio on my own time to boost my knowledge of controllers beyond AB/Siemens. To ease myself into...
Replies
0
Views
896
Back
Top Bottom