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,771
What is the best way to make an online program change with structured ladder without stopping the operation of the PLC using GX Works 2?
Replies
1
Views
98
Good morning. I'm doing a rehab and I need to recycle some part of the old code that won't change and that I need. This is a calculation that...
Replies
22
Views
1,170
I'm writing some structured text that's handling a data structure that comes from a PC. The PC structure is in the "new" LREAL 64-bit floating...
Replies
3
Views
440
Trying to put these equations in structured text program in a Micro 830. when I run the verify I get this error. ;:expected before this new...
Replies
4
Views
395
Back
Top Bottom