Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Color has a deprecated constructor in /homepages/23/d548214462/htdocs/clickandbuilds/Joomla/MyCMS/templates/rt_chapelco/features/color.php on line 11
myCNC - advanced CNC control, software - CNC Server API - Server API

Frequently Asked Questions - Server API

FAQs - Server API

Server API interface related questions.

myCNC sooftware offers API for third party software. Softwrae developers can connect to myCNC software and

  • load, run, stop/pause, g-code programs or single g-code lines;
  • rotate, scale g-code programs;
  • get current status of myCNC control (current position, speed, controller hardware inputs & outputs,
  • run PLC procedures from myCNC controller;
  • change myCNC control hardware outputs (relays, open collector outputs, PWM, DACs etc);

 

There are 2 version of command "SetScale" in the Server API to change scale of given g-code file.

For both commands g-code program should be loaded to myCNC by runnig command "ProgramFileOpen" -
Example:

ProgramFileOpen /sk/DNC/3d3.nc

1) Command "SetScale".

Format: SetScale <scale>
Example:

SetScale 3.5

(myCNC software will open g-code file defined by command "ProgramFileOpen", scale it to factor 3.5 and load result to myCNC memory).

 If "SetScale" command used several times, previous "scale" ratios are ignored. myCNC software uses original g-code file and the last "scale" ratio to generate scaled program.

 

{avsplayer videoid=1}

2)Command "SetScale++".

For some applications "scale" ratio should be used together with g-codes rotation. In this case commands "SetScale++" and "SetRotationAngle++" should be used.

When running "SetScale++" command "scale" ratio is latched to 'Scale&Rotation" structure. If running "SetRotationAngle++" myCNC software loads g-code file, given with "ProgramFileOpen" commands and perform rotation and scale with given Angle and Scale.

 

Example:

SetScale++ 2.75

SetRotationAngle++ 1.77