User Tools

Site Tools


mycnc:server_api

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
mycnc:server_api [2022/01/07 13:08] ivanmycnc:server_api [2022/09/07 15:33] (current) ivan
Line 1: Line 1:
 ====== Server API ====== ====== Server API ======
  
-This article serves as the main reference point for all myCNC material related to the myCNC Server API. It will be expanded at a full manual.+//This article serves as the main reference point for all myCNC material related to the myCNC Server API.// 
  
-The server API allows to control movement and machine coordinates remotely, via a series of commands. A list of such commands is presented below for jog control, etc. To obtain a full list of commands, type ? while connected to the remote host:+The server API allows to control movement and machine coordinates remotely, via a series of commands. 
 + 
 +To enable Server API functionality, first head into your Settings > Config > Network, and enable the ''Server Interface'' option, as well as set a ''Server Port'' (the server port will be used to connect to your system via the ''telnet'' command, for example ''telnet 127.0.0.1 4266''): 
 + 
 +{{:mycnc:server-api-002-network-tab.png}} 
 + 
 +A list of Server API commands is presented below for jog control, etc. To obtain a full list of commands, type ? while connected to the remote host:
  
 {{:mycnc:server-api-001-commands-list.png}} {{:mycnc:server-api-001-commands-list.png}}
Line 15: Line 21:
 | ProgramAppend | | ProgramAppend |
 | ProgrmaEnd | | ProgrmaEnd |
-| ProgramPlay |+| ProgramPlay | Starts running the program |
 | ProgramPlayBack | | ProgramPlayBack |
 | ProgramPlayStep | | ProgramPlayStep |
 | ProgramPlayStepBack | | ProgramPlayStepBack |
 | ProgramPause | | ProgramPause |
-| ProgramStop | +| ProgramStop | Stops the running program 
-| ProgramReset |+| ProgramReset | Resets the program to the beginning 
 | GetEstimateTime | | GetEstimateTime |
-| GetMachinePosition | +| GetMachinePosition | Returns all of the current machine position coordinates |
 | GetProcess | | GetProcess |
-| GetWorkPosition |+| GetWorkPosition | Returns all of the current work (program) coordinates |
 | GetMyCNCVersion | | GetMyCNCVersion |
-| GetFVariable | +| GetFVariable | Returns the value stored in a global variable (as double) 
-| GetIVariable |+| GetIVariable | Returns the value stored in a global variable (as int) |
 | GetReady | | GetReady |
 | LineAppend | | LineAppend |
 | GetScanData | | GetScanData |
 | GetSensors | | GetSensors |
-| GetMCC | +| GetMCC | Get Motion Control Code - read machine status, returns a number (for example, 3) 
-| GetMCPtr |+| GetMCPtr | Get Motion Control Pointers |
 | GetHW | | GetHW |
 | GetHWDAC | | GetHWDAC |
 | GetHWADC | | GetHWADC |
-| GetHWInputBit | +| GetHWInputBit | Returns (reads) the state of a particular input 
-| GetHWInputs |+| GetHWInputs | Returns (reads) the state of an input group |
 | GetHWOutputs | | GetHWOutputs |
 | GetHWPWM | | GetHWPWM |
Line 51: Line 57:
 | RunPLC | | RunPLC |
 | SaveConfig | | SaveConfig |
-| SetG92 |+| SetG92 | Sets the current work position to the selected value (for example, ''SetG92 X0''|
 | SetHWDAC | | SetHWDAC |
 | SetHWOutputBit | | SetHWOutputBit |
Line 63: Line 69:
 | SinglePlay | | SinglePlay |
 | ShutDown |  | ShutDown | 
 +| GetJobName | Get the full job name and file path | 
 +| GetSVariable8020 | Get the full job name and file path (same as GetJobName) | 
 +| GetSVariable8109 | Get current job (file) size, in MB |  
 +| GetSVariable8108 | Get the current job (file) folder path (same as GetJobName but without the actual file name) | 
 +| GetSVariable8107 | Get the current job name without the folder path (name only) | 
  
 ====Server API, Jog control==== ====Server API, Jog control====
mycnc/server_api.txt · Last modified: 2022/09/07 15:33 by ivan

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki