About pulse and adding

smiles

Member
Join Date
Oct 2006
Location
DaNang
Posts
36
Hi , this is the first time I join here
I am using S7200 MicroWin and get somes troubles with my project
I have two questions about it
1) If my statement like this
network 1 : LN Q0.2
TON T37 , +30
network 2 : LD T37
AN Q0.2
= Q0.2
so have I just create pulses every 3 seconds ?
2) For example , I have a sensor that gets signal every 3 seconds
whith the code above , but see no result with S7200 simulink , I
think caused of the " on " time is very fast , so try to give it be "on "
in 1 second
network 1 : AN T40
TON T37, +30
network 2 : LD T37
TON T40, +10
network 3 : LD T37
= Q0.2
+I +1, MW1
as you see , my plan is add 1 to MW1 when sensor 2 " on "
my question is does the result of adding change depend on the
" on " time of sensor 2 ?
when view in simulink I count 1 for each time it "on " but " on "
3 times doesn't mean MW1 = MW1 + 3 ???

Thank !
 
Last edited:
my question is does the result of adding change depend on the
" on " time of sensor 2 ?
No, the addition will happen each program scan when the rung is TRUE.

T37 is a 1 millisecond timer, so a Preset Time of "+30" creates a 0.3 second timer. Adding a second T40 1-second timer is NOT helping anything at all. Your problem in your first program was that T37 is being reset on the same scan in which it reaches 0.3 seoncds. So it is only on for 1 PLC scan, a very short time in a short program like this. The ON time will be so short that you will not be able to "see" it go on. In your Network 1, use some reset trigger other than T37 to reset Timer T37. You do not want to reset it as soon as it times out. Instead, use T37 to "Do Something:, and when that "Something" is Finished (Done), use "Something Done" to reset T37.

If you view your programs in "Ladder" mode, the error will probably be obvious to you. That is the problem with STL for beginning programmers: The logic is obscured by the language.

Sensor_Timer1.JPG
 
Last edited:
uhm ... T37 to T61 in S7-200 have the resolution of 100ms
so my program means T37 "off" in 3 seconds and " on " in
1 second
another way to make this I see in Help part :

network 1
LDN M0.0
TON T37,+40
network 2
LDW>= T37,+30
= Q0.2
network 3
LD Q0.2
= M0.0

so Q0.2 will "on" in 1 second

network 4
LD Q0.2
+I +1, MW1

No, the addition will happen each program scan when the rung is TRUE.
I will try my program again :)
 
smiles said:
uhm ... T37 to T61 in S7-200 have the resolution of 100ms
so my program means T37 "off" in 3 seconds and " on " in
1 second
another way to make this I see in Help part ::)


Doesn't 30ms equate to 0.03SEC?
Why is it 0.3 Seconds?

Am I forgetting how to convert or something????
 
30 * 100ms = 3000ms = 3 * 1000ms = 3 * 1s = 3s
np :)
I had tried that program again , the addition is done when the rung is on as you say :site:
 
Last edited:
Hi Lancie1,

I think T37 is a 100ms resolution timer. If your preset time is 30 then you have 3sec. a timer.
kindly check help on you s7Microwin software.

set-csg
 
Yes, you alll are correct, T37 is a 100 ms range timer. All other comments are still valid.
 

Similar Topics

Hai everybody, I have a small issue of adding delay in the pulse count of the high speed counter input of the micrologix 1100.The pulse comming...
Replies
6
Views
4,416
Hi, The hardware is: Click Plc model # CO-O1DD1-O HMI model # S3ML-R magnetic-inductive flow meter model # FMM100-1001. I will set the flow meter...
Replies
4
Views
136
Hi All, I'd like to know can we use DTR instruction to get a week pulse ? Could anyone please help me to understand that one ? I've managed to...
Replies
4
Views
182
Hello, I am struggling to figure out some logic. I have an analog pressure sensor coming into the PLC and would like to have multiple timing...
Replies
4
Views
151
I have PLC Omron CJ2M with OD211 module. I want to use the pulse output and PWM output and this module. But i confuse how to activated this, i...
Replies
0
Views
107
Back
Top Bottom