tidy structured look

interd0g

Member
Join Date
Jun 2008
Location
FALMOUTH
Posts
14
I recently started playing wiht a Toshiba T1 to run a renwable power house. It has a solar array, generator and can hook to the utility when they are on.
Depending on the source some loads are allowable and some not, and connection to the utility is minimised. Seemleess power is required to safeguard the house elcronics stuff.
The t1 also does a perimeter alarm and auto yard lights in its spare time.

Here is my problem;-

Once some process is under way, with timers and counters ticking away, the process may terminate in various ways ( eg manual buttons, power failure or the process times out)
When it does it will catch some timers and counters in mid- flight with some value remaining in the register.
Before the next instance of this process they need to be back to some ok initial values.

Right now, I figured this by trial and error and put 'MOV' instructions here and there to re-initialise these timer/counter registers for each input or outcome which could start or end the process.
It reached the point of inscrutable and un t-shootable ( but it DOES work for the moment.)
There most be a more elegant way of thinking and doing this?
 
I have zero experience with the Toshiba PLCs, but I had a quick look at the manual:

"It is possible to specify the T registers as retentive to retain their data in the event of a power failure."

It sounds like you have yours set to be retentive, so they retain their current value through a power cycle. I think if you set them to be non-retentive, they will automatically reset back to zero.

:bberhcug:

-Eric
 

Similar Topics

Hi, I'm doing a compare in s7 stl. The code i have written works fine but looks messy. What I'm trying to achieve is to set m9.0 when the PLC...
Replies
15
Views
3,778
Hello, I am using studio 5000 pro and am trying to figure out the structured text. Here's my scenario: An operator scans a barcode, the barcode...
Replies
15
Views
250
I have an expression in a structured text routine of a Logix controller that looks more or less like the following: ResultInteger := Integer1 *...
Replies
13
Views
390
Good evening. I display the step number of a SFC on a display. Sometimes, on a trip, it goes quickly through many steps and I need to prove to...
Replies
1
Views
134
I am trying to set up a piece of equipment with a Horner HE-X4R. I'd like to use structured text and so far I'm just trying to get a basic On/off...
Replies
0
Views
72
Back
Top Bottom