10/4/2011 2:45 PM | |
Joined: 8/16/2010 Last visit: 9/12/2023 Posts: 635 Rating:
|
Hi all. How to realize blinking (every second) of one signal, with timers? Thanks |
10/4/2011 2:56 PM | |
Joined: 3/24/2009 Last visit: 6/20/2023 Posts: 535 Rating:
|
Dear Milosh, timers are one possibility. Another way is to do it is to negate the signal in a cyclic interrupt (e.g. OB32) [code] UN M 0.7 = M 0.7 [/code] Best regards, yy1 |
Last edited by: yy1 at: 10/4/2011 3:00 PMAdded code |
|
10/4/2011 3:25 PM | |
Joined: 8/16/2010 Last visit: 9/12/2023 Posts: 635 Rating:
|
ok. thanks. But how to turn on one singnal and turn off second signal, and reverse. |
10/4/2011 8:22 PM | |
Joined: 1/28/2009 Last visit: 9/24/2023 Posts: 6821 Rating:
|
Dear Milosh Check the following codes for generating 10s pulses. You can change the time value of timers to get the proper pulse as you like! [code] AN M 0.0 L S5T#10S SD T 0 NOP 0 A T 0 L S5T#10S SF T 1 NOP 0 A T 1 = M 0.0[/code] Best regards |
12/29/2011 10:46 AM | |
Joined: 1/28/2009 Last visit: 9/24/2023 Posts: 6821 Rating:
|
Dear eden, What you need is included in the attachment.This link would be really helpful especially fritz 's point. Please note when you change MW10, the S5 TIME will be effective when the next timer triggers(as shown in attachment). [code] L MW 10 // From panel ITD L 1000 *D T MD 14 CALL "TIM_S5TI" IN :=MD14 RET_VAL:=MW12 AN M 0.0 L MW 12 SD T 0 NOP 0 A T 0 L MW 12 SF T 1 NOP 0 A T 1 = M 0.0[/code] Best regards, Hamid Hosseini AttachmentBlinking.zip (207 Downloads) |
Last edited by: hdhosseini at: 12/29/2011 10:49 AM// typo |
|
This contribution was helpful to
2 thankful Users |
Follow us on