UC300/400ETH communication protocol

This Section is for users to discuss hardware

UC300/400ETH communication protocol

Postby ups » Wed Sep 06, 2017 7:44 pm

Hi,

I have a special application that is not covered by standard CNC software like Mach3/4 and I want to control UC300/400ETH from a custom C# application. Do you have any kind of protocol documentation available? How does UCCNC or your Mach3/4 plugins communicate with the motion controller? Just plain G-Code over some kind of TCP/IP connection or is there some "magic" involved?

Thanks
Mike
ups
 
Posts: 2
Joined: Wed Sep 06, 2017 7:34 pm

Re: UC300/400ETH communication protocol

Postby cncdrive » Wed Sep 06, 2017 9:27 pm

There is no publicly available motion control library for our motion controllers, but we already working on making the API documentation available.
The API is basicly a native C++ library, it is the same .dll file which installs with the UCCNC, it is the UC100.dll file and it contains all communication functions,
the UCCNC makes all communications to the motion controllers through the functions of that .dll.
And the UCCNC.exe is also written in C#, so we already have a C# wrapper for the native API library, it is basicly a bunch of DLLimports to the functions in the API .dll file.

The API does not send g-codes, but using a lower level of communication.
You can List the devices, Open the devices, Configure and set parameters of the devices, send linear and circular interpolation datas to the devices, manipulate I/Os directly and many other things like these.

As said unfortunately the documentation is not ready yet and without that we can't give support for the API, because it is complex, so it would give us too much work if we have to support the API without the documentation. So, if you will want to use our API then you will have to wait a few weeks until we finish the documentation.
What we will release is the API .dll file, C++ .h header file, the C# wrapper (later also a VB wrapper) and the documentation which contains the functions prototypes with description of the functions and the parameters and some examples.
I'm attaching a printscreen of the first page of the API documentation to let you have an idea about how it will look like.
Attachments
UCAPI_firstpage.png
cncdrive
Site Admin
 
Posts: 2187
Joined: Tue Aug 12, 2014 11:17 pm

Re: UC300/400ETH communication protocol

Postby ups » Thu Sep 07, 2017 2:00 pm

Thanks for your detailed and quick response. I was hoping that you plan to offer such an API for your products and I realy look forward to the release.

One question regarding the features of the API: Do you have something like "position reached" events or do you poll the current position to detect position reached state?
ups
 
Posts: 2
Joined: Wed Sep 06, 2017 7:34 pm

Re: UC300/400ETH communication protocol

Postby cncdrive » Thu Sep 07, 2017 2:43 pm

There is a GetStatus function which returns a structure which structure holds several different properties of the controller including if there is motion, or dwell or homing etc. is going on and you can also read how much data (motion) is currently loaded into the motion buffer, so you will know if there is still motion and if there is still to be executed data in the motion buffer and you can also know which motion is currently being executed from the motions you loaded into the buffer, you know that from the value of the CurrentID which gives back the ID number of motion command currently being executed. You can give an ID to every commands you fill into the motion buffer...

Code: Select all
GetStatus
To query the status of the different controller states.

Syntax
int GetStatus(Stat * _Stat)

Parameters
_Stat [Inp]      
bool   Idle;         
bool   Jog;         
bool   Dwell;         
bool   Backlash;      
bool   Home;         
bool   Probe;         
bool   Estop;         
bool   SoftLimit;      
bool   HardLimit;      
int   Puffer;         
double   Feed;         
double   SpindleRPM;      
int   CurrentID;      
bool   LimitOverride;      
double   ProgrammedFeed;   
bool   MPG1JogOn;      
bool   MPG2JogOn;      
bool   THCOnWaiting;      
bool   SyncThread;      
bool   SpindleOn;      
bool   SpindleDir;      
bool   LaserRunning;      
bool   LDataValid;      
bool   THCOn;      
cncdrive
Site Admin
 
Posts: 2187
Joined: Tue Aug 12, 2014 11:17 pm

Re: UC300/400ETH communication protocol

Postby rsp » Tue Jun 19, 2018 3:43 pm

Could you update me on the status of the API? I am also trying to connect to the controller from C# so any assistance would be greatly appreciated!
rsp
 
Posts: 1
Joined: Tue Jun 19, 2018 3:37 pm


Return to Hardware

Who is online

Users browsing this forum: No registered users and 1 guest