klm
  •  klm
  • 70.75848% (Friendly)
  • Advanced Member Topic Starter
2020-04-29T21:28:15Z

I use S:42/0 to trigger my intructions, over and over with each pulse.
This way I don't have to tigger the instruction (further down the rung) manualy.

For example.


---]S:42/0[----------| sequencer |------


A couple of things:

1. This contact (S:42/0) will give me a rate of "every 1/2 second" (50 % duty cycle)
Am I right in thinking this way?

2. I'm trying to think, "what if I wanted to tigger at a faster pace"; how could I
do that? What other instruction/technique could I use?


Any help or direction that you could point me in would be appreciated.


Thanks!
klm
Guest
2020-04-29T21:32:50Z
For those reading this, the S:42 register is the seconds value of the onboard clock in the SLC.

There are times that it makes sense to use that bit and possibly other values of the real time clock. We often use them in our flasher circuits for alarms. For non precision requirements such as the rate of a flashing light, you can use a couple timers - one for the on time and one for the off time. Any precision timing requirements such as PID timing and totalization, should use an STI file set at your required rate. The STI will interrupt the operation of your regular program to run the code in that file at an accurate rate. This is especially important for totalizers as you have to add to it with very accurate values. Any timers or code in your regular program are subject to the scan time of your regular program code. Actually the same is true for using the S:42 register in your code. For instance if your scan time is 100 ms and the rung that has the S:42/0 contact in it is evaluated right before the bit turns to a 1, then you could be close to 100ms late by the time it comes around and scans that rung again. This doesnt matter for most things but 100ms here and there can really mess up a totalization calculation and PID calculations.

Now if you are looking at the S:42/0 bit you also need to keep in mind that it turns to a 1 every other second. Lets look at a shorter binary number:

Seconds Binary

0 0000
1 0001
2 0010
3 0011

If you look at that last bit which would be like looking at the S:42/0 bit, you can see that it turns to a 1 every other second.

Now with all this said about the SLC, keep in mind that with the Control Logix, you can setup several tasks with varying periods. You can set one with 100ms one with 500ms and so on.
klm
  •  klm
  • 70.75848% (Friendly)
  • Advanced Member Topic Starter
2020-04-29T21:40:43Z
You wrote:

Now if you are looking at the S:42/0 bit you also need to keep in mind that it turns to a 1 every other second. Lets look at a shorter binary number:

Seconds Binary

0 0000
1 0001
2 0010
3 0011

If you look at that last bit which would be like looking at the S:42/0 bit, you can see that it turns to a 1 every other second.

Now that's the answer I was looking for! - Now it makes sense to me!

Thank you very much.

klm