- Linux MultiMedia Studio Computer Accessories User Manual

Mint v4 PC Programming Guide
24
MN1278 05.2001
/*------------------------------------------------*/
/* Toggle it. */
/*------------------------------------------------*/
MILError ( m_pController->setDriveEnable( 0, ( FALSE == b )));
}
3.1.4 Compiling an ATL COM Project with Visual C.
When compiling an ATL COM project in Visual C, define _NO_AFX_. This prevents AFX and MFC files being
included.
3.1.5 RS485 Networks.
Individual controllers on an RS485 network can be accessed from within one application built using the source
code. One CController derived object can be created for each node on the network, and they will share the serial
port. Other applications will not be able to access controllers on the same port.
When using controllers on an RS485 link, remember to call
setHandShakeMode(0)
to disable hardware
handshaking. If there are several CController objects sharing the port,
setHandShakeMode(0)
only has to
be called for one of the controllers.
3.2 All Other Languages : The ActiveX Control ( OCX )
The ActiveX control is known as the Baldor Motion Library. When used, a TMintController object is created.
This can be used with a large number of languages. This section documents the use of the control with Visual
Basic 6 and Delphi 5, but the principle is the same in any language.
3.2.1 The ActiveX Control And The Languages It Can Be Used
With.
The control is a Active X (COM) control. It can be used with any languages that support
Long integers (32 bit signed integers)
Short integers ( 16 bit signed integers)
Floats ( 32 bit floating point)
BSTRs (Visual Basic Style strings)
Pointers to all the above types.
Some languages do not support all of these data types (e.g. WonderWare InTouch does not support short integers
or pointers). For these languages, a ‘wrapper’ COM server may have to be written to convert to types used by the
language. Documentation should be provided with each language on how to perform this.