mr_electrician Posted March 19, 2007 Report Posted March 19, 2007 (edited) Allrighty everyone, here is my next question coming from me, the learning programmer. My supervisor has just asked me to program into existing logic on all our flow form machines. We are using Step 7 for the PLC, and I think Win CC for the touch screens. What I have been asked to do is program some logic that will allow an operator to key in a set amount of parts. Then once the machine starts, it counts each part that is made in the machine. When the machine count reaches the set point entered from the operator, then the machine will stop. I have an idea of what to use as for incrimenting my counter (either count up or count down), but I have not had much exposure to touch screen programming as of yet. How do I program a soft key onto our touch screen. I am guessing that I am going top have to start using some shift functions, which in turn will move me from basic programmer to intermediate. I love these challenges! Bring them on!!! Edited March 19, 2007 by mr_electrician Quote
mr_electrician Posted March 20, 2007 Author Report Posted March 20, 2007 Hello, my question probably sounds confusing to some. I am guessing since I had no replies. Basicly all I need is an example of some logic using step 7. I want to count the parts going into a machine. This counter will have a set value based on what the operator has inputted on the touch screen. When that value has been reached, then a message will come up informing the operator as well as stopping the machine. I have stopping the machine figured out. I want the operator to be able to clear the message by hitting the acknowledge key. Also I do not want the counter to be resettable unless it is by the operator inserting a new value after the previous value has been reached. Thanks again to those who give there time on this. Quote
Groo Posted March 20, 2007 Report Posted March 20, 2007 // On Ack reset message A #Ack R #Message // If message still exists end here A #Message BEC // If Op value and preset = zero then not doing anything A( L #OperatorValue L 0 ) A( L #CountPreset L 0 ) ==I BEC // If Count Preset > Zero then Started // (Don't allow operator to change count) L #CountPreset L 0 >I JC Cnt // Preset Count Value and RESET the STOP signal L #OperatorValue T #CountPreset SET S #EnableRun // Count Falling Edges of part entering machine Cnt: A #PartAtPhotoEye FN #FallingEdgeControl = #PhotoEyeFallingEdge AN #PhotoEyeFallingEdge BEC // Count the part L #ActualCount L 1 +I T #ActualCount L #CountPreset <I BEC // If the preset is reached end cycle SET R #EnableRun S #Message L 0 T #OperatorValue T #ActualCount T #CountPreset On a serious note, whats the weather like as I'm moving to Kitchener next week. Quote
mr_electrician Posted March 20, 2007 Author Report Posted March 20, 2007 Well the weather is starting to look more like spring. It is to be 17 degrees on Thursday. Kitchener is about an hour from where I live. The reply you sent me, what all does that mean. I am pretty fresh when it comes to programming with touch screens. My talent as of now is being able to use inputs, outputs, memory bits, counters, and timers. Quote
Groo Posted March 21, 2007 Report Posted March 21, 2007 The code is for Step 7, not the WinCC part. Bits/words etc from WinCC #Ack = Boolean bit to acknowledge message #OperatorValue = Integer word for counter preset #Message = Boolean bit to prompt message on screen There are no idiot limits to ensure the operator puts in anything sensible, I would expect that to be in the WinCC. I have made the assumption that by Step 7 you mean S7-300 or S7-400 PLC's. The program is in STL. I made the above assumption as S7-200's uses MicroWin and not Step 7. Quote
JesperMP Posted March 21, 2007 Report Posted March 21, 2007 (edited) Exactly what panel do you have ?If it is a panel with real keys (OP177B have both touch and keys), then I do not think you can use the ACK key, as it is used solely for acknowledging Alarm messages. You may have to program another key or onscreen button for resetting the bit that triggers the event message as mentioned above. edit: on a sidenote. I think you shall use event messages and not alarm messages. Like you describe it, when the message shall be displayed it is not an alarm but merely an information. Edited March 21, 2007 by JesperMP Quote
mr_electrician Posted March 21, 2007 Author Report Posted March 21, 2007 We are using Sinumeric. I found the manual for it on the Siemens web page. I have 600 pages to read to figure this out . I have my plc ladder figured out. I am using 300 series plc as well. This is quite the learning curve for me, but like everyone else, you got to start somewhere. I am glad that there are people like those here in mrplc land to help those like me who are learning as they go. Thanks guys! Quote
JesperMP Posted March 21, 2007 Report Posted March 21, 2007 Unfortunately I have no experience with SINUMERIK. Dont even know if it is based on Siemens standard HMI panels, or if it is based on dedicated panels for SINUMERIK. Quote
mr_electrician Posted March 21, 2007 Author Report Posted March 21, 2007 Hello Groo, thanks for the ladder logic, I understand it but just have 2 question concerning the falling edge bit. Why do we use that bit. I see it alot in our programs, as well as the rising edge. Is that used so that it is only triggered once on either the falling or rising edge during a scan time. Is it to eliminate the possibility of it dpouble counting? Quote
Groo Posted March 21, 2007 Report Posted March 21, 2007 The method I used was to increment an integer rather than use a Siemens counter (force of habit). Therefore it needs a one shot, otherwise it could increment every scan (=disaster). The reason I used a falling edge rather than a rising edge was because in my mind, thinking of what you may be doing, you would want to stop a conveyor when the first of the next batch came along, so I counted the back ends of the objects counted. Quote
mr_electrician Posted March 21, 2007 Author Report Posted March 21, 2007 Good logic. I guess this is were expertise come into play. So what brings you to making a move to Kitchener? Quote
Groo Posted March 21, 2007 Report Posted March 21, 2007 I worked in Montreal a few years ago (I know, French and all that) and quite liked it and have thought of returning since. I now have a job offer from a company in Kitchener and a positive LMO (Labour Market Opinion), which is what you need from the Canadian Human Resources to get a work permit. I shall be arriving next week and hopefully meet a decent immigration officer. Quote
mr_electrician Posted March 21, 2007 Author Report Posted March 21, 2007 Sounds good! Hope everything goes well. Hey listen, I will probably bug you a few times about your logic, some of it is still unclear to me. I have never used alot of these functions before and trying to blend this logic into the existing logic is a minor challenge. Mabey I could message you and show you our program? I don't want you to do it for me, I am just looking for a nudge in the right direction. I learn better if I figure it out on my own, but I also don't learn much when I am at a HUGE road block of understanding. Quote
stplanken Posted April 16, 2007 Report Posted April 16, 2007 Not to be picky but the RLO will only change on "==I" so instead use: A( L #OperatorValue L 0 ==I ) A( L #CountPreset L 0 ==I ) Quote
Recommended Posts
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.