Shop OBEX P1 Docs P2 Docs Learn Events
towards a P2 PLC - Page 13 — Parallax Forums

towards a P2 PLC

189101113

Comments

  • jmgjmg Posts: 15,190

    @Rayman said:
    Was contemplating using a second FT231X chip to enable a second (debug?) interface to PC.
    But, just noticed this FTDI FT200XD chip that does kind of the same thing, but with I2C.

    Think there's an advantage here because with the P2 being I2C master, data could have several different endpoints with the attached PC just being one of them...

    Maybe you could hack something similar with FT231X, but wouldn't be clean...

    Scratching my head on this one, but might be something to think about...

    You could also look at the CH347 ? This is 9Mbd Dual with choice of CDC UART and i2c or SPI. HS-USB and large buffers should make for fewer no-handshake-lines issues.
    I think anything not UART, needs driver support on the PC side ?

    • Hardware full-duplex UART interface, integrated independent transmit-receive buffer, supports communication baud rate varies from 1200bps to 9Mbps.
    • UART supports 8 data bits, supports odd, even, and none parity, supports 1 or 2 stop bits.
    • Built-in 12K bytes RX-FIFO and 4K bytes TX-FIFO for each UART.
    • Support common MODEM signals RTS, DTR, DCD, RI, DSR and CTS.
    • Support CTS and RTS hardware automatic flow control.

    https://www.lcsc.com/product-detail/USB-Converters_WCH-Jiangsu-Qin-Heng-CH347T_C5122332.html

    https://www.aliexpress.com/item/1005004996204007.html USB2.0 High Speed USB to UART / I2C / SPI / JTAG / GPIO Open Source USB-HS-Bridge

  • RaymanRayman Posts: 15,035

    Thanks @jmg, but I'm kind of entrenched in FTDI, devil you know sort of thing...

  • RaymanRayman Posts: 15,035

    Just noticed these metal version of the Bud DIN rail cases:
    https://www.budind.com/series/nema-ip-rated-boxes/dmx-extruded-aluminum-din-rail-enclosure/#group=series-products&external_dimensions_group=0&internal_dimensions=0

    The setup I'm working on is already in an EMI shielded metal box though. So, don't really see the point of a metal case.
    Who really uses DIN rail electronics outside of a metal box anyway?

    Anybody know when one would go through the trouble of using a metal box instead of plastic for a PLC?

  • RaymanRayman Posts: 15,035

    If using a larger case, or if didn't need all those relays on bottom board, could move the USB to bottom board...
    Might have to explore having Stamp and this USB/LAN/RJ45 connector on bottom board...

    683 x 545 - 63K
  • RaymanRayman Posts: 15,035

    If could squeeze the Stamp into DMB-4771, this would be nice and could use it in this one bay module, or the 2, 3, or 4 bay versions...
    https://www.budind.com/product/general-use-boxes/din-rail-mount-multi-board-box-series/dmb-4771/#group=series-products&external_dimensions_group=0

    198 x 176 - 22K
    548 x 853 - 109K
  • RaymanRayman Posts: 15,035

    Maybe like this...

    459 x 527 - 53K
    1047 x 615 - 78K
  • RaymanRayman Posts: 15,035

    Think have this PCB wrapped up. Also, made adapter so can plug in Wiznet IO board to this board and make the ethernet work.

    Think could instead use the @ManAtWork network driver. That uses 3 cogs as I understand it. Might be Ok though and save $$$.

    399 x 585 - 23K
    756 x 442 - 51K
    483 x 808 - 114K
  • TubularTubular Posts: 4,727

    @Rayman said:
    The setup I'm working on is already in an EMI shielded metal box though. So, don't really see the point of a metal case.
    Who really uses DIN rail electronics outside of a metal box anyway?

    Anybody know when one would go through the trouble of using a metal box instead of plastic for a PLC?

    Generally you use a metal case when you have to, for IP rating/waterproofing, or robustness, or its going in a steel mill. Another reason is to command a premium price.

    I did speak to Bud a few weeks back regarding getting cutouts made in the AL extrusion, and yes they can do that, but not exactly like the plastic din rail boxes, more for 'access' than large generic openings like on the plastic version.

  • RaymanRayman Posts: 15,035

    4775 PCB is alive!

    At first, it wasn't. Both power (not) good LEDs were lit and 3.3 V rail was measuring ~2.65 V.
    I'm used to the pain of new boards not working though...

    Turns out that the P2 Stamp has an "ON" pin that needs connecting to 5 V to turn on power supply.
    So, just a little solder bridge and all good.

    Now time to see if it fits in the enclosure...

    1140 x 1244 - 908K
  • MicksterMickster Posts: 2,764

    @Tubular said:

    @Rayman said:
    The setup I'm working on is already in an EMI shielded metal box though. So, don't really see the point of a metal case.
    Who really uses DIN rail electronics outside of a metal box anyway?

    Anybody know when one would go through the trouble of using a metal box instead of plastic for a PLC?

    Generally you use a metal case when you have to, for IP rating/waterproofing, or robustness, or its going in a steel mill. Another reason is to command a premium price.

    I did speak to Bud a few weeks back regarding getting cutouts made in the AL extrusion, and yes they can do that, but not exactly like the plastic din rail boxes, more for 'access' than large generic openings like on the plastic version.

    As my stuff is not cost-sensitive, I have been working with this

    The selection of predefined shapes is limited but importing dxf is supported and has worked perfectly for me.

    I guess that the most cost-effective approach would be to procure a die-cast box and throw away the original lid(?)

  • RaymanRayman Posts: 15,035

    PCBs more or less fit in 4775.
    Hacked away more of the plastic than should have though...

    1023 x 1009 - 761K
  • RaymanRayman Posts: 15,035
    edited 2025-02-21 18:18

    Unfortunate blunder with the LCD on top board... Seems the pinout assumes that LCD is connected to bottom side of PCB through a hole...
    Guess should actually do that next time...

    Can at least develop code for the display with connector spun 180 degrees...

    1106 x 1402 - 1M
  • RaymanRayman Posts: 15,035

    Just learned that our giant Siemens plc is programmed in stl and not ladder logic.

  • evanhevanh Posts: 16,345
    edited 2025-02-22 01:11

    What support and machine documentation is there? Is the coding done in-house?

  • RaymanRayman Posts: 15,035

    Nothing. That is our problem... inherited machine and none of us knows how to program it...
    But thats a different goal than the one focused on here... im just doing a vacuum system. Just a small part of the big system. For now anyway...

  • MicksterMickster Posts: 2,764

    @Rayman said:
    Nothing. That is our problem... inherited machine and none of us knows how to program it...

    BINGO!
    Precisely what I keep harping-on about. Imagine a production-line, dead-in-the-water and a bunch of hourlies, standing around. Welcome to my world :D

  • RaymanRayman Posts: 15,035

    We found some people that would help us with the big plc, but they wanted $30-40k. Might still end up there…

  • MicksterMickster Posts: 2,764

    @Rayman said:
    We found some people that would help us with the big plc, but they wanted $30-40k.

    Plus downtime

    In my case; "yeah, we no-longer support that system and we don't give-out the code but we can sell you a new machine" ($150K - $500K)

    I recently pulled-out a Siemens S7-1500. It was a brand new install but this Siemens flag-ship PLC is incapable of coordinated servo motion control and this is a 5-axis machine :D
    They managed to get 3 axes moving at a snail's pace. The company went under.

    So this machine is getting a P2 + PicoMite

  • RaymanRayman Posts: 15,035

    Got the LCD for 4775 top board working. Newhaven tripped me up with their pin numbering scheme, but new design fixes it being backwards...

    Default gamma was horrible, but found some gamma code for the ILI9163V on github that makes it much better.

  • RaymanRayman Posts: 15,035

    Was just looking at this PLC I/O thing that uses M12 connectors for everything:
    https://emedia.digikey.com/view/786020823/54/

    Are M12 connectors something commonly used?
    Appears to be metric, so maybe there's another version used in USA?
    Although, appears to be a lot of metric stuff being used in USA PLC... Maybe because a lot of it comes from Siemens?

  • evanhevanh Posts: 16,345
    edited 2025-02-28 21:29

    Yup, are used lots on the field sensors because they are waterproof. M8 is the other really commonly used size but there'll be other sizes as well.

  • RaymanRayman Posts: 15,035

    Perfect. I'm liking the M12 8-pin IDC version. Looks perfect for connecting the RJ-45 connectors on the P2 box to outside world...

  • MicksterMickster Posts: 2,764

    Remote I/O blocks.....another of my blacklisted items :D

    Break a connector and you are screwed. Totally sealed units, can't do a darned thing with them.

  • RaymanRayman Posts: 15,035

    @Mickster What do you use instead? Or, do you just run all signal wires to the main unit?

  • MicksterMickster Posts: 2,764

    I tend to go beefy

    Maintenance can handle these with nothing more than a screwdriver.

    Pretty cool because there are some with separate pins for signals and those requiring current (power)

  • RaymanRayman Posts: 15,035

    This first version of the PCBs have some issues, but the digital I/O is working, guess that's the important thing.
    New boards should be here soon.

    There is one strange thing to figure out... After programming P2 once, have to disconnect and reconnect USB in order to program again.
    Haven't seen this before, not sure how that's even possible...

    Populated a second main board and it doesn't show this behavior, but it's also not connected to the bottom board with the digital I/O and the 24V to 5V converter.
    Something to keep an eye on anyway...

  • RaymanRayman Posts: 15,035

    Wound up mounting the main board upside down from the original plan...
    Thinking it's better to have USB and such coming out the top than bottom.

    480 x 640 - 181K
  • RaymanRayman Posts: 15,035

    Building a second copy now and being more careful with the Dremel tool.

    It's important to leave that thin strip on the bottom...
    The back cover/din rail mount doesn't fit properly if it's completely removed, as in the first go.

    724 x 1287 - 665K
  • MicksterMickster Posts: 2,764

    @Rayman said:
    Wound up mounting the main board upside down from the original plan...
    Thinking it's better to have USB and such coming out the top than bottom.

    Voice of experience chimes yet again :)
    All kinds of things can happen in a control panel. For example, someone has a need to make or remake a connection above your device. They use wire-cutters, strippers, etc. Conductive off-cuts can fall anywhere.
    The same goes for screws; they unscrew a terminal too far and the screw falls. Can't find the screw so they grab a replacement from elsewhere.

  • RaymanRayman Posts: 15,035

    3D printed a cover for the connectors. Looks more presentable now...

    640 x 480 - 158K
Sign In or Register to comment.