Software Manual DPL Magic Marker
Software Manual DPL Magic Marker
Magic Mark
for Laser Marking Devices
DPLMagic Marker
DPLGenesis Marker
DPLNexus Marker
Copyright and Protection Rights
Internet: www.ACI-Laser.de
E-Mail: [email protected]
This publication, or the software described therein, respectively, may not be reproduced either par-
tially or in its entirety in any form, nor translated or saved to a retrieving system without the express
written permission of the manufacturer.
The manufacturer does not assume any guarantee regarding the content of this publication or for
the software described therein in particular and denies any suggestion of a guarantee for the mar-
ketability or the suitability of the publication contents nor for the software for any particular purpose.
The manufacturer assumes no liability for any indirect damages, resulting damages or certain other
damage, other than that caused by malice or gross negligence, which has arisen because of or in
connection with the content of these instructions or the software described therein, be it on the basis
of impermissible action, contract-related or another matter.
We are constantly working on the further development.
Please understand that we must reserve the right to make changes to the scope of delivery in form,
equipment and technology at all times.
The manufacturer expressly reserves all copyright rights in accordance with the law.
Contents
1 Delivery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.1 Scope of delivery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.2 Software manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.3 Manufacturer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.4 Warranty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.1 System requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.2 Installation requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Windows XP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Windows 2000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.3 Installation sequence. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.4 Software installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.5 Dongle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.6 Laser connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.7 Program start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.8 Specific parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.9 Exit program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.10 Uninstalling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.11 Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.12 Release . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.13 Language settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3 Program description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.1 Program start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Command line parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Offline state . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Connect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.2 Software user interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.3 Entry elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Text box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Multi line text box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Numerical input box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
List box. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Check box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.4 Access rights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Enter password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Change passwords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.5 File management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
New file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Open file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Save File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Print file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Import options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Apply options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
3.7.5.11 Move parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
3.7.5.12 Size parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
3.7.5.13 Rotation parameter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
3.7.5.14 Mirror parameter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
3.7.5.15 Polar parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
3.7.5.16 Fill parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
3.7.5.17 Wobble parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
3.7.5.18 Path parameter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
3.8 Script area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3.8.1 Script samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
3.8.1.1 Serial numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Graphic part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Script part. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Main program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
CallBack function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
3.8.1.2 Excel content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Graphic part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Script part. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Main program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
CallBack function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
3.9 Parameter area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Laser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Auto start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Measurement unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
I/O control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Default and test values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Marking field. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
3.10 Service area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Laser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Jump delays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Corner delay. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
First pulse suppression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
4 Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
4.1 Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
General information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Program documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
4.2 The script programming window . . . . . . . . . . . . . . . . . . . . . . . . . 62
4.2.1 File handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
New . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Open . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Save . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Save All . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Print . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
4.2.2 Edit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Cut . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Copy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Paste . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Undo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Redo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
4.2.3 Object Catalogue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Display object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
4.2.4 Start/Stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Start/Continue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Pause. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
End. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
4.2.5 Program Testing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Breakpoint On/Off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Evaluate Expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Edit Point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Jumping in (individual step) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Skip (procedure step). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Jump out (Finish procedure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
4.2.6 User Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Edit user dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
4.3 Programming language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
4.3.1 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
General information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Naming Variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Byte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Boolean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Integer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Long . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Single . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Double . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Currency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Date . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
String . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Variant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
4.3.2 Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
4.3.3 Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
4.3.4 Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
For Next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
While . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Do . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
4.3.5 Branching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
If Then Else . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Select Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
4.3.6 Procedures and Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Procedures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
4.3.7 Editing Texts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Len . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Left . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Mid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Right. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Str. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
StrReverse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
UCase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
4.3.8 Mathematical Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Sin, Cos, Tan, Atn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Exp, Log, Sqr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Abs, Fix, Int, Round, Sgn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
4.3.9 Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
4.3.10 Type Conversion Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
4.3.11 Working with Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
File names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
4.3.12 Sequential Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Open . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Close . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Print . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Write. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Line Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
4.3.13 Files with Direct Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Put . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Get . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
4.3.14 Creating User Dialog Windows. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Edit user dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Menu bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Editing properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
View of elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Select . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Add group box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Add text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Add text box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Add check box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Add options button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Add list box. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Add droplist box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Add combo box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Add picture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Add buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Dialog function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
4.3.15 Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Input box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Message Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
PopUp menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
4.3.16 Handling of Errors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
On Error Goto. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
On Error Resume Next. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Refresh. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
SetCheck . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
GetCheck . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
BoundingBox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
ShowBoundingBox. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
GetBBMinX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
GetBBMaxX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
GetBBMinY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
GetBBMaxY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
ZoomBoundingBox. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
ZoomAll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
4.4.3 External Extensions (EX.). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Formatter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
ReadIniFormat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
WriteIniFormat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
ReadXmlFormat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
WriteXmlFormat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
SerOpen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
SerClose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
SerCloseAll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
SerChangeBaudRate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
SerWrite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
SerWriteByte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
SerWritePending . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
SerWritePendingWait . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
SerRead . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
SerReadByte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
SerReadWait . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
SerReadUntil . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
SerReadUntilWait. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
SerReadPending . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
4.4.4 ScannerControl extensions (SC.) . . . . . . . . . . . . . . . . . . . . . . . . . . 120
A_GetStatusDigital. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
A_GetStatusAnalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
A_SetLaserState . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
A_SetShutterState . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
A_LockShutter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
A_SetPilotState . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
A_GetBufferEmptyState. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
A_ReadyForNextSyncCmd . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
A_Stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
A_GetGeneralInputDigital . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
A_SetGeneralOutputDigital . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
A_ResGeneralOutputDigital. . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
A_ClrGeneralOutputDigital. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
A_GetGeneralOutputDigital . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
A_GetPower . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
S_Power. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
S_Speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
S_QSF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
S_QSF_PW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
S_SetStartStopDelay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
S_Pos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
P_SetRotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
P_SetSize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
P_SetMove . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
P_SetClip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
P_SetMirror . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
4.4.5 HighlevelGraphics extensions (HG.) . . . . . . . . . . . . . . . . . . . . . . . 125
InitVectorArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
FreeVectorArray. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
SendToSC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
GetBoundingBox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
GetBoundingBoxLast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Vector. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Ellipse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Rectangle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
TextInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Barcode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Datamatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
PDF417 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
HPGL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Draw. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Fill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Mirror . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Polar. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Clip. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
4.5 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
4.5.1 BaseRef . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
4.5.2 Format specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
4.5.3 Special format specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
4.5.4 Barcode specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
5 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
1 Delivery
1.3 Manufacturer
See the back of the cover sheet.
1.4 Warranty
The vendor, programmers and author have applied the greatest
possible care in the creation of the software and the manual. Never-
theless, the vendor, programmers and author do not assume any
guarantee for the software and the manual. In particular, the vendor,
programmers and author offer no guarantee that this software cor-
responds to the demands of the customers, or that the software is
entirely without errors. In no case can the vendor, programmers or
author be made liable for any errors, destruction or resulting dam-
age that can be derived from the use of the software.
2 Installation
6. Now the actual installation procedure for the software can take
place.
8. Select the desired program folder with the help of the Browse
button or use the default setting.
9. Click on Next.
10. Follow further instructions.
The installation can be terminated at any time by pressing the
Esc key or with the Cancel button.
11. Once the installation is complete, the message Installation
Complete will appear.
12. Finish by clicking on the Close button.
The software will run now in Demo mode.
2.5 Dongle
1. Plug the delivered dongle into an available USB port.
The software will only run in Demo mode without the dongle.
2. Because of the new hardware component an assistent to
install the required software is started.
Follow the installation instructions.
2.10 Uninstalling
If necessary, uninstall the software via the operating system:
Start → Settings → Control Panel → Software...
2.11 Help
2.12 Release
3 Program description
This software is designed for the creation of marking programs as
well as for the monitoring and control of a laser or a manufacturing
cell, respectively.
The program was developed to make the integration of one or more
lasers with a manufacturing cell possible.
The most important functions of the software are:
• The control of several lasers with only one PC:
• The program is executed independently for each laser.
• Each laser can exchange messages with other lasers.
• The number of lasers is solely dependent on the power of the
PC.
• A license is required for each laser!
• Integration with the manufacturing cell:
• High performance scripting language for controlling machine
processes (handling systems)
• Can be operated as a task bar symbol without a visible win-
dow.
• Among other things, can communicate with other programs
via a socket interface or file support.
• Communication with external instruments via various interfac-
es.
• Accesses databases.
• Integration with host computer.
• Administration of all laser parameters:
• Power output.
• Speed.
• Frequency.
• Delays.
• Interfaces.
• Graphic objects:
• Precise input of parameters.
• Fonts with single lines and all TrueType fonts.
• Polar and multi line texts.
• Various formats for numbers, date, time, etc.
• 1D (normal) and 2D (data matrix) barcodes.
• Basic objects (line, circle, rectangle).
• Import of graphic images in various formats (DWG, DXF,
HPGL, BMP, JPG and GIF).
• Filling of all polygon-based objects.
• Rotation of all objects.
• Changes the size of all objects.
• Moves all objects.
Command line parameter If you want to use a different configuration, then you must pass a
command line parameter (/L:) followed by the name of the configu-
ration to the software.
This usually takes place by using a shortcut.
So to use a configuration with the name Laser1, give: /L:Laser1 as
the parameter.
NOTE!
If two or more lasers are to be operated simultaneously,
each laser (configuration) requires its own license!
Offline state If the software cannot establish a connection to the laser or an ex-
isting connection is interrupted, the software shows this with the of-
fline mode.
In this case the operating elements for controlling the laser are de-
activated.
Should this have happened unintentionally, check or correct the in-
terface settings in the parameter area, see Parameter area on
page 55.
Connect
1 2 3 4 5 6 7 8 9 10 11 12
13 14 15 16 17 18 19 20 21 22 23 24
1 Title bar 13 Button to clear messages
2 Menu bar 14 Message window
3 File toolbar 15 I/O control display
4 Password group 16 Graphic toolbar
5 Laser toolbar 17 Zoom toolbar
6 Laser status group 18 Parameter area graphic
7 Element window 19 Designation of the laser/number of the device
8 Graphic area 20 Current configuration
9 Script area 21 Run time timer
10 Parameter area 22 User timer
11 Service area 23 Version/build number of the software
12 Graphic window 24 Status line graphic window
Text box
The text box is primarily for entering texts, such as the font type, as
is shown here.
The multi line text box can accept several lines of text.
It has two scroll bars that are automatically activated when the lines
cannot be directly shown.
List box
No values or texts are entered in this field, but a list with possible val-
ues from which you make a selection is displayed after clicking on
the arrow key.
Check box
Enter password
Change passwords
Fig. 20 Dialog window for changing the password for levels 1 and 2, with the
passwords following the first installation
New file
Open file
Save File
Print file
To print a file, select the menu option Print… in the file menu.
The Print dialog is displayed
Here you select the printer to be used and start the print output.
What is just being displayed in the graphic window is output on the
printer.
At this time the selection is adjusted to the print medium, whereby
the output from the printer depicts a somewhat larger selection.
NOTE!
For security purposes, the password many only be
known to authorised persons. By no means should it be
written down on the monitor, PC, keyboard, laser, etc.
NOTE!
In this case it means an electronic switch off. The sys-
tem is not disconnected from the line voltage.
Lock shutter
Click on the Bounding box icon to switch the output of the bounding
box by the laser (pilot laser) on or off.
Start marking
NOTE!
If a script is accessible, then this will start.
Otherwise the graphic image will be output directly.
Stop marking
I/O control
Message window
Fig. 29 Messages
Element window
This area shows the current pointer position when the pointer is over
the graphic window.
NOTE!
Elements provide their own local coordinate system for
the objects and modifiers contained in them. These are
displayed by means of a small crosshair in the graphic
window.
NOTE!
Element branches can contain either other element
branches or objects and modifiers, but not both at the
same time!
Coordinate systems
With these symbols the coordinate system 0-point of the graphic el-
ement or the normal elements is shown in the graphic window.
The higher order graphic element is constantly displayed, the 0-
point of the other elements are only shown if an element or an ob-
ject contained therein is selected.
The higher order graphic element with its coordinate system repre-
sents the reference point for all lower order elements.
An element that contains objects represents the reference system
of just these objects.
Elements and objects Use elements to combine objects or objects and modifiers that
form a unit, respectively
Example:
In order to generate a filled text, first create an element followed by
a text object and fill modifier.
The element now represents the complete text.
Now the element can be moved to any position in the marking field.
Enable element
PopUp menu
Drag & Drop The so-called Drag and Drop function is also supported.
You can drag branches to new positions or copy them in.
Procedure:
1. Keep the left mouse key pressed above the branch that you
want to move or copy.
2. Keeping the left mouse key pressed, drag the branch to the de-
sired position.
3. To move it, release the left mouse key.
To copy activate the Ctrl key before releasing the left mouse
key. You will then see a small + sign at the mouse pointer.
Target positions that are not possible or not permitted are shown as
a prohibiting sign instead of the mouse pointer. If the left mouse key
is released on these occasions, the process is terminated.
New element
Click on this icon to create a new element in the tree structure of the
element window. See also Element parameter on page 40.
Line
Click on this icon to insert the object line into the tree structure of the
element window. See also Line parameter on page 41.
Rectangle
Click on this icon to insert the object rectangle into the tree structure
of the element window. See also Rectangle parameter on page 41.
Ellipse
Click on this icon to insert the object ellipse into the tree structure of
the element window. See also Ellipse parameter on page 42.
Text
Click on this icon to insert the object text into the tree structure of
the element window. See also Text parameter on page 42.
Barcode
Click on this icon to insert the object barcode in the tree structure of
the element window. See also Barcode parameter on page 43.
Datamatrix
Click on this icon to insert the object datamatrix in the tree structure
of the element window. See also Datamatrix parameter on page 44.
PDF417
Click on this icon to insert the object PDF417 in the tree structure of
the element window. See also PDF417 parameter on page 45.
NOTE!
You need a special license to use the PDF417 code!
Import
Click on this icon to insert the object import in the tree structure of
the element window.
Import enables you to import image files that have been created by
external programs. See also Import parameter on page 46.
Move
Click on this icon to insert the Move modifier in the tree structure of
the element window.
All objects that are located in the same element in front of this mod-
ifier can be moved by the indicated value. See also Move parameter
on page 47.
Size
Click on this icon to insert the Size modifier in the tree structure of
the element window.
All objects that are located in the same element in front of this mod-
ifier can be changed in size. See also Size parameter on page 47.
Rotation
Click on this icon to insert the Rotation modifier in the tree structure
of the element window.
All objects that are located in the same element in front of this mod-
ifier can be rotated around a defined point. See also Rotation param-
eter on page 48.
Mirror
Click on this icon to insert the Mirror modifier in the tree structure of
the element window.
All objects that are located in the same element in front of this mod-
ifier can be mirrored on the X- and/or Y-axis of a virtual coordinate
system. See also Mirror parameter on page 48.
Polar
Click on this icon to insert the polar marking in the tree structure of
the element window.
All objects that are located in the same element in front of this mod-
ifier can be aligned to a virtual circle. See also Polar parameter on
page 48.
Fill
Click on this icon to insert the Fill modifier in the tree structure of the
element window.
All objects that are located in the same element in front of this mod-
ifier can be filled. See also Fill parameter on page 49.
NOTE!
Fillings can only be applied to closed polygons (contin-
uous lines).
If fillings are applied to other structures, there may be
unexpected results.
Wobble
Click on this icon to insert the Wobble modifier in the tree structure
of the element window.
For all objects that are located in the same element in front of this
modifier the lines can be changed in his width and structure.
See also Wobble parameter on page 49.
Pfad
Click on this icon to insert the Path modifier in the tree structure of
the element window.
All objects that are located in the same element in front of this mod-
ifier the lines can be aligned at a wavy path.
See also Path parameter on page 49.
A click on this icon results in the graphic window showing the entire
marking area.
A click on this icon results in the graphic window showing the con-
tent of the bounding box in a frame-filling way.
Zoom plus
Zoom minus
Zoom window
After activating this icon a rectangle can be drawn with the mouse
that depicts the new zoom area.
The icon remains active until you complete the action or you click on
it again.
The first click with the left mouse button defines the first corner of the
zoom rectangle, the second click defines the concluding second cor-
ner.
NOTE!
If you are using a wheel mouse, you can also zoom us-
ing the wheel.
The values in the entry fields can also be changed in
this manner.
Also use the Shift and Ctrl keys with the entry fields to
influence the changes.
Measurement
After activating this symbol you can draw a line in the graphic win-
dow with the mouse.
The icon remains active until you complete the action or click on the
icon again.
The first click with the left mouse button defines the beginning of the
line, the second click defines the end of the line.
The length of the line, as well as the lengths along the X- and Y-axes
are shown in the status line of the graphic window.
Apart from the graphic elements in the Graphic window, you can
also see the following:
1. A pale blue rectangle with rounded corners, which contains a
crosshair.
This is the recommended marking area.
If you go outside of this area with your marking, then you will
have to expect reductions in quality, such as diminished output,
etc.
2. A pale blue rectangle that surrounds the first one.
This the maximum possible physical marking area, that the de-
flecting/scanning mirror can reach. Marking beyond this bound-
ary is not possible!
3. A dotted red square.
This is exactly big enough to just encompass the graphic ele-
ments, therefore the designation "bounding box".
Moving the view You can move the view in the graphic window by left-clicking the
mouse anywhere in the window and then moving the mouse, still
holding down the button. The view should follow the mouse move-
ment until you release the mouse button.
NOTE!
When the same procedure is applied with the right
mouse button, the element or object currently selected
in the element window can be moved.
This parameter group is part of the root branch of the tree structure
in the element window and is therefore contained in every graphic.
All parameters apply universally, i.e. to the entire image.
Laser parameter If this group is active, it determines the settings for the laser. If it is
inactive, then the default and test values from the parameter area
are applied.
See Default and test values on page 57.
Move With this the entire graphic can be moved in the X- or Y-directions.
Mirror The graphic can be mirrored on the axes of a virtual coordinate sys-
tem.
Script file By specifying a script file and setting the activating check mark, the
graphic can be linked with a script file (*.bas).
External axis The setting values here are passed to a script program for process-
ing by means of a Call-Back function.
See LC_ExternAxis(...) on page 109.
Laser parameter Here, too, you have the possibility of assigning the laser new param-
eters.
The individual activation boxes permit you to determine exactly,
which parameters you want to change.
External axis Here you can specify the position of up to four external axes as well.
These values are sent to a script program for processing.
See LC_ExternAxis(...) on page 109.
Move The graphic that belongs to this element can be moved in X- and Y-
directions.
NOTE!
The move can also be executed by clicking and drag-
ging it in the graphic window with the right mouse but-
ton!
Because a line has a beginning and an end, these values can be en-
tered separately.
NOTE!
By clicking and dragging in the graphic window with the
right mouse button, you can change both values simul-
taneously and in doing so move the line.
BaseRef The BaseRef group enables you to establish which point of the ob-
ject is to be fixed to which coordinates. See BaseRef on page 131.
NOTE!
The BaseRef can be changed by clicking and dragging
in the graphic window the right mouse button.
Dimension Here is where you enter the width and height of your rectangle.
Corner radius To create a rectangle with rounded corners, enter the desired radii
here.
NOTE!
Both text fields must contain a radius > 0 to generate an
acceptable rectangle.
Both values are usually the same.
BaseRef The BaseRef group enables you to establish which point of the ob-
ject is to be fixed to which coordinates. See BaseRef on page 131.
NOTE!
The BaseRef can be changed by clicking and dragging
the right mouse button in the graphic window.
Angle If you want an ellipse/circle segment, then you determine the seg-
ment with the beginning or end angle.
BaseRef The BaseRef group enables you to establish which point of the ob-
ject is to be fixed to which coordinates. See BaseRef on page 131.
NOTE!
The BaseRef can be changed by clicking and dragging
the right mouse button in the graphic window.
Additional settings Line space: Determines the line spacing in multi line texts.
Spacing: Is a factor with which the character spacing can be
changed.
Codepage: Permits the specification of a codepage for special
cases, e.g. Asian characters.
BaseRef The BaseRef group enables you to establish which point of the ob-
ject is to be fixed to which coordinates. See BaseRef on page 131.
NOTE!
The BaseRef can be changed by clicking and dragging
the right mouse button in the graphic window.
Barcode height For the definition of the barcode heights see Barcode specification
on page 134.
Module parameter By Module Width, the width of the narrowest barcode bar is meant.
With Fill Distance you determine the distance at which the laser
draws the lines necessary for filling.
CAUTION!
The fill spacing might also be slightly changed by the
program in order to comply with the required module
width.
If this is not desired on critical materials, it can be pre-
vented by setting the module width to a whole number
multiple of the fill distance.
3.7.5.8 Datamatrix
parameter
BaseRef The BaseRef group enables you to establish which point of the ob-
ject is to be fixed to which coordinates. See BaseRef on page 131.
NOTE!
The BaseRef can be changed by clicking and dragging
the right mouse button in the graphic window.
Module parameter Choose the required version of the datamatrix barcode under Type.
Size fixes the size of an individual point of the datamatrix code.
The total size results from the number of points that comprises the
datamatrix code, multiplied by the stated Size.
With Fill Distance you determine the distance at which the laser
draws the lines necessary for filling.
CAUTION!
The fill spacing might also be slightly changed by the
program in order to comply with the required module
width.
If this is not desired on critical materials, it can be pre-
vented by setting the module width to a whole number
multiple of the fill distance.
CAUTION!
A special license is required to use the PDF417 code!
BaseRef The BaseRef group enables you to establish which point of the ob-
ject is to be fixed to which coordinates. See BaseRef on page 131.
NOTE!
The BaseRef can be changed by clicking and dragging
the right mouse button in the graphic window.
Code parameter By specifying Rows and/or Columns, the number of rows or col-
umns, respectively, can be predetermined.
ECC determines the degree of error tolerance.
Module parameter A few different versions of PDF417 barcodes are available under
Type.
By Module Width, the width of the narrowest barcode bar.
With Fill Distance you determine the distance at which the laser
draws the lines necessary for filling.
CAUTION!
The fill spacing might also be slightly changed by the
program in order to comply with the required module
width.
If this is not desired on critical materials, it can be pre-
vented by setting the module width to a whole number
multiple of the fill distance.
BaseRef The BaseRef group enables you to establish which point of the ob-
ject is to be fixed to which coordinates. See BaseRef on page 131.
NOTE!
The BaseRef can be changed by clicking and dragging
the right mouse button in the graphic window.
Import file In this text field the files to be imported are entered.
Load/Reload Clicking this button reloads the graphic image once more, in case it
has been altered in the meantime.
Vectors For inforrmation about the file to import the number of existing vec-
tors is shown here.
Import options Here you can defin, if vector files should be optimised for the laser
output and how to do this.
Sort. vectors: Reducing the number of vectors.
You can set the parameters min. length of a
vector and max. angle of vectors border on
each other.
Combine vectors: Combining of vectors to realise compact areas.
You can set the parameter max. distance bet-
ween two vector points.
Apply options Clicking this button the choosed import parameters are applied.
NOTE!
Fillings can only be applied on closed polygons (contin-
uous lines).
If fillings are applied to other structures, the results can
be unexpected.
With the modifier Wobble a line can shown with lined up polygones.
You can set the width and the distance of the polygones and the
number of polygon points. So the width and the structure of the line
are defined.
A graphic or text element can lined up on a wavy path using the Path
modifier.
For the wave style you can set the values X-Center, Y-Center, Max.
Length, Period and Amplitude.
In the script area you can do all the things that go beyond the simple
output of graphic objects.
Beginning with the creation of a simple process over the recurring
output of a drawing as a reaction to a control entry, up to the control
of a complete system with conveyor belt, various interfaces and pos-
sibly several lasers.
Information that applies to the script program window can be found
under Programming on page 62.
Details regarding the programming language used is in Program-
ming on page 62
And the special language extensions of this software are under La-
ser specific script extensions on page 107.
3.8.1.1 Serial numbers You can find this example in the installation directory inside the fold-
er Samples\SerialNumber.
Graphic part
Script part
'Version 1.0
Option Explicit
Sub Main
SerNo1 = CLng(EX.ReadXmlFormat("SerNo1", "1", "C:\SerNumber.xml"))
LC.Mark("", True)
SerNo1 = SerNo1 + 1
EX.WriteXmlFormat("SerNo1", CStr(SerNo1), "C:\SerNumber.xml")
End Sub
Main program The first line is a comment and gives information about the version
of this script program.
The second line, if at hand, forces the programmer to also declare
all variables used in the program (Dim...), this procedure can only be
recommended!
In the next line a variable (SerNo1) is declared, because it will take
up the actual serial number later.
The actual program consists of two parts:
1. The main program Main and
2. the CallBack function LC_Formatter... See also
LC_Formatter(...) on page 109.
Main is called up (started) when the program is started and carries
out the following actions:
1. Reading out the serial number from an XML file.
2. Starts the actual marking (LCMark("", True)).
3. After the marking is completed the serial number is increased by
one and finally,
4. written back into the XML file.
3.8.1.2 Excel content You will find this example in the Samples\Excel folder in the instal-
lation directory.
NOTE!
Microsoft Excel must be installed on your computer in
order to execute this example program!
Graphic part
The text in the multi line text box (Cell A1:#A1#) or (Cell A2:#A2#)
does not have a default value in this example, that is why none is
shown in the graphic window.
However, this has no effect on the function.
In this case the text of each line contains the following components:
1. A fixed text (Cell A1:) and
2. a format specification (#A1#)
For further information on format commands see also Format spec-
ifications on page 132 and Special format specifications on
page 133.
In this case the script program has the task of reading out the cell
that was specified by the format specification, from an Excel table;
in this case the A1 and A2 cells.
Script part
'Version 1.0
Option Explicit
Sub Main
Set objExcel = CreateObject("Excel.Application")
objExcel.Workbooks.Open("C:\Test.xls")
LC.Mark("", True)
objExcel.Quit
End Sub
Main program The first line is a comment and gives information about the version
of this script program.
The second line, if at hand, forces the programmer to also declare
all variables used in the program (Dim ...), this procedure can only
be recommended!
An object (objExcel) is declared in the next line, this will be used later
to access Excel.
The actual program consists of two parts:
1. The main program Main and
2. The CallBack function LC_Formatter. See also
LC_Formatter(...) on page 109.
Main is called up (started) when the program is started and carries
out the following actions:
1. Initialising the Excel object.
2. Opening the Excel file.
3. Starting the actual marking (LC.Mark("",True)).
4. Closing Excel.
Laser
The type of the laser used and the connection ports, with which the
software establishes the connection to the laser, are determined in
the laser parameter:
COM-Port: If activated, then the COM port to be used can
be set here.
LPT-Port: Selection of an optional LPT port to accelerate
the marking.
Annotation:The respective connections are only active if the corre-
sponding box is marked with a check mark.
Auto start
Measurement unit
Here you can select the measurement unit with which you want to
work.
In detail, the following can be set:
µm: µm (1/1000 mm) is used as the measurement
unit.
mm: mm is used as the measurement unit.
mil: mil (1/1000 inch) is used as the measurement
unit.
inch: inch (25.4 mm) is used as the measurement
unit.
I/O control
NOTE!
In DEMO MODE the program outlet is fixed at 0!
On the one hand, the values specified here are default values for
new graphic objects parameters and, on the other hand, serve as la-
ser parameters for the text output of the Marking field group.
In detail the following settings can be set:
Power: Laser output in %.
Speed: The speed at which the laser beam is guided
over the surface.
QSF: The frequency in Hz, which determines the
pulse repetition frequency of the laser.
This parameter is only available with YAG la-
sers.
Pulse width: Specifies the laser pulse width.
This parameter is only available with YAG la-
sers.
Start delay: The delay from the beginning of the mirror mo-
tion until the activation of the laser.
Stop delay: Time extension, at which the laser remains
switched on, beginning with the braking of the
mirror motion.
Marking field
The laser type and the parameters for the marking field are deter-
mined in the Marking field group:
Pincushion
Adjustment: With ()->|| and )(->|| the pillow- or barrel-
shaped distortions can be compensated.
Offset X and Y serve to align unequally shaped
distortions.
To check the settings you can laser a large
rectangle with Draw a Test Rectangle.
Field
Adjustment: With the help of Draw a Test Figure, which la-
sers a test image, the Mirror X- and -Y as well
as Rotation can be set in such a way, that the
test figure is output according to your wishes.
If your laser is equipped with a pilot laser, then
this can be set with Pilot-X and -Y in such a
way that it precisely hits the small circle in the
centre of the test figure.
The Field size is set in the following manner:
1. Output test figure.
2. Measure X and Y and
3. enter at Measured X and Y.
4. Activate Compute and set new field size.
To check you can now laser the test figure
again, the X and Y lengths should now be ex-
actly 50 mm or 2".
Laser
Fig. 73 Laser
Power setting
time: The time that should elapse when the power
setting of the laser changes.
The time entered here is the time for a power
jump from 0 % to 100 %.
Corresponding less time elapses with smaller
power jumps.
Shutter: The shutter can be activated for testing purpos-
es.
Cooler: When the laser is switched off, the cooling sys-
tem can be switched on for testing purposes.
RF-Generator: The RF generator can be switched on or off, re-
spectively, for testing purposes.
Jump delays
In the group Jump delays all jump relevant parameters of the scan-
ning control are defined.
Speed: If a new position is to be run to by means of a
vector, then the speed set here is applied.
> 1/xxxx: Delays in µs, which are inserted after a jump or
a vector used for positioning.
> 1/2: is shown for a positioning that is larger
than half of the marking field. The further values
stand for correspondingly smaller jumps.
Vector: If Vector is selected, then a positioning (the la-
ser is deactivated at this time) by means of a
vector (line) takes place with the speed stated
in Speed.
If the relevant delay is set to 0, then there will
also be a positioning by means of a vector, but
the "normal" marking speed then applies.
Otherwise, the laser is positioned at the new
position with a jump.
Corner delay
The Corner delay group is for setting the delays that can be set if
the angle between to vectors is too acute.
Break angle: The delay becomes applicable for angles that
are smaller (more acute) than are entered here.
Break delay: The delay to be inserted.
4 Programming
4.1 Basics
General information The script programming language is compatible with Visual Basic
Version 6.
Using this language, complex program sequences can be created
with little effort.
The following description will explain the most important commands
used in the context of laser marking.
Program documentation Each program should be documented adequately. This makes trou-
bleshooting, later changes or adaptations by other persons easier.
Specifically, tasks and characteristics of variables should be de-
scribed adequately.
Comments are introduced with the " ' " symbol.
Option Explicit 'so all variables must be declared
Sub Main
LC.TimerStart() 'Start the user timer
Wait 3 'Wait some Time
LC.TimerStop() 'Stop the user timer
End Sub
Sample 3 Comments
New
Open
Save
Save All
Click on the Save All icon for saving all open programs.
If a project has not been assigned a name yet, a name must be en-
tered before saving. If a project already has a name, it can be saved
without any acknowledgement.
4.2.2 Edit
Cut
Copy
Paste
Undo
Redo
Display object
4.2.4 Start/Stop
Start/Continue
Pause
End
Breakpoint On/Off
Evaluate Expression
Edit Point
4.3.1 Variables
General information Variables are values marked with a name whose content is change-
able.
They are required for saving and/or further processing of results of
calculations or entries from the program user.
Each variable should be declared; i.e., assigned a variable type
(string, integer etc.)
In order to force the declaration of all variables and thus exclude
sources of error, the Option Explicit command is used.
Naming Variables The name of a variable should be explicit so that the function of the
variable can be deduced from its name alone.
Value range:
0 to 255
Size:
1 byte
Value range:
True/False
Size:
2 bytes
Value range:
-32768 to +32767
Size:
2 bytes
Value range:
-2 147 438 648 to +2 147 483 647
Size:
4 bytes
Value range:
-3.402823*1038 to -1.401298*10-45
1.401298*10-45 to 3.402823*1038
Size:
4 bytes
Value range:
-1.79769313486232*10308 to -4.94065645841247*10-324
4.94065645841247*10-324 to 1.79769313486232*10308
Size:
8 bytes
Currency Mix of integers and floating point for calculations up to the fourth
decimal after the point.
Value range:
-922 337 203 685 477.5808 to 922 337 203 685 477.5807
Size:
8 bytes
Size:
10 byte + 2 byte/character
Variant Standard type which can assume any other type. In the process, the
variables are converted automatically. This declaration is used
when the type may change during the execution of the program.
String size:
22 byte + 2 byte/character
Declaration description
Dim Number As Integer Declares number as an integer
Dim Symbol As String Declares symbol as a string
Dim Value Declares value as a variable of the variant type
Declaration Description
Dim number% Declares number as integer
Dim symbol$ Declares symbol as a string
Sub Main
Dim Number!
Dim Result!
Number! = 2.5
Result! = Number! * Number!
Debug.Print "Result = " & Result!
End Sub
Result = 6.25
Sub Main
Dim Number%
Dim Result!
Number% = 2.5
Result! = Number% * Number%
Debug.Print "Result = " & Result!
End Sub
Result = 4
The two programs lead to different results due to the different dec-
laration of variables. In Sample 6 floating points are multiplied with
each other, while in integers are Sample 7 multiplied with each oth-
er. When doing so, values up to x.50 are rounded down.
4.3.2 Constants
Constants are named values whose content cannot be changed.
They may assume any type.
4.3.3 Fields
Fields are lists of variables.
Fields can be one- or multi-dimensional.
If the value of a field is constant during object time, it is called a static
field.
Sub Main
Dim Text(5) As String
Part A
Part B
Part C
Part D
Part E
x 0 1 2 3 4
Value Text(x) Part A Part B Part C Part D Part E
Sub Main
Dim x, y As Integer
Dim Product(3,4) As Integer
for x = 0 to 2
for y = 0 to 3
Product(x,y) = x * y
Debug.Print Product(x,y)
next y
next x
End Sub
0
0
0
0
0
1
2
3
0
2
4
6
Sample 10 Multiplication
x
0 1 2
0 0 0 0
1 0 1 2
y
2 0 2 4
3 0 3 6
Sub Main
Dim Field(2) As Variant
Debug.Print Field(0)
Debug.Print Field(1)
End Sub
4.3.4 Loops
Syntax:
For Variable = Start To End [Step Step size]
...
[Exit]
...
Next Variable
Sub Main
Dim x!
Dim Result!
0
0.04
0.16
0.36
0.64
1
Syntax:
While condition
...
Wend
Sub Main
Dim i%
i% = 5
While i% > 2
i% = i% - 1
Debug.Print i%
Wend
End Sub
4
3
2
Syntax:
Do
...
[Exit]
Loop Until Condition
Sub Main
Dim i%
i% = 5
Do
i% = i% - 1
Debug.Print i%
Loop Until i%<2
End Sub
4
3
2
1
Sample 14 Do loop
Syntax:
Do
...
Loop
4.3.5 Branching
Branches serve to distinguish cases during object time.
Syntax 1:
If condition Then instruction
...
End If
Syntax 2:
If condition Then instruction Else instruction
...
End If
Syntax 3:
If condition Then
...
Else if Condition Then
...
Else
...
End If
Sub Main
Dim i!
i! = 5
While i! > -2
If i! > 2 Then
Debug.Print "i is " & i! & "; thus greater than 2!"
Else
Debug.Print "i is " & i! & "; thus smaller than 2!"
End If
i! = i! - 1.5
Wend
End Sub
Syntax:
Select Case expression
Case 1
...
case 2
...
Case 3
...
Case Else
...
End Select
Sub Main
Dim Workpiece As Integer
Sub Marking1
'Branch to marking1
End Sub
Sub Marking2
'Branch to marking2
End Sub
Sub Marking3
'Branch to marking3
End Sub
Advantages:
• Programmers can find their way around in the code fast.
• Errors can be delimited fast.
• Program extensions can be realised easily.
• Functions and procedures can be used multiple times.
Syntax:
Sub Procedure name (Param1 As ... - ParamN As...)
...
End Sub
Sub Main
Dim Radius%
Radius%=15
Sub Marking1(Radius%)
Debug.Print Radius%
End Sub
15
Sub Main
Dim i%
Dim Result As Double
i% = 10
Result = Sqr (Sum(i%)) 'root of the function Sum
Debug.Print "Result = " & Result
End Sub
Function Sum(i%)
Sum = i% + i%
Debug.Print i%
End Function
10
Result = 4.47213595499958
Sample 18 Function
In our example, the square root of the returned value of the sum
function is calculated. In this function then the sum of the variable i
with itself is calculated.
Syntax:
Len (String)
Type:
String
Sub Main
Dim Value As Integer
Debug.Print Len("Laser")
Value = Len("Laser")* 2
Debug.Print Value
End Sub
5
10
Syntax:
Left (String, Len)
Type:
String
Sub Main
Debug.Print Left("Laser",2)
End Sub
La
Mid Creates a string of the length Len, starting at the Index position.
Syntax:
Mid (String,Index,[Len])
Type:
String
Sub Main
Debug.Print Mid("Laser",3,2)
End Sub
se
Syntax:
Right (String,Len)
Type:
String
Sub Main
Debug.Print Right("Laser",2)
End Sub
er
Syntax:
Str (Num)
Type:
String
Sub Main
Debug.Print Str(-5*8)
End Sub
-40
Syntax:
StrReverse (String)
Type:
String
Sub Main
Debug.Print StrReverse("Laser")
End Sub
resaL
UCase Converts all lower case letters of a string into upper case.
Syntax:
UCase (string)
Type:
String
Sub Main
Debug.Print UCase("Laser")
End Sub
LASER
Sin, Cos, Tan, Atn These functions return the trigonometric functions of numerical val-
ues.
Syntax:
Sin (Num)
Cos (Num)
Tan (Num)
Atn (Num)
Sub Main
Debug.Print Sin(1)
Debug.Print Cos(1)
Debug.Print Tan(1)
Debug.Print Atn(1)
End Sub
0.841470984807897
0.54030230586814
1.5574077246549
0.785398163397448
Syntax:
Exp (Num)
Log (Num)
Sqr (Num)
Sub Main
Debug.Print Exp(1)
Debug.Print Log(1)
Debug.Print Sqr(81)
End Sub
2.71828182845905
0
9
Abs, Fix, Int, Round, Sgn Abs: Forms the absolute value.
Fix: Forms an integer variable by removing all decimals.
Int: Forms an integer variable by rounding.
Round: Rounds a numerical value to the number of decimals
required.
Sgn: Returns an Algebraic sign value.
Syntax:
Abs (Num)
Fix (Num)
Int (Num)
Round (Num,[Digits])
Sgn (Num)
Sub Main
Debug.Print Abs(-100)
Debug.Print Fix(-100.2)
Debug.Print Int(-100.8)
Debug.Print Round(-100.88,1)
End Sub
100
-100
-101
-100.9
4.3.9 Operators
n: Numeric value
s: String
- n1 Change of algebraic sign from n1.
n1 ^ n2 Takes n1 to the power of 2.
n1 * n2 Multiplies n1 and n2.
n1 / n2 Divides n1 by n2.
n1 \ n2 Divides the integer value of n1 by the integer value of
n2.
n1 + n2 Adds n1 and n2.
s1 + s2 Connects s1 with s2.
n1 - n2 Subtracts n2 from n1.
n1 & n2 Connects n1 to n2.
n1 < n2 Returns True if n1 less than n2.
n1 <= n2 Returns True if n1 less than or equal n2.
n1 > n2 Returns True if n1 greater than n2.
n1 >= n2 Returns True if n1 greater than or equal n2.
n1 = n2 Returns True if n1 equal n2.
n1 <> n2 Returns True if n1 unequal n2.
s1 = s2 Returns True if s1 equal s2.
s1 <> s2 Returns True if s1 unequal s2.
n1 And n2 Bitwise AND conjunction of n1 with n2.
n1 Or n2 Bitwise OR conjunction of n1 with n2.
Sub Main
Dim N1,N2 As Integer
Dim S1$,S2$
N1 = 10
N2 = 3
S1$ = "asdfg"
S2$ = "hjkl"
Debug.Print -N1 '-10
Debug.Print N1 ^ N2 '1000
Debug.Print N1 * N2 '30
Debug.Print N1 / N2 '3.3333333333333
Debug.Print N1 \ N2 '3
Debug.Print N1 + N2 '13
Debug.Print S1$ + S2$ '"asdfghjkl"
Debug.Print N1 - N2 '7
Debug.Print N1 & N2 '"103"
Debug.Print N1 < N2 'False
Debug.Print N1 <= N2 'False
Debug.Print N1 > N2 'True
Debug.Print N1 >= N2 'True
Debug.Print N1 = N2 'False
Debug.Print N1 <> N2 'True
Debug.Print S1$ = S2$ 'False
Debug.Print S1$ <> S2$ 'True
Debug.Print N1 And N2 '2
Debug.Print N1 Or N2 '11
End Sub
Syntax:
Conversion function (expression)
Function Return Type Range of the Expression argument
CBool Boolean A valid string or a valid numerical expression.
CByte byte 0 to 255.
CCur Currency -922 337 203 685 477.5808 to
922 337 203 685 477.5807.
CDate Date Any valid date expression.
CDbl Double -1.79769313486231E308 to
-4.94065645841247E-324 for negative values;
4.94065645841247E-324 to
1.79769313486232E308 for positive values.
File names The Script language executes input and output operations by
means of file numbers. This number is assigned to a file or unit when
it is opened using the Open command.
The physical file is described by a string.
Syntax:
[Unit:] [Path] File name
Parameter:
Unit: Input/Output unit
Path: Path, directory in which the file is located.
File name: File name
Syntax:
Open File For Mode As # File Number [record length]
Parameter:
Mode: Output File is opened for writing or
created,
content is deleted.
Append File is opened for adding.
Input File is opened for reading,
error if file does not exist.
Random Access to entire records,
length of sentence must be stated.
Syntax:
Close # File number
Syntax:
Print # File number Expression list
The values of the list of expressions are written to the file consecu-
tively without separators, as one record.
Syntax:
Write # File number Expression list
The values of the list of expressions are written to the file, consecu-
tively with commas as separators, as one record.
Sub Main
Dim A As Integer
A=5
Open "c:\temp\Mark.txt" For Output As #1
Print #1,"A=";",";A
Close #1
End Sub
Sub Main
Dim B As Integer
B=10
Open "c:\temp\Mark.txt" For Append As #1
Print #1,"B=";",";B
Close #1
End Sub
Syntax:
Input # File number List of variables
The parts of the line divided by commas are transferred to the vari-
ables of the list of variables.
Syntax:
Line Input # File number Variable
The content of the line is transferred to the variable.
Sub Main
Dim Text$
Dim Value%
Dim Lines$
Open "c:\temp\Mark.txt" For Input As #1
While Not EOF(1)
Input #1,Text$,Value%
Line Input #1,Lines$
Debug.Print Text$;Value%
Debug.Print Lines$
Wend
Close #1
End Sub
A= 5
B=, 10
Syntax:
Put File Number, [Record Number], Variable
Sub Main
Dim V As Variant
V="Text;"
Open "C:\temp\sample.txt" For Random As #1 Len=15
Put #1,1,V
Put #1,2,V
Put #1,3,V
Close #1
End Sub
Syntax
Get File number, [Record number], Variable
Sub Main
Dim V As Variant
Open "c:\temp\Beispiel.txt" For Random As #1 Len=15
Get #1,1, V
Debug.Print V
Close #1
End Sub
Text;
Sample 34 Read out the 1st record form the file of Sample 33
Sub Main
Begin Dialog UserDialog 400,203 '%GRID:10,7,1,1
OKButton 110,98,180,49
End Dialog
Dim dlg As UserDialog
Dialog dlg
End Sub
When the program is executed, the defined dialog window will open
and will wait for an acknowledgement via a mouse click on the OK
button.
Menu bar
Editing properties
View of elements
If several elements are used in a dialog box, the functions of the El-
ement view provide a clearer representation. If several elements
overlap, the element which comes first in the program will be the top
element during processing.
Select
Add text
This element serves to the output of text in the user dialog window.
Fixed or variable text content can be given.
Sub Main
Dim Laser As String
Laser = "5345"
Begin Dialog UserDialog 400,203
OKButton 110,133,160,49
Text 140,28,100,35,"Laser",.Text1,2
Text 140,77,100,35,Laser,.Text2,2
End Dialog
Dim dlg As UserDialog
Dialog dlg
End Sub
The content entered will be written into a variable with the name as-
signed under Field. In the further processing of the program, this
variable can be accessed.
Sub Main
Dim Radius As String
Begin Dialog UserDialog 380,175,"Circle"
OKButton 130,112,130,49
TextBox 230,56,60,21,.Variable
Text 70,56,160,21,"Radius:",.Text1
End Dialog
Dim dlg As UserDialog
Dialog dlg
MsgBox (dlg.Variable)
End Sub
The check box allows the user to activate or deactivate various op-
tions during program processing.
A check box can assume exactly two states, true or false. If the
check box is activated, the status will change to True; otherwise, the
False status will remain.
Sub Main
Selection
End Sub
Function Selection
Begin Dialog UserDialog 400,203,"CheckBox"
CheckBox 240,70,90,14,"Circle",.CheckBox1
CheckBox 240,105,90,14,"Rectangle",.CheckBox2
OKButton 120,140,180,35
End Dialog
Dim dlg As UserDialog
Dialog dlg
If dlg.checkbox1 = 0 and dlg.checkbox2 = 0
Then MsgBox ("nothing")
If dlg.checkbox1 = 1 and dlg.checkbox2 = 0 Then MsgBox ("Circle")
If dlg.checkbox1 = 0 and dlg.checkbox2 = 1 Then MsgBox ("Rectangle")
If dlg.checkbox1 = 1 and dlg.checkbox2 = 1
Then MsgBox ("both")
End Function
The Options button is a switch which can assume only the states of
True or False. In this context, however, all elements of a group are
interdependent since they are linked by an OR-function. I.e., only
one Option button out of a group may assume the status True; the
other elements will remain on False.
Any number of Option buttons may be organized into a group.
Sub Main
Selection
End Sub
Function Selection
Begin Dialog UserDialog 400,203,"Option Button"
OKButton 120,140,180,35
OptionGroup .Group1
OptionButton 160,70,80,14,"Circle",.OptionButton1
OptionButton 160,91,100,14,"Rectange",.OptionButton2
End Dialog
Dim dlg As UserDialog
Dialog dlg
If dlg.Group1 = 0 Then MsgBox ("Circle")
If dlg.Group1 = 1 Then MsgBox ("Rectangle")
End Function
Using the List box, lists may be shown. If the list contains more ele-
ments than can be shown, scroll bars will be added.
A list element can be selected, but there is no option for adding ele-
ments.
The List box is defined by a field.
Access to the user’s selection is obtained by evaluating the vari-
ables assigned under Field; it contains the field number selected.
Sub Main
Dim Mark(2) As String
Mark(0)= "Circle"
Mark(1)= "Rectangle"
Begin Dialog UserDialog 400,203,"Listbox"
OKButton 120,126,140,49
ListBox 150,56,90,49,Mark(),.ListBox1
End Dialog
Dim dlg As UserDialog
Dialog dlg
If dlg.ListBox1 = 0 Then MsgBox ("Circle")
If dlg.ListBox1 = 1 Then MsgBox ("Rectangle")
End Sub
Lists may be shown using the Droplist box. A line with scroll bars will
be appear.
A list element may be selected or a value may be entered.
The List box is defined by a field.
Sub Main
Dim Mark(2) As String
Mark(0)= "Circle"
Mark(1)= "Rectangle"
Begin Dialog UserDialog 400,203,"DropListBox"
OKButton 130,119,130,56
DropListBox 150,56,90,49,Mark(),.DropListBox1,1
End Dialog
Dim dlg As UserDialog
Dialog dlg
MsgBox (dlg.DropListBox1)
End Sub
The Combo box corresponds to the Droplist box in its role; they differ
in their representations.
With the Combo box, the select box is permanently open; if neces-
sary, you can scroll through this box.
With the DropList box, the select box is not opened until activated.
Add picture
Using the Add Picture function, bitmap files may be linked to the
user dialog box.
Sub Main
Begin Dialog UserDialog 400,203,"Picture"
Picture 0,0,400,203,"c:\windows\blue lace 16.bmp",0,.Picture1
OKButton 120,112,160,56
End Dialog
Dim dlg As UserDialog
Dialog dlg
End Sub
Add buttons
NOTE!
For an executable dialog window, at least one of these
buttons must be supplied!
Sub Main
Begin Dialog UserDialog 260,126,"Button"
Text 60,28,140,28,"Please push a button"
OKButton 10,91,60,21
PushButton 90,91,60,21,"&Run"
CancelButton 170,91,80,21
End Dialog
Dim dlg As UserDialog
Debug.Print Dialog(dlg)
End Sub
Depending on the key pressed, Variable Dialog (dlg) will return the
following results, which may be accessed when processing the pro-
gram:
OK OK-Button -1,
Run Push-Button 1,
Cancel Cancel-Button 0.
Dialog function The Dialog function in the User Dialog menu may be used, among
other things, for keeping a dialog box open permanently during pro-
gram processing.
Sub Main
Begin Dialog UserDialog 370,140,"Dialog",.DialogFuncStatus
OKButton 220,42,90,42
PushButton 70,28,110,35,"TestStart",.TestStart
PushButton 70,63,110,35,"TestStop",.TestStop
End Dialog
Dim dlg As UserDialog
Dialog dlg
End Sub
Syntax:
Return Value = InputBox("Message"[, "Title"][, "Default"][, XPos,
YPos])
Parameter:
Return Value:The String type variable is used to store text en-
tered by the user.
Message: Text which appears in the input box and prompts
the user to act.
Title: Input Box Designation
Default: This is where an instruction for the user may be
placed.
XPos: X-position for the upper left corner of the Input
box.
YPos: Y-position for the upper left corner of the Input
box.
Sub Main
Dim L$
L$ = InputBox("Enter your name:", "Input box", "Ingmar Grote")
Debug.Print L$
End Sub
Message Box The Message box shows a pre-defined output dialog. The button
can be evaluated through the return value.
Syntax:
Return Value = MsgBox("Message"[, Buttons][, "Title"])
or
MsgBox"Message"[, Buttons][, "Title"]
Parameter:
Return Value: The user input is returned in a variable of the In-
teger type.
Return value Constant selected button
1 vbOk OK
2 vbCancel Cancel
3 vbAbort Abort
4 vbRetry Repeat
5 vbIgnore Ignore
6 vbYes Yes
7 vbNo No
Sub Main
'Buttons
MsgBox("Program example",0,"Test")
MsgBox("Program example",1,"Test")
MsgBox("Program example",2,"Test")
MsgBox("Program example",3,"Test")
MsgBox("Program example",4,"Test")
MsgBox("Program example",5,"Test")
'Icons
MsgBox("Program example",16,"Test")
MsgBox("Program example",32,"Test")
MsgBox("Program example",48,"Test")
MsgBox("Program example",64,"Test")
End Sub
Sub Main
If MsgBox("Program example",4,"Query")= vbYes Then
MsgBox("Yes pressed!",16,"Information")
Else
MsgBox("No pressed!",32,"Information")
End If
End Sub
Syntax:
Return Value = ShowPopupMenu (Field( ) [, Alignment][, XPos,
YPos])
Parameter:
Return Value:The list number selected is returned as a variable
of the Integer type.
Field: In a one-dimensional field, all selection options are
determined.
Sub Main
Dim Selection As Integer
Dim Items(0 To 2) As String
Items(0) = "&Circle"
Items(1) = "&Rectangle"
Items(2) = "&Vector"
Selection = ShowPopupMenu (Items)
If selection = 0 Then circle 'Popup menu with selection circle
If selection = 1 Then rectangle 'Popup menu with selection rectangle
If selection = 2 Then vector 'Popup menu with selection vector
End Sub
Function circle
MsgBox ("Circle")
End Function
Function rectangle
MsgBox ("Rectangle")
End Function
Function vector
MsgBox ("Vector")
End Function
On Error Goto If after entering the On Error Goto Target Mark command an error
occurs, the program will jump to the target mark. This is where the
user can be informed about the error that occurred.
Syntax:
On Error Goto Target Mark
...
Target
...
Sub Main
Calculation
End Sub
Function Calculation
Dim a!,t!
Dim Result As Single
On Error GoTo Errors
a!=InputBox ("Input number")
t!=InputBox ("Input divisor")
Result = a!/t!
Debug.Print Result
Exit Function
Errors:
MsgBox("An error occurred.", 48, "Error")
End Function
In the program example, input errors committed by the user are de-
tected and reported. These may include:
• Division by Zero,
• Entering strings,
• No entry.
On Error Resume Next This command causes the program line containing the error to be
skipped. While this results in errors being avoided, it may also lead
to false calculations.
Syntax:
On Error Resume Next
...
Sub Main
Calculation
End Sub
Function Calculation
Dim a!,t!
Dim Result As Single
On Error Resume Next
a!=InputBox ("Input number")
t!=InputBox ("Input divisor")
Result = a!/t!
Debug.Print a!;t!;Result
Exit Function
End Function
Hide LC.Hide()
Parameter: ---.
Return: ---.
Function: Hide the program.
ApplicationExit LC.ApplicationExit()
Parameter: ---.
Return: ---.
Function: Exit the program.
TimerStart LC.TimerStart()
Parameter: ---.
Return: ---.
Function: Activates the user timer, see also User timer
on page 21 point 23.
TimerStop LC.TimerStop()
Parameter: ---.
Return: ---.
Function: After call the user timer is stopped.
See also User timer on page 21 point 23.
StartRecMessage LC.StartRecMessage()
Parameter: ---.
Return: ---.
Function: After call the program is ready to receive mes-
sages.
Attention: After receiving a message, a callback proce-
dure is called.
See also Callback procedures on page 107
This function uses socket ports from 10000 to
19999.
StopRecMessage LC.StopRecMessage()
Parameter: ---.
Return: ---.
Function: The message reception is canceled after the
call of this command.
StopMark LC.StopMark()
Function: Used to stop the graphic output asynchronous-
ly. Normally executed within a callback proce-
dure.
Return: ---.
Refresh LC.Refresh()
Return: ---.
Function: Redraw’s the graphic screen.
ZoomBoundingBox LC.ZoomBoundingBox()
Function: Zoom the graphic view to show the content of
the bounding box.
ZoomAll LC.ZoomAll()
Function: Zoom the graphic view to show the content in-
side the marking area.
SerCloseAll EX.SerCloseAll()
Parameter: ---.
Return: ---.
Function: All COM ports will be closed.
A_ClrGeneralOutputDigital SC.A_ClrGeneralOutputDigital()
Parameter: ---.
Return: ---.
Function: After execution of this command all of the digi-
tal output bits are set to false.
Attention: This command depends on hardware which
must be installed in your system in order to use
this command.
FreeVectorArray HG.FreeVectorArray()
Parameter: ---.
Return: ---.
Function: Releases the vector array.
To every InitVectorArray you must use an
FreeVectorArray!
SendToSC HG.SendToSC()
Parameter: ---.
Return: ---.
Function: The vector array is sent to the laser for process-
ing.
After this command you normally use FreeVec-
torArray to release the used memory.
4.5 References
4.5.1 BaseRef
BaseRef defined the position used for the basis point of each graph-
ical object:
Example:
If you have the mid point coordinate of a circle, than you set
BaseRef to 9.
Using left justified text than you like to use the 1.
Use 8 if you like to have the text centred, etc.
Time format
#Time:# 18:40:55
#Hour# 18
#Minute# 40
#Second# 55
Date format
#DateL# 24.12.2004
#DateS# 24.12.04
#YearL# 2004
#YearS# 04
#YearD# 358
#Month# 12
#Week# 51
#Day# 24
#SN=0,1,10,0,2# 0 0, 0, 1, 1, 2, 2, 3, ...
All the time and date formats use the time/date at mark time.
Using the serial numbers the characters after the #SN have the fol-
lowing meaning:
D or d the number is shown in decimal notation.
X the number is shown in hexadecimal notation
(0,1,..,9,A,B,C,D,E,F,10,...).
x as X but using lower case letters (9,a,b,...).
If the letter is followed by a number, than the resulting serial number
is preceded by 0, building a number with the giving character count.
The numbers behind the = have the following meaning:
1st number: Current serial number.
2nd number: Step width (optional).
3rd number: Max count (optional).
4th number: Value after the maximum value has used.
5th number: How many identical number should be generated (op-
tional).
Example using format strings:
Writing Result
Height
AddOnHeight
LongHeight
Characteristics:
No. Barcode type Numeric Character Length
1 2 of 5 Yes No Variable
6 EAN-8 Yes No 7
7 EAN-13 Yes No 12
8 UPC-A Yes No 11
9 UPC-E Yes No 10
5 Index
Symbols
µm ................................................................................................................ 56
A
A_ ............................................................................................................... 120
A_ClrGeneralOutputDigital ........................................................................ 122
A_GetBufferEmptyState ............................................................................. 121
A_GetGeneralInputDigital .......................................................................... 122
A_GetGeneralOutputDigital ....................................................................... 122
A_GetPower ............................................................................................... 123
A_GetStatusAnalog ................................................................................... 120
A_GetStatusDigital ..................................................................................... 120
A_LockShutter ........................................................................................... 121
A_ReadyForNextSyncCmd ........................................................................ 121
A_ResGeneralOutputDigital ....................................................................... 122
A_SetGeneralOutputDigital ........................................................................ 122
A_SetLaserState ........................................................................................ 120
A_SetPilotState .......................................................................................... 121
A_SetShutterState ..................................................................................... 121
A_Stop ....................................................................................................... 121
Abs ............................................................................................................... 82
Access rights ................................................................................................ 23
Activate ........................................................................................................ 61
ApplicationExit ........................................................................................... 110
Atn ................................................................................................................ 81
Auto start ...................................................................................................... 56
B
Barcode ................................................................................................ 33, 128
Barcode parameter ...................................................................................... 43
Barcode specification ................................................................................. 134
BaseRef ..................................................................................................... 131
Boolean ........................................................................................................ 68
Bounding box ............................................................................................... 27
BoundingBox .............................................................................................. 115
Branching ..................................................................................................... 75
Break angle .................................................................................................. 61
Break delay .................................................................................................. 61
Breakpoint On/Off ........................................................................................ 65
Byte .............................................................................................................. 67
C
Callback procedures .................................................................................. 107
Cancel-Button ............................................................................................ 100
CBool ........................................................................................................... 84
CByte ........................................................................................................... 84
CCur ............................................................................................................. 84
CDate ........................................................................................................... 84
CDbl ............................................................................................................. 84
CDec ............................................................................................................ 85
Check box .................................................................................................... 23
CInt ............................................................................................................... 85
Clear messages ........................................................................................... 28
Clip ............................................................................................................. 131
CLng ............................................................................................................. 85
Close ............................................................................................................ 86
Command line parameter ............................................................................. 20
Comments .................................................................................................... 62
COM-Port ..................................................................................................... 55
Constants ..................................................................................................... 71
Continue ....................................................................................................... 65
Cooler ........................................................................................................... 60
Coordinate systems ..................................................................................... 31
Copy ............................................................................................................. 63
Corner delay ................................................................................................. 61
Cos ............................................................................................................... 81
Creating User Dialog Windows .................................................................... 89
CSng ............................................................................................................ 85
CStr .............................................................................................................. 85
Currency ....................................................................................................... 69
Cut ................................................................................................................ 63
Cvar .............................................................................................................. 85
D
Datamatrix ............................................................................................ 33, 128
Datamatrix parameter .................................................................................. 44
Date .............................................................................................................. 69
Default and test values ................................................................................. 57
Display object ............................................................................................... 64
Do ................................................................................................................. 74
Dongle .......................................................................................................... 15
Double .......................................................................................................... 68
Drag / Drop ................................................................................................... 32
Draw ........................................................................................................... 129
E
Edit Point ...................................................................................................... 66
Edit user dialog ............................................................................................ 66
Editing Texts ................................................................................................ 78
Element parameter ....................................................................................... 40
Element window ........................................................................................... 31
Elements and objects... ................................................................................ 31
Ellipse ................................................................................................... 33, 126
Ellipse parameter ......................................................................................... 42
Enable element ............................................................................................ 32
Enable external start .................................................................................... 28
End ............................................................................................................... 65
Enter password ............................................................................................ 23
H
Help .............................................................................................................. 18
Hidden on startup ......................................................................................... 56
Hide ............................................................................................................ 110
HPGL ......................................................................................................... 129
I
I/O control ............................................................................................... 28, 56
If Then Else .................................................................................................. 75
Import ........................................................................................................... 34
Import parameter .......................................................................................... 46
inch ............................................................................................................... 56
InitVectorArray ........................................................................................... 125
Input ............................................................................................................. 87
Installation .................................................................................................... 12
Installation requirements .............................................................................. 12
Installation sequence ................................................................................... 12
Int ................................................................................................................. 82
Integer .......................................................................................................... 68
J
Jump delays ................................................................................................. 60
Jump In ........................................................................................................ 66
Jump Out ...................................................................................................... 66
Jump out (Finish procedure) ........................................................................ 66
Jumping in (individual step) .......................................................................... 66
L
Language setting .......................................................................................... 18
Laser ...................................................................................................... 55, 59
Laser connection .......................................................................................... 16
Laser control ................................................................................................ 26
Laser specific script extensions ................................................................. 107
Laser state ................................................................................................... 57
Laser status display ..................................................................................... 27
LC_AckMessage ........................................................................................ 108
LC_Formatter ............................................................................................. 109
LC_LifeTick ................................................................................................ 108
LC_MarkIdle ............................................................................................... 109
LC_OnError ................................................................................................ 108
Left ............................................................................................................... 79
Len ............................................................................................................... 79
LifeTickInterval ........................................................................................... 110
Line .............................................................................................................. 33
Line Input ..................................................................................................... 88
Line parameter ............................................................................................. 41
List box ......................................................................................................... 22
LoadFile ..................................................................................................... 111
Lock shutter .................................................................................................. 27
Log ............................................................................................................... 82
Long ............................................................................................................. 68
Loops ........................................................................................................... 73
LPT-Port ....................................................................................................... 55
M
Manufacturer ................................................................................................ 11
Mark ........................................................................................................... 112
Marking field ................................................................................................. 58
Measurement ............................................................................................... 37
Measurement unit ........................................................................................ 56
Message Box ............................................................................................. 102
Message window ......................................................................................... 28
Mid ............................................................................................................... 79
mil ................................................................................................................ 56
Mirror .................................................................................................... 35, 130
Mirror parameter .......................................................................................... 48
mm ............................................................................................................... 56
Move .................................................................................................... 34, 130
Moving the view ........................................................................................... 38
Multi line text box ......................................................................................... 22
N
Naming Variables ......................................................................................... 67
New .............................................................................................................. 62
New element ................................................................................................ 33
New file ........................................................................................................ 24
Numerical input box ..................................................................................... 22
O
OK-Button .................................................................................................. 100
ON Hours ..................................................................................................... 59
Open ...................................................................................................... 63, 86
Open file ....................................................................................................... 24
Operators ..................................................................................................... 83
P
P_SetClip ................................................................................................... 124
P_SetMirror ................................................................................................ 125
P_SetMove ................................................................................................ 124
P_SetRotation ............................................................................................ 124
P_SetSize .................................................................................................. 124
Parameter area ...................................................................................... 30, 55
Paste ............................................................................................................ 64
Path .............................................................................................................. 35
Path parameter ............................................................................................ 49
Pause ........................................................................................................... 65
PDF417 ................................................................................................ 34, 129
Pilotlaser ...................................................................................................... 27
Pincushion adjustment ................................................................................. 58
Working ........................................................................................................ 57
Write ............................................................................................................. 86
WriteIniFormat ........................................................................................... 117
WriteXmlFormat ......................................................................................... 117
Z
Zoom minus ................................................................................................. 36
Zoom plus .................................................................................................... 36
Zoom to bounding box ................................................................................. 36
Zoom to marking area .................................................................................. 36
Zoom toolbar ................................................................................................ 36
Zoom window ............................................................................................... 36
ZoomAll ...................................................................................................... 116
ZoomBoundingBox .................................................................................... 116