plc:software_plc_examples
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
plc:software_plc_examples [2019/07/12 09:26] – ivan | plc:software_plc_examples [2021/02/03 16:06] – ivan | ||
---|---|---|---|
Line 1: | Line 1: | ||
==== Software PLC examples ==== | ==== Software PLC examples ==== | ||
+ | |||
+ | ===General examples=== | ||
* [[How to add mandatory Homing after Emergency Button and-or Servo ready alarm]] | * [[How to add mandatory Homing after Emergency Button and-or Servo ready alarm]] | ||
Line 204: | Line 206: | ||
- | ==== Jog Step (0.001, 0.01, 0.1 1.0) Indication with external LED display | + | ===Jog Step (0.001, 0.01, 0.1 1.0) Indication with external LED display=== |
Line 261: | Line 263: | ||
}; | }; | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===Switching an output ON for a certain period of time=== | ||
+ | |||
+ | < | ||
+ | #define OUTPUT_TIMER 15 | ||
+ | main() | ||
+ | { | ||
+ | count=0; | ||
+ | do{ | ||
+ | a=gvarget(7373); | ||
+ | |||
+ | if (a!=0) | ||
+ | { | ||
+ | count++; | ||
+ | if (count< | ||
+ | else { | ||
+ | portclr(OUTPUT_TIMER); | ||
+ | if (count> | ||
+ | }; | ||
+ | }else | ||
+ | { | ||
+ | portclr(OUTPUT_TIMER); | ||
+ | count=0; | ||
+ | }; | ||
+ | }while(1); | ||
+ | exit(99); | ||
+ | }; | ||
</ | </ | ||
plc/software_plc_examples.txt · Last modified: 2022/03/29 15:55 by ivan