Guest hongkongfooey Posted November 1, 2004 Report Posted November 1, 2004 Hello, This will be the first time posting on this forum. Well, I haven't touched ladder since school, been mostly doing C. Anyway I have an application where I want to monitor 6 thermocuples, but be able to select certain ones to monitor. The program will watch the selected TC's, and when they reach a certain temp a timer will start. The thing is, I am having to create a lot of ladder code to accout for every possible choice selection. I think there has to be a better way of doing what I am trying to attempt. Can someone out there tell me if there is way to combine the following code into a simpler format? TC1 TC2 TC3 TC4 TC5 TC6 I I-----I/I-----I/I-----I/I-----I/I-----I/I------TIMER TC1 TC2 TC3 TC4 TC5 TC6 I/I-----I I-----I/I-----I/I-----I/I------I/I---TIMER ETC.. ETC.. ON TO.. TC1 TC2 TC3 TC4 TC5 TC6 I I-----I I--------I I-------I I------I I------I I-----TIMER Thanks Quote
Guest Posted November 1, 2004 Report Posted November 1, 2004 Greetings, if you can give us some more detail, I'm sure that we can help ... first of all, what brand of PLC are you using? ... and if you'll give us specific model numbers and tell us how your hardware is assembled, we can even write the program for you ... the diagram that you posted shows the thermocouples as discrete (off/on) inputs ... they don't usually (ever?) work that way ... did you just simplify and leave out the comparison conditions? ... and how do you intend to "select" the thermocouple (or thermocoupleS?) that you want to monitor? ... again, if you'll detail exactly what you want the program to do, then we'll try to help you make it happen ... you said that you've been working in C ... try expressing the program requirements in pseudo-code, or a statement list, or as a simple flow chart ... we can work from just about any format of problem statement as long as all of the details are there ... and don't forget to register on the forum ... best regards, Ron Quote
hongkongfooey Posted November 1, 2004 Report Posted November 1, 2004 (edited) Thanks for the response Ron, I am using a Siemens S7-224, with EM 231 thermocouple modules, and a touch panel. The code I posted earlier was a shortened version. The following is what I have: TC1STRT through TC6STRT are the touch screen enable buttons. The TC1 is the compare instruction. As you can see, if I follow this stream of code to the end I will have many, many rungs of ladder. As I will have to code every possible case of enables, and TC compares from TC1 to TC6. TC1STRT..TC2STRT.TC3STRT.TC4STRT.TC5STRT.TC6STRT...TC1 I I----------I/I---------I/I---------I/I----------I/I------I/I--------I>=I----TIMER--REDLT .......................................................................................2500 ETC.. ETC.. Through TC1STRT.TC2STRT.TC3STRT.TC4STRT.TC5STRT.TC6STRT..TC1....TC2....TC3 I I-----------I I--------I I---------I I---------I I----------I I-----I>=I--I>=I--I>=I---- ......................................................................................2500...2500..2500 ....TC4...TC5.....TC6 --I>=I--I>=I---I>=I----TIMER---REDLT ..2500..2500...2500 The basic premise is, to monitor selected TC's from 1 to 6 with any combination thereof. The TC will be selected from a touch screen panel, talking to the plc via profibus. Once all of the selected TC's reach the desired temp (for example 250 deg F) a 1 hour timer is initiated. After the 1 hour timer is complete an output to a red light will initiate. Thanks again, Chris Edited November 1, 2004 by hongkongfooey Quote
Guest Posted November 1, 2004 Report Posted November 1, 2004 Greetings Chris, bad news: I have no personal experience with Siemens ... but ... maybe this “should work with Allen-Bradley” code will give you some useful ideas ... basic plan: try using a separate signal (bit status) from the HMI touchscreen to enable each thermocouple that you want to monitor ... with the branching structure below, any thermocouples NOT enabled will simply have their on/off status “bypassed” ... note that absence of a green highlight in the example shows that thermocouple 2 is NOT presently “at temperature” ... but the timer is enabled anyway ... because the “at temperature” signal from thermocouple 2 is presently being “bypassed” by the condition in the branch ... obviously the picture below is abbreviated to fit on the screen ... just keep the same format for as many thermocouples as you need ... also ... there is a chance that I’ve misinterpreted what you really need ... feel free to post again if I’m too far off track ... hope this helps ... good luck ... and incidentally ... just click on the picture below to enlarge it ... best regards, Ron Quote
hongkongfooey Posted November 1, 2004 Report Posted November 1, 2004 Thanks Ron, I knew it had to be that easy. The only change I had to make was adding another NO contact to the compare rung. This makes sure that I won't be watching any TC's I don't want to. AS follows: TC1-Compare...........TC1 ENABLE............TC1_AT_TEMP -----I>=I-------------------I I---------------------( ) ......2500 How do you attach .html files like the one you attached? It's a lot better than trying to create ladder rungs in text format. Thanks for the tip. Chris Quote
Guest Posted November 1, 2004 Report Posted November 1, 2004 glad I was able to help ... as for attaching graphics ... here's my favorite method ... first I get what I want to capture on the screen ... then hit the “Print Screen” key ... then open a new file in Windows Paint ... and click “Edit” and then “Paste” ... that puts the picture into Paint ... I touch it up if necessary ... and crop off anything I don’t need by using the “Selection” tool to lasso what I want ... and then click “Edit” and “Copy To” to save just the part I want ... then (if I’m using Windows XP) I reopen the “cropped” file I’ve just saved ... (usually I have to specify “New File” along the way or Paint just keeps showing me the same old “uncropped” file) ... then I do a “File Save As” and set the file type to “JPG” ... this puts it into a format acceptable for posting on the forum ... if I’m using Windows 98, I save the picture from Paint as a “BMP” file (the only option I have available with my Windows 98 version of Paint) ... then I open the file in “Imaging” and then click “File” and “Save As” to save it as a “JPG” format type file ... note: you can’t post a BMP file on this forum but JPG files are ok ... finally when I’ve got my post typed up and ready to go ... I click “Browse” at the bottom of the screen and select the JPG “picture” file I’ve saved ... that’s it ... 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.