Hi- Sorry for entering the thread so late in the game. There have been many good replies to the OP, I might suggest an alternative. I have "whomped up" a PLC --> PIC translator toolchain. It is in beta, but it is available via: http://getok.net The toolchain starts witha sourceforge.net (free) ladder logic compiler. The project pages are gone, but the download is still there, or I could supply a copy. There is need of perl, which I use ActivePerl (free) or the linux perl to do the job. You run your ladder logic design through the ladder logic compiler, then using a perl script I've developed you get pretty readable PIC assembly language code. Run that through the microchip assembler and you are ready to rock and roll. There are some software architechtural differences between the PLC and "standard" code that are usually not apparent to the casual observer. Most noteably, the internal cycle of most PLCs. They have an input phase, a rules phase and an output phase in that order, done in pretty much an endless loop. This is done to help prevent race conditions of variables. Depending upon the application, ladder logic can be very effective and a very fast way to program an application. It was designed for electricians who were replacing relay racks of process equipment. These racks kind of looked like ladders, hence the name. For combinatorial work such as Jinx has defined, it would tend to easily transfer to ladder logic. Read some stuff, do some minimal calculations, and dump out some new state. One caveat. Not all ladder logic "coding" is the same. Most vendors have their own "take" as to symbols for things like counters, timers, conditionals, etc. Also math functions and non boolean conditionals might be different. However, they are pretty easy to map between vendors. Another "gottcha" is the relative lack of documentation capabilities for ladder logic. You can't easily take the "gui" input from your design and transfer it to another ladder logic compiler. Drat! You will have to "hand code" the program back in again in the vendor's visual editor (ladder logic designer). Finally, on my website's documentation page (external) there is a link to a VERY GOOD tutorial on ladder logic programming: http://claymore.engineer.gvsu.edu/~jackh/books/plcs/ For those interested in learning more about PLCs. Back to my little project, the code is extesible and can be used with various capabilites spanning the 10F, 12F, and 16F lines of PICs. Configureation can be done to assign inputs and outputs different than what is originally programmed by me. Mine has A/D, RS232, integer math (mulitply/divide) timers and counters. Variable number of variables depending upon the size of the PIC choosen. Finally, the little educational kits are no longer available. Hope this missive helps. Cheers, Rich S. > > Sounds like a 'smart relay' would do the trick... > > http://bb-elec.com/product_multi_family.asp?MultiFamilyId=39&Trail=32&TrailType=Top > "free" software - you'll need to get a programming cable with a special connector. > > >>> Jinx 29 Nov 08 03:20:43 >>> > I'm assessing a job, which I think a low-end 18F can do fairly simply. The > logic is quite straight-forward. Inputs are two 4-20mA transducers, a mains > relay, and two temperature sensors, with a real-time clock. Outputs are > a couple of alarm lines, LCD, and a few pushbuttons to set parameters > > The scenario might be something like - If transducer1 is a certain value > and temperature sensor2 is a certain value, then turn on the mains and > measure temperature sensor1 after 1 minute to make sure the appliance > (a chiller) is running. And various IF....THEN combos like that > > I was talking over the pricing structure with a couple of people and they > both suggested that I base it at less than the cost of an 'industrial PLC' > which would be needed. Their thought is that the lower (but not too low) > price mentioned in the same breath as a PLC will make my PIC sound > more attractive. Can't say I'm 100% about that but they won't shut up > about PLCs ! > > I'm a complete ignoramus in the PLC department > > http://en.wikipedia.org/wiki/Programmable_logic_controller > > To me, after reading that, it seems a PLC is way OTT for this job, and > especially if you know how to program a micro yourself. This assessment > may be for 300 units (optimistic "Everyone will want one" salesman !!) > > I guess the material costs, not including sensors, using a PIC may be around > NZ$70 (US$35-$40), and software perhaps a little less (@ Q = 300), then > there's markup on that > > Can anyone with practical experience of PLCs give me any advice as to > whether the cost of a PLC system is even worth considering ? And, if so, > how do prices compare ? > > TIA > > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist