Technical Forum

STEP 7 / STEP 7 Lite

Flashing Output Effect

Thread Starter: chibby0ne   Started: 2/4/2010 6:47 AM   Replies: 2

« Previous thread Next thread »
Page 1 of 1 (3 items)
  2/4/2010, 6:47 AM
Joined 5/3/2008
Last visit: 8/5/2010
Posts: 8
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hi,

I'm trying to make a bit (output) to flash without using any timers or counters. I've looked for a internal system word, used for example the internal clock, or a free running timer same way the AB's PLC have S2:4 word that runs everytime the PLC is in RUN mode, in this case I'd just address any bit of that word to the bit of the output I want to flash, but I haven't found it yet.

IDK if there's any word as such in Siemens' PLC.
What are the alternatives here?

Thank you very much in advance.

Top
  2/4/2010, 7:04 AM
Joined 5/3/2008
Last visit: 8/5/2010
Posts: 8
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Just found out how to do it.

Using the Clock Memory byte. They are activated in Properties of CPU in HW Config under the "Cycle/Clock Memory" tab. Put the Memory byte that you want to use and Voila!

Clock Memory

The clock memory is a memory byte that changes its binary state periodically at a pulse­pause ratio of 1:1. You select which memory byte is used on the CPU when you assign parameters for the clock memory using STEP 7.

Uses

You can use clock memory bytes in the user program, for example, to activate flashing lights or to trigger periodic activities (for example, measuring an actual value).

Possible Frequencies

Each bit of the clock memory byte is assigned a frequency. The following table shows the assignment:

 

Bit of the Clock Memory Byte

7

6

5

4

3

2

1

0

Period Duration (s)

2.0

1.6

1.0

0.8

0.5

0.4

0.2

0.1

Frequency (Hz)

0.5

0.625

1

1.25

2

2.5

5

10

 

 

Note

Clock memory bytes are not synchronous with the CPU cycle, in other words, in long cycles, the state of the clock memory byte may change several times.

Top
  2/4/2010, 11:01 AM
Joined 6/12/2009
Last visit: 9/14/2012
Posts: 288
Rating:
Rated: Outstanding [4 out of 5 / rated 17 time(s)]. (17) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
chibby0ne wrote:
Just found out how to do it.

Using the Clock Memory byte. They are activated in Properties of CPU in HW Config under the "Cycle/Clock Memory" tab. Put the Memory byte that you want to use and Voila!

Clock Memory

The clock memory is a memory byte that changes its binary state periodically at a pulse­pause ratio of 1:1. You select which memory byte is used on the CPU when you assign parameters for the clock memory using STEP 7.

Uses

You can use clock memory bytes in the user program, for example, to activate flashing lights or to trigger periodic activities (for example, measuring an actual value).

Possible Frequencies

Each bit of the clock memory byte is assigned a frequency. The following table shows the assignment:

 

Bit of the Clock Memory Byte

7

6

5

4

3

2

1

0

Period Duration (s)

2.0

1.6

1.0

0.8

0.5

0.4

0.2

0.1

Frequency (Hz)

0.5

0.625

1

1.25

2

2.5

5

10

 

 

Note

Clock memory bytes are not synchronous with the CPU cycle, in other words, in long cycles, the state of the clock memory byte may change several times.



Also if you want to flash the bit for counting purposes or for signalling an event, you can make use of the rising/falling edge detection instructions.

the edge detection function will keep the target bit at logic "high" for one scan cycle of the OB executing the instruction from the moment the instruction detects a change in state of the bit being checked.


for example, if the following STL code were to be programed as part of an OB(cyclic or not) which takes ...............say 1s for one complete execution scan,

A M 0.0
FP M 0.1
= M 2.0

then M 2.0 bit would be in Logic HIGH state for 1s from the moment M 0.0 changed its state form Logic LOW to Logic HIGH and then the state of M 2.0 will return to 0, till another time the above conditions for M 0.0 repeat.
if M 0.0 were to be part of the cyclic clock byte of the CPU then the above code would generate a pulse train.

IMPOSSIBLE SPELLS I'M POSSIBLE
Top
Page 1 of 1 (3 items)
Actions