Shop OBEX P1 Docs P2 Docs Learn Events
bs2sx used as industrial computer. — Parallax Forums

bs2sx used as industrial computer.

remmi870remmi870 Posts: 79
edited 2008-12-07 00:48 in BASIC Stamp
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.

Comments

  • HumanoidoHumanoido Posts: 5,770
    edited 2008-12-05 06:39
    The stamp 2 can handle around 500 statements but the 2sx is around 4,000 (and as many remarks and documentation as you want) and you can probably write the old existing code much more efficiently. I'm interested in seeing the design schematic, photos, more details, etc. In the past, I designed and build PLCs for 24 ton industrial robots, and for "pick & place" Japanese assembly robots, and converted over some old code too from Galin and Yawskawa languages. The conversions were usually very challenging because 60% or more of the code was all GOTO statements. There were 5 programmers who contributed thousands of GOTO statements to the old code over a period of many years, and not one programmer used any documentation! I hope you document your basic stamp code.

    humanoido

    Post Edited (humanoido) : 12/5/2008 6:44:29 AM GMT
  • stamptrolstamptrol Posts: 1,731
    edited 2008-12-05 13:21
    Either a BS2 or BS2sx can probably do the job, with proper planning.

    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
    ·
  • $WMc%$WMc% Posts: 1,884
    edited 2008-12-05 19:28
    remmi870

    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.
  • remmi870remmi870 Posts: 79
    edited 2008-12-05 22:27
    For everyone who is interested in my pcb, here is a few picts and immages.
    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.
    2592 x 1944 - 1M
  • $WMc%$WMc% Posts: 1,884
    edited 2008-12-06 01:27
    remmi870

    Well done .I liked the extras added to the Drivers.

    __________$WMc%_____
  • HumanoidoHumanoido Posts: 5,770
    edited 2008-12-07 00:43
    How are you doing with the software?
  • remmi870remmi870 Posts: 79
    edited 2008-12-07 00:48
    kinda stalled right now, got other things to do, the problem is trying to test it, with 6 inputs to emulate and another 10 outputs to monitor, its kinda hard to debug, i might just wait till i actualy get it hooked up to finish it.
Sign In or Register to comment.