![]() |
||
|
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc. |
||
| ||
New Here? Please read this important info!!!
|
|
#1 |
|
Member
![]() Join Date: Mar 2006
Location: G.B.
Posts: 14
|
3 BCD input to 13 solenoid output sequence
Hi All
Ive added my required output sequence list . I want to use a Mitsubishi FX0-30MR-ES with 3 BCD thumbwheel switches and an enter and clear push button on the inputs, the outputs need to be switched in a sequence following my switching pattern sheet. To operate you would select a number between 1 & 603 on the thumbwheels then press enter to initiate the outputs for the coresponding contactors, then I want this to stay selected regardless of thumbwheel position until another number in the range 1 - 603 is selected and entered or the clear button is pressed to disable all outputs. Ive had a look at the mitsi manual and find it hard to understand especially about keying in the functions in GPPWIN as i am new to plc programming and could do with some guidance. Last edited by Skeggy; March 13th, 2006 at 05:28 PM. |
|
|
|
#2 |
|
Lifetime Supporting Member
|
Looking at your file we see that you have over 600 different "recipes".
One could argue that a Karnaugh map could simplify these into a nice math function, you still would run out of memory allocations to make this thing work. Get a FX2N or an HMI to store the data or ask your boss for a lot less recipes to handle. Sorry! This PLC is just to cheap to do the job.
__________________
If it looks like a Cat... |
|
|
|
#3 |
|
Member
![]() Join Date: Jun 2005
Location: Fairport Harbor, Ohio
Posts: 152
|
I'm a little rusty in Mitsubishi programming, but...
You will need to make some sort of a look-up table for your BCD switch values. This table would assign a decimal (Binary) number to each switch value. The assigned value can then be move to the outputs through a single instruction to form a binary image of the value assigned by the BCD switches. I have attached an Excel file I created from your word file which should help you visualize what I am talking about. |
|
|
|
#4 |
|
Member
![]() Join Date: Jun 2005
Location: Fairport Harbor, Ohio
Posts: 152
|
PS
If you could get 4-BCD swithes you could enter the output matrix directly. |
|
|
|
#5 |
|
Member
![]() Join Date: Mar 2006
Location: G.B.
Posts: 14
|
Hi Wireguy
Thanks for the list, im going to have a look at it now, my problem, with not having done much plc programming is understanding what functions and how to implement them in gppwin, ive tried one or two ideas over the last couple of nights without success. |
|
|
|
#6 |
|
Member
![]() Join Date: Apr 2002
Posts: 3,170
|
Damn-it Skeggy!
Quit Starting New Threads!!! |
|
|
|
#7 |
|
Member
![]() Join Date: Apr 2002
Posts: 3,170
|
Skeggy...
What is the rationale behind the "BCD-Code" and Output corrolation? Is there any? If not, is there a problem with trying to make a "rational-connection" between the two? That is, can the BCD-Codes be re-assigned? What happened to Y8 and Y9??? Are these outputs in Octal? Last edited by Terry Woods; March 14th, 2006 at 07:27 PM. |
|
|
|
#8 |
|
Member
![]() Join Date: Mar 2006
Location: G.B.
Posts: 14
|
Hi All,
Terry Woods, sorry for the new thread, I pressed the wrong button again! The BCD code is matched to the number and pattern of outputs for this project (which I now wish I hadn't taken on) which i dont really want to change as this will cause some confusion later (if I ever get it completed). Yes the inputs and outputs are in Octal on this plc. I have got the 3x bcd's to decimal programmed in, but I am struggling with this damn software GPPWin I now have a good idea what i have to do but could do with some help on inputting it in to this **** software, As I am not after my homework done for me, I'm a 39 year old electrician thats never programmed a plc before, i'm learning, slowly but I think I will get there in the end, Thanks for your help so far. I have the bcd,s decoded into D0 - D2, how do you convert these into a 3 digit number, then how do I input the "IF" statment that Lancie1 sugested earlier. Last edited by Skeggy; March 16th, 2006 at 08:02 PM. |
|
|
|
#9 |
|
Member
![]() Join Date: Apr 2002
Posts: 3,170
|
Look, it is simple enough to simply corrordinate a particular BCD number with a particular combination of outputs.
You can't use a K-Map with your scheme because there is no direct corrolation between any particular BCD-digit and any of your outputs. You will have to do this on a specific-BCD/specific-Outputs basis. You will need to do it 600 times! With 600 "recipes", all uniquely hardcoded, what if you find, later on, that you need to make a change that might affect a few hundred of those? That is a "recipe" for disaster! Surely the operators are working from some kind of look-up table. They couldn't possibly remember 600 unique recipes - unless there was "intellegence" in the BCD number. How can changing 600 recipes cause any more confusing than they already have to deal with? The whole idea is nothing short of NUTS! Actually, it's more like a crime! You are NOT doing yourself a favor by taking that path! It will be a NIGHTMARE to maintain if you ever need to apply a change. One of the better talents that a programmer should develop is the ability to recognize "grief" when he sees it... avoid it... and leave it behind. I can see that there is NO RELATIONSHIP between any particular BCD-digit and any of the outputs. I can't take part in the scheme as you have described it... it simply can't be done in a reasonable manner! My aim is to change your scheme! Is there a relationship between the Outputs? What is the purpose of those outputs? What are you DOING with those Outputs? What are you making? |
|
|
|
#10 |
|
Member
![]() Join Date: Mar 2006
Location: G.B.
Posts: 14
|
I am making a hand control for an old load bank which I have just re-furbished. It had 13 switches on it to control the elements from 1KW to 603KW in steps of 1KW using element banks of: 1, 2, 3, 4, 10, 16.66, 33.33, 66.66, 66.66, 100, 100, 100, 100 KW. that is why i need the range 1 to 603 and outputs as the table that I made up (which I have made 2 small mistakes on which I am correcting at the moment). There will be no reason to change any of the program after as the numbers relate to KW directly applied @ 415v, 1 of the 2 buttons was to enter the load selected, the other was to clear all. The outputs are driving some large opto-isolated contactors directly.
Last edited by Skeggy; March 17th, 2006 at 07:17 PM. |
|
|
|
#11 |
|
Member
![]() Join Date: Apr 2002
Posts: 3,170
|
So... you have a wire going from each output to each element.
Are these wires IMPOSSIBLE to relocate? But first... You say you have steps of... "1, 2, 3, 4, 10, 16.66, 33.33, 66.66, 66.66, 100, 100, 100, 100 KW." How the heck can a step of 16.66 or 33.33 or 66.66 provide a 1KW-step? If all outputs are on, you have 603.31. Something is wrong here. What I see you say doesn't match what you describe as your intent. Last edited by Terry Woods; March 17th, 2006 at 08:38 PM. |
|
|
|
#12 |
|
Lifetime Supporting Member
|
Normally such control would be simple to do with an index.
Not considering your interlocks and other controls like AUTO/ Man or ON/OFF its a 1 rung program. The only rung you would need is one that move the binairy value of a register directly to your outputs. For instance, for BDC=1, your index =1
The BCD value has to be moved to Z which is the index. So for a BCD value of 1, D10 will have the value inside D11, for a BCD value of 47 D10 olds the value inside D57. You just have to write the digital values of the BCD selection in these D memory registers and it works fine. Moving to K4Y000 means that the 16 bits of register D is applied to the 16 (thats the K4 (groups of 4 x 4)) continuous Y bits which are your outputs. So for BCD value 47 you will have writen 88 in D57. (88 in decimal being 0000 0000 0101 1000) So again its really a very short program BUT the PLC cannot do it, like I mention earlyer. Have a look at the specs. It barely has over 500 registers. (Sorry can't seem to be able to attach any files tonight???) ![]()
__________________
If it looks like a Cat... Last edited by Pierre; March 17th, 2006 at 10:28 PM. |
|
|
|
#13 |
|
Lifetime Supporting Member + Moderator
|
Skeggy,
Wireguy and Pierre have found a method that works. An index (also called a look-up table) will allow you to 1. Set any of the 603 numbers on your thumbwheel switch, 2. Press "Enter" pushbutton, 3 Then the PLC looks up the number entered in the table, finds what "value" must be set in the 16-bit Output to turn on the right Outputs Y0 to Y12, then MOVES that number into the Output memory, then activates the outputs when the "Enter" is pushed. The only problem is that your PLC must have at least 603 internal memory storage locations. Pierre says it barely has 500. You need a more powerful PLC. Are there ways to use only 500 memory locations? Sure, you could multi-plex the look-up table numbers, so that only 1/2 are loaded at any time, say the first 1 to 300kW steps, using 300 locations, )call it the "Lower Index") then when the thumbwhell approaches 300, reload the Upper Index with 300 - 603, using the same 300 locations. This would be pretty complicated for a beginner. Another thought: How many of your 603 "settings" actually match some known number system? For example, could simple manipulations create most of them, with the missing numbers simply skipped over, becoming null positions, or may leaving the last set of load banks activated? |
|
|
|
#14 |
|
Member
|
I think Skeggy might be able to get away with a combination of a 200 (or so) element look-up table and a few rungs of discrete logic. The real dynamic part is between 1 and 200 (or so), where combinations of the first nine outputs determine the level. After that you simply drop your base by 100 and turn on one of the 100kW elements as a make a 100 count transition. Actually, it may be easier to reset the index to zero and turn on two of the 100kW elements at a time.
This leaves you with a look-up index to get the output pattern between 1 and 200 and four discrete rungs for the 100 kW elements. However, as Terry said, this better be a VERY static design. Maintaining even 200 locations in a look-up table can be a real pain. Keith |
|
|
|
#15 |
|
Lifetime Supporting Member + Moderator
|
Looking at Skeggy's list, he has a few other errors. He used the 16.66 kW bank as "16" instead of the closer "17" so this will introduce an error in many of the outputs. I suggest the 16.66 bank be used as "17" and the 33.33 kw be used as "33", except where adding two or more of the fractions makes a whole 1 kW.
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Topics
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| BCD input to 13 assigned outputs on a FX | Skeggy | LIVE PLC Questions And Answers | 7 | March 12th, 2006 02:58 PM |
| toggle logic in 'c' language | naishadgosai | LIVE PLC Questions And Answers | 11 | August 6th, 2005 08:53 PM |
| OPTO22 Question | Terry Woods | LIVE PLC Questions And Answers | 0 | August 2nd, 2005 06:54 PM |
| 1 input 3 outputs | guest | LIVE PLC Questions And Answers | 26 | February 8th, 2004 04:33 PM |
| Sequential Logic to AB PLC | Tze | LIVE PLC Questions And Answers | 7 | January 4th, 2003 11:41 AM |