RSLogix 500 timebase

Marc

Member
Join Date
Jun 2004
Location
Nashua, NH
Posts
430
Hey guys,

I have run into an odd request. Is it possible to change the RSLogix500 timer timebase via an HMI? It appears to have the address T4:X/9 but since it is addressed to the bit level and there are 3 different timebases available, I'm not sure how to tackle this question. I have rsl500 in front of me but no emulator and no slc at the moment. I can't change the radix of a timer to look at it's guts from what I can see. Any experiance with this?

Marc
 
I am sure you cant either but there are other ways around it. Just use 2 timers one with a time base of 0.1 second and the other with 1 sec. Use the HMI to swap between them. The 0.001 time base is only valid from memory on the ML range of processors.
Regards Alan Case
 
You can't change the timebase of a timer without a program edit anyway...

Another option beyond what's already been offered is to just set the timebase in the PLC to the fastest available, then use a multiplier factor in the HMI when selecting the appropriate value.
 
I think Alan has the best solution using multiple timers. I get the feeling Marc needs a fairly wide range of timing and that is why he can't set it to the fastest available. I had a application like this once and had to do something similar

.001 = 32.767 Seconds
.01 = 327.67 Seconds or 5.46 Minutes
.1 = 3276.7 Seconds or 54.61 Minutes
1 = 32767 Seconds or 546.12 Minutes or 9.10 Hours
 
I'll wager that you can change the time base. But its not going to be particularly easy. I'm at home so I can't test this, but the time base is set by (I think) bits TX:X.0/8 and TX:X.0/9. If you attempt to change them directly programatically Logix500 will give you an error. But an HMI might be able to change them. You can programatically change them indirectly by copying the entire 3 words of the timer to three consecutive integers with the COP instruction, then manipulte the time base bits, then COP the entire 3 words back into the timer (make sure the timer doesn't execute in the middle of any rungs that manipulate the timer this way. But I caution you, changing the timebase could have unexpected results unless you are very very careful. You should fully understand how the timer works before you attempt this. See technote 21729 in the AB knowledge base for more information on how a timer works.
 
Yes you can....

Similar to Alaric's suggestion, but you can #COP, you need 3 timers, 2 of will be dedicated to the 'base' then the 3rd will be the one you are using in your program...

look at these two screen shots

Timebase1.gif




Timebase2.gif


So by changing state B3:2/3 and B3:2/1 you are able to change the base of T4:2,

Not sure what would be a cleaner way, but....
 
This is a little cleaner example but by indexed addressing you would have to address the other values in the other timers because the PRE and ACC COP also (its worth a try or a look :D )

Timebase3.gif


Timebase4.gif
 
I had in mind one timer and three consecutive N file words.

1) COP #T4:0 N7:0 3
2) Manipulate N7:0/8 and N7:0/9 (check the bit numbers, I'm doing this from memory)
3) and then COP #N7:0 T4:0 1
 
Alaric.
I dont think the copy command will work with a timer and an integer.

I have just tried another way. It is unusual but does work.
You need to
a) Set the bit in the status file to allow you to index across file boundaries.
b) Set up a binary file at say file 100 with only 1 word.
c) Set up a timer file at file 101.
d) Set bit 7 or 8 or 9 (only one at a time and make sure you reset it to off before you set the next bit) to one using indirect addressing as shown below.
OTE B100:[N7:1]/7 (where N7:1 = 1)

This will set the bits in the first word of file 101 which is T101:0
Strange thing is you do not see a change in the timebase in a timer block on the screen but if you look at the data table you will see the timebase alter.

Regards Alan Case
 
Last edited:
I tried this out on a SLC5/05 with unexpected results.

I tried my previous suggestion out on a SLC 5/05. It appears to work, but it in fact doesn't work.

First thing I did was to first program timer T4:0 with a 1.0 second time bas and then with a .01 second time base and look to see which bits were setting the time base. Bit 9 appears to be the one that sets the time base on the SLC5/05 (A Micrologix will need two bits because of the additional time base options) Here is a composite screen shot of the two timer configurations.
AL041607C.JPG


When bit 9 is clear, the time base is .01. When its set, it is 1.0.

One thing you will notice if you try this yourself online is that the low order byte of N7:0 is always changing. This is refleccted in the screen shots I made. This is a copy of the reference time stored in the timer. It is always updated, even when the timer is not running. See the technote 21729 for more information on this.

Next, I expanded the program to include logic to mainpulate bit N7:0/9 and write back to the timer.

AL041607A.JPG



Notice how bit N7:0/9 is set, and when copied back to the timer by toggling B3/201, the timer time base is 1.0. And when B3/202 is toggled, the time base is .01. This is updated and reflected in the data table for the timer. However, it is not reflected in the ladder. This didn't surprise me as I figured the logic in the display would be static.


AL041607B.JPG



As you can see, I first programmed a 10 second timer with a 1.0 time base. When I enabled the timer, it counted for 10 seconds and set the /dn bit as expected. Then I disabled the timer and toggle B3/202. The time base changed to .01 in the data file as expected, as shown in the third image. But when the timer was re-enabled, it still counted for 10 seconds. This was unexpected.

So I edited the ladder so that T4:0 had a .01 second time base. When enabled, the timer counted for .1 second and set the /dn bit as expected. And when I toggled B3/201, the time base was changed from .01 to 1.0 and the change was reflected in the data table. However, the timer still operated for .1 second, as programmed.

So I am left to conclude that in the case of a timer, the time base bits in the data table don't mean a thing, the instruction operates as programmed, not as the data table indicates. I doubt that any of the other methods suggested such as copying two timers to a third or using indexed addressing past file boundaries will work either.

So next, my question to the origianl poster is what is the customer trying to accomplish in chaning the time base? There are some timer tricks that can be done to create accurate long duraion .01 second timers, possibly eliminating the need to change time base.
 
Hey Guys,

I tried many of the things listed above with much the same result. The customer who manufactures systems for resale was asking about this to have as much flexibility in their system as possible for feild service/installation teams. This was not an absolute requirment, more of an "it might be nice if we could" type of thing. All in all I think it turned out to be an interesting question and I want to thank all of you guys for taking a crack at it.

Marc
 
Hi Alaric.
Interesting. I tried the copy command with a micrologix and it will not verify but it does with an SLC 505. That is the reason I had to use indexed addressing to fool the processor into writing to bits in the timer file. Incidentally in a micrologix bits 7, 8, 9 set the timebase. Each bit is for an individual time base ie 1 sec 0.1 sec and 0.001 sec.
Setting more than 1 bit gives a ? in the data table under the time base.
Regards Alan Case
 

Similar Topics

Hi Everyone, I am not proficient in RSLogix 500 so I have a question regarding the evaluation of N7:0 data as an input. So as I understand in...
Replies
1
Views
130
I have a little bit of experience with Allen-Bradley. I have a Micrologix 1500 (RSLogix 500) and a PanelView Plus 7 (FactoryTalk View Studio ME)...
Replies
3
Views
206
buen dia. tengo una falla al pasar los tags de mi plc SLC 5 0/4 a mi panel me aparece un error Problem writing value " " to item <tag name>...
Replies
1
Views
106
Will someone please convert this logic to pdf?
Replies
2
Views
152
Hello, Haven't been on in a while. I need to generate a bit level pdf of the I/O for RSLogix 500. I can generate a report but it just shows the...
Replies
1
Views
180
Back
Top Bottom