• Home
  • Товары
      • Back
      • Программное обеспечение myCNC
          • Back
          • Основные функции
          • Установка myCNC
          • Основные преимущества
          • Обновления
      • Сравнение плат myCNC
      • Электронные комплекты myCNC
      • ET6
          • Back
          • myCNC-ET6
          • myCNC-ET6 Reflash Firmware (ru)
          • myCNC-ET6 - Диагностика неполадок
      • ET7 (ru)
          • Back
          • myCNC-ET7 (ru)
          • myCNC-ET7 Reflash Firmware (ru)
          • myCNC-ET7 - Диагностика неполадок
      • ET10 (ru)
          • Back
          • myCNC-ET10 (ru)
          • Перепрошивка myCNC-ET10
      • Система CNC Vision
      • Датчики и центроискатели
      • Устройства Modbus
      • Устаревшие продукты
          • Back
          • ET1
          • ET3
          • ET5
          • Дополнительная плата THC
          • Комплект ET3+7PC
  • Применения
      • Back
      • Плазменная/газовая резка
          • Back
          • Профили плазменной резки
          • Примеры плазменной резки
          • Профиль газовой резки
      • Тангенциальная резка
          • Back
          • Профиль тангенциальной резки
          • Примеры тангенциальной резки
      • Фрезерование
          • Back
          • Примеры фрезерования
          • Профили фрезерования
      • Фрезерование по дереву
      • CNC Vision (камера)
          • Back
          • Настройка CNC Vision
          • Демо CNC Vision
      • Токарная обработка
      • Фрезерование и токарная обработка
      • Лазерная резка
      • Роботика
      • Машины спецпредназначения
      • Зуборезная синхронизация
  • Цены
  • Скачать
  • О нас
      • Back
      • Наша цель
      • Наша история
      • Клиентура по миру
  • Онлайн-магазин
  • Поддержка
      • Back
      • Документация
      • Связаться с нами
  • Поиск
  • Блог
  • Форум
  • Файлы
      • Back
      • Фото
          • Back
          • Машины клиентов
      • Видео
          • Back
          • Видео клиентов
          • Обучающие видео
  1. Главная
  2. Documentation (ru)
  3. myCNC software (ru)
  4. CNC Server API (ru)

Server API, Jog control (ru)

Server API, Jog control

Command "SetJog" is used for Jog control through Srever API.
Command syntax is "SetJog Parameter". Parameters listed in table below

Parameter Description
x+ start jog X+ direction
x- start jog X- direction
y+ start jog Y+ direction
y- start jog Y- direction
z+ start jog Z+ direction
z- start jog Z- direction
a+ start jog A+ direction
a- start jog A- direction
b+ start jog B+ direction
b- start jog B- direction
c+ start jog C+ direction
c- start jog C- direction
x+y+ start jog in 2 axes X+,Y+ directions
x-y- start jog in 2 axes X-,Y- directions
x+y- start jog in 2 axes X+,Y- directions
x-y+ start jog in 2 axes X-,Y+ directions
xstop stop jog in X axis
ystop stop jog in Y axis
zstop stop jog in Z axis
astop stop jog in A axis
bstop stop jog in B axis
cstop stop jog in C axis
xystop stop jog in X, Y axes
   

 

 

Server API, Pendant control emulation (ru)

Server API, Pendant control emulation

Server API has a command to simplify Pendant control emulation. This command can be used for writing third-patry Pendant control device drivers.

Command Description
SetPendant

Format:
SetPendant Parameter1;Parameter2

Parameter1 - Emulated Handwheel position. It's supposed the handwheel has reolution "100", position range can be (0...99)
Parameter2 - 16bit value, high byte is Step selector, low byte is Axis selector.
Step selector values -
0 -> "x0.001" (1 wheel step = 0.001 unit)
1 -> "x0.01" (1 wheel step = 0.01 unit)
2 -> "x0.1" (1 wheel step = 0.1 unit)
3 -> "x1" (1 wheel step = 1 unit)
Axis selector values -
0 -> "OFF"
1 -> "X"
2 -> "Y"
3 -> "Z"
4 -> "A"
5 -> "B"
6 -> "C"

   Example:
  SetPendant 50;0x0300 <Axis=OFF, Mul=1, Wheel=50 - initial position>
SetPendant 50;0x0301 <Axis=X, Mul=1, Wheel=50 - Turn ON X axis>
SetPendant 55;0x0301 <Axis=X, Mul=1, Wheel=55 - Rotate wheel +5 "clicks", will move X +5*1.0=5.0 mm>
SetPendant 55;0x0302 <Axis=Y, Mul=0.01, Wheel=55 - Switch to Y axis>
SetPendant 65;0x0302 <Axis=Y, Mul=0.01, Wheel=65 - Rotate wheel +10 "clicks", will move Y +10*0.01=+0.1 mm>
SetPendant 65;0x0302 <Axis=Z, Mul=0.1, Wheel=65 - Switch to Z axis>
SetPendant 50;0x0302 <Axis=Z, Mul=0.1, Wheel=50 - Rotate wheel -15 "clicks", will move Z -15*0.1=-1.5 mm>

 

 {avsplayer videoid=6}

 

 

 

 

Hardware outputs (binary, DAC, PWM) manipulation thourgh Server API. (ru)

Hardware outputs (binary, DAC, PWM) manipulation thourgh Server API.

 

There are 3 ways to manipulate myCNC control board Hardware outputs through Serve API:

  1. Direct manipulation through commands "SetHWBinaryOutput", "SetHWDAC", "SetHWPWM"
  2. Manipulation through running PLC procedure with Hardware Outputs manupulation.
  3. Manipulation thourgh running short G/M-codes program

 

Direct Manipulation.

Command Description
SetHWBinaryOutput

SetHWBinaryOutput <Port number> <Port value>
Port Number is number binary port. Range is 0...159
Set Port value - "1" to turn ON binary output (relay, open collector), "0" to turn OFF binary output

Example:

SetHWBinaryOutput 0 1 <Turn ON binary output #0>
SetHWBinaryOutput 1 1 <Turn ON binary output #1>
SetHWBinaryOutput 23 1 <Turn ON binary output #23>
SetHWBinaryOutput 0 0 <Turn OFF binary output #0>
SetHWBinaryOutput 1 0 <Turn OFF binary output #1>
SetHWBinaryOutput 19 0 <Turn OFF binary output #19>

   
SetHWPWM

SetHWPWM <PWM channel> <PWM value>
PWM channel is number of PWM pin. Software range is 0...3, however rela number of PWM channels depends on myCNC Ethernet controller model. Controllers ET1, ET3, ET5 contain 3 PWM pins.
PWM value.

Example:

SetHWPWM 0 2000 <Set value "2000" to PWM#0 (PWM1). Max PWM value is 4095>
SetHWPWM 0 0 <Set value "0" to PWM#0 (PWM1). Max PWM value is 4095>
SetHWPWM 2 3500 <Set value "3500" to PWM#2 (PWM3). Max PWM value is 4095>
SetHWPWM 1 4095 <Set value "4095" (Maximum) to PWM#1 (PWM2). Max PWM value is 4095>
   
 SetHWDAC

SetHWDAC <DAC channel> <DAC value>
DAC channel is number of DAC pin. Software range is 0...1, however real number of DAC channels depends on myCNC Ethernet controller model. Controllers ET1, ET3 contain 1 DAC pins, Controllers ET5 contains 6 DAC pins.


Example:

SetHWDAC 0 1000 <Set value "1000" to DAC#0 (DAC1). Max DAC value is 4095>
SetHWDAC 0 0 <Set value "0" to DAC#0 (DC1). Max DAC value is 4095>
SetHWDAC 1 4095 <Set value "4095" (Maximum) to DAC#1 (DAC2).
   

 

Manipulation through PLC procedure.

Server API command "RunPLC" loads and runs PLC procedure on myCNC controller end with given parameter. We can run PLC procedure that manipulates Hardware outputs to get similar result.
Normally every profile configuration contains PLC procedures for Hardware outputs manipulation :

PLC procedure Syntax
M62

M62 <Parameter>
Turn ON binary output pin with given number (Parameter=Port number)

Example:

M62   1 <Turn ON binary output #1>
M62   0 <Turn ON binary output #0>
M62   15 <Turn ON binary output #15>

   
M63

M63 <Parameter>
Turn OFF binary output pin with given number (Parameter=Port number)

Example:

M63   1 <Turn OFF binary output #1>
M63   0 <Turn OFF binary output #0>
M63   15 <Turn OFF binary output #15>
   
DAC

DAC <Parameter>
low 12 bits (11...0) contains value of DAC to be written, bits (14..12) contains DAC channel

Example:

DAC 0 <Set value "0" to DAC#0 (DAC1). Max DAC value is 4095>
DAC 0x0600 <Set value "0x600" (1536) to DAC#0 (DAC1). Max DAC value is 4095>
DAC 0x1400 <Set value "0x400" (1024) to DAC#1 (DAC2). Max DAC value is 4095>
DAC 0x1000 <Set value "0" to DAC#1 (DAC2). Max DAC value is 4095>
   
PWM

PWM <Parameter>
low 12 bits (11...0) contains value of PWM to be written, bits (14..12) contains PWM channel

Example:

PWM 0 <Set value "0" to PWM#0 (PWM1). Max DAC value is 4095>
PWM 0x0600 <Set value "0x600" (1536) to PWM#0 (PWM1). Max PWM value is 4095>
PWM 0x1400 <Set value "0x400" (1024) to PWM#1 (PWM2). Max PWM value is 4095>
PWM 0x2000 <Set value "0" to PWM#2 (PWM3). Max PWM value is 4095>

 

Examples to run PLC procedures through Server API shown in a table below

   
Binary input manipulation

RunPLC   M62  1 <Turn ON output#1>
RunPLC   M62  0 <Turn ON output#0>
RunPLC   M63  3 <Turn OFF output#3>
RunPLC   M63  5 <Turn OFF output#5>

   
PWM control

RunPLC  PWM  0x1350  <Write to PWM#1 (PWM2) value 0x350>
RunPLC  PWM  0x250    <Write to PWM#0 (PWM1) value 0x250>
RunPLC  PWM  0x2800  <Write to PWM#2 (PWM3) value 0x800>
RunPLC  PWM  0x0       <Write to PWM#0 (PWM1) value 0>
RunPLC  PWM  0x1000  <Write to PWM#1 (PWM2) value 0>
RunPLC  PWM  0x2000  <Write to PWM#2 (PWM3) value 0>

   
 SetHWDAC RunPLC  DAC  0x1570  <Write to DAC#1 (DAC2) value 0x570>
RunPLC  DAC  0x800    <Write to DAC#0 (DAC1) value 0x800>
RunPLC  DAC  0x0       <Write to DAC#0 (DAC1) value 0>
RunPLC  DAC  0x1000  <Write to DAC#1 (DAC2) value 0>
   

 

{avsplayer videoid=4}

 

Manipulation through running G-codes.

Server API command "SinglePlay"  run G-code line (or a number of G-code lines divided by symbol ";" ).
It's possible to control binary outputs by running M-functions "M62", "M63". P-parameter set binary output number to control.

M-code Syntax
M62

M62 P<number
Turn ON binary output pin with given number

Example:

M62   P1   <Turn ON binary output #1>
M62   P0   <Turn ON binary output #0>
M62   P15 <Turn ON binary output #15>

   
M63

M63 P<number>
Turn OFF binary output pin with given number.

Example:

M63   P1   <Turn OFF binary output #1>
M63   P0   <Turn OFF binary output #0>
M63   P15 <Turn OFF binary output #15>
   

 Any custom PLC function can be written and assigned to M-code, then loaded through CNC Server API.

 

{avsplayer videoid=5}

 

 

 

How to change Scale and Rotation Angle. (ru)

How to change Scale and Rotation Angle.

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"
Format: ProgramFileOpen <filename>
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=3}

 

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

{avsplayer videoid=1}

 

 

 

Puruvesi Automation
78 George St #204, Ottawa, ON K1N 5W1, Canada

+1 613 413 2223
sale@pv-automation.com
About
  • About Us
  • Global Reach
  • Our Projects
  • Blog
Technical Support
  • Contact Us
  • Documentation
  • FAQ
© 2013 - 2025 Puruvesi Automation. All rights reserved.