Getting into PLCs

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • R_J
    Badcaps Legend
    • Jun 2012
    • 9514
    • Canada

    #41
    Re: Getting into PLCs

    I suspect the one of the password that in configured in the XC3 is to allow the OP series display to be able to access it. Then there will also be a different password for uploading and downloading the "program" to and from the XC3 plc to the pc.
    There is also a password on the OP display which is likely to allow parameter changes that the normal machine operator can't change. This likely only applies to the OP plc not the XC3 plc.

    Comment

    • Dannyx
      CertifiedAxhole
      • Aug 2016
      • 3912
      • Romania

      #42
      Re: Getting into PLCs

      The more interesting question for me here was why my CH341 failed to communicate with the damn thing and it only worked through the COM port....I think it's down to TTL vs RS232.
      Last edited by Dannyx; 09-26-2019, 11:34 AM.
      Wattevah...

      Comment

      • redwire
        Badcaps Legend
        • Dec 2010
        • 3900
        • Canada

        #43
        Re: Getting into PLCs

        PLC's usually have oddball serial cables. It's to keep the cable a $200 "special" part. I'm not sure what the "program" pin needs.
        9600,E,8,1 your parity might be wrong. It's even parity.
        Attached Files

        Comment

        • stj
          Great Sage 齊天大聖
          • Dec 2009
          • 30910
          • Albion

          #44
          Re: Getting into PLCs

          that's not oddball, it was used by Apple and SGI on a lot of machines to save space (and probably money)

          Comment

          • Dannyx
            CertifiedAxhole
            • Aug 2016
            • 3912
            • Romania

            #45
            Re: Getting into PLCs

            THIS chap here shows a similar, larger PLC. Unfortunately I don't speak russian to understand whether that mini-DIN cable is something he wired himself as per the schematic in the manual you showed, or it's an "official" cable. If someone can help with that, it would be wonderful. His cable looks homemade to me, so the only difference between me and him is the USB-serial adapter. I tried it with the CH341 of my programmer, while he used one which actual terminates in a COM port and has a "lump" on the cable which presumably houses some more intelligent hardware than my single chip.
            Last edited by Dannyx; 09-26-2019, 01:40 PM.
            Wattevah...

            Comment

            • stj
              Great Sage 齊天大聖
              • Dec 2009
              • 30910
              • Albion

              #46
              Re: Getting into PLCs

              you need to open the unit and see if the port has a level shifter before you damage it or your usb adapter.
              5v/3v3 and +/-12v systems dont mix!

              Comment

              • Dannyx
                CertifiedAxhole
                • Aug 2016
                • 3912
                • Romania

                #47
                Re: Getting into PLCs

                Well since the PLC connected just fine via the onboard COM port, I would assume it does have a level shifter to go from the PC's 12v signals (or 10v whatever) to 3.3v or 5v - I doubt its MCU runs natively on 12v levels. The CH341 runs at 5v (I THINK - there's a 3.3v regulator on it, but I'm not sure it's involved in the TTL part), so perhaps it wasn't enough and the chap in the video has an USB-serial adapter which has a charge pump in it.

                However this got me thinking whether or not I damaged my CH341...I'd need to find something "serial" to connect to and ensure it still functions. An Arduino Pro Mini is the first thing that comes to mind - if it can upload a code to it, the adapter's functional.
                Last edited by Dannyx; 09-26-2019, 02:01 PM.
                Wattevah...

                Comment

                • stj
                  Great Sage 齊天大聖
                  • Dec 2009
                  • 30910
                  • Albion

                  #48
                  Re: Getting into PLCs

                  link tx and rx with a jumper, then run a serial terminal like putty or minicom
                  it should echo what you type back to the screen

                  Comment

                  • Dannyx
                    CertifiedAxhole
                    • Aug 2016
                    • 3912
                    • Romania

                    #49
                    Re: Getting into PLCs

                    Ok, LOL never thought something that simple would work I'm guessing the same trick would work to test ANY serial port ("adapted" or "native") then.
                    Last edited by Dannyx; 09-26-2019, 02:28 PM.
                    Wattevah...

                    Comment

                    • Curious.George
                      Badcaps Legend
                      • Nov 2011
                      • 2305
                      • Unknown

                      #50
                      Re: Getting into PLCs

                      Originally posted by Dannyx
                      Ok, LOL never thought something that simple would work I'm guessing the same trick would work to test ANY serial port ("adapted" or "native") then.
                      The port has to be configured as RD/TD-only -- if it expects handshaking signals, then it will likely just sit there fat, happy and stupid (doing absolutely NOTHING!)

                      Comment

                      • Dannyx
                        CertifiedAxhole
                        • Aug 2016
                        • 3912
                        • Romania

                        #51
                        Re: Getting into PLCs

                        I can now confirm that this works, at least in my case: I placed a jumper cap over the TX/RX pins of the programmer, ran Putty, set it to the right COM as indicated in device manager and typed something in the window that popped out. I wasn't sure this was actually doing anything, since what I was seeing could just be me typing and not the device actually echoing, so I removed the jumper and I could no longer type anything at all. Put the jumper back in and sure enough, I could type once again, so there is that - still good. Great tip ! Thanks again
                        Wattevah...

                        Comment

                        • Dannyx
                          CertifiedAxhole
                          • Aug 2016
                          • 3912
                          • Romania

                          #52
                          Re: Getting into PLCs

                          We've just received two new sets of displays and PLCs today, so I tried messing around with the displays to get the hang of it, but I could not get anything to upload to it. A standard crossover serial cable just wasn't enough - the software just stood there upon hitting "download" and eventually timed out. The closest I got it to uploading was by making my own cable which has pin 7 connected straight across like in the manual of the display (page 16), although the manual is slightly contradictory there, since pin 7 is labeled as CTS, whereas in any serial port pin 7 is listed as RTS, so the manual is incorrect AFAIK ! Regardless, by connecting pin 7 to pin 7 on both ends (not crossed over to pin 8 like the console cable does - hence why I needed to make my own !), I made it one step further: the display makes a beep sound and also shows a progress bar when I hit "download". Still: the bar never leaves 0% and the program times out again...I wasted an entire day on this thing: trying both the CTS an RTS pins, switching them around, tying them together, but to no avail, that's as far as I ever made it. It probably is the only correct combination though, because the progress bar and beep happen only with pin 7 connected straight across, so I'll just leave it like that and shift my attention elsewhere. It's like the device is expecting data, but it isn't being sent over...which got me thinking to swap the TX and RX pins around, though I triple checked they're wired correctly (i.e. "crossed over", like the manual says). I also tried different software versions, since apparently that's also important, but all seem to do the same thing. I'm on Win10 here as well. Will try it on 7 too just for the hell of it....so yeah, that was disappointing
                          Wattevah...

                          Comment

                          • Per Hansson
                            Super Moderator
                            • Jul 2005
                            • 5894
                            • Sweden

                            #53
                            Re: Getting into PLCs

                            TX and RX in serial works just like USB:
                            First you try it the right way: it does not work.
                            Then you flip it around: it does not work.
                            Then you flip it back: it works.

                            Intel has a very handy diagram of this:
                            Attached Files
                            "The one who says it cannot be done should never interrupt the one who is doing it."

                            Comment

                            • Dannyx
                              CertifiedAxhole
                              • Aug 2016
                              • 3912
                              • Romania

                              #54
                              Re: Getting into PLCs

                              As I was scanning my eyes across your reply, I was actually thinking it would be helpful. I was like "wow, a diagram - thanks", but then....
                              Wattevah...

                              Comment

                              • Dannyx
                                CertifiedAxhole
                                • Aug 2016
                                • 3912
                                • Romania

                                #55
                                Re: Getting into PLCs

                                For some reason it just decided to work today and I managed to upload some stuff to the display
                                I finished the last day off by uninstalling the software, so today I had to download it again to try again, so it's most likely that I guessed the right version, since I hooked up the cable in exactly the same way, so that can't be it....so far so good
                                Wattevah...

                                Comment

                                • Dannyx
                                  CertifiedAxhole
                                  • Aug 2016
                                  • 3912
                                  • Romania

                                  #56
                                  Re: Getting into PLCs

                                  Ok guys, here's where I stand: today I managed to connect and interact with both the display and the PLC itself. I mostly played with the PLC because I might have to create my own program based on how I think these water basins should work (or at the very most by observing a functional one), because I there's no way I'll be able to unlock a programmed PLC to obtain the code.

                                  Here's some shots of what's on the inside: as you can see, there's a flash memory on there but that's about it. And no, that 8 pin IC is a DAC - nothing of interest there, I looked it up. The "bulk", including lock codes and other stuff, is most likely stored on this one flash, making recovering anything impossible, both due to hardware constraints and possibly electronic ones as well, so there is that...unless of course someone pro enough goes "oh, that's a XYZ chip - you can crack those easily by doing this" sort-of deal

                                  As far as creating my own program goes, today I put together something which loosely mimics what the "good" PLC should do: it steps through 4 of its outputs (representing air valves which open and close) one at a time at a set interval, so I created that with a short 3 second interval just for a proof of concept test and I got it working after an entire day of work. I even included a "power failure guard" which allows the PLC to continue where it left off in case it loses power and reboots. I'm still getting the hang of it. For instance, I still haven't tried relaying info from the PLC to show up on the display, like the status of its outputs, the countdown time, etc. The poor translation of the manual doesn't do me any favours here either, because I'm having a hard time understanding what some of those functions do....
                                  Attached Files
                                  Wattevah...

                                  Comment

                                  • stj
                                    Great Sage 齊天大聖
                                    • Dec 2009
                                    • 30910
                                    • Albion

                                    #57
                                    Re: Getting into PLCs

                                    the flash is 28pin tsop package,
                                    i could just lift it and throw it into my adapter and read it out with my programmer.

                                    if i was not me but somebody lesser, i could still lift it and put it onto an adapter pcb for a $ from ebay and then read it with a breadboard and arduino.

                                    Comment

                                    • Dannyx
                                      CertifiedAxhole
                                      • Aug 2016
                                      • 3912
                                      • Romania

                                      #58
                                      Re: Getting into PLCs

                                      Even if you did manage to read it, I doubt you'd be able to crack JUST the password while leaving the programming alone. I do not care about the device itself, since I have two new ones anyway. In the best of scenarios I'd do this operation twice: first to extract an unlocked "image" from the new working PLC and then spit it onto the "locked" one, which would give me a second unlocked PLC to play with, but would wipe any programming too.....that is IF the PLC even boots with the contents of the other one, since they may have different firmware versions and other stuff....
                                      Wattevah...

                                      Comment

                                      • stj
                                        Great Sage 齊天大聖
                                        • Dec 2009
                                        • 30910
                                        • Albion

                                        #59
                                        Re: Getting into PLCs

                                        you think they arent seperate?
                                        your obviously not into this type of stuff

                                        Comment

                                        • Dannyx
                                          CertifiedAxhole
                                          • Aug 2016
                                          • 3912
                                          • Romania

                                          #60
                                          Re: Getting into PLCs

                                          Originally posted by stj
                                          you think they arent seperate?
                                          your obviously not into this type of stuff
                                          No, I'm not into programming, but I'm willing to learn, so I'd be curious what the contents of such a flash chip would look like and what programmer would be able to read it.
                                          Wattevah...

                                          Comment

                                          Related Topics

                                          Collapse

                                          • sam_sam_sam
                                            20 year old Kenmore refrigerator ice maker bad water valve coil took a crap
                                            by sam_sam_sam
                                            I got lucky that when I got home and was about to get some ice out of the ice dispenser I hear and see water running down the outside of the ice dispenser what the heck is going on here

                                            At first I thought that the ice dispenser mold was cracked so I brought a new ice maker because this one has been in there for about 10 years now

                                            Well I put the new one in and wait and I wait for the water valve to open and let water in no such luck well there is a way to check the function of the motor and the water valve on this ice maker just need a jumper wire “L” to...
                                            04-09-2023, 08:04 PM
                                          • BOSCHNJAK
                                            by BOSCHNJAK
                                            ABOUT ME INTRODUCTION FILE

                                            2
                                            024 BEV, BIH, SARAJEVO START PROJECT: ELECTRIC VEHICLE TOYOTA 4 RUNNER CONVERSION http://www.bev.ba/TOYOTA4RUNNER/index.html

                                            2023 BEV, BIH, SARAJEVO START PROJECT: SECRETS AND MANUFACTURING PLANS (AS MY REPLICA) OF THE LIBERTY ENGINE 2.0.
                                            2022 BEV, PROJECT ?
                                            2021 BEV, PROJECT ?
                                            2020 BEV,BiH, Sarajevo: PROJECT IS: HOW TO SWITCH OFF PERMANENT MAGNET FIELD and HOW TO SWITCH ON PERMANENT MAGNET FIELD?
                                            2019 BEV, Croatia, Ston:, Broce: PROJECT - PROJEKT ELEKTRIČNI GLISER http://www.bev.ba/ELEKTRICNIVANBRODSKIMOTOR/indexHR.htm...
                                            12-28-2023, 02:09 PM
                                          • edugimeno
                                            Stagg sms12p audio amp has water damage
                                            by edugimeno
                                            Hi! My friend just brought this audio amplifier/speaker fro his music band saying they realized its got no sound. Led powers up but there no sound at all
                                            I opened it and found 3 board. 2 of them are for input plugs and potentiometers, and the other larger board has the amplifiers for 2 large speakers that it drives
                                            There's also a large toroid transformer that feeds a lower voltage to the first 2 boards and a larger voltaje (36x2 rectified close to 100v) to the power board. The power board has the plugs for both speakers
                                            There is only one signal wire connecting the first boards...
                                            05-24-2025, 06:00 AM
                                          • RetroComputingGrotto
                                            Water Damaged Toshiba 48L1435DB
                                            by RetroComputingGrotto
                                            I have a water damaged Toshiba TV that was hanging nicely on the wall then over the summer we had a new multi-million pound boiler system put in and right where this TV was hanging is a nice new pair of water pipes for the radiators...

                                            The TV hasnt been used for a fair few months but it was needed again the other day and needless to say, it didn't power on or show any signs of life (no standby LED etc). After checking the fuse in the plug (and that the socket it was plugged in to worked) I decided to get up some step ladders to take a closer look and low and behold! It looks like...
                                            10-07-2024, 08:23 AM
                                          • rzsn
                                            water damaged G513I
                                            by rzsn
                                            Hello friends, so I have got a "water damaged" (or cola/beer/coffe .. something dark and sticky) G513I system - which has the board and schematics from this thread. After cleaning up all the visible sticky residue with water and detergent (thankfully mostly on the top/keyboard side), I have a partial success. IPA was of no use for cleaning this.

                                            Using a bench power supply on the DCIN jack (as it seems that the PSU keying pin is not wired at all - series resistor R6003 is not populated), and using a shoring wire for the power button (either pin 5 on CN251 keyboard, or one...
                                            12-22-2024, 09:02 PM
                                          • Loading...
                                          • No more items.
                                          Working...