0% found this document useful (0 votes)
90 views62 pages

Mikrocad Software: User Manual

Uploaded by

Po Ynt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
90 views62 pages

Mikrocad Software: User Manual

Uploaded by

Po Ynt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 62

USER MANUAL MikroCAD Software

Software version: 1.2.x.xx
Document revision: A
Copyright
Copyright © 2015 by LMI Technologies, Inc. All rights reserved.

MikroCAD, LMI Technologies, the company logo, and all product logos are trademarks of LMI
Technologies. Other than to identify this software and publication, individuals or organizations
purchasing the software are not entitled to use LMI Technologies' trademarks without the written
permission of LMI Technologies.

All other trademarks and names mentioned herein are the property of their respective owners. No part
of this document may be reproduced in any form without the written permission of LMI Technologies.
The content of this document is furnished for informational use only, is subject to change without
notice, and should not be construed as a commitment by LMI Technologies. LMI Technologies assumes
no responsibility or liability for any errors or inaccuracies that may appear in the informational content
contained in this document.

No warranties of any kind are created or extended by this document. Any products and related material
disclosed in this document have only been furnished pursuant and subject to the terms and conditions
of a duly executed agreement to license the software. Any warranties made by LMI Technologies with
respect to the software described in this publication are set forth in the License Agreement provided
with the software. LMI Technologies does not and will not accept any financial or other responsibility
that may result from use of the software or any accompanying material including, without limitation, any
direct, indirect, special, or consequential damages. For more definitive information, consult the License
Agreement.

Contact Information
For more information, please contact LMI Technologies.

LMI Technologies, Inc. 1673 Cliveden Ave.


Delta, BC V3M 6V5
Canada

Telephone: +1 604 636 1011


Facsimile: +1 604 516 8368

www.lmi3D.com

MikroCAD Software User Manual 2


End User License Agreement
LMI Technologies SOFTWARE END USER LICENSE AGREEMENT

By agreeing to have any of LMI Technologies Software Products installed on to your computer
equipment and by subsequent use of the Software, you agree to comply with the terms of this general
End User License Agreement (“EULA”) where no specific agreement is in place between LMI Technologies
and the user of the software. If you do not agree to the terms of this EULA, do not install or use the
Software but return it for a full refund. This EULA applies to any upgrades and supplements to the
original Software provided.

1. The Licensed Software is owned and copyrighted by LMI Technologies. The Software is licensed, not
sold, only on the terms of this EULA. Acceptance and installation of the software indicates your
acceptance of the terms and conditions of this EULA.

Upon receipt and installation of the software and payment of the license fee, you will acquire the right to
use the Software in object code form, directly from LMI Technologies although the product may be
distributed by a Value Added Reseller (VAR). You assume responsibility for the selection of the program
to achieve your intended results, and for the installation, use and results obtained from the Licensed
Software.

2. In consideration of your acceptance of the terms and conditions contained in this EULA, LMI
Technologies grants you a non-exclusive license to use the Licensed Software and the associated
documentation for your own needs on one Server. You are not licensed to rent, lease, or distribute the
Software.

3. Title and copyright to the Software, including object code media and documentation, remain with LMI
Technologies. You may not copy, reproduce or make data transmissions, in whole or in part, except as is
necessary for back-up or archival purposes. You may not reverse engineer, translate, disassemble or
decompile the Software, in whole or in part.

4. The license is effective upon acceptance and installation of the Licensed Software and shall continue
until terminated. You may terminate it at any time by destroying the Licensed Software media. LMI
Technologies has the right to terminate this Agreement if you fail to comply with any term or condition
of this EULA. Upon termination you shall stop all use of the Software and return the Licensed Software
and all copies and documentation to LMI Technologies or destroy the Licensed Software and provide
LMI Technologies with a statutory declaration signed by you declaring that the Licensed Software and
the documentation and all copies have been returned or destroyed and the copy of the Licensed
Software on the hard disk has been removed.

5. Copyright and confidentiality of the Software will survive any termination of this EULA in perpetuity.

6. LMI Technologies warrants for a period of ninety (90) days from the date of delivery that the LMI
Technologies Software object code will perform the functions of the Software as set out in any LMI
Technologies Software Reference Material in effect on the date of delivery.

Except for the warranty stated herein, LMI Technologies disclaims all warranties with regard to the
Software, including the implied warranty of merchantability and fitness for a particular purpose.

MikroCAD Software User Manual End User License Agreement • 3


Some Countries/States have laws which require warranty and liability rights different from those stated
herein. In those areas the required warranty and liability terms will apply.

7. LMI Technologies’ entire liability and your exclusive remedy, if the VAR from whom you acquired the
Licensed Software is unable to deliver acceptable replacement media, is limited to your purchase price,
which shall be paid to you upon return of the Licensed Software and the statutory declaration required
above certifying complete return.

In no event will LMI Technologies be liable for any loss of profits, loss of use, or indirect, special,
incidental or consequential damages in any way related to or arising out of the use of the Software. LMI
Technologies maximum liability shall in no event exceed the amounts paid to LMI Technologies for the
Licensed Software.

8. The prevailing party in any action or proceeding between LMI Technologies and End-User Licensee
arising out of or related to this Agreement shall be entitled to recover reasonable legal fees and costs,
including lawyers’ fees, which may be incurred.

9. This Agreement shall be construed and enforced in accordance with the laws of British Columbia,
Canada and each party agrees to be subject to those relevant laws.

Copyright law protects the Licensed Software and accompanying documentation. Except as specifically
authorized in writing by LMI Technologies, copying, duplication, sale, distribution or other use of the
Licensed Software is prohibited.

It is understood and acknowledged that LMI Technologies has the absolute right to obtain injunctive
relief to protect LMI Technologies’ proprietary rights.

By using the Software, you further agree that this is the complete and exclusive statement of the
Agreement which supersedes any proposal or prior agreement, oral or written, and any other
communications relating to the subject matter of this EULA.

If any provision of this Agreement is held to be invalid or unenforceable the remaining provisions will not
be affected.

MikroCAD Software User Manual End User License Agreement • 4


Table of Contents Examples
Header Files
45
45
Operation Workflow 45
Copyright 2
Functions 46
End User License Agreement 3
General 46
Table of Contents 5
MikroCAD_GetModuleVersionInfo 46
Introduction 7
MikroCAD_
Safety and Maintenance 8 GetNumConnectedSensorModules 46
Safety Information 8 MikroCAD_GetSensorModuleInfo 46
Environment and Lighting 8 MikroCAD_ListAllSensors() 46
Transporting 9 MikroCAD_GetSensorSerialNumber 47
Getting Started 10 MikroCAD_GetSensorTypeID 47
System Requirements 10 MikroCAD_Initialize 47
Installing the Software 10 MikroCAD_Deinitialize 47
Measurement Modules 11 Parameter 47
Software Overview 12 MikroCAD_ParameterAvailable 47
Scan Tab 12 MikroCAD_SetIntegerParameter 48
Advanced Tab 13 MikroCAD_GetIntegerParameter 48
Help Tab 14 MikroCAD_GetIntegerParameterLimits 48
Log Messages 15 MikroCAD_SetFloatParameter 48
Acquiring Scan Data 16 MikroCAD_GetFloatParameter 49
Connecting to a Scanner 16 MikroCAD_GetFloatParameterLimits 49
Viewing the Live Image 16 Measurement and Projection Area 49
Choosing the Projection Pattern 17 MikroCAD_SetMeasurementArea 49
Adjusting the Brightness 19 MikroCAD_ResetMeasurementArea 49
Working with High-Contrast Samples (HDR) 20 MikroCAD_SetProjectionArea 49
Focusing the Scanner 21 MikroCAD_SetProjectionMask 50
Scanning Data and Managing Results 22 MikroCAD_ResetProjectionArea() 50
Scanning 22 Camera Images 50
Viewing Scanned Data 24 MikroCAD_GetCameraImage8 50
Saving and Discarding Data 26 MikroCAD_GetCameraImage24 50
Measuring 27 Projector 51
Using Exposure Indication 28 MikroCAD_ProjectValue 51
Advanced Settings 29 MikroCAD_ProjectColorValue 51
Working with Overlays 29 MikroCAD_ProjectImage8 51
Creating Custom Acquisition Modes 30 MikroCAD_ProjectImage24 51
Calibrating the Scanner 33 MikroCAD_ProjectPattern 51
Acquiring Sequential Scans 41 MikroCAD_ProjectStripePattern 52
Converting Files 43 MikroCAD_
Importing .OMC (ODSCAD) Files 43 SwitchOnOffProjectorLampAvailable 52

Editing Advanced Settings 43 MikroCAD_SwitchOnOffProjectorLamp 52

Software Development Kit 45 MikroCAD_GetProjectorLampState 52

Setup and File Locations 45 Data Acquisition 52

MikroCAD Software User Manual 5


MikroCAD_ MikroCAD_GetNumGrooveCalibrations 59
GetNumPredefinedMeasParameterSets 52 MikroCAD_GrooveCalibration 59
MikroCAD_ MikroCAD_GetCalibrationState 59
GetPredefinedMeasParameterSetName 52
MikroCAD_CalibrationToSensor 59
MikroCAD_
MikroCAD_GetCalibrationResultData 59
SelectCurrentMeasurementProgram 53
MikroCAD_UnlockCalibrationDataBuffer 59
MikroCAD_
GetCurrentMeasurementProgramIndex 53 MikroCAD_ReadCalibrationParameter 60

MikroCAD_GetCurrentMeasurementProgram 53 Events 60

MikroCAD_GetDefaultMeasProgramName 53 MikroCAD_GetNumAvailableEventTypes 60

Measurement 53 MikroCAD_GetEventType 60

MikroCAD_Measure 53 MikroCAD_StartSensorEvent 60

MikroCAD_HeightImagePtr 54 MikroCAD_StopSensorEvent 60

MikroCAD_ValidDataPtr 54 Support 61

MikroCAD_CameraImagePtr 54 Contact 62

MikroCAD_CameraRawImagePtr 54
MikroCAD_PowerSpectrumPtr 54
MikroCAD_IsDataBufferLocked 54
MikroCAD_UnlockDataBuffer 55
Configuration Measurement Programs and
Other Settings 55
MikroCAD_GetMeasProgramSetPtr 55
MikroCAD_ReadConfig 55
MikroCAD_WriteConfig 55
MikroCAD_ReadInitialParameterFromFile 55
MikroCAD_WriteInitialParameterToFile 55
MikroCAD_ReadMeasProgramDataFromFile 56
MikroCAD_WriteMeasProgramDataToFile 56
MikroCAD_ListAllSensorsType 56
MikroCAD_GetSensorSerialNumberType 56
MikroCAD_ListSensorDescriptions 56
MikroCAD_ReadSensorDescription 57
MikroCAD_ReadMeasProgramDataFromFile 57
MikroCAD_WriteMeasProgramDataToFile 57
MikroCAD_ListAllSensorsType 57
MikroCAD_GetSensorSerialNumberType 57
MikroCAD_ListSensorDescriptions 57
MikroCAD_ReadSensorDescription 58
Calibration (General) 58
MikroCAD_CalibrationOnSensor 58
Calibration (Simple) 58
MikroCAD_GridCalibration 58
MikroCAD_PlaneCalibration 58

MikroCAD Software User Manual 6


Introduction
Welcome to the MikroCAD software user manual!

MikroCAD is an optical scanner capable of performing both 2D and 3D measurements on metallic or


non-metallic surfaces down to the micron level (model-dependent).

This manual describes the set-up of MikroCAD scanners and explains how to acquire data, which is then
passed to the measurement component of the MikroCAD software. (For information on performing
measurements on acquired data, see the Reference Guide on the Help tab on the Acquisition page.)

MikroCAD scanners use digital stripe projection provided by micro-mirror projectors to scan surfaces.
Due to the blue light used for illumination and narrow band optical filtering, the imaging process is highly
robust against ambient light. A height map of the target is calculated from the position of the strips and
the Gray value of the individual image points.

The main advantages of MikroCAD scanners include non-contact data recording, high-speed
measurement, high resolution, and measurement precision, as well as ease of use. The scanners can be
used for tasks which could not previously be solved with optical measuring systems.

Notational Conventions
This guide uses the following notational conventions:

Follow these safety guidelines to avoid potential injury or property damage.

Consider this information in order to make best use of the product.

MikroCAD Software User Manual 7


Safety and Maintenance

The following sections describe the safe use and maintenance of MikroCAD scanners.

The scanner's LED pattern turns off after 5 minutes of non-use. Check the Light option to turn
the LED pattern on.

Safety Information
This safety information is intended to ensure long service life of your MikroCAD scanner and protect
against fire and electric shock. Carefully read and follow this and all other safety information.

l Before installing and starting the scanner, read this documentation.

l Incorrect handling of the scanner may cause personal injury or property damage.

l To avoid the risk of fire or electric shock, do not expose the scanner to rain or moisture.

l To avoid the risk of fire or electric shock, do not open the cover of any of the scanner component.
These devices contain high voltage components. All service must be performed by qualified
LMI personnel.
l Do not look into the projection lens when the projector is turned on. This can cause serious injury to
your eyes.
l Do not reach between motorized moving components when the scanner is in operation. You may
cause serious injury to your hands and fingers.
l The scanners contain electrostatic-sensitive components which may be damaged through improper
handling. Discharge your body before touching them. Avoid contact with highly insulating sub-
stances (synthetic fibers, plastic foils etc.). Place the electrostatic-sensitive device on a conducting sur-
face.
l Do not open scanner components. Keep all covers and switching cabinet doors closed during oper-
ation. There is a risk of death or severe harm to health or material damage.
l Never disconnect the electrical connections under current. In some conditions, electric arcs may form
and cause personal injury, as well as damage to contacts.
l Adjustment of the scanner can only be performed by trained personnel.

Environment and Lighting


To ensure precise measurements and to prevent damage to the scanner, avoid the following:

MikroCAD Software User Manual Safety and Maintenance • Safety Information • 8


l large temperature variations
l strong vibrations
l strong magnetic fields
l high air humidity

Direct sunlight and direct light exposure through the room lighting onto the measuring area leads to
increased noise in the scanned data or incomplete 3D data and must therefore be avoided.

When setting up the scanner, ensure sufficient distance between the scanner components and walls,
furniture etc. All ventilation openings must be left uncovered. Ensure that no fluids, particularly when
cleaning the unit, enter the scanner.

Transporting
Before transporting the scanner, all components must be carefully packaged. Handle all system
components carefully during transportation. Strong vibrations, shaking, shocks, etc., can cause
misalignment in components, which may negatively affect later measurements.

Mechanical influences, particularly if the system is dropped, may destroy sensitive components.

After transporting the scanner, you must calibrate it, or at least verify the calibration. See Calibrating the
Scanner on page 33 for information on how to calibrate the system.

LMI excludes all liability for damage due to improper transport.

MikroCAD Software User Manual Safety and Maintenance • Transporting • 9


Getting Started

This sections provides information on system requirements and software installation.

For information on setting up the hardware, see the Quick Start Guide for your scanner model.

System Requirements
Computer Requirements

Minimum Recommended

Operating System Windows 7 (64-bit)


CPU Quad-core
Memory 4 GB 8 GB
Video Card OpenGL or Direct3D hardware accelerated
Resolution 1280 x 768, thousands of colors 1600 x 1024, thousands of colors
Free Disk Space 1 GB
Ethernet MikroCAD lite 1.6 x 1.2 / premium 1.6 x 1.2
1 free Ethernet port

USB MikroCAD lite 1.6 x 1.2 / premium 1.6 x 1.2


1 free USB port (for software dongle;
required only for measurements)

MikroCAD premium 13 x 10 / 80 x 60 / 140 x
105 and plus 1.7 x 1.4
2 free USB ports (one port for software
dongle; required only for measurements)

FireWire 800 MikroCAD premium 13 x 10 / 80 x 60 / 140 x


105 and plus 1.7 x 1.4
1 free FireWire 800 port

Installing the Software


The MikroCAD setup wizard easily guides you through the installation of the software.

To install the MikroCAD software:


1. Download the software from http://lmi3d.com/support/downloads.
If you purchased the MikroCAD software (Standard or Professional), download 14471-x.x.x.x_SOFTWARE_
MikroCAD_Measurement.exe, which lets you scan data and perform measurements.

MikroCAD Software User Manual 10


If you purchased only the scanner, download 14470-x.x.x.x_SOFTWARE_MikroCAD_Scan.exe, which only lets
you scan data.

2. Double-click on the installer and follow the instructions to install the MikroCAD software.

Measurement Modules
The MikroCAD software is available in two versions: Standard and Professional. The following table
describes which modules are included with each version, as well as the optional modules:

Standard Professional

2D Advanced Surface Texture optional included


Contour included included
Advanced Contour optional optional
2D Automotive optional included
3D Advanced Surface Texture included included
3D Fourier & Wavelets optional included
Colocalization optional included
Lead Analysis (Twist) optional optional
4D Series optional included
Statistics optional included
Grains & Particles optional included

MikroCAD Software User Manual Getting Started • Installing the Software • 11


Software Overview

The MikroCAD software provides two main modes: an acquisition mode and a measure mode. This
manual describes the steps you must follow to acquire data and pass it to the software's measurement
component. For information on performing measurements, see the documentation integrated in the
software.

Scan Tab
The Scan tab lets you set up your scanner, and acquire and view data.

Scan tab

Element Description

Scanner group Lets you connect to scanners.


Brightness group Lets you set the brightness of the scanner. Properly setting the brightness
ensures that acquired data will be good, which is necessary for good
measurements.

MikroCAD Software User Manual Software Overview • Scan Tab • 12


Element Description

Use Exposure Indication to toggle a color representation of overexposed and


underexposed areas.
You can also turn the scanner's LED light on and off using the Light option.
Projection Lets you choose the projection pattern. Different patterns are used for
different operations. See Choosing the Projection Pattern on page 17 for more
information.
Acquisition Lets you acquire data (scan), save or discard the data, and pass it to the
measurement component.
View Lets you view acquired data as either a 2D heightmap or as a
3D representation.
Camera Image window Displays the live camera image.
Intensity Profile window Displays a histogram of the row or column in the live image that is currently
under the mouse pointer. Choose Horizontal in the drop-down to display the
intensity of the current row. Choose Vertical in the drop-down to display the
intensity of the current column.
Zoom window Shows a zoomed-in view around the mouse pointer when you hover it above
the Camera Image window. Zoom in or out using the mouse wheel.

Advanced Tab
The Advanced tab provides functions that are used in less common scenarios.

MikroCAD Software User Manual Software Overview • Advanced Tab • 13


Advanced tab

Element Description

Overlay Lets you save and load overlays, which you can use to align samples a desired
orientation and position. See Working with Overlays on page 29 for more
information.
Acquisition mode Lets you create custom acquisition modes, defining grey code stripe patterns,
phase shift patterns, and prefilters. Custom acquisition modes can improve
data quality in some scenarios. See Creating Custom Acquisition Modes on page
30 for more information.
Sequential Scan Lets you take a series of scans. Useful for quality assurance scenarios.
Calibration Lets you calibrate the scanner and save calibration information on the
scanner. Also provides a Help dialog that reminds you of the required steps.
See Calibrating the Scanner on page 33 for more information.
File Utilities Lets you import .omc (ODSCAD) files, and convert files to different formats.
Settings Lets you edit various advanced settings.

Help Tab
The Help tab lets you access help topics, and also save information for support issues.

Help tab

MikroCAD Software User Manual Software Overview • Help Tab • 14


Element Description

Open logfile Opens a text logfile.


Collect support information Saves settings and state information, which Technical Support may ask for in
case of issues.

Log Messages
You can use the log to see system messages that can help in troubleshooting.

To open the log:


l From any page, click the vertical Log messages tab.

The log lists the following types of messages: errors, warnings, general information, and debug
information.

To filter messages by type:

l Click one of the four icons at the top of the log ( ).

To clear messages:

l Click the Clear Messages icon ( ).

MikroCAD Software User Manual Software Overview • Log Messages • 15


Acquiring Scan Data

Once you have set up your scanner and installed the software on your computer, you are ready to
acquire data by scanning a sample.

After acquiring scan data, you pass the data to the Measurement component of the MikroCAD software.

Follow the procedures in the next topics to acquire scan data.

Connecting to a Scanner
When you launch the MikroCAD software, it will try to connect to a scanner.

If more than one scanner is connected to your computer, you can choose which scanner to connect the
software to.

To choose a scanner:
1. On the Scan tab, in the Scanner group, click Connect.

2. In the Select Scanner dialog, select a scanner and click Connect.

The camera image of the connected scanner is displayed.

Viewing the Live Image


Before you scan data, or after discarding scanned data, the main area of the window shows the live
camera image, an intensity profile, and zoom window.

MikroCAD Software User Manual 16


Live view

You use the live view to adjust brightness and focus the scanner before scanning data.

Live view elements


Element Description

Camera Image window Displays the live camera image.


Intensity Profile window Displays intensity values of the pixels in the row or column in the live image
that is currently under the mouse pointer. Choose Horizontal in the drop-
down to display the intensity of the current row. Choose Vertical in the drop-
down to display the intensity of the current column.
Zoom window Shows a zoomed-in view around the mouse pointer when you hover it above
the Camera Image window. Zoom in or out by first clicking in the Camera
Image window and then using the mouse wheel.

Choosing the Projection Pattern


Various projection patterns are available in the MikroCAD software. Different patterns are used for
different operations.

Projection patterns
Pattern Use

Cross Used for focusing samples with a regular surface.

MikroCAD Software User Manual Acquiring Scan Data • Choosing the Projection Pattern • 17
Pattern Use

Half Used for adjusting brightness with most samples and also for focusing samples with a
less regular surface.

Stripes Used for adjusting brightness with samples whose surface has varying brightness.

Clicking on this button cycles through a predefined set of finer and finer stripe
patterns.

Bright Lights the entire field of view. Lets you see all details of the surface and can be used for
capturing camera images, such as for overlays. See Working with Overlays on page 29
for more information on overlays.

MikroCAD Software User Manual Acquiring Scan Data • Choosing the Projection Pattern • 18
To choose a projection pattern, on the Scan tab, in the Projection group, click on the pattern you want.

Adjusting the Brightness


Setting the brightness correctly helps ensure that data quality will be good. Specifically, if the brightness
is incorrect, the contrast may be too low, which results in bad data quality. Adjusting the brightness must
be done often to adapt it to the sample being scanned.

Ideal brightness is achieved when there is good contrast between the dark and the light stripes in the
image.

Good contrast. Provides the best data quality.

Poor contrast. Provides poor data quality.

MikroCAD Software User Manual Acquiring Scan Data • Adjusting the Brightness • 19


Very poor contrast. Provides very poor data quality.

Make sure that ambient lighting, such as light from windows and strong electrical lighting, is
limited.

To adjust the brightness:


1. Place the sample you want to scan under the scanner.
2. On the Scan tab, in the Projection group, choose the Half pattern.

3. In the Brightness group, check the Light option to turn on the projector light.

4. Move the slider until there is a high contrast between the halves of the images.
For examples of good and bad contrast, see the images above
Move the slider to the left to decrease the brightness and to the right to increase the brightness.
The number of steps available in the slider is model-dependent.

Working with High-Contrast Samples (HDR)


When a sample's surface has a high contrast, that is, both light and dark regions, whether because of
reflectivity or the color of the surface being scanned, you can use the HDR (High Dynamic Range)

MikroCAD Software User Manual Acquiring Scan Data • Working with High-Contrast Samples (HDR) • 20
settings to improve the scan data.

When you enable HDR and then scan a sample, the scanner takes multiple exposures, setting the
brightness a certain number of steps above and below the current Brightness setting for each
exposure (model-dependent), and then combines the exposures into a single scan image.

The following HDR settings are available:

HDR settings
HDR setting Number of exposures

None 1
HDR 2
Super HDR 3

Scans using HDR take roughly twice as long as scans without HDR using the same initial
brightness. Scans using Super HDR take roughly three times as long as regular scans without
HDR using the same initial brightness.

To enable HDR:
1. On the Scan tab, in the Brightness group, click HDR.

2. In the drop-down, choose HDR or Super HDR.

If Brightness is set to the lowest or highest setting when you enable HDR, the Brightness
setting is raised or lowered by one step, respectively, to account for the brightness variation
that occurs during scans using HDR. Also, when HDR is enabled, you can't raise the
Brightness setting to its highest setting, or lower it to its lowest setting.

Focusing the Scanner


You must focus the scanner properly to get good scan data, which is necessary to successfully take
measurements, and also to properly calibrate the scanner.

Use the Cross pattern to focus the scanner.

To focus the scanner:


1. Place the sample you want to scan or a calibration target under the scanner.

MikroCAD Software User Manual Acquiring Scan Data • Focusing the Scanner • 21


2. On the Scan page, in the Projection group, choose the Half pattern.

3. In the Brightness group, check the Light option to turn on the projector light.

4. Align the vertical line of the projected cross pattern with the vertical line of the red cross in the MikroCAD
software.

For lite 1.6 x 1.2, premium 1.6 x 1.2 / 13 x 10 / 26 x 20, and plus 1.7 x 1.4:
Use the small knob on the column stand to fine-tune the focus. Use the large knob on the column stand to
move the scanner more quickly.
For premium 140 x 105 / 320 x 240:
Use the column control box to raise and lower the camera.

Scanning Data and Managing Results


Scanning
After you have adjusted the brightness so that it is appropriate for your sample and have focused the
scanner, you are ready to acquire data. After scanning, you may save, measure (using the Measurement
component), or discard the data to scan again.

MikroCAD Software User Manual Acquiring Scan Data • Scanning Data and Managing Results • 22
To acquire data:
1. On the Scan page, in the Result group, click on Scan to perform a scan.

Scanned data appears in the viewer.


You can choose a 2D view or a 3D view by clicking the Flat and 3D buttons to switch to a 2D and 3D view,
respectively.
The 2D view is a heightmap.

The 3D view provides tools that you can use to rotate, zoom, and pan the image.

See Viewing Scanned Data on the next page for more information on viewing scanned data in 3D.

MikroCAD Software User Manual Acquiring Scan Data • Scanning Data and Managing Results • 23
2. After using the scanner, be sure to close the MikroCAD software before disconnecting the scanner.

Failing to close the software before disconnecting the scanner will result in damage to the
scanner.

The scanner does not need to be powered to perform measurements on the acquired data.

Viewing Scanned Data


After you have acquired data, it is displayed in the MikroCAD software Camera Image window.

You can view the data as either a 2D heightmap or as a 3D representation, in order to evaluate whether
the acquired data is ready to pass to the Measurement component.

After you have determined that the scanned data is good, you should save the data. See Saving
and Discarding Data on page 26 for more information.

Scanned data - 2D view (heightmap)

MikroCAD Software User Manual Acquiring Scan Data • Scanning Data and Managing Results • 24
Scanned data - 3D view

You can rotate, pan, and zoom the 3D representation by clicking on a manipulation control to select it
and then using the mouse or keyboard to manipulate the image.

3D image manipulation controls

Orientation cube

The following controls are available when viewing a 3D representation: 

MikroCAD Software User Manual Acquiring Scan Data • Scanning Data and Managing Results • 25
Scanned image manipulation tools
Element Description

Zoom Window Lets you select and then zoom in on a region.


Zoom Lets you zoom the image in and out using the mouse wheel or by clicking in
the image, holding the mouse button, and moving the mouse up or down.
Pan Lets you pan the image using the mouse.
Rotate Lets you rotate the image using the mouse.
Zoom Fit Fits the scanned data into the window.
Orientation cube Lets you rotate the image quickly to a specific orientation.
Clicking on labels (such as "Top" or "Left"), on a corner or edge of the
orientation cube, or on one of the "compass points (such as "N" or "W")
snaps the 3D representation to that orientation. You can also click on the
cube and hold the mouse button, and then move the view by moving the
mouse.

Saving and Discarding Data


After you have acquired scan data and have decided that the data is good by viewing it either as a
2D heightmap or as a 3D rendering, you can save the data in one of the following formats:

File formats
Format Description

.sur The "studiable" format. You can load .sur files into an analysis document in the
Measurement component.
.omc The ODSCAD format. Use this format if you need to work with data in ODSCAD.
.obj The Wavefront OBJ format. This format lets you import, align, and combine MikroCAD's
scan data in FlexScan3D and other mesh-processing software.
.stl STL Binary or STL ASCII.

You do not need to save data to pass it to the Measurement component, but saving the data is
recommended.

For more information on viewing data, Viewing Scanned Data on page 24.

After you save data, the Measure, Save, and Discard buttons, as well as the Flat and 3d buttons in the
View group, become disabled. After that, you may start the next scan.

To save acquired data:


1. On the Scan tab, in the Acquisition group, click on Save.

2. In the Save As dialog, choose a location for the data and provide a name.

MikroCAD Software User Manual Acquiring Scan Data • Scanning Data and Managing Results • 26
The data is saved as a "studiable," in the .sur format, which the measurement tools can use to perform
measurements.
If the acquired data is not satisfactory, you can discard it by clicking Discard in the Acquisition group.

Measuring
After performing a scan, click on Measure in the Result group, on the Scan tab, to transfer the
acquired data to the Measurement component.

Passing data to Measurement component

The Measurement page will open automatically after clicking Measure.

Data passed to Measurement component

You can switch between the Acquisition page and the Measurement page using the icons in the upper
left corner of the interface.

Switching to Measurement page

MikroCAD Software User Manual Acquiring Scan Data • Scanning Data and Managing Results • 27
For information on performing measurements on the acquired data, see the Reference Guide on the
Help tab on the Measurement page.

Using Exposure Indication


You can use the Exposure Indication setting to see what parts of the live image are overexposed and
underexposed. You can use this function to help determine whether the brightness is appropriately set.

By default, overexposed areas are indicated in the live image by red; underexposed areas are indicated
by blue. You can change these colors in the Advanced Settings editor. For information on the editor, see
Editing Advanced Settings on page 43.

Exposure indication turned on Exposure indication turned off

To enable Exposure Indication:


l On the Scan tab, in the Brightness group, click Exposure Indication.

MikroCAD Software User Manual Acquiring Scan Data • Using Exposure Indication • 28


Advanced Settings

The following topics describe the advanced settings in the MikroCAD software.

Working with Overlays


Overlays let you use saved images of a sample in the camera's view to easily align subsequent samples so
that the area you want to scan is properly positioned under the scanner. A previous scan image is laid on
top of the live view so that you can move and orient the sample to produce scans similar to the previous
scan. For example, you could use a previous scan of a drill bit to help orient a different drill bit so that the
new scan is similar to the previous scan.

To create an overlay:
1. Place a sample under the scanner.
Make sure the brightness is properly set (see Adjusting the Brightness on page 19) and that the camera is
focused (see Focusing the Scanner on page 21).

2. Move the sample so that the area you will want to measure is properly positioned and oriented.

3. On the Advanced tab, in the Overlay group, click Save.

If scanned data is displayed in the Scan Result window, rather than live data in the Camera
Image window, the Overlay buttons are disabled. To save an overlay, return to the Scan
tab and either pass the data to the Measurement page by clicking Measure in the
Acquisition group, or discard the data by clicking on Discard. After this, you can return to
the Advanced tab on the Acquisition page and save the overlay.

4. In the Save As dialog, choose a location and provide a name for the overlay image.
The overlay is saved as a .PNG file.
After you have created an overlay, use it to position subsequent samples.

To use an overlay:
1. Place a new sample under the scanner.
Make sure that the brightness is properly set (see Adjusting the Brightness on page 19) and that the camera
is focused (see Focusing the Scanner on page 21).

MikroCAD Software User Manual Advanced Settings • 29


2. On the Advanced tab, in the Overlay group, click Load and choose a previously saved overlay image in the
Open dialog.

3. Using the Ratio slider, adjust the transparency of the overlay image.

Sliding the slider to the left makes the overlay more transparent.
In the image below (a calibration target is used as an example), the horizontal groove is the overlay image,
whereas the diagonal groove is the "new" sample that needs to be properly positioned. You would move the
sample under the scanner until the two images are roughly aligned.

4. After positioning the new sample, click Clear and return to the Scan tab to scan the new sample.
See Scanning on page 22.

Creating Custom Acquisition Modes


With some types of materials and targets, you will need to define a custom acquisition mode to
maximize the quality of the data.

MikroCAD Software User Manual Advanced Settings • 30


MikroCAD scanners use structured light to determine the location of points on an object in 3D space. To
do this, two methods are used: "Gray coded" patterns (named after Frank Gray, and not because the
patterns are "gray") and phase-shifted patterns.

For Gray coded patterns, the software cycles through a predefined number of black/white (lit/unlit)
stripe projection patterns, changing the width of the stripes each time.

For phase-shifted patterns, the software varies the intensity of light across the width of the stripes to
create "smooth" transitions from light to dark in the pattern. The software cycles through a series of
these projection patterns, each one of which is "shifted" by a certain amount of the width of each stripe
in successive projected images, namely, the reciprocal of the number of images. For example, if twelve
images are used, each image is shifted by 1/12 the width of the stripes. Doing this in effect increases the
resolution of the scanner.

Acquisition mode setup dialog

To create a custom acquisition mode:


1. On the Advanced tab, in the Acquisition mode group, click Adjust.

MikroCAD Software User Manual Advanced Settings • 31


2. In the Acquisition modes setup dialog, click New acquisition mode and type the name of the new
acquisition mode in the New Measurement Program dialog.

In the main dialog, you can select an acquisition mode in the list and check Default acquisition mode to
set it as the default.

3. Choose whether both Gray code and phase shift patterns will be enabled, or phase shift only.

4. Choose the Gray code settings if you have enabled them.


a. Click the "..." button near Gray code stripe width begin / end and choose the values in the Gray
Code Parameters dialog.

The Stripes width start value represents the width, in pixels, of the stripes in the first image. The
Stripes width end value represents the width, in pixels, of the stripes in the last image.
b. Click OK.

5. Choose the phase shift pattern settings.


a. Click the "+" button near Phase shift (Stripe width / number of images) and choose the values in
the Phase Shift Parameters dialog.

MikroCAD Software User Manual Advanced Settings • 32


The Stripes width in Pixel setting represents the width of the "smooth" stripes. The Number of
images setting represents the number of images the software will cycle through, shifting each one by
the reciprocal of the number of images selected.
You can add multiple phase shift patterns.
b. Click OK.
To delete a phase shift pattern, select it in the list of phase shifts and click the "-" button.

6. Choose the prefilter settings and set a value in Threshold for power spectrum.
These settings are for advanced users only.

Calibrating the Scanner


Calibrating the scanner ensures that measurements will be precise and accurate.

You should calibrate a scanner or at least verify its calibration each time after you transport it.

Calibrating results in the following:

l The 0 height reference (baseline) is determined using a plane calibration target in the camera focus.

l The vertical reference is determined using a step or groove calibration target in one or several steps.

l The horizontal reference is determined using a grid calibration target.

Calibration must be performed in a room where no direct sunlight can fall on the calibration
target.

The calibration targets must be handled using gloves.

The MikroCAD software provides an integrated calibration Help guide to remind you of the steps
required for the calibration process.

MikroCAD Software User Manual Advanced Settings • 33


Calibration help

To open the Calibration Help, click Calibration help in the Calibration group on the Advanced tab.

Clicking Calibration Help

In the following procedure, a MikroCAD premium 1.6 x 1.2 scanner is used. Different scanners
use different sizes of calibration targets.

To calibrate the scanner:


1. On the Advanced tab, in the Calibration group, click Start.

2. Click Yes in the confirmation dialog.

MikroCAD Software User Manual Advanced Settings • 34


3. In the Calibration group, click Target Settings, enter the grid line spacing and the groove depth values, and
then click OK.

You can find these values printed on the calibration targets.

If you have previously calibrated the scanner and saved the calibration to the scanner, you should already
see these values. However, verify that the values are correct, or change them if you are using different
calibration targets.

4. Perform the grid calibration.


a. Place the grid calibration target under the device.

MikroCAD Software User Manual Advanced Settings • 35


b. If necessary, focus the camera by moving it up or down until the grid pattern of the calibration target is
as sharp as possible in the Camera Image window.
You can use the Zoom window to help you focus the image.
See Focusing the Scanner on page 21 for more information on focusing the scanner.
In later steps, you align the red cross pattern in the software with the projected cross pattern. For this
step, you only want to focus scanner so that the grid pattern is sharp.
c. Position the calibration target so that the grid is roughly aligned to the red cross in the software.

If the projected black cross is shifted left or right in relation to the red cross, ignore the black cross
when focusing the sample surface. You may use the Contrast indicator to find the best focus, adjusting
the scanner up and down until the Contrast value is at its greatest.

MikroCAD Software User Manual Advanced Settings • 36


d. Click Grid.

5. Perform the plane calibration.


a. Place the groove calibration target under the device and position it so that only a flat surface is visible in
the camera image (no groove).

b. Adjust the brightness of the scanner.


See Adjusting the Brightness on page 19 for instructions on setting the brightness.
c. Focus the scanner by moving it up or down until the vertical line of the projected cross pattern aligns
with the vertical line of the red cross.

MikroCAD Software User Manual Advanced Settings • 37


You may use the Contrast indicator to find the best focus, moving the scanner up and down until the
Contrast value is at its greatest.

See Focusing the Scanner on page 21 for more information on focusing the scanner.
d. In the Calibration group, click Plane.

The MikroCAD software will perform the plane calibration. This may take a minute, and the scanner
may disconnect and reconnect during this time. A smaller image of the data scanned during the plane
calibration will appear next to the Camera Image window.

6. Perform the groove calibration.


a. Place the groove calibration target under the device.

MikroCAD Software User Manual Advanced Settings • 38


b. If necessary, focus the camera by moving it up or down until the vertical line of the black projected cross
pattern aligns with the vertical line of the red cross.
The vertical line of the projected pattern will appear shifted at the bottom of the groove. You should use
the projected pattern at the top of the groove for alignment.

See Focusing the Scanner on page 21 for more information on focusing the scanner.
In the software, the horizontal line should be parallel with the groove and roughly in its center.
c. Click Groove.

MikroCAD Software User Manual Advanced Settings • 39


The MikroCAD software will perform the groove calibration. This may take several seconds, and the
scanner may disconnect and reconnect during this time. A smaller image of the data scanned during
the groove calibration will appear next to the Camera Image window.

7. Perform additional groove calibration, if necessary.


Additional groove calibration is not required with all MikroCAD scanners.
a. Place the groove calibration target under the device.

b. If necessary, focus the camera by moving it up or down until the vertical line of the black projected cross
pattern aligns with the vertical line of the red cross.
The vertical line of the projected pattern will appear shifted at the bottom of the groove. You should use
the projected pattern at the bottom of the groove for additional groove calibration.

MikroCAD Software User Manual Advanced Settings • 40


See Focusing the Scanner on page 21 for more information on focusing the scanner.
In the software, the horizontal line should be parallel with the groove and roughly in its center.
c. Click Additional Groove.

8. Click Save on scanner to save the calibration onto the scanner.

You can cancel the calibration at any time by clicking Cancel in the Calibration group.
You are now ready to start acquiring data using the scanner. For more information, sSee Acquiring Scan
Data on page 16.

Acquiring Sequential Scans


In Quality Assurance systems, users often need to perform a series of scans, for example, 25 or 50 scans,
to later demonstrate the repeatability and reproducilibity of the scanning device using the Measurement
component. MikroCAD lets you acquire several scans sequentially with a single click of a button.

To acquire multiple scans sequentially:


1. Place a sample under the scanner.

MikroCAD Software User Manual Advanced Settings • 41


2. Move the sample so that the area you want to measure is properly positioned and oriented.

3. Make sure the brightness is properly set (Adjusting the Brightness on page 19) and that the camera is
focused (see Focusing the Scanner on page 21).

4. On the Advanced tab, in the Serial scan group, click Start.

The Serial scan dialog displays.

5. In the Serial scan properties dialog, do the following:

a. Under Select folder to save scans, click and choose or create a folder.
b. In Number of scans, choose a number of scans.
c. Click OK.
MikroCAD performs the specified number of scans sequentially, saving each scan as a Studiable (.sur file) in
the specified folder.

You can then switch to the Measurement component, load the scans into an analysis document, and
perform a repeatability or reproducibility analysis.

To cancel sequential scans at any time:


l On the Advanced tab, in the Serial scan group, click Cancel.

MikroCAD Software User Manual Advanced Settings • 42


Converting Files
By default, the MikroCAD software saves scans as .sur files ("Studiable" files that can be loaded into
analysis documents in the Measurement component). You can convert files to different formats. The
following target formats are available:

File formats
Format Description

.sur The "studiable" format. You can load .sur files into an analysis document in the
Measurement component.
.omc The ODSCAD format. Use this format if you need to work with data in ODSCAD.

To convert a file:
1. On the Advanced tab, in the File Utilities group, click Convert file.

2. In the Open dialog that appears, choose the file format of the file that you want to convert from the drop-
down, locate the file in the dialog, and click Open.

3. In the Save As dialog that appears, in Save as type, choose the file format you want to use for the
conversion from the drop-down.

4. In File name, type a name, and then click Save.

Importing .OMC (ODSCAD) Files


The MikroCAD software lets you import .omc files created with the ODSCAD software. When you import
an .omc file, MikroCAD inserts it into the analysis document that is active in the Measurement
component.

To import an .omc file:


1. In the Advanced tab, in the File Utilities group, click Import OMC File.

2. In the Open dialog that appears, locate the file you want to import and click Open.

3. MikroCAD switches to the Measurement page and inserts the file in the active analysis document.

Editing Advanced Settings


You can edit several advanced settings through a dialog in the MikroCAD software.

MikroCAD Software User Manual Advanced Settings • 43


To edit the advanced settings:
1. In the Advanced tab, in the Settings group, click Edit.

The settings dialog opens.

2. Make changes to the desired setting and then click Close.

MikroCAD Software User Manual Advanced Settings • 44


Software Development Kit

The following topics describe the MikroCAD software development kit (SDK).

The MikroCAD software development kit (SDK) includes open-source software libraries that can be used
to programmatically access and control MikroCAD scanners. The latest version of the SDK can be
downloaded by going to http://lmi3d.com/support/downloads/, selecting MikroCAD, and clicking on the
Product User Area link.

Setup and File Locations


Examples
Examples showing how to perform various operations are provided, each one targeting a specific area.
All of the examples can be found in SDK_Examples.sln in the SDKExample folder.

All sample code, including C++ examples, can be downloaded by going to


http://lmi3d.com/support/downloads/, selecting a product type, and clicking on the Product User Area
link.

The project solution is for Visual Studio 2013 only.

Header Files
Header files are referenced with SDKInterface as the source directory, for example: #include
"../../SDKInterface/MikroCADSDK.h".

Operation Workflow
Applications created using the SDK typically use the following programming sequence:

MikroCAD Software User Manual Software Development Kit • 45


Functions
The following functions are available in the MikroCAD SDK.

General
MikroCAD_GetModuleVersionInfo
Returns version information contained in Measurement.dll. No connection to a scanner is necessary.

void MikroCAD_GetModuleVersionInfo(unsigned long& dwModuleVersion,


unsigned long& dwInterfaceVersion);
Parameters
dwModuleVersion: Returned module version.
dwInterfaceVersion: Returned module interface version.

MikroCAD_GetNumConnectedSensorModules
Returns the number of connected sensor modules.

unsigned long MikroCAD_GetNumConnectedSensorModules();


Returns
Number of connected sensor modules.

MikroCAD_GetSensorModuleInfo
Returns sensor information of a connected sensor module.

unsigned char MikroCAD_GetSensorModuleInfo(unsigned long dwIndex,


unsigned long& dwModuleVersion,
unsigned long& m_dwFirmwareVersion,
unsigned long& dwInterfaceVersion,
SensorTypeID& SensorType);
Parameters
dwIndex: Index in list.
dwModuleVersion: Returns version of the module (DLL).
dwFirmwareVersion: Returns the firmware version of the sensor.
dwInterfaceVersion: Returns the version of the interface (protocol) to hardware.
SensorType: Returns sensor type ID.
Returns
Success: true.

MikroCAD_ListAllSensors()
Lists all available sensors. (Before connection to the sensor.)

unsigned long MikroCAD_ListAllSensors();


Returns
Number of listed Sensors.

MikroCAD Software User Manual Software Development Kit • 46


MikroCAD_GetSensorSerialNumber
Returns the serial number of a listed sensor.

unsigned long MikroCAD_GetSensorSerialNumber(unsigned long dwIndex);


Parameters
dwIndex: Index in list.
Returns
The serial number.

MikroCAD_GetSensorTypeID
Returns the sensor ID.

MikroCAD_GetSensorTypeID();
Returns
The Sensor ID.

MikroCAD_Initialize
Initializes the measurement module.

Do not call MikroCAD_CalibrationOnSensor after the sensor has been initialized.

long MikroCAD_Initialize(unsigned long dwSensorNo,


SensorOperatingMode OperatingMode = SensorOperatingMode_
Measure);
Parameters
dwSensorNo: The sensor number.
OperatingMode: Operating mode (measurement, simple calibration....).
Returns
The error code.

MikroCAD_Deinitialize
Deinitializes the measurement module.

void MikroCAD_Deinitialize();

Parameter
MikroCAD_ParameterAvailable
Parameter available.

unsigned long MikroCAD_ParameterAvailable(MeasurementParameterID ParameterID);


Parameters
ParameterID: The parameter ID.
Returns
Availability of the parameter (flags).

MikroCAD Software User Manual Software Development Kit • 47


MikroCAD_SetIntegerParameter
Write an integer parameter.

long MikroCAD_SetIntegerParameter(MeasurementParameterID ParameterID,


long lParameter);
Parameters
ParameterID: The parameter ID.
lParameter: The returned parameter value.
Returns
An error code.

MikroCAD_GetIntegerParameter
Reads an integer parameter.

long MikroCAD_GetIntegerParameter(MeasurementParameterID ParameterID,


long& lParameter);
Parameters
ParameterID: The parameter ID.
lParameter: The returned parameter value.
Returns
An error code.

MikroCAD_GetIntegerParameterLimits
Reads the integer parameter limits.

long MikroCAD_GetIntegerParameterLimits(MeasurementParameterID ParameterID,


long& lMinParameter,
long& lMaxParameter);
Parameters
ParameterID: The parameter ID.
lMinParameter: The returned minimum value of the parameter.
lMaxParameter: The returned maximum value of the parameter.
Returns
An error code.

MikroCAD_SetFloatParameter
Writes a float parameter.

long MikroCAD_SetFloatParameter(MeasurementParameterID ParameterID,


double dParameter);
Parameters
ParameterID: The parameter ID.
dParameter: The parameter value.
Returns
An error code.

MikroCAD Software User Manual Software Development Kit • 48


MikroCAD_GetFloatParameter
Reads a float parameter.

long MikroCAD_GetFloatParameter(MeasurementParameterID ParameterID,


double& dParameter);
Parameters
ParameterID: The parameter ID.
dParameter: The returned parameter value.
Returns
An error code.

MikroCAD_GetFloatParameterLimits
Reads the float parameter limits.

long MikroCAD_GetFloatParameterLimits(MeasurementParameterID ParameterID,


double& dMinParameter,
double& dMaxParameter);
Parameters
ParameterID: The parameter ID.
dMinParameter: The returned minimum value of the parameter.
dMaxParameter: The returned maximum value of the parameter.
Returns
An error code.

Measurement and Projection Area


MikroCAD_SetMeasurementArea
Sets the measurement area.

void MikroCAD_SetMeasurementArea(double dSizeX,


double dSizeY,
double dX0,
double dY0);
Parameters
dSizeX: X dimension of the measurement area as a percentage of the camera image limits (0.0 to
1.0).
dSizeY: Y dimension of the measurement area as a percentage of the camera image limits (0.0 to
1.0).
dX0: X origin of the area (-1.0 to 1.0) as a percentage of the camera image limits.
dY0: Y origin of the area (-1.0 to 1.0) as a percentage of the camera image limits.

MikroCAD_ResetMeasurementArea
Resets the measurement area.

void MikroCAD_ResetMeasurementArea();

MikroCAD_SetProjectionArea
Sets the projection area.

MikroCAD Software User Manual Software Development Kit • 49


void MikroCAD_SetProjectionArea(double dSizeX,
double dSizeY,
double dX0,
double dY0);
Parameters
dSizeX: X dimension of the projection area as a percentage of the camera image limits (0.0 to
>1.0).
dSizeY: Y dimension of the projection area as a percentage of the camera image limits (0.0 to
>1.0).
dX0: X origin of the projection area (< -1.0 to >1.0) as a percentage of the camera image limits.
The projection image is greater than the camera image.
dY0: Y origin of the projection area (< -1.0 to >1.0) as a percentage of the camera image limits.
The projection image is greater than the camera image.

MikroCAD_SetProjectionMask
Sets the projection mask.

void MikroCAD_SetProjectionMask(unsigned char* pbyMask);


Parameters
pbyMask: The projection mask in camera coordinates.

MikroCAD_ResetProjectionArea()
Resets the projection area.

void MikroCAD_ResetProjectionArea();

Camera Images
MikroCAD_GetCameraImage8
Gets a camera image (black and white).

long MikroCAD_GetCameraImage8(unsigned char* pbyImage,


unsigned long dwAverage = 1);
Parameters
pbyImage: The buffer for the camera image.
dwAverage: The number of averages.
Returns
An error code.

MikroCAD_GetCameraImage24
Gets a camera image (color).

long MikroCAD_GetCameraImage24(unsigned char* pbyImage,


unsigned long dwAverage = 1);
Parameters
pbyImage: The buffer for the camera image (red, green, blue, red, green,...).
dwAverage: The number of averages.

MikroCAD Software User Manual Software Development Kit • 50


Returns
An error code.

Projector
MikroCAD_ProjectValue
Projects an image with one overall constant gray value.

long MikroCAD_ProjectValue(unsigned char cValue);


Parameters
cValue: Gray value.
Returns
An error code.

MikroCAD_ProjectColorValue
Projects a color value (entire image is the same color).

long MikroCAD_ProjectColorValue(unsigned char cRed,


unsigned char cGreen,
unsigned char cBlue);
Parameters
cRed: Red color value.
cGreen: Green color value.
cBlue: Blue color value.
Returns
An error code.

MikroCAD_ProjectImage8
Projects a black and white image.

long MikroCAD_ProjectImage8(unsigned char* pbyImage);


Parameters
pbyImage: The buffer for the projector image.
Returns
An error code.

MikroCAD_ProjectImage24
Projects a color image.

long MikroCAD_ProjectImage24(unsigned char* pbyImage);


Parameters
pbyImage: The buffer for the camera image (red, green, blue, red, green,...).
Returns
An error code.

MikroCAD_ProjectPattern
Projects a predefined pattern.

MikroCAD Software User Manual Software Development Kit • 51


long MikroCAD_ProjectPattern(short nPatternIndex);
Parameters
nPatternIndex: 0...NumPattern. 0 = off.
Returns
An error code.

MikroCAD_ProjectStripePattern
Projects a predefined pattern.

long MikroCAD_ProjectStripePattern(short nPatternIndex,


bool bInvers);
Parameters
dwPatternIndex: 0...NumStripePattern. 0 = off.
bInvers
Whether the pattern is inverted.
Returns
An error code.

MikroCAD_SwitchOnOffProjectorLampAvailable
Determines whether the projector lamp switch on / off switch is available.

bool MikroCAD_SwitchOnOffProjectorLampAvailable();
Returns
true if the projector lamp switch on / off switch is available; false otherwise.

MikroCAD_SwitchOnOffProjectorLamp
Switch the projector lamp on or off.

void MikroCAD_SwitchOnOffProjectorLamp(bool bOn);

MikroCAD_GetProjectorLampState
Returns the projector lamp state.

ProjectorLampState MikroCAD_GetProjectorLampState();
Returns
The projector lamp state.

Data Acquisition
MikroCAD_GetNumPredefinedMeasParameterSets
Returns the number of predefined measurement parameter sets.

unsigned long MikroCAD_GetNumPredefinedMeasParameterSets();


Returns
The number of predefined measurement parameter sets.

MikroCAD_GetPredefinedMeasParameterSetName
Returns the name of a predefined measurement parameter set.

MikroCAD Software User Manual Software Development Kit • 52


char* MikroCAD_GetPredefinedMeasParameterSetName(unsigned long dwIndex);
Parameters
dwIndex: The index in the list.
Returns
The name of the predefined measurement set.

MikroCAD_SelectCurrentMeasurementProgram
Selects the current measurement program.

long MikroCAD_SelectCurrentMeasurementProgram(char* pszMeasProgName = NULL);


Parameters
pszMeasProgName: Measurement program name (not case-sensitive). NULL = default pro-
gram.
Returns
An error code.

MikroCAD_GetCurrentMeasurementProgramIndex
Gets the current measurement program index.

long MikroCAD_GetCurrentMeasurementProgramIndex();
Returns
The current measurement program index. A value less than 0 indicates the default measurement
program.

MikroCAD_GetCurrentMeasurementProgram
Gets the current measurement program.

char* MikroCAD_GetCurrentMeasurementProgram();
Returns
The current measurement program. "" indicates the default program.

MikroCAD_GetDefaultMeasProgramName
Returns name of the measuring program that is identical to the default measuring program.

char* MikroCAD_GetDefaultMeasProgramName();
Returns
The name of the measurement program identical to the default measuring program or "-1" if no
measurement program is identical.

Measurement
MikroCAD_Measure
Performs a measurement.

long MikroCAD_Measure(bool bOnSensor = true);


Parameters

MikroCAD Software User Manual Software Development Kit • 53


bOnSensor: Height image calculation on sensor or sensor DLL if possible. Always true for normal
cases, false for development or tests.
Returns
An error code.

MikroCAD_HeightImagePtr
Returns a pointer to height image data.

short* MikroCAD_HeightImagePtr();
Returns
A pointer to height image data or NULL if not available.

MikroCAD_ValidDataPtr
Returns a pointer to valid data or NULL if not available.

unsigned char* MikroCAD_ValidDataPtr();


Returns
A pointer to valid data. NULL if not available.

MikroCAD_CameraImagePtr
Returns a pointer to camera image data (texture). The image is a 24 bit color image (red, green, blue, red,
...).

unsigned char* MikroCAD_CameraImagePtr();


Returns
A pointer to camera image data (texture). NULL if not available.

MikroCAD_CameraRawImagePtr
Returns a pointer to camera image data (raw data). The image is a 24 bit color image (red, green, blue,
red, ...).

unsigned char* MikroCAD_CameraRawImagePtr();


Returns
A pointer to camera image data (raw data). NULL if not available.

MikroCAD_PowerSpectrumPtr
Returns a pointer to the power spectrum.

short* MikroCAD_PowerSpectrumPtr();
Returns
A pointer to the power spectrum.

MikroCAD_IsDataBufferLocked
Determines whether the data buffer is locked.

bool MikroCAD_IsDataBufferLocked();
Returns

MikroCAD Software User Manual Software Development Kit • 54


true if the data buffer is locked; false otherwise.

MikroCAD_UnlockDataBuffer
Unlock the data buffer.

void MikroCAD_UnlockDataBuffer();

Configuration Measurement Programs and Other Settings


MikroCAD_GetMeasProgramSetPtr
Returns a pointer to the measuring program set object.

CMeasProgramSet* MikroCAD_GetMeasProgramSetPtr();
Returns
A pointer to the measuring program set object.

MikroCAD_ReadConfig
Reads the configuration.

long MikroCAD_ReadConfig();
Returns
An error code.

MikroCAD_WriteConfig
Writes the configuration.

long MikroCAD_WriteConfig();
Returns
An error code.

MikroCAD_ReadInitialParameterFromFile
Reads the initial parameters from a file.

long MikroCAD_ReadInitialParameterFromFile(char* pszFileName);


Parameters
pszFileName: The file name, including the path.
Returns
An error code.

MikroCAD_WriteInitialParameterToFile
Writes the initial parameters to a file.

long MikroCAD_WriteInitialParameterToFile(char* pszFileName);


Parameters
pszFileName: The file name, including the path.
Returns
An error code.

MikroCAD Software User Manual Software Development Kit • 55


MikroCAD_ReadMeasProgramDataFromFile
Reads the measurement program data from a file.

long MikroCAD_ReadMeasProgramDataFromFile(char* pszFileName);


Parameters
pszFileName: The file name, including the path.
Returns
An error code.

MikroCAD_WriteMeasProgramDataToFile
Writes the measurement program data to a file.

long MikroCAD_WriteMeasProgramDataToFile(char* pszFileName);


Parameters
pszFileName: The file name, including the path.
Returns
An error code.

MikroCAD_ListAllSensorsType
List all available sensors of a special type. (Before connection with the sensor).

unsigned long MikroCAD_ListAllSensorsType(SensorTypeID SensorType);


Parameters
SensorType: The sensor type ID.
Returns
The number of listed sensors.

MikroCAD_GetSensorSerialNumberType
Returns the serial number of a listed sensor of a special type.

unsigned long MikroCAD_GetSensorSerialNumberType(unsigned long dwIndex);


Parameters
dwIndex: The index in the list.
Returns
The serial number.

MikroCAD_ListSensorDescriptions
List all sensor descriptions. (Only for sensors with separate camera and projector.)

Sensor must not be initialized!

long MikroCAD_ListSensorDescriptions(SensorTypeID TypeID);


Parameters
TypeID: The sensor type ID.
Returns
The number of description items.

MikroCAD Software User Manual Software Development Kit • 56


MikroCAD_ReadSensorDescription
Reads the sensor description.

TSensorDescription* MikroCAD_ReadSensorDescription(long lIndex);


Parameters
lIndex: The index in a list.
Returns
A pointer to a sensor description.

MikroCAD_ReadMeasProgramDataFromFile
Reads the measurement program data from a file.

long MikroCAD_ReadMeasProgramDataFromFile(char* pszFileName);


Parameters
pszFileName: The file name, including the path.
Returns
An error code.

MikroCAD_WriteMeasProgramDataToFile
Writes the measurement program data to a file.

long MikroCAD_WriteMeasProgramDataToFile(char* pszFileName);


Parameters
pszFileName: The file name, including the path.
Returns
An error code.

MikroCAD_ListAllSensorsType
List all available sensors of a special type. (Before connection with the sensor).

unsigned long MikroCAD_ListAllSensorsType(SensorTypeID SensorType);


Parameters
SensorType: The sensor type ID.
Returns
The number of listed sensors.

MikroCAD_GetSensorSerialNumberType
Returns the serial number of a listed sensor of a special type.

unsigned long MikroCAD_GetSensorSerialNumberType(unsigned long dwIndex);


Parameters
dwIndex: The index in the list.
Returns
The serial number.

MikroCAD_ListSensorDescriptions
List all sensor descriptions. (Only for sensors with separate camera and projector.)

MikroCAD Software User Manual Software Development Kit • 57


Sensor must not be initialized!

long MikroCAD_ListSensorDescriptions(SensorTypeID TypeID);


Parameters
TypeID: The sensor type ID.
Returns
The number of description items.

MikroCAD_ReadSensorDescription
Reads the sensor description.

TSensorDescription* MikroCAD_ReadSensorDescription(long lIndex);


Parameters
lIndex: The index in a list.
Returns
A pointer to a sensor description.

Calibration (General)
MikroCAD_CalibrationOnSensor
Determines whether there is a calibration on the sensor.

The sensor must not have been initialized by calling MikroCAD_Initialize when you call this
function!

bool MikroCAD_CalibrationOnSensor(unsigned long dwSensorNo,


CalibrationMode CalMode);
Parameters
dwSensorNo: The sensor number.
CalMode: The calibration mode.
Returns
true if any calibration is on the sensor.

Calibration (Simple)
MikroCAD_GridCalibration
Executes a grid calibration.

long MikroCAD_GridCalibration();
Returns
An error code.

MikroCAD_PlaneCalibration
Executes a plane calibration.

long MikroCAD_PlaneCalibration();
Returns

MikroCAD Software User Manual Software Development Kit • 58


An error code.

MikroCAD_GetNumGrooveCalibrations
Gets the number of groove calibrations.

long MikroCAD_GetNumGrooveCalibrations();
Returns
The number of groove calibrations.

MikroCAD_GrooveCalibration
Executes a groove calibration.

long MikroCAD_GrooveCalibration(long lIndex);


Parameters
lIndex: The Index. basic calibration = 0; additional groove calibration - nIndex = 1, etc. See also
number of MikroCAD_GetNumGrooveCalibrations().
Returns
An error code.

MikroCAD_GetCalibrationState
Returns the calibration state:

#define SIMPLE_CALIB_STATE_NONE 0
#define SIMPLE_CALIB_STATE_PLANE 1
#define SIMPLE_CALIB_STATE_GRID 2
#define SIMPLE_CALIB_STATE_GROOVE 4

unsigned long MikroCAD_GetCalibrationState();


Returns
State flags.

MikroCAD_CalibrationToSensor
Sends calibration data to sensor.

long MikroCAD_CalibrationToSensor();
Returns
An error code.

MikroCAD_GetCalibrationResultData
Returns a pointer to result data.

short* MikroCAD_GetCalibrationResultData();
Returns
A pointer to result data.

MikroCAD_UnlockCalibrationDataBuffer
Unlocks the data buffer.

MikroCAD Software User Manual Software Development Kit • 59


void MikroCAD_UnlockCalibrationDataBuffer();

MikroCAD_ReadCalibrationParameter
Returns a pointer to the calibration parameters.

TSimpleCalibPar* MikroCAD_ReadCalibrationParameter();
Returns
A pointer to the calibration parameters.

Events
MikroCAD_GetNumAvailableEventTypes
Returns the number of the available event types.

unsigned long MikroCAD_GetNumAvailableEventTypes();


Returns
The number of the available event types.

MikroCAD_GetEventType
Returns the sensor event type .

SensorEventType MikroCAD_GetEventType(long lIndex);


Parameters
lIndex: Index in the event type list.
Returns
The sensor event type, or "SensorEventType_None" if not found.

MikroCAD_StartSensorEvent
Starts the sending of sensor events.

void MikroCAD_StartSensorEvent(MikroCADEventFunc EventFunc);


Parameters
EventFunc: Sensor event function.

MikroCAD_StopSensorEvent
Stops the sending of sensor events.

void MikroCAD_StopSensorEvent();

MikroCAD Software User Manual Software Development Kit • 60


Support

For assistance regarding a component or product, please contact LMI Technologies.

World

Email [email protected]
Web http://www.lmi3D.com
Phone +49 3328 9369-6

MikroCAD Software User Manual 61


Contact

Americas EMEAR ASIA PACIFIC

LMI Technologies (Head Office) LMI Technologies GmbH LMI (Shanghai) Trading Co., Ltd.
Vancouver, Canada Berlin, Germany Shanghai, China
+1 604 636 1011 +49 (0)3328 9360 0 +86 21 5441 0711

LMI Technologies has sales offices and distributors worldwide. All contact information is listed at
lmi3D.com/contact/locations.

MikroCAD Software User Manual 62

You might also like