Bank account | Technical support | Worldwide



更多
Wifi Remoter
Description:
Model:PHB04
Size:183*100*30mm

Programming CNC remoter PHBX.DLL introduction
 

Overview
The cnc system is used more and more widely.To satisfy  various  CNC system and facilitate user to use our remoter.we provide the standard PHBX.DLL interface to CNC. 
 
PHBX.DLL only support windows platform now.
The Cnc system connects our remoter through the PHBX.dll interface.PHBX.dll is responsible for data transmission with our HBX remoter.then they will communicate each other.

A:  Programming steps
You should connect the phbx.dll as follows:
a) Load phbx.dll.
b) Call  Xinit      function to initialize device.
c) Call  Xopen     function to open device.
d) Call  XSend     Output function to download displaying data to the remoter
e) Call  XGetInput  function to receive key data.
f) Call  XClose     function to close device when cnc system exit

B. Programming interface
2. Initialize function
Void Xinit(void) 
2.   Open device function
Int  XOpen (HWND hwndwnd)
3.   input:handle of main windows of cnc system 
return : 0 - successful
not zero refer to error code.

   write device function:
int  XSendOutput (char *pBuff, char *pSize)
input: pBuff :buffer of write data
psize:buffer length
return : 0 - successful
not zero refer to error code.
buffer of write data should been writed as format as following:
work coordinate+ machine coordinate +feed actual value+spindle actual value+feed preset value+spindle preset value+step value
all  data  is  expressed  as  string  and  connected  as  “:”
work coordinate:current work coordinate of x,y,z,a,(domain:“9999.999”-“0.000”)
Format: X :Y: Z:A
Gap with “:”
machine coordinate:current machine coordinate of x,y,z,a,(domain:“9999.999”-“0.000”)
Format: X :Y: Z:A
Gap with “:”
      The string must be format as float or double at least one dot.
For example :”0.0”; it is illegal if you input “8”.you should change it to “8.0”

Feed speed:include preset and actual value(domain:”9999”-“00”)
It is integer,for example:”8”,you can not input “8.0”
Spindle speed: include preset and actual value(domain:”9999”-“00”)
It is integer,for example:”8”,you can not input “8.0”

step(mm/inch): it is one step of movement.
Step is limited as following:
                0/0.1/0.2/0.3/0.4/0.5/1/5/10

Write data example:
“9999.91:9990.01:0.01:0.0:8888.82:3456.67:0.02:0.0: 2000:3000:4000:5000:10”

X work coordinate:9999.91,X machine coordinate: 8888.82
A:  work coordinate 0  A machine work coordinate 0
Feed actual value:2000  preset value:4000
Spindle actual value:3000 preset value:5000
Step:10
 
   Receive key function:
    Int  XGetInput (char * pHeader,char * pCount)
   
pHeader: pBuff :buffer of write data
pCount:buffer length
return : 0 - successful
not zero refer to error code.
    
             the remoter will filled data as format as following:
            
             4bytes:remoter key1+ remoter key2+ band key+wheel data

                example:
                0x01 0x00 0x11 0x01
                The key 01 is pressed,0x11 band switch ON, wheel has data positive 01.
                0x00 0x00 0x11 0xff
                No key is pressed, 0x11 band switch ON,wheel has negative  -1
                0x00 0x00 0x00 000
                No key is pressed, band switch off, wheel has no data.
                  
 Close device function
long XClose ()
input:
return : 0 - successful
not zero refer to error code.

C.   Error code:
 100:USB is not opened or lost
 101:USB wirte error
 102: USB read error
 103: parameter error

D.  demo
We provide vc and vb.net demo.user could link phbx.dll into their cnc system as demo.

E.order information 
 
Now we provide two types of remoter with dll support.
Our DLL library currently supports three kinds of CNC remote control


1. Type:PHB04
PHB04-remote control, the remote control is a powerful; With a pulse generator; programmable key switches; programmable band switch; Pulse generator, aluminum structure; long life, high performance; Support feed and spindle speed display.
PHB04 remote control, used in engraving machines and other CNC machines
For example: MACH3 engraving system.

 

When the band switch positioned to 5 # and 6 # position, then switch to the feed and spindle speed display.
As shown below: 
Users can use the DLL libraries, the feed and spindle speed value is passed to the remote control display
 

2. Type:PHB04S
PHB04-S remote control, without MPG function; is to provide a low cost solution
PHB04-S remote control can be used in the engraving machine, cutting machine, etc.
For example: MACH3 engraving system.

 
When the band switch positioned to 5 # and 6 # position, then switch to the feed and spindle speed display. As shown below: 
Users can use the DLL libraries, the feed and spindle speed value is passed to the remote control display
 
 


3. Type:PHB05-S
   PHB05-S  remote control, is a low-cost remote control; applications in laser cutting, water jet cutting and other NC system. The remote control does not support the feed and spindle speed display.