small quiz

Mostafa

Member
Join Date
Nov 2002
Posts
6
want to switch on and off a lamp with the same push button and i am using Siemens s7-300
can u help please?
 
Use the pushbutton to Count-Up on a counter.

map bit 0 of the counter's accumulator to the output.

:p
 
Hello ,

you can write this:

[Simatic Step7 German Style]

U E 1.0 // Pushbutton
FP M 1.1 // Flag for rising edge
X A 1.0 // xor Output
= A 1.0 // Output


Rolf
 
one button toggle

I'm not sure about a siemens, I would use the push button to add one to an integer , monitor bit "0" for the output. Write a compare statement that says if the integer value is equal to or greater than 2 then clear the value. Since the first digit value is "0" when the stored number is 2 the output will appear to be off anyway without danger of overruns!!! Works quite nicely for AB, and the programming idea should work the same with siemens. Just a thought
 
I dont feel like arguing it tonite

u can do it this way
flipflopsiemens.jpg

OR
stlflipflop.jpg

OR
togglefb.jpg
 
The counter idea is still cute though.

As for it maxing out - don't know about Siemens, but A-B counters just carry on after the .dn bit is set (it doesn't even need a preset) - and at max value+1 just rolls-over to -32768 (PLC5) or -2,147,483,648 (ControlLogix) then continues to count up from there.

Input "one-shot" function is built into the count-up function, and a :D nother advantage is the state of the output bit (Acc. bit 0) is retentive and survives processor restart etc., which I'm sure some of the other solutions posted don't.
 
INC command

hi
use the PB to icrement a word .
use the 1st bit to set the outout
use the 2nd bit to reset the output and to move "0" in the used word
thx :D
 
It seems school has begun again :( and the first homework has been handed out đź““ .

rsdoran,

your solution is the simplest possible, but you forgot to put an edge detection after the pushbutton. Otherwise the lamp will toggle every PLC cycle as long as you push the button.

Rolf,

keep in mind that not every service technician is able to read STL (not to mention the students), especially if they are confronted with PLC's from different make. If you write your programs in ladder, you wont have many problems translating to another brand. Try reading a program in statement lists if you're not familiar with the brand ;) and then compare to ladder.

dave b,

Siemens counters don't roll over, they count up to 999 and down to 0. They get stuck at these boundaries. To continue you have to reset or re-set them.

Kind regards,
 
oh well, like I said not sure about Siemens counters rolling over, but even so, a simple 'reset' at any even value would accomplish same thing (don't forget 0 (zero) in the sense of the binary acc. value is even), so resetting the counter has no effect on the output.

and so much :cool: neater :cool: than all that latch, follower, unlatch arrangement that everybody comments differently, don't you think.

and yes, jvdcande, it is usually the first exercise they get you to do at "school", i remember it so well...... ;)
 

Similar Topics

...and I agree. Context: TIA Portal/HMI = KTP1200 (12" screen) In the attached redacted image, the values in the white boxes are entered by the...
Replies
10
Views
706
Hi all, I’m new to programming and want to write a simple routine. Push start button, turns on sensor. 2 second delay before anymore logic read...
Replies
1
Views
327
Hi! I'm wondering if PLCs are used for small-scale production. I've got four machines doing different things with textiles, and I'm exploring the...
Replies
16
Views
1,336
I am looking at an application where I will need to detect small hairline cracks in stamped metal parts. The sensing will need to be done in the...
Replies
10
Views
1,135
Anyone know what the little green triangle on SCREEN 3 means ? See picture Thanks
Replies
2
Views
454
Back
Top Bottom