jinyistudio
HI

I try to make a clock signal(on 500ms/off 500ms) and then output to a output coil(%QX0.0) but i don't know how to code it. Could you give me a LD sample ? thank's
[jinyi_title_1p] 
Delphi, B4A, B4J, C#/Mono, Mitsubishi Q-PLC
[image]
Delphi, C#, Q-PLC, B4A, B4J, Raspberry PI2
Delphi, C#, Q-PLC, B4A, B4J, Raspberry PI2
[image]
Delphi, C#, Q-PLC, B4A, B4J, Raspberry PI2
Quote 0 0
thiagoralves
If you put a negated contact and a coil connected together you will create an oscilator:

osc1.PNG 

If you add a timer on and a timer off between them, they will oscilate in the frequency you want:

osc2.PNG 

Just make sure that the contact and the coil are both referencing the same variable or it won't work.
Quote 2 0
felipe

I'm just getting started here. Where did you get the block that defines the time for the timer on delay? I've been trying to find it ...

Quote 0 0
thiagoralves
This block is a normal variable. Just write T#time in expression
Quote 0 0