Table Of ContentApplication Note #4419
Using Indusoft Web Studio™ with Galil ActiveX Controls
Introduction
This application note provides a simple example for communicating to a Galil DMC-
1830 controller through Indusoft Web Studio v5.1. In order to access Galil controllers
through Indusoft, the user must use the Galil ActiveX controls. The example described
below can be run in Windows NT 4, 2000, or XP. In the future, Indusoft will have their
own Galil driver that will eliminate the need for the ActiveX tools. Also, the Indusoft
driver will provide compatibility in Windows CE as well as the operating systems listed
above. The Galil ActiveX tools used for the application below will not operate in
Windows CE.
Installation
1. Install both the Galil ActiveX toolkit (DMCOCX) and a standard
communication interface like DMC Terminal or DMCWIN32. Once
DMCOCX has been installed, run the REGOCX utility to register all the
ActiveX controls. Also, install Indusoft Web Studio v5.1.
2. If the controller is BUS based (i.e. DMC-17x0, DMC-18x0, etc.) power down
the PC and install the controller in an available BUS slot. Otherwise, connect
the controller to the PC with the appropriate cable (USB, Serial or Ethernet).
3. Run the Galil Terminal software and add the controller to the registry if
necessary. See the controller manual for the installation procedure. Establish
communication to the controller through the terminal software to verify that the
driver is working properly. Disconnect from the controller after verifying
reliable communication.
- 1 -
Galil Motion Control, Inc. • 3750 Atherton Road • Rocklin, CA 95765 USA • 800-377-6329 • Ph: 916-626-0101 • Fax: 916-626-0102 • www.galilmc.com
Project Creation
1. Starting a New Indusoft Project
Open up Indusoft Web Studio and click on the File1 menu to create a “New Project”.
Click on the Project tab in the pop-up window and enter the “Application name:” and
“Location:” for the project. For this example, “CEView Standard” should be chosen
as the “Target platform:”.
Figure 1. New Project Window
1 Throughout the text, Indusoft screens, windows, function tabs, workspace components and icons will be
shown in Bold. Menu items, tagnames, folder names, window options, toolbar items and user-defined text
will be written in “quotes”.
- 2 -
Galil Motion Control, Inc. • 3750 Atherton Road • Rocklin, CA 95765 USA • 800-377-6329 • Ph: 916-626-0101 • Fax: 916-626-0102 • www.galilmc.com
After clicking “OK” in the New window, a Project Wizard window will appear.
Choose the settings in that window according to Figure 2. Click “OK” when finished.
Figure 2. Project Wizard Window
Under the Workspace section on the left of the Indusoft development screen, click
the Graphics tab and right click on the “Screens” folder. “Insert” a new screen and a
dotted white grid will appear to the right.
- 3 -
Galil Motion Control, Inc. • 3750 Atherton Road • Rocklin, CA 95765 USA • 800-377-6329 • Ph: 916-626-0101 • Fax: 916-626-0102 • www.galilmc.com
2. Adding the Components
To add ActiveX components to the screen, click on the button labeled “OCX” on the
right edge of the development screen. The following window will appear.
Figure 3. ActiveX Tool List
- 4 -
Galil Motion Control, Inc. • 3750 Atherton Road • Rocklin, CA 95765 USA • 800-377-6329 • Ph: 916-626-0101 • Fax: 916-626-0102 • www.galilmc.com
Add a DMCShell Control, a DMCTerminal Control, a DMCPoll Control and a
DMCAnalog Control to the screen. Also, add three buttons to the screen. Arrange
and resize the components to look like Figure 4.
Figure 4. Screen1 Layout
At this point, it may be wise to click on the File menu and save the screen as
Screen1.
- 5 -
Galil Motion Control, Inc. • 3750 Atherton Road • Rocklin, CA 95765 USA • 800-377-6329 • Ph: 916-626-0101 • Fax: 916-626-0102 • www.galilmc.com
To ensure that Screen1 is the screen that opens first when the application is executed,
got to the Project menu in the Indusoft development environment and click
“Settings”. In the Project Settings window, click on the Runtime Desktop tab and
type “Screen1” in the “Startup Screen:” box.
Figure 5. Project Settings Window
To have menu option on the runtime screen, check the “Menu” box in the Project
Settings window and then click on the “Options…” button. Configure the Runtime
menu options window as shown in Figure 6.
Figure 6. Runtime Menu Options Window
- 6 -
Galil Motion Control, Inc. • 3750 Atherton Road • Rocklin, CA 95765 USA • 800-377-6329 • Ph: 916-626-0101 • Fax: 916-626-0102 • www.galilmc.com
3. Configuring the ActiveX Tools
Next, right click on the DMCShell Control and select “Properties”. The Object
Properties window will appear as shown in Figure 7.
Figure 7. Object Properties Window
Click the “Properties” button and make sure that the “DMCController:” number is the
one to be accessed from the Galil Registry. The default controller number is 1.
Figure 8. DMCShell Properties
Repeat this process for the DMCTerminal Control.
- 7 -
Galil Motion Control, Inc. • 3750 Atherton Road • Rocklin, CA 95765 USA • 800-377-6329 • Ph: 916-626-0101 • Fax: 916-626-0102 • www.galilmc.com
For the DMCAnalog Control set the “DMCAnalogInput:” to one, and add the
“Caption:” “Analog Input 1”. This DMC Analog Control will display the voltage of
analog input 1 at a “DMCPollInterval:” of 500 samples per update (500msec for
TM1000).
Figure 9. DMCAnalog Properties
Under the DMCPoll Control properties, select “0-Standard” as the
“DMCPollMethod:” and “TEX” as the “DMCCommand:”. The “Caption:” for the
DMCPoll Control should read “X-Axis Position Error”.
Figure 10. DMCPoll Properties
- 8 -
Galil Motion Control, Inc. • 3750 Atherton Road • Rocklin, CA 95765 USA • 800-377-6329 • Ph: 916-626-0101 • Fax: 916-626-0102 • www.galilmc.com
4. Configuring the Buttons
The button in the upper right of the Indusoft development screen needs to be labeled
as an exit button. Right click on it, go to “Properties” and add the “Caption:” “Exit”.
Figure 11. Exit Button Properties
Also, add the “Caption:” “Jog X-Axis at 5000” to the button below the DMCPoll
Control, and add the “Caption:” “Stop Jog” to the button below that. The
development screen should then look like Figure 10.
Figure 12. Fully Labeled Development Screen
- 9 -
Galil Motion Control, Inc. • 3750 Atherton Road • Rocklin, CA 95765 USA • 800-377-6329 • Ph: 916-626-0101 • Fax: 916-626-0102 • www.galilmc.com
The Exit button must be formatted to exit out of the runtime environment. Highlight
the Exit button by left clicking on it, and click on the icon that looks like a computer
mouse in the right toolbox of the development screen. Next, right click on the Exit
button and go to “Properties”. Select “On Down” from the pull down menu in the
upper right corner of the Object Properties window. In the first “Expression” box
type in the following:
XSet(“DMCShell1”,”DMCConnect”,”False”)
The XSet function call is a utility within Indusoft for setting a value (”False”) to the
property (“DMCConnect”) of the ActiveX object (“DMCShell1”). This particular
call ends communication with the controller. The other ActiveX calls within Indusoft
are XGet and XRun. For more information, see the Indusoft documentation.
In the second “Expression” box, add the text “Shutdown()”. This command will
shutdown and exit the Indusoft runtime screen. Figure 13 shows the Object
Properties window for the Exit button.
Figure 13. Configuration Properties for the Exit Button
Repeat the configuration process for the X-Axis Position Error button, but use the
following function in the “Expression” box instead:
XSet(“DMCShell1”,”DMCCommand”,”JG5000;BGX”)
This function will send the commands JG5000;BGX to the controller. The Object
Properties window for the X-Axis Position Error button should look like Figure 14.
Figure 14. Configuration Properties for the X-Axis Position Error Button.
- 10 -
Galil Motion Control, Inc. • 3750 Atherton Road • Rocklin, CA 95765 USA • 800-377-6329 • Ph: 916-626-0101 • Fax: 916-626-0102 • www.galilmc.com
Description:through Indusoft, the user must use the Galil ActiveX controls Figure 7. Object Properties Window. Click the “Properties” button and make sure that the “DMCController:” click on the “Math” folder and “Insert” a math screen.