Our USB Interface Boards use this software to control the CNC Machine. The Planet-CNC software has a broad range of features including the ability to control various configurations, up to 6 axes, a large viewing area, easy jogging and a nice g-code viewer all on the main screen.

  1. Planet Cnc Compatible Format Codedigishara Download
  2. Planet Cnc Compatible Format Codedigishara Tool
  3. Planet Cnc Compatible Format Codedigishara Free
  1. The thing came with some USB Controller Software by planet CNC and claims to be 'Mach3' compatible; however, the latest version of the USB Controller Software (I think it's called TNG2 or something) doesn't work with the JP-382C controller, and the Mach3 software I downloaded doesn't seem to interact with it either.
  2. Last visit was: Tue Jan 19, 2021 11:47 am. It is currently Tue Jan 19, 2021 11:47 am.
I plan to add this kind of chinese MPG ( wireless WHB03, WHB04 and wired HB04, HB03 ) to Planet CNC and reveal some technical details for other who want to use it where they want...
First of all both of this device ( include wireless version ) looks in system like a HID device ( really two HID device one for read data... and another one for sending DRO through HID SetFeature request ).
Photos:
WHB03 HB03 Format( it designed for NCStudio )
WHB04 HB04( it designed for Mach3 )
WHB04
whb04.jpeg (8.49 KiB) Viewed 33483 times

USB VID & PID
Planet Cnc Compatible Format CodedigisharaFile
Code: Select all
WHB03:
VID: 0x10CE
PID: 0xEB6E
WHB04:
VID: 0x10CE
PID: 0xEB70

How can we know which of this two HID devices for read and which write ?
To select correct hid device you need check input report length field.. if this field is 6 it is our READ hid... and if feature report length is 8 it is our WRITE device... this is correct for BOTH device...
How to read device data ?

Planet Cnc Compatible Format Codedigishara Download


When you push the button... or spin the wheel... device send data to READ hid... and data format is:
Code: Select all
#pragma pack( push, 1 )
struct whb0x_in_data
{
uint8_t rep_id;
uint8_t btn_1;
uint8_t btn_2;
uint8_t wheel_mode;
int8_t wheel;
uint8_t xor_day;
};
#pragma pack( pop )

rep_id - it is our report ID ( value is 4 for both device )
btn_1 & btn_2 - button code... you can push TWO simultaneously...
wheel_mode - mode of handwheel ( you can choose it with positional switcher near to wheel )
Code: Select all
0x00 - position switch to off state
0x11 - position switch to X state
0x12 - position switch to Y state
0x13 - position switch to Z state
0x15 - position switch to Spindle speed state
0x14 - position switch to Feedrate speed state
0x18 - position switch to Processing speed state ( A-axis for HB04 )

wheel - it is direction and speed of wheel... when we spin wheel to CW dir it will be positive from 1 to 10 ( maybe little more... and this value based on current spin speed ) and when spin wheel to CCW value be negative from -1 to -10 ( based on spin speed too )
xor_day - very intersting value... it is a crypted DAY OF THE MONTH this value settable with HID Set Feature and used as key for simple XOR crypt what used for very easy protection of they protocol...
how to resolve real day value ?
Code: Select all
day_value = btn_1 ^ xor_day;

Thats all i think...
How to write device data ?
All data writen to writable HID with HID Set Feature request... all data divided in 8 byte blocks and sent to device...
Data structure for both model's ( little difference in postition but all other is same )
Code: Select all
#pragma pack( push, 1 )
struct whb03_out_data
{
/* header of our packet */
uint16_t magic;
/* day of the month .. funny i know*/
uint8_t day;
/* work pos */
uint16_t x_wc_int;
uint8_t x_wc_frac;
uint16_t y_wc_int;
uint8_t y_wc_frac;
uint16_t z_wc_int;
uint8_t z_wc_frac;
/* machine pos */
uint16_t x_mc_int;
uint8_t x_mc_frac;
uint16_t y_mc_int;
uint8_t y_mc_frac;
uint16_t z_mc_int;
uint8_t z_mc_frac;
/* speed */
uint16_t feedrate_ovr;
uint16_t sspeed_ovr;
uint16_t feedrate;
uint16_t sspeed;
uint8_t step_mul;
uint8_t state;
};
struct whb04_out_data
{
/* header of our packet */
uint16_t magic;
/* day of the month .. funny i know*/
uint8_t day;
/* work pos */
uint16_t x_wc_int;
uint16_t x_wc_frac;
uint16_t y_wc_int;
uint16_t y_wc_frac;
uint16_t z_wc_int;
uint16_t z_wc_frac;
/* machine pos */
uint16_t x_mc_int;
uint16_t x_mc_frac;
uint16_t y_mc_int;
uint16_t y_mc_frac;
uint16_t z_mc_int;
uint16_t z_mc_frac;
/* speed */
uint16_t feedrate_ovr;
uint16_t sspeed_ovr;
uint16_t feedrate;
uint16_t sspeed;
uint8_t step_mul;
uint8_t state;
};
#pragma pack( pop )

About main fields:
magic - magic value indicate what it is a first packet and it is always 0xFDFE
day - day of the month ... it will read back from readable HID... as we talk before... you can use it for your own needs..
#_wc_int - it is integer part of position... as example if position 135.17 we must fill it with value 135... and if our position is -77.89 we must put value 77 to this var... ( we always put POSITIVE value to this value )
#_wc_frac - it is 8bit for WHB03 and 16bit for WHB04 ... it is simple whan you look two display max frac part for WHB03 it is .99 and for WHB04 it is .9999 ... this value also have a SIGN bit if value is negarive you must set most significant bit to 1... little example:
WHB03
our X position is: -117.33
we put 117 to x_wc_int
Planet cnc compatible format codedigishara pdfwe also put 33 to x_wc_frac
we have negative value... we also need to set most significant bit of x_wc_frac to 1...
Code: Select all
x_wc_frac = x_wc_frac | 0x80;

WGB04
our X position is: -220.3345
we put 220 to x_wc_int
we also put 3345 to x_wc_frac
we have negative value... we also need to set most significant bit of x_wc_frac to 1...

Planet Cnc Compatible Format Codedigishara Tool

Code: Select all
x_wc_frac = x_wc_frac | 0x8000;

feedrate_ovr - our fedrate override value... just put something
sspeed_ovr - display our speed override value...
feedrate - current feedrate
sspeed - current speed
step_mul - it is step multiplier for our wheel... if we change it in software we can show this value to user...
Code: Select all
low nibble
0x00 - 0*1x
0x01 - 1*1x
0x02 - 5*1x
0x03 - 10*1x
0x04 - 20*1x
0x05 - 30*1x
0x06 - 40*1x
0x07 - 50*1x
0x08 - 100*1x
0x09 - 500*1x
0x0A - 1000*x
hi nibble ( can be combined with low )
0x10 - back to original
0x20 - floating on the knife(?)
0x50 - back to mechanical origin
0x60 - fine adjastment

it does not change wheel value from readable HID... it is just to notify user...
state - this is state value... used to notify user of state of our machine or if you need something from user...
Code: Select all
0x01 - Run state blink
0x02 - Pause state blink
0x80 ( 0x40) - flash yes/no leds ( only for WHB03 ? )

To send data you need to split it in 7 bytes blocks ( if latest block less than 7 you need add padding to it ) add first byte to this block it be report ID ( value must be 6 ) and then send it trought set feature request...
as example:
Code: Select all
our data is
00 01 02 03 04 05 06 07 08 09
we send it as
[06] 00 01 02 03 04 05 06
[06] 07 08 09 [00] [00] [00] [00]

[] - it added data
Power saving
After 30 seconds, device go to sleep mode ( screen will not update! )...
------------------------------------------------------------------------------------------------------
I think this information will useful for anyone who want to use this MPG with your own project and so on...
I already create some demo project to use this MPG with PlanetCNC... i will publish it soon as i make it more stable for testing... thnax
p.s: if anyone have a (W)HB04 ... PM me please

Planet Cnc Compatible Format Codedigishara Free

If you’re venturing into the world of CNC and CAM manufacturing, or are just looking into beginners CNC kits, you may well have heard of the term “G-code”. G-code is a programming language for computer numerical controlled (CNC) machines. In this short guide, we’ll introduce you to the basics of G-code, and how to start using it. (Spoiler alert: unlike some other programming languages, you won’t have decipher the meaning of all the letters and digits of G-code to use CNC; you only need to choose the right CAM program to generate it for you!)

How is G-code used in CNC machining?

CNC machinists use G-code to instruct CNC machines where and how to move. The code dictates which direction the machine should move in, how fast it should move, how deep it should cut, and so on. The instructions are described using Cartesian coordinate locations (e.g. two units left and three units up.)

To begin with, an initial block of material will be loaded into the machine. Then, following the instructions given by the G-code, the cutting tool cuts away material from the block to produce the finished product.

G-code is one of the most widely used programming languages used to control automated machine tools. Most CNC machines execute G-code, although other CNC languages exist, such as Heidenhain, Mazak, and other proprietary formats.

CNC machinists can either write G-code from scratch, modify existing G-code, or generate G-code using CAM software. CAM software can generate G-code from either images or CAD files. In today’s extensive CAD industry, there are also CAD editing programs that automatically convert CAD files into G-code. There are also richly-featured G-code editors that can be used to simulate G-code, or to translate G-code into conversational CNC.

An example of a CNC editor, where CAM programmers can edit G-code before manufacturing

How to read and write G-code

A typical line of G-code is quite cryptic for newcomers – it takes years for a CNC machinist to master the language. Whilst the entire language is referred to as G-code, technically speaking a ‘code’ refers to just a single instruction in the language. Each ‘code’ consists of a letter address and a number, and gives a specific instruction to the machine.

Most lines of G-code will begin with the letter G – hence why the language got the name! This is because the letter G signifies preparatory codes. They tell the machine which kind of motion is required, or which offset values to use. The codes beginning with G are therefore almost always found at the start of a line of G-code. G00, for example, tells the machine to move at maximum speed, while G02 tells it to move in a clockwise, circular motion.

Try and read this snippet of G-code! It’s a simple drawing of straight lines

Not all G-codes start with the letter G!

Whilst codes beginning with G are extremely common, all 26 letters of the alphabet are used in G-code. S, for example, defines speed, while F defines feed rate. There are some other important basics to know, such as:

  • The letter X controls the horizontal position or X-axis of the machine
  • The letter Y controls the vertical position or Y-axis of the machine
  • The letter Z controls the depth or Z-axis of the machine
  • The numbers next to these letters determine the distance moved by the machine

You can view a full list of standard G-codes here. Be aware, however, that codes vary by machine type, make, and model.

G-code File Types supported by Scan2CAD

There are dozens of known G-code file extensions. Which file type your CNC machine will support depends on its setup, as well as the make and model. Scan2CAD supports three of the most popular G-code file types – .CNC, .NC and .TAP. The latest release of Scan2CAD, v9, allows you to directly export a vector image file to G-code file format. Now, you can convert scanned sketches and images to vector using Scan2CAD, before saving it as G-code. These files can then be transferred to a CNC machine and used for production.

The CNC Export dialog in Scan2CAD provides you with a range of options:

  • G-code Bezier options – cubic splines (G-code G05), arcs (G-code G02/G03) or polylines (G-code G01). If you select polylines, Bezier curves will be broken into straight-line segments
  • Arc and circle rotation – clockwise or anti-clockwise
  • Z-settings – various parameters relating to the cutting of the exported vectors
  • Scale settings – the relation between vector points and a distance in real-life – e.g. two points on a vector image could represent an inch

The CNC Export Settings dialog box in Scan2CAD. There are four different settings which can be defined.

Recommended reading: