User Tools

Site Tools


plc:button_to_toggle_select_output_pin_with_indication

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
plc:button_to_toggle_select_output_pin_with_indication [2017/12/06 01:47] esplc: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);
 +  
 }; };
 </code> </code>
 +
 +To add Software PLC procedure - 
 +  * Go to Software PLC tab
 +  * Press **+** (Add) button and enter PLC procedure name {{mycnc::mycnc-add-toggle-output--2.png}}
 +  * 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-add-toggle-output--2.png}} {{mycnc::mycnc-add-toggle-output--2.png}}
  
  
plc/button_to_toggle_select_output_pin_with_indication.txt · Last modified: 2017/12/06 13:49 by es

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki