bs2sx used as industrial computer.
I have this project im workin on now to replace a AllenBradley SLC500 plc for a compressor controler. it monitors the startup of a large 50hp and 40hp compressor, using the 50hp as a main, it will test to make shure they·can create pressure and then monitor the lines in case of a failure or if a large decompression keeps the lines from a compleet blowdown.
i used the OEM parts for a BS2sx chip and printed my own board to wire it up, it has 6 opticaly isolated ac inputs using a MID400 ac optoisolator for simplicity, as well as 2 uln2803a line drivers to run 10 12v dc relays for the outputs. it has 12v input as well as onboard 5v voltage regulator with the posability to bypass it to run 12v for the relays and a seperate 5v power supply for the BS2sx.
the one problem i have is programing the large amount of code to replace the ladder logic used on the SLC500, the code is pretty complex at around 150-200 lines of instructions. i think i can figure it out using some flowcharts and pointers from the industrial controls manual.
if anyone would like to see my design or my traces to print the board, let me know.
i used the OEM parts for a BS2sx chip and printed my own board to wire it up, it has 6 opticaly isolated ac inputs using a MID400 ac optoisolator for simplicity, as well as 2 uln2803a line drivers to run 10 12v dc relays for the outputs. it has 12v input as well as onboard 5v voltage regulator with the posability to bypass it to run 12v for the relays and a seperate 5v power supply for the BS2sx.
the one problem i have is programing the large amount of code to replace the ladder logic used on the SLC500, the code is pretty complex at around 150-200 lines of instructions. i think i can figure it out using some flowcharts and pointers from the industrial controls manual.
if anyone would like to see my design or my traces to print the board, let me know.
Comments
humanoido
Post Edited (humanoido) : 12/5/2008 6:44:29 AM GMT
The brute force method would be to try to copy the logic in each line of ladder code.
You'll get a more elegant, better working and quicker solution by developing the flow chart of the process first, then start to code.
Compressor control is not that complicated and most reference texts and large manufacturers literature will show some generic flow charts that will get you started.
Cheers,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tom Sisk
http://www.siskconsult.com
·
I would like to see Your finished project"the PCB". I was called in to work this morning at 4:00am over a "Slick 500" fault.Made good $$.
To Me the hardware interface is the biggest challenge,and if One was to need a feed back loop to a control room!"Stop/Start-AirTemp-Humidity-oil temp"...Most DataHiways run at or above 119.2KBaud
If You can look at the ladder logic You'll find Little hints to ASM./Basic like "mov","dira","cnt"."subrtn".I have also seen Ladder"1" set up to do nothing but run subroutines."This is were the GOTOs and GOSUBs come in at".The subroutines will be Ladder2,Ladder3,etc..Remeber AB didn't write the ladder logic,some one else did.I think You'll find in Basic that You'll only need about A 1/4 of the code from the "ladder"
________$WMc%______
I think the OEM BS2sx is a great idea,Just remember a lot of Engineering went into the SLC 5 and 500.
the bmp pcboardprint is the actual cad image used to print the board, it is the direct coppy to print ( its reversed for the botom, all the pins are a botom view to make everything work.)
there is actualy two boards on that print,(total footprint is 6"x6" which is a easily found presensitized board form online suppliers, the top board is just to allow inputs and outputs with a selectable high, low, comon ground, common high, which alows for many differnt configurations as well as the addition of a line driver for·12v.
The bottom board is for a 6/10 I/O with 120v ac isolated logic in (logic in·is low on the input pins), the voltage could be adjusted by changing the inline resistor the relays are 12v coils with [url=mailto:5A@250v]5A@250v[/url] contacts which is plenty for most plc applications, they are driven with two drivers, each driver has built in snubber diodes.
the second is an actual picture of the board, it alows for onboard programming and the bs2sx chip can be removed in case one were to need to replace it or even switch out for another chip. the final board is 3.5"x6"x1.25" which is a far cry from the plc it is replacing that is about 11x6x6. the wire terminals should acept up to 14 gauge wire to easily transition, all relays have isolated contacts (there is no common terminal so multiple voltages and types can easily be wired.
if somone is interested in making one, or would like the cad files and parts list to build, let me know, i will fill in the parts.
Well done .I liked the extras added to the Drivers.
__________$WMc%_____