Sunteți pe pagina 1din 2

MacComm OCX file

JVLs MacComm OCX* file makes it easy to develop Windows


software with JVLs MAC motors.

This OCX can be used with well as the Controller SMC75. Besides access to the registers
Windows 95, 98, Me, 2000, XP, Developers do not have to think the OCX also has the following
and makes it easy to communi- about opening and closing the features:
cate with the MAC and RS232 port. Communication is Reset
QuickStep motors and controller taken care of entirely by the Write to flash
SMC75. The OCX enables appli- OCX. The OCX will take care of 3 different customizable
cations to be easily developed in the special MAC protocol with factors for easy data process-
for example: checksum, inverse byte, register ing:
length and register format. You - Position
Visual Basic only have to specify a register - Acceleration
Visual C++ no. to read from, or a register - Velocity
Visual .Net no. and value to write to. In
Delphi Visual Basic the OCX only needs The OCX is supplied on a CD as a
Borland C++ Builder to be added to the controls bar, self extracting installer.
LabView and from there dragged to a
Excel window, and it is ready to use. Order no.: MacCommOCX
or any other environment
supporting OCX controls.

The OCX makes it easy to send/


* MacComm OCX (OLE Custom Controls.
read register values to/from
Also known as ActiveX controls)
MAC and QuickStep motors as

LD0049-04GB Sold & Serviced By:


Date: 24-9-08
ELECTROMATE
Toll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099
www.electromate.com
sales@electromate.com
MacComm OCX file
Placement
The following illustration OCX in a typical implementa- The registers can be read/sent in
displays the placement of the tion: 2 ways:
Direct
Alternative (Using factors for
relevant registers for easy data
processing)
It is possible to control multiple
motors MAC or QuickStep
motors in a single program in 2
ways:
Using addressing on the
motors
Adding multiple instances of
the OCX each controlling their
own COM port (possibly
multiple motors on each
port using addressing)

Installation and Use


The MacComm OCX and required DLLs available in the controls bar 5. Connect it to an Invoke node
are installed automatically by running When put on a form the and use this to call the methods.
Setup.exe and following the onscreen properties page of the object can
prompts. be used to set the startup values Examples of use in Visual Basic:
You have the option to install a Visual for the 2 properties (Retries and Getting Operation Mode (register 2)
Basic sample and a LabVIEW sample ComPort) for MAC motor on address 1:
along with the OCX. MacComm1.ReadParameter(1, 2,
Visual .NET Value)
It can also be done manually by copying 1. In the menu Tools click
the following Microsoft redistributable Customize Toolbox Setting Position (register 3) to 4096
DLLs to the Windows\System folder: 2. Find MacComm OCX Control for MAC motor on address 1:
OLEAUT32.DLL module, and put a checkmark MacComm1.WriteParameter(1, 3,
OLEPRO32.DLL besides it, and click OK 4096)
MacComm.OCX should be placed in a
directory called MacComm in the The MacComm OCX is now Getting Register number for P_IST
Windows folder, and registered with available in the Toolbox value:
RegSvr32 i.e. Regsvr32 When put on a form the ParamNum=MacComm.GetParam
C:\Windows\MacComm\MacComm.ocx properties page of the object can NumFromName(P_IST)
be used to set the startup values
Adding MacComm OCX to the for the 2 properties (Retries and
program ComPort)

Visual Basic 6 LabVIEW 7.0


1. In the menu Projects click 1. Place an ActiveX container on
Components. your Front Panel.
2. Make sure the Selected Items 2. Right click it and select Insert
Only checkbox is NOT selected ActiveX object JVL Industri Elektronik A/S
3. Find MacComm OCX Control 3. Select MacComm Control from Blokken 42
module, and put a checkmark the list. DK-3460 Birkerd, Denmark
besides it, and click OK 4. Connect it to a Property node Tel: +45 4582 4440
and use this to setup the Fax: +45 4582 5550
The MacComm OCX is now properties. E-mail: jvl@jvl.dk www.jvl.dk
Sold & Serviced By:

ELECTROMATE
Toll Free Phone (877) SERVO98
Toll Free Fax (877) SERV099
www.electromate.com
sales@electromate.com

S-ar putea să vă placă și