News:

  • October 13, 2025, 11:06:54 AM

Login with username, password and session length

Author Topic: Hold last state  (Read 6710 times)

LongDawg

  • Newbie
  • *
  • Posts: 3
Hold last state
« on: September 01, 2009, 02:40:21 PM »
I am a first time user of a D0-06DR-D DL06 brick. The programming software is DS5.
My question is, How can I have the processor hold last state (outputs) in the event of a power outage. Do i need to install the battery backup? Or is it a bit that needs to be set?
Thanks for any comments

b_carlton

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 606
    • thePLCguy
Re: Hold last state
« Reply #1 on: September 01, 2009, 02:55:31 PM »
Investigate retentive ranges, also the use of SET and RST for outputs.
An output is a PLC's way of getting its inputs to change.

LongDawg

  • Newbie
  • *
  • Posts: 3
Re: Hold last state
« Reply #2 on: September 01, 2009, 03:18:12 PM »
I just tried both with no luck. Any other thoughts?

b_carlton

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 606
    • thePLCguy
Re: Hold last state
« Reply #3 on: September 01, 2009, 03:24:13 PM »
Maybe I misunderstood. Are you asking for a way for the outputs to remain in their state WHILE POWER IS OFF?
An output is a PLC's way of getting its inputs to change.

LongDawg

  • Newbie
  • *
  • Posts: 3
Re: Hold last state
« Reply #4 on: September 01, 2009, 03:35:16 PM »
Yes is there a "power up in last state" function not just for the physical outputs but internal bits that were latched closed.

b_carlton

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 606
    • thePLCguy
Re: Hold last state
« Reply #5 on: September 01, 2009, 03:42:45 PM »
The 'retentive range' sets which items are held in their last state. But if the logic on power up turns affects their state then that is what will control. You must investigate the entire program plus the 'retentive range'.

Can you create a limited rung program and post it to illustrate the problem you are confronting?
An output is a PLC's way of getting its inputs to change.

milldrone

  • Full Member
  • ***
  • Posts: 48
  • I'm changing my attitude to thumbs up
Re: Hold last state
« Reply #6 on: September 02, 2009, 06:35:42 PM »
The 'retentive range' sets which items are held in their last state. But if the logic on power up turns affects their state then that is what will control. You must investigate the entire program plus the 'retentive range'.

LongDawg,

Here is a test program to illustrate what I think Bernie is talking about

PLC 06

// Rung 1
// Address 0
#BEGIN COMMENT
"http://forum.hosteng.com/index.php/topic,410.0.html"
""
"LongDawg,"
""
"Try this:"
""
"Presuming you have not changed the default retentive ranges."
""
"Momentary energize the input and notice how the outputs C0 and C1000 stay energised. "
"This is the SET and RESET coils Bernie was referring to"
""
"Now after energizing the ""set rung"" turn the input off, power down the PLC. When you "
"power up the PLC   C1000 will still be ""set"" and C0 will not "
#END
STR X100
SET C0
SET C1000

// Rung 2
// Address 3
#BEGIN COMMENT
"This rung resets the coils"
#END
STR X101
RST C0
RST C1000

// Rung 3
// Address 6
STR C0
OUT Y0

// Rung 4
// Address 8
STR C1000
OUT Y1

// Rung 5
// Address 10
END

// Rung 6
// Address 11
NOP


#BEGIN ELEMENT_DOC
"X100","","","use whatever input you have available, at my desk I have x100 thru x107"
"X101","","","use whatever input you have available, at my desk I have x100 thru x107"
"C0","","","by default this bit is not retentive"
"C1000","","","by default this bit IS retentive"

#END
Vaughn