Tags - Compactlogix to RSView

You can MOVe a value or another variable into the timer/counter.pre or .acc and it will replace the "hard-coded" value.

Thanks, OkiePC ...

That's exactly what I needed to know. Apparently there's something in the RSLogix 5000 regarding the way a DINT tag works. I can't quite wrap my brain around it. This is probably why darrenj expressed confusion on what I was trying to ask.

... rab
 
I believe the presets in timers/counters are DINTs with c-logix. You may be able to MOVe INTs into them, but it would be best to use the same data type in your user variable presets.
 
Rbergman:

When you write the program you enter a value for a timer preset. However, this does not mean it is hard coded. That value can be changed at any time by your program or by an HMI by just writing to TimerName.PRE The only way to hard code a PRE is to do something like

MOV 1000 TimerName.PRE 'Move a hard coded constant into the preset
TON TimerName 'Execute the timer.

This isn't really necessary though as you design your HMI to only access the timers you want it to access.

In a SLC you could create a timer file and make all the timers in it STATIC, that way it can't be changed online.

A DINT is a 32 bit integer, the default integer size of the CLX. When you create a SINT or an INT, 4 bytes of memory are still allocated and little is gained unless you create an array or data structure; the CPU still reads memory in 32 bit gulps.

The timer PRE is the CLX is in milliseconds. It is a 32 bit word, so even in milliseconds you can still time continuously for about 25 days. Your operator is probably going to enter time in some unit other than milliseconds, so its a good idea to write that to a seperate tag and then move it to the PRE with a math operation.

You might consider creating a UDT like this one to keep the timer and the tag to which you write your actual time in seconds (or whatever units) from the HMI.

MyTimerUDT
PRE_Seconds DINT
TimerTag TIMER

Then create a tag
TIMER1 of type MyTimerUDT

Then you write your seconds from the HMI to Timer1.PRE_Seconds,
then in your program you do a
MUL Timer1.PRE_Seconds 1000 Timer1.TimerTag.PRE
TON Timer1.TimerTag.




OkiePC
A negative PRE will cause a major fault in a timer. However I believe a negative PRE is allowed in a counter in the SLC, PLC/5, and CLX - I've never tried it though.

(edit) OK, I tried it real quick with a ML1000 I have at my desk; a negative PRE is OK in a counter.
 
Last edited:

Similar Topics

Hello all. I have a 1769-L16 that I inserted a 1769-L35E into. I was expecting it to create module defined tags automatically in my controller...
Replies
10
Views
1,817
Good Day to the peeps of PLCs! I am trying to create a produced/consumed handshake between two CompactLogix 1769-L16ER BB1B PLCs while online...
Replies
3
Views
2,080
Hello Everyone, I am trying to pull a few data table points from a MicroLogix 1400 L32AWA Controller into a CompactLogix L30ER over ethernet. I...
Replies
2
Views
1,601
Is there anyway to do this short of creating new tags one at a time while online? PLC cannot be brought off-line nor are downloads allowed. I need...
Replies
1
Views
1,600
Hi all, For those that do, thanks for taking the time to read my post. I have some experience, mainly self taught with Allen Bradley SLC &...
Replies
6
Views
2,555
Back
Top Bottom