API Manual

API Manual

Postby tdb8904 » 25 Jun 2016, 03:04

Is there any way to get the API manual so that I might be able to program the machine to do different jogs automatically using C# programming language?
tdb8904
 
Posts: 3
Joined: 08 Jun 2016, 17:05
Controller: Probotix Mk1

Re: API Manual

Postby Support » 27 Jun 2016, 07:21

You can use C#,VB... for creating your own application.
Yes, API is available:

viewtopic.php?f=16&t=824 (see bottom files)

Please follow these steps for quick start with PlanetCNC API (for using example):

1. Download API files from this link:
download/file.php?id=696 (C#)

2. Extract files to dedicated project folder

3. Start Visual Studio: File/Open → Project/Solution → CNCUSBControllerAPI_CSharp.csproj
Software may ask you for upgrade (it depends on which software version are you using).

4. In your project folder software will create “Backup” folder and backup file. Delete them.

5. Click Build/Rebuild solution. Error is expected.

6. Copy/paste files from install folder of CNC USB controller software(PlanetCNC software should be instlled) into BIN/Debug folder of your project folder: .lic, .dll, .var, .keys, .settings

7. Click View/Solution Explorer and click “References“(see image)
You will notice there is an exclamation point next to CNCUSBController API reference. Right click to this reference and click Remove.

8. Right click on the main “Reference” → Add reference → browse and add CNCUSBController API.dll file from your project/BIN/Debug folder.

Click Rebuild and if you get error do this:
Change lines "cnc.SendOutput(o);" into "cnc.SendOutput((int)o, PlanetCNC.API.OutputEnum.On);"

You should be able to start .exe file of API example located in BIN/Debug folder

Unfortunately we do not have API documentation ready, but we have it planned for future.

Best regards,
Team PlanetCNC
Support
 
Posts: 2571
Joined: 07 Apr 2014, 17:39
Controller: Many controllers


Return to DIY



Who is online

Users browsing this forum: No registered users and 1 guest