Timers- Swap values after start

dandrade

Member
Join Date
Jan 2004
Posts
374
Question 01: Possible swap values PRESET or CURRENT TIME after enabled time?

Or is associate software PLC restrition. Quote PLC is permited.

Question 02: IEC61131 what definition about question 01 ?

Question 03: Before start timer, is permite set value CURRENT TIME
start > 0? It not definition IEC...


My comment: Mitsubishi is have effect change values.Is FX series , dont'know news famile

PS Off-topic: LOAD or MOV data is LD, what name in FB?
 
“ú‚ɍs‚í‚ꂽ‘æ‚V‚U‰ñ‘I”²‚Z

–ì‹…‘å‰ï‚S“ú–Ú‚P‰ñí‘æ‚QŽŽ‡‚ŁA“Œ–k‚
‚̃_ƒ‹ƒrƒbƒVƒ…—L“ŠŽè‚ªAŒF–{H‚‘ŠŽè‚É–³ˆÀ‘Å–³“¾“_ŽŽ
‡‚ð’B¬‚µ‚½Bt‚Ì‘å‰ï‚ł́A
Žjã‚P‚Ql–ڂ̉õ‹“BiƒXƒ|[ƒcƒiƒrŽÊ^]“Œ–k\
ŒF–{HA—Í“Š‚·‚é“Œ–k‚̃_ƒ‹ƒrƒbƒVƒ…“ŠŽèB‘å‰ï‚P‚Ql–Ú‚Ì–³ˆÀ‘Å–³“¾“_ŽŽ‡‚ð’B¬‚µ‚½BŽŽ‡‚Í‚Q|‚O‚Å“Œ–k‚̏Ÿ—˜i‚Q‚U“úAbŽq‰€jiŽž

Œƒí•KŽ€‚̃pEƒŠ[ƒO‚ªŠJ–‹!ƒvƒ–ì‹…
ƒvƒŒ[ƒIƒt§“x‚𓱓ü‚µA3ˆÊ‚܂ł̃`[ƒ€‚ª“ú–{ƒV
ƒŠ[ƒY‚ɐio‚Å‚«‚é‰Â”\«‚ª‚ ‚鍡”N‚̃pEƒŠ[ƒOBŒƒí•KŽ€
‚Ì1”N‚ª27“úA–‹‚𖾂¯‚éBŠJ–‹ŽŽ‡‚́A2˜A”e‚ð–ÚŽw‚·ƒ_ƒCƒG[vsˆÉŒ´
VŠÄ“—¦‚¢‚éƒIƒŠƒbƒNƒXA¼â‚Æ—›‚̈ö‰‘ÎŒˆ‚ƂȂ鐼•vsƒƒbƒeAŽáŽè‚̐¬’·’˜
‚µ‚¢‹ß“SvsV¯‚̉Á“üA–kŠC“¹‚ւ̃tƒ‰ƒ“ƒ`ƒƒƒCƒYˆÚÐ‚Å‹C‡‚Ì“ü‚é“ú–{ƒnƒ€‚Ì3ŽŽ‡
BŠJ–‹ƒ_ƒbƒVƒ…‚ð‚©‚¯‚é‚Ì‚Í‚Ç‚Ì

But don't take my word for it get a second opinion beerchug
 
Damn it, Pierre! You little turd! (cute... envision a Smiley Face inserted here. Eric, I have personally used those silly things for myself just once. Any other occurances were purely demonstrative. yeah, yeah, yeah...)

dandrade,

In one part of the manual it says, if you use an OUT instruction to write to the Timer Preset you must write a CONSTANT value (k) to the Preset.

In another part of the manual it says you can use the MOV (Move) instruction to write FROM any memory location TO the Timer
-OR-
FROM the Timer TO any memory location.

The manual is not very good. I can only assume that a "read" will read the CURRENT TIME. And that a "write" will write to the PRESET TIME.

Use the MOV (move) instruction.

You should be able to use MOV (move) to read the CURRENT TIME to a memory location.

You should be able to use MOV (move) to write a memory location to the TIMER PRESET.
 
What, are you bored, Terry? Reading the manual for the FX? Yes, the manual is confusing. Here's my 'take' on it...

If you want to be able to change the PRESET of a timer, use a D word rather than a constant (K) as the preset. This will allow you to change the preset by writing to the D register you used for the timer's preset.

Note: I'm pretty sure that if you change the preset while the timer is running, it will still use the previous preset value. The 'new' value will only take effect when the timer is restarted.

I think the timer's CURRENT (or 'accumulated') value is stored in the T word associated with that timer. For instance, if you MOV T1 D1, the accumulated value of T1 will be placed in D1

The inverse should be true as well. If you MOVE D1 T1, the value in D1 will replace the accumulated value of T1. Of course, this will only work while the timer is running.

beerchug

-Eric
 
As far as changing the preset of a timer you can do it while the timer is running or not running, until the timer times out.

If a timer has a preset of say 10 seconds and you turn the timer on and before it reaches 10 seconds you change the preset to 20 seconds. The timer preset will now be 20 seconds and the timer will not time out at 10 seconds, but 20 seconds.

If the timer has timed out at 10 seconds and you change the preset to 20, the new preset will not take effect until you turn the timer back off.

If the timer has an accumulated value of 10 seconds and you change the preset of the timer to 5 seconds the timer will immediatly time out and not at 10 seconds.

Tim
beerchug
 
Ah yes, that's correct Tim. I forgot that the timer's accumulated value is increasing FROM zero TO the preset value. If a timer's accumulated value decreased TO zero FROM the preset value, then changing the preset would have no effect until restarted.

beerchug

-Eric

P.S. What's so 'lousy' 'bout this Terry?... :unsure:
 
END TOPIC

Obliged to replys Even so I asked; for Phil delete the topic. (Write it direct, not translation) Fair I understand, but readers not

I will put previamente my post "Practice Posting Here" to approve the writing. Ok got to section

Close topic the end. Delete. Phil!!
 
In general, from memory's point of view...

There is no difference between a Timer and a Counter.

There is no difference between a Current Value and a Preset Value.

They are simply memory locations.

The difference is in the code. That is, the difference is in the way that various instructions use the particular memory locations.

In most PLC's the programmer is warned against using the same reference number for multiple Timer Instructions. He is also warned against using the same Timer reference number for a Counter Instruction (TMR-314 vs. CTR-314).

Some PLC's are designed to provide "X" number of Timers and "Y" number of Counters. In this case, there might be a TMR-1 and a CTR-1. If you need "X+1" Timers, and even though your program does not use any Counters,... too bad.

Does that mean that a program can not have a TMR-314 and a CTR-314?

No... it does not.

There are Timer Instructions and Counter Instructions.

A Timer Instruction performs "Timer-Type" activity on a particular set of Timer/Counter Memory Locations.

A Counter Instruction performs "Counter-Type" activity on a particular set of Timer/Counter Memory Locations.

If your code included a Timer Instruction for TMR-314 followed by a Counter Instruction for CTR-314, then your code would first perform a "Timer-Type" activity using the Current and Preset Values associated with T/C-314 and then perform a "Counter-Type" activity on the same memory locations.

Is this a practical thing to do? Probably not, however (except in the case of being a "morning person"), never say never.


In my "neighborhood", those memory locations are referenced by...

TCC-314
TCP-314

The first two letters, "TC" refer to the fact that the memory location is in the "Timer/Counter" range.

The third letter, "C" or "P", refers to "Current" and "Preset", respectively.

The number "314", of course, refers to the particular Timer/Counter.

So... on the surface, TCC-314 refers to the "Current Value of Timer, or Counter, -314". Likewise, TCP-314 refers to the "Preset Value of Timer, or Counter, -314".

Now, on a more basic level, TCC-314 and TCP-314 simply refer to a pair of particular memory locations.

As such, those memory locations should be accessible to any "read" and/or "write" instruction.

It should also be the case that Timers and Counters DO NOT have a rememberance of what the Preset or Current Values might have been on the last scan.

That is, once a Timer or Counter is turned ON, it simply performs the Timer or Counter type action, then compares the Current and Preset Values. Having compared the two, the instruction then manipulates the output as necessary.

I believe that means that even if a Timer has timed out in some previous scan, if one were to explicitly write a value into the Current Value indicating that the timer has not timed out, then the result of the Timer Instruction would indicate that the Timer has not timed out - even while the Timer enabler-bit has not gone OFF then ON.

The whole point of my rambling being that Timer/Counter memory locations are nothing more than memory locations and should be accessible as such.

Additionally, that Timer/Counter results can be manipulated, in some cases, by means other than the enabler-bit.

Would that be practical? Or desirable?

Using the favorite PLCnet response... "It depends".
 
Help

Rube


I think there is too late for help now. Dandrade seem to have the answer he needs, even if I did not understand the question.

João
 
Re: END TOPIC

dandrade said:
Close topic the end. Delete. Phil!!

Nah... Regardless of the original topic, the fact that Terry got involved makes the thread worth keeping.

Who knows when he'll escape his keepers again... utoh

Besides, Pierre gave some invaluable information we can't afford to lose!... :nodi:

beerchug

-Eric
 
I thank the effort everybody answers.not scorn.

No resentment here. No one person make an inadequate attitude

As support the organization and broad understanding to everybody that here are. Therefore, it follows writing fear him well here

With respect to everybody, by the tangle of the matters, someone now asks to the Phil delete the topic.
 

Similar Topics

I recently did a program conversion from logix 500 to studio 5000 and when machine runs it depends on two ton instructions to keep the machine in...
Replies
17
Views
576
Hi, I'm quite new to Rockwell PLC and currently trying to implement the following if Sw1 then for i:=1 to 20 by 1 do xEnable := 1...
Replies
9
Views
424
I'm writing some alterations to an FPWin program and need to see the running value of timers so I can set them correctly. It's my first time with...
Replies
0
Views
149
Hi everyone I am using Winproladder software for programming FATEK FBs PLCs and in programming, we often use Timers for activation of the...
Replies
4
Views
662
Hi all, I have what is likely not a complex issue, but I am working in Automation Studio and want an accumulating/retentive timer when a...
Replies
17
Views
1,968
Back
Top Bottom