English Support - Software > easySoft
Demo program - set, reset, toggle, edge detection
(1/1)
Andrus Saar:
Hello everyone
I'm quietly practicing programming in ST.
I'm quite at the beginning, only a few months of practice.
I made a demo program with set and reset, pulse relay function and edge detection.
Program description and code in .zip file.
Andrus
Andrus Saar:
Question:
(* 2. Impulse relay logic. The RIGHT button turns output Q2 on or off *)
IF P03 AND NOT M02 THEN // Initiate impulse relay function - RIGHT button switches memory M3.
M03 := NOT M03; // Memory, which is switched on the first time, off the second time, on the third time, etc.
END_IF;
M02 := P03; // Impulse relay function termination - button RIGHT affects memory M2.
Is there any way to make this function shorter or easier?
Andrus
weiss_nix:
Hi Andrus,
I think your question is answered here!
weiss_nix
Andrus Saar:
Hello
New version of the program, modified according to Weiss_nix instructions.
Andrus
Navigation
[0] Themen-Index
Zur normalen Ansicht wechseln