Find Docs

Galil Motion Control - utilities (Page 2)

Wodocs >> Electronics : Motion Control >> Galil Motion Control utilities Page 2
Galil Motion Control - utilities
S
O
F
T
W
A
R
E
www.galilmc.com
/
Galil Motion Control, Inc.
89
Galil Utilities
C/C++ Programmers Toolkit
Galil's C/C++ Programmers Tool Kit includes DMCWIN
software that provides C libraries (Linux, DOS and QNX
versions are also available), sample programs, utilities,
a complete terminal program, and full documentation.
With this kit, all Galil motion controllers can be pro-
grammed using standard C/C++ compilers including
Borland, Microsoft,Watcom and others.The kit is also
compatible with Galil ActiveX Tool Kit.
Partial DLL API list:
The following represents a partial list from over 60 API
functions.
DMCOpen
Open communications
DMCClose
Close communications
DMCCommand
Send a command
DMCBinaryCommand
Send binary command
DMCDownloadFile
Download a file from hard disk
DMCArrayUpload
Upload an array
DMC.NET API Toolkit
Galil has taken its `C'Application Programming Interface
(API) and ported it to .NET (Framework v1.1).This object
oriented API uses .NET native types to provide a commu-
nication interface to Galil Motion Controllers.It can be
used from any of the VisualStudio.NET managed lan-
guages (VB, C++, C#, J#).
The DMC .NET API includes objects for basic commu-
nications, data record access, array operations, and Galil
registry modifications.Exception based error handling as
well as many other forms of the traditional function calls
are implemented to make the API very versatile and help
reduce programming.Dynamic help files and sample
code are also included.Users of the older `C'API should
find the new .NET version familiar and that it fits more
naturally into the .NET environment.
In .NET, the Galil .NET API objects can be imported
to your project by simply adding a reference to the
DMCdNet.dll class library.The simple VB.NET example
below shows how the DMCAPI object is used to send
"TPX"to the controller and display the response in a
text box.
Imports Galil
'use Galil namespace
Public Class Form1
Inherits System.Windows.Forms.Form
'declare controller object
Dim Controller As DMCAPI
+Windows Form Designer generated code
Private Sub Form1_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
'allocate memory for controller object
Controller = New DMCAPI
'open communications
Controller.apiOpen(1, System.IntPtr.Zero)
'declare response string
Dim sResponse As String
'send command to controller
Controller.apiCommand("TPX", sResponse)
'display response
TextBox1.Text = "X position: " + sResponse
End Sub
Private Sub Form1_Closed(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Closed
'close communications
Controller.apiClose()
End Sub
End Class
#include <windows.h>
#include <Dmccom.h>
long rc;
HANDLEDMC hDmc;
char szBuffer [64];
int main(void)
{
rc = DMCOpen(1,0,&hDmc);
rc = DMCCommand(hDmc,"PR1000;BGX;",szBuffer,
sizeof(szBuffer));
rc = DMCClose(hDmc);
return 0;
}
Example C Program tells the controller
to move the X-axis motor 1000 counts.
DMC.NET API Toolkit

<< Previous       1 2       Next >>



Other Documents:
wsdk, activelife, camalot, mojavaton, smmov, Filter Equiv, note 1410, note 1411, note 1412, eseries brochure, ethernet dmc 21x 2, ethernet emerge, ethernet flight, ethernet horizons, pr 03 30 00, pr 10 1 98, pr 10 20 99, pr 11 30 00, pr 1 13 00, pr 2 18 98, pr 3 11 98, pr 3 2 98, pr 6 15 99, pr 7 1 99, pr 8 29 00, pr 9 13 99, pr 9 9 98, db 28040 qsi, bestvalue, jacob video, icmworksheet, note 1220, note 1222, note 2311, note 2312, note 2319, note 2321, note 2326, note 3311a, note 3312, note 1419, note 1427a, note 2429, note 2438, note 4413, cadtodmc, dmcdos, dmcocx, dmcwin, ecam,


WODocs | |
All rights reserved. wodocs.com© 2009
WODocs


New Docs

Documents Category:
Arts (Design, Movies, Music, Radio, Television)
Automotive (Cars, Marine, Motorcycle, ATV, Snowmobiles)
Business (Biotechnology and Pharmaceuticals, Chemicals, Construction and Maintenance, Materials, Real Estate, Services)
Electronics (Computers, Motion Control, Power Supply)
Games (Board, Family, Party, Card, Construction, RC Toys)
Health (Animalm, Beauty, Healthcare, Medicine, Pharmacy, Surgery, Weight Loss)
Home (Accessories, Cooking, Decor and Design, Electrical, Family, Pets)
News (Newspapers, Sports, Television)
Recreation (Collecting, Hiking, Scouting, Survival, Travel)
Reference (Education, Libraries and Archives, Museums)
Science (Agriculture, Astronomy, Biology, Chemistry)
Shopping (Antiques and Collectibles, Clothing, Flowers, Food, Home and Garden)
Sports (Bicycle, Snowboard, Skiing, Other)