plc:button_to_toggle_select_output_pin_with_indication
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:button_to_toggle_select_output_pin_with_indication [2017/12/06 01:47] – es | plc:button_to_toggle_select_output_pin_with_indication [2017/12/06 13:49] – es | ||
---|---|---|---|
Line 28: | Line 28: | ||
main() | main() | ||
{ | { | ||
- | a=portget (0x406); | ||
- | if (a==0) {portset(6); | ||
- | if (a!=0) {portclr(6); | ||
+ | a=portget (0x406); //read current state of output #6 | ||
+ | |||
+ | if (a==0) {portset(6); | ||
+ | else {portclr(6); | ||
exit(99); | exit(99); | ||
+ | | ||
}; | }; | ||
</ | </ | ||
+ | |||
+ | To add Software PLC procedure - | ||
+ | * Go to Software PLC tab | ||
+ | * Press **+** (Add) button and enter PLC procedure name {{mycnc:: | ||
+ | * Fill the procedure source code | ||
+ | * Press 2 buttons on the right - **Build All** and **Save** to save sourece code and build PLC binary file | ||
{{mycnc:: | {{mycnc:: | ||
plc/button_to_toggle_select_output_pin_with_indication.txt · Last modified: 2017/12/06 13:49 by es