Sign in to follow this  
Followers 0
Guest PLC Guest

Mitsubishi Q Series CPU

9 posts in this topic

I have programmed AB PLC-5, SLC-5/05 and Micro Series, but now I have a customer that specified a Mitsubishi Q00 cpu for their machine. With this version processor I can only enter code into one main file. I don't have the option of different program files as I would with an AB plc. Can someone lend advice on how to keep this program clean an under control with only one program file? I have thought about using subroutines, but am nervous that I will run in to issues with them. Are there any nuances with subroutines that I should know about or be aware of? Typically with an AB plc, there are program files for inputs, output, alarms, panelview I/O, machine control, and then automatic and manual functions of the devices in our robotic cells. I don't know if I should try to stick to this same layout with the Q00 or not? Any help would be appreciated. Thanks, Art

Share this post


Link to post
Share on other sites
don,t know much about ab programming, but if yo want to split a program in part with mitsubishi PLc, you can try using stepladder(STL). a part of a program is only then execute when it associated state coil(s) is active.

Share this post


Link to post
Share on other sites
Rightclick on the programs (main) and create new program file(s). In the parameters > programs, add files to be scanned to scan list. ----- EDIT ------------------ Sorry, I just checked it out and it doesn't work with the CPU you have. You will have to use Q02 or bigger or resort to CALL instructions (or MC/MCR). All logic will be in one file (main) and finish with FEND instruction (file end). After that instruction you can write subs. Each sub will have to have pointer (P1, P2, ....) that you can call using CALL instructions. Note that pointers are placed on the LEFT side of the ladder power bar.

Share this post


Link to post
Share on other sites
Your best bet would be to use GX IEC Developer as your programming software. With this you can structure your program into subroutines similar to that of the Logix series. You can also make use of the IEC61131 programming techniques such as label programming, 5 programming languages, user defined data types etc

Share this post


Link to post
Share on other sites
I understand how to call a subroutine and return from it. What I am still confused about is the status of the outputs once the routine is exited. Say I want to execute a sequence to move a part and locate it for a robot to pick up. When a certain condition is met the program will call this subroutine and the logic will be executed. So here are my questions (I hope they make a little sense) -Once the subroutine is done, is there a chance that the outputs could be "stuck" on when the routine is exited? -Does the logic that calls the subroutine have to remain "on" until the subroutine is complete? i.e. the call is statement is latched on until the routine is complete? -Is there any "housekeeping" code that I should use with subroutines? Should there be code included to monitor the status of a subroutine? -Should I view subroutines as functions in other programming languages as C or C++? I think this is where I am hung up. I keep comparing the two types of codiing styles and I am not sure I can. I am using to programming in C so I might be making this harder than it is. I am asking these questions because I am curious as to how this coding is done within the industry. I would like to keep my code as simple as possible but still maintiain coding functionality. Thanks again for all the responses, Art

Share this post


Link to post
Share on other sites
- yes - yes - if you choose so - yes

Share this post


Link to post
Share on other sites
Or ask to your customer to install Q02cpu with the possibility to create more files. Actually this function is available only with high speed Qcpu models. Howevere i think in the future Mitsubishi will change all the base Qcpu model with new firmware so to use multiple files and also memory card. Remember now basic models Qcpu have only 8ksteps memory. My be also the possibility to use FCALL instruction and [CALL Px S1..Sn] where you trnsmit different arguments to your Call subroutine, but i'm not sure this will help you. bye Max

Share this post


Link to post
Share on other sites
This is how I always did it. Main Call Sub1 Call Sub2 Call ...... Fend Sub1 Code... RET Sub2 Code... RET END I may have mixed END and FEND, it's been a few years. Make sure you don't forget the return or it will continue through the next sub until it hits RET or END, this can be a useful feature on rare occasions.

Share this post


Link to post
Share on other sites
Be aware of the fact that if you use multiple programms in GX Developer that each program takes 4kB memory. Even when a program doesn't contain any lines in it.

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
Sign in to follow this  
Followers 0