Announcement

Collapse
No announcement yet.

What happens BRX log file on SD card when the power fails?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts


  • What happens BRX log file on SD card when the power fails?

    I need to log to the SD card in a BRX every 3 minutes. Everynight, the power will be turned off. Does the log file have enough time to close without corruption? Or on power on the next day, when a new file will be created first thing with a new time stamp, will the file be in some unknown state?


  • #2
    Each logging operation opens, writes, and closes the file. Like any flash medium, turning off the power while accessing can corrupt it, but as long as you aren't actively writing it is fine. Even if interrupted, the file should be intact up to the last record, but I really wouldn't encourage it.

    Comment



    • #3
      UPS. Detect when running on UPS without AC MAIN, then make a write. stop process.

      Comment



      • #4
        What turns off the power? Have the PLC be part of the shutdown process, have operator press a button attached to the PLC, have the PLC do what it needs to do, then PLC opens the contactor or whatever shuts the power off to the facility.

        Comment



        • #5
          Originally posted by Bolt View Post
          What turns off the power? Have the PLC be part of the shutdown process, have operator press a button attached to the PLC, have the PLC do what it needs to do, then PLC opens the contactor or whatever shuts the power off to the facility.
          The possible gotcha there is that if the power gets shut off (which also powers the PLC), you can't turn the facility back on. Not that I accidentally made that mistake once or anything..

          Comment



          • #6
            What a guy could do is, have a pushbutton supply power to the plc which the operator would hold until the plc has booted up and on the first scan it would latch a relay which would be wired in a OR circuit to supply power when the pushbutton is released.

            Comment



            • #7
              We can't just have the operator push a button as it will be whomever is leaving the facility last throwing breakers - Owner, manager, janitor, etc.

              Since we have potentially over 2000 units, price is important.

              How about:
              1) I use a DC powered BRX with no IO (BX-DM1E-M-D). It will have up to 1 or 2 16Bit DC input modules and 1 or 2 8 bit 4-20ma input modules depending on location.
              1) I put a large capacitor between the DC power supply and the BRX to act as cheap UPS.
              2) I utilize a relay on the AC line to open the DC going to the IO (the typical ice-cube relay opens in 20-25ms)
              3) I detect DC loss in ladder logic to the Analog Module(s) and do a final write to the log file.

              Any guesses on size of capacitor?

              Comment



              • #8
                Originally posted by djedesign1 View Post
                3) I detect DC loss in ladder logic to the Analog Module(s) and do a final write to the log file.
                I would recommend this as an interlock to NOT START a write vs. a condition TO INITIATE a WRITE. If you miss the last log entry, no big deal. If you corrupt your file, or file system you may lose a bunch of them.

                Hence, use "NOT powering down" as a condition to enable the writes, in addition to whatever other conditions you are using.



                There are 10 kinds of people in this world, those who know binary, and those who do not.

                Comment



                • #9
                  Doesn't need to be that elaborate. BRX DC input modules are full wave, and will take AC directly. A 110/24VAC transformer is less than $10 (I found one for $7 in about 5 minutes). When fed into the DC input, half wave pulses are coming in at 8.33ms, so if you haven't seen a pulse in 16ms or so, AC power was interrupted. One of the 24VDC supplies we are using with our PLCs took over a full second to shut off after AC was removed...plenty of time.

                  Comment

                  Working...
                  X