Sie sind auf Seite 1von 492

OMICRON CMEngine

User Manual

OMICRON CMEngine

Version CMEngine.ENU.9 Year: 2014


OMICRON electronics. All rights reserved.
This manual is a publication of OMICRON electronics.
All rights including translation reserved. Reproduction of any kind, e.g., photocopying, microfilming,
optical character recognition and/or storage in electronic data processing systems, requires the explicit
consent of OMICRON electronics.
Reprinting, wholly or in part, is not permitted. The product information, specifications, and technical
data embodied in this manual represent the technical status at the time of writing and are subject to
change without prior notice.
We have done our best to ensure that the information given in this manual is useful, accurate and
entirely reliable. However, OMICRON electronics does not assume responsibility for any inaccuracies
which may be present.
The user is responsible for every application that makes use of an OMICRON product.

OMICRON CMEngine

Contents
1

Preface ......................................................................................................... 17
1.1

What tasks can be performed using CMEngine? ................................

18

1.2

Command overview ............................................................................. 18

1.3

Operating systems and compilers .......................................................

1.4

Accessing the CMEngine from your program ...................................... 21

1.5

Typical program sequence ..................................................................

21

1.6

CMEngine license administration ........................................................

24

1.7

Handling special cases ........................................................................ 25

21

Programming the CMEngine ...................................................................... 29


2.1

System Overview ................................................................................. 30

2.2

Analog outputs ..................................................................................... 33


2.2.1 Definition and routing of amplifiers ...........................................

34

2.2.2 Amplifier Configurations ............................................................ 37


2.2.3 Defining the signal parameters ................................................. 41
2.3

Binary outputs ...................................................................................... 46

2.4

Analog inputs ....................................................................................... 47

2.5

Binary inputs ........................................................................................ 47

2.6

Using the Input Buffer .......................................................................... 48

2.7

Using the Sequencer ........................................................................... 53

2.8

Counter inputs .....................................................................................

2.9

Circuit Breaker Simulation ................................................................... 65

61

2.10 System control unit .............................................................................. 68


2.11 The CMC 256 ......................................................................................

69

2.11.1 Amplifiers .................................................................................. 69


2.11.2 The DC auxiliary output ............................................................ 71

OMICRON CMEngine

2.11.3 The AC analog inputs ............................................................... 72


2.12 How to extract a parameter from a result string ................................... 75
3

Interface Functions ..................................................................................... 79


3.1

Error Codes Overview ........................................................................

3.2

Which error codes can be caused by a specific function? ................... 90

3.3

Interface function reference ................................................................. 91


3.3.1 AddRegDev ..............................................................................

79

93

3.3.2 Associated ................................................................................ 93


3.3.3 AssociationMode ......................................................................

93

3.3.4 DevAssociateAppend ...............................................................

93

3.3.5 DevAssociateAppendSpecific ................................................... 94


3.3.6 DevAssociationCount ...............................................................

94

3.3.7 DevAssociationInfo ................................................................... 94


3.3.8 DevAssociationTime ................................................................. 95
3.3.9 DevAssociationRequest ............................................................ 95
3.3.10 DevAssosiationRequestCancel ................................................

95

3.3.11 DevDisassociate ....................................................................... 95


3.3.12 DevDisassociateSpecific ..........................................................

96

3.3.13 DevGetList ................................................................................ 96


3.3.14 DeviceAddress .......................................................................... 97
3.3.15 DeviceType ............................................................................... 97
3.3.16 DevLock .................................................................................... 97
3.3.17 DevScanForNew ....................................................................... 98
3.3.18 DevUnlock ................................................................................

99

3.3.19 Exec .......................................................................................... 100


3.3.20 FriendlyName ........................................................................... 101

OMICRON CMEngine

3.3.21 GetDevIDbyIPAddress .............................................................. 101


3.3.22 GetOfflineCfg ............................................................................ 101
3.3.23 GetOfflineCfg2 .......................................................................... 102
3.3.24 GetStatusText ........................................................................... 102
3.3.25 ImgDevTypePrefix .................................................................... 102
3.3.26 IPAddress ................................................................................. 103
3.3.27 LanguageForMessages ............................................................ 103
3.3.28 LogAppend ............................................................................... 103
3.3.29 LogGetInfo ................................................................................ 104
3.3.30 LogNew ..................................................................................... 104
3.3.31 LogS etLevel ............................................................................. 105
3.3.32 LogWrite ................................................................................... 105
3.3.33 MaxAssociationTime ................................................................. 106
3.3.34 MinReqImgVersion ................................................................... 106
3.3.35 OutUserApp .............................................................................. 106
3.3.36 ParallelPort ............................................................................... 107
3.3.37 RegDevCount ........................................................................... 107
3.3.38 RegDevItemInfo ........................................................................ 107
3.3.39 RegDevItemIPAddress ............................................................. 107
3.3.40 RemoveDevice ......................................................................... 108
3.3.41 RemoveRegDev ....................................................................... 108
3.3.42 ResGetList ................................................................................ 108
3.3.43 ResLock .................................................................................... 108
3.3.44 ResUnlock ................................................................................ 109
3.3.45 SerialNumber ............................................................................ 109
3.3.46 SetLicInfo .................................................................................. 110

OMICRON CMEngine

3.3.47 Version ...................................................................................... 110


3.3.48 Functions for Real-time Playback of Transient Signals ............ 111
4

String Commands ....................................................................................... 119


4.1

Symbols used in string commands ...................................................... 119

4.2

Syntax rules for string commands ....................................................... 120

4.3

Parameter types used in the string commands ................................... 122

4.4

System Commands ............................................................................. 123


4.4.1 sys:reset ................................................................................... 124
4.4.2 sys:test? [(<filename>)] ............................................................ 125
4.4.3 sys:cfg? (type|ser|hard|firm|cal) ................................................ 127
4.4.4 sys:status? [ (<bit_number>) ] .................................................. 128
4.4.5 Organization of the Status Command Register Structure ......... 129
4.4.6 sys:goose:cfg(<filename>) ........................................................ 146
4.4.7 sys:goose:cfg?(<filename>) ...................................................... 147

4.5

Output Commands ............................................................................... 147


4.5.1 out:[ana:]v|i (<generator_list>):[sig(<no>):]a (<amplitude> [,
step ] ) ....................................................................................... 150
4.5.2 out:[ana:]v|i (<generator_list>):[sig(<no>):]f (<frequency> [,
step ] ) ...................................................................................... 152
4.5.3 out:[ana:]v|i (<generator_list>):[sig(<no>):]t (<period_time>) ... 153
4.5.4 out:[ana:]v|i (<generator_list>):[sig(<no>):]p (<phase> [,
step ] ) ....................................................................................... 154
4.5.5 out:[ana:]v|i (<generator_list>):[sig(<no>):]wav
(<waveform>, ...) ....................................................................... 155
4.5.6 out:[ana:]v|i (<generator_list>):[sig(<no>):]wav (sin) ................ 156
4.5.7 out:[ana:]v|i (<generator_list>):[sig(<no>):]wav
(sum,<amplitude_factor1>, ...) .................................................. 157

OMICRON CMEngine

4.5.8 out:[ana:]v|i (<generator_list>):[sig(<no>):]wav (sumcorr,


<fund_frequency>,<amplitude_factor1>, ...) ............................. 160
4.5.9 out:[ana:]v|i (<generator_list>):[sig(<no>):]wav (tri
[ ,<duty_cycle>] ) ...................................................................... 163
4.5.10 out:[ana:]v|i (<generator_list>):[sig(<no>):]wav (square
[ ,<duty_cycle>] ) ...................................................................... 165
4.5.11 out:[ana:]v|i (<generator_list>):[sig(<no>):]wav (user,
<user_sig_no> [,single] ) .......................................................... 167
4.5.12 out:[ana:]v|i (<generator_list>):[sig(<no>):]wav (dc) ................. 169
4.5.13 out:[ana:]v|i (<generator_list>):[sig(<no>):]wav (exp) ............... 170
4.5.14 out:[ana:]v|i (<generator_list>):on ............................................. 172
4.5.15 out:[ana:]v|i (<generator_list>):off ............................................. 173
4.5.16 out:[ana:]v|i (<generator_list>):clr ............................................. 174
4.5.17 out:[ana:]v|i (<generator_list>):mix (sig(<no>)|add|mult|off) ..... 175
4.5.18 out:[ana:]save ........................................................................... 178
4.5.19 out:[ana:]restore ........................................................................ 179
4.5.20 out:[ana:]v|i (<triple_no>):zero(<zero_factor>) ......................... 180
4.5.21 out:[ana:]on ............................................................................... 181
4.5.22 out:[ana:]off [(zcross [,<off_generator_list>])] ........................... 182
4.5.23 out:[ana:]clr ............................................................................... 185
4.5.24 out:[ana:]step [(load|exec)] ....................................................... 186
4.5.25 out:[ana:]pmode (abs|diff[(v|i(<reference_generator>)]) ........... 187
4.5.26 out:[ana:]pmode? ...................................................................... 190
4.5.27 out:[ana:]resetopt ...................................................................... 191
4.5.28 out:[ana:]buf:sam[(lock|free)] .................................................... 194
4.5.29 out:[ana:]buf:get? (v|i (<triple>:<gen>) [:sig (<sig_no>)]) ......... 195
4.5.30 out:[ana:]sync(ext, +|-) .............................................................. 198

OMICRON CMEngine

4.5.31 out:[ana:]sync(off) ..................................................................... 199


4.5.32 out:[ana:]user:... ........................................................................ 200
4.5.33 out:[ana:]user:alloc? (<no_of_samples>) ................................. 201
4.5.34 out:[ana:]user:app (<user_sig_no>, <user_data>) .................. 202
4.5.35 out:[ana:]user:free [(<user_sig_no>)] ....................................... 204
4.5.36 out:[ana:]user:status? [(<user_sig_no>)] .................................. 205
4.5.37 out:bin:cfg? ............................................................................... 206
4.5.38 out:bin(<out_module_idx>):cfg? ............................................... 207
4.5.39 out:bin(<out_module_idx>:<group_idx>):cfg? .......................... 209
4.5.40 out:bin(<out_module_idx>):on(<output_list>) ........................... 212
4.5.41 out:bin(<out_module_idx>):off (<output_list>) .......................... 213
4.5.42 out:bin(<out_module_idx>):set (<data>) ................................... 214
4.5.43 out:bin(<out_module_idx>):get? ............................................... 216
4.5.44 out:bin(<out_module_idx>:<group_idx>):name(<name>) ........ 217
4.5.45 out:bin(<out_module_idx>:<group_idx>):name? ...................... 218
4.5.46 out:aux:cfg? .............................................................................. 219
4.5.47 out:aux(<idx>):cfg? ................................................................... 220
4.5.48 out:aux(<idx>):on|off ................................................................. 221
4.5.49 out:aux(<idx>):a(<v_dc>) .......................................................... 222
4.5.50 out:aux(<idx>):a? ...................................................................... 223
4.5.51 out:aux(<idx>):def(<pwr_on_v>) ............................................... 224
4.5.52 out:aux(<idx>):def? ................................................................... 225
4.5.53 out:cfg? ..................................................................................... 226
4.6

Sampled Values Commands ............................................................... 226


4.6.1 out:[ana:]sv:def(<#blocks>, <nom_freq>) ................................ 228
4.6.2 out:[ana:]sv:def? ....................................................................... 229

OMICRON CMEngine

4.6.3 out:[ana:]sv:cfg(<sv_idx>, <fact_i>, <fact_v>, <adapter>,


<dest_mac_adr>, <eth_type>, <app_id>, <vlan_tag>,
<quality>, <svId_name>[,<simulate>]) ..................................... 230
4.6.4 out:[ana:]sv:cfg?(<sv_idx>) ....................................................... 233
4.6.5 out:[ana:]sv:off(<sv_idx>) ......................................................... 235
4.6.6 out:[ana:]sv:status?(<sv_idx>) .................................................. 236
4.7

Amplifier Commands ........................................................................... 238


4.7.1 amp:cfg?[(<cfg_no>)] ................................................................ 239
4.7.2 amp:cfg?(<amp_id>,firm) .......................................................... 245
4.7.3 amp:def (<amp_no>, ...) ........................................................... 246
4.7.4 amp:def (<amp_no>, int|ext , v|i, <amplification>, <max_out>,
<f_min>, <f_max>, <t_corr1>, <t_corr2>, <t_corr3>) ............... 247
4.7.5 amp:def (<amp_no>, int) / amp:def (<amp_no>, ext, <id_list>) 249
4.7.6 amp:def ([<amp_no>,] clr|clrnooff) ........................................... 251
4.7.7 amp:def(off) .............................................................................. 252
4.7.8 amp:def? [(<amp_no>[,harm])] ................................................. 253
4.7.9 amp:scan? ................................................................................ 255
4.7.10 amp:param? (<id> [,cal]) ........................................................... 256
4.7.11 amp:route(clr|clrnooff) ............................................................... 258
4.7.12 amp:route (v|i (<triple_no>), <amp_no>|clr|clrnooff) ................ 259
4.7.13 amp:route? ( v|i, <triple_no>) .................................................... 262
4.7.14 amp:range(v|i(<triple_no>), <range>) ....................................... 263
4.7.15 amp:range?(v|i(<triple_no>)) .................................................... 265
4.7.16 amp:ctrl (i (<triple_no>), <v_ctrl>) ............................................. 266
4.7.17 amp:ctrl? (v|i , <triple_no>) ....................................................... 267
4.7.18 amp:reset(<amp_id>) ............................................................... 268

4.8

Input Commands ................................................................................. 269

OMICRON CMEngine

4.8.1 inp:[ana:]v|i(<input_list>):get?[(all)] ........................................... 270


4.8.2 inp:[ana:]v|i(<input_list>):range? .............................................. 272
4.8.3 inp:[ana:]v|i(<input_list>):range(<range>) ................................. 273
4.8.4 inp:bin:cfg? ............................................................................... 274
4.8.5 inp:bin(<inp_module_idx>):cfg? ................................................ 275
4.8.6 inp:bin(<inp_module_idx>:<group_idx>):cfg? ........................... 277
4.8.7 inp:bin(<inp_module_idx>):get? ............................................... 280
4.8.8 inp:bin(<inp_module_idx>):diff? ................................................ 281
4.8.9 inp:bin[(<inp_module_idx>)]:diff(reset) ..................................... 282
4.8.10 inp:bin(<inp_module_idx>:<group_idx>):debounce(<deb_time
>) .............................................................................................. 283
4.8.11 inp:bin(<inp_module_idx>:<group_idx>):debounce? ................ 284
4.8.12 inp:bin(<inp_module_idx>:<group_idx>): deglitch
(<degl_time>) ............................................................................ 285
4.8.13 inp:bin(<inp_module_idx>:<group_idx>):deglitch? ................... 286
4.8.14 inp:bin(<inp_module_idx>:<group_idx>[:<inp_idx>]):def(pf|
<threshold>) .............................................................................. 287
4.8.15 inp:bin(<inp_module_idx>:<group_idx>[:<inp_idx>]):def? ........ 289
4.8.16 inp:bin(<inp_module_idx>:<group_idx>):name(<name>) ......... 290
4.8.17 inp:bin(<inp_module_idx>:<group_idx>):name? ...................... 291
4.8.18 inp:ana(<input_list>):def(v,<range>) /
inp:ana(<input_list>):def(i,<range>,<CTRatio>) ....................... 292
4.8.19 inp:ana(<input_list>):def? ......................................................... 294
4.8.20 inp:ana(<input_list>):range? ..................................................... 295
4.8.21 inp:ana:cal(ac|dc) ..................................................................... 296
4.8.22 inp:ana:cfg?(srate|avrg|firm|hard) ............................................. 297
4.8.23 inp:ana:dc(on|off) ...................................................................... 298

10

OMICRON CMEngine

4.8.24 inp:buf:sam (<source>, <index>) / inp:buf:sam (bin, on|off|bin)


.................................................................................................. 299
4.8.25 inp:buf:sam(ext) ........................................................................ 301
4.8.26 inp:buf:get? ............................................................................... 302
4.8.27 inp:buf:get?(<no_of_entries>) ................................................... 306
4.8.28 inp:buf:clr .................................................................................. 307
4.8.29 inp:count:on .............................................................................. 308
4.8.30 inp:count:off .............................................................................. 309
4.8.31 inp:count:clr .............................................................................. 310
4.8.32 inp:count:set(bcount|ecount(<counter>), <count>, +|-) ............. 311
4.8.33 inp:count:join(bcount|ecount(<master_counter>), bcount|
ecount(<slave_counter>)) ......................................................... 313
4.8.34 inp:count:get?(bcount|ecount(<counter>)) ................................ 314
4.8.35 inp:ana:cfg(<srate>,<avrg>) ..................................................... 315
4.8.36 inp:cfg?[(ecount)] ...................................................................... 317
4.9

GPS Commands .................................................................................. 318


4.9.1 gps:status? ............................................................................... 319
4.9.2 gps:reset ................................................................................... 321
4.9.3 gps:sigma? ............................................................................... 322
4.9.4 gps:pos? ................................................................................... 323
4.9.5 gps:pos(<latitude>, <longitude>, <height>) .............................. 324
4.9.6 gps:def? .................................................................................... 326
4.9.7 gps:time:timemode? ................................................................. 327
4.9.8 gps:time:utc? ............................................................................ 328
4.9.9 gps:time:sync(<ch>,<rate>,<yyyy>,<mm>,<dd>,<hh>,<mm>,<
ss>) ........................................................................................... 329
4.9.10 gps:time:sync?(<ch>) ............................................................... 331

11

OMICRON CMEngine

4.9.11 gps:time:datetime(<yyyy>, <mm>, <dd>, <hh>, <mm>, <ss>)

332

4.9.12 gps:time:datetime? ................................................................... 333


4.9.13 gps:setup:mode? ...................................................................... 334
4.9.14 gps:setup:mode(<accuracy_mode>) ........................................ 335
4.9.15 gps:setup:gmt? ......................................................................... 337
4.9.16 gps:setup:gmt(<hh>, <mm>) .................................................... 338
4.9.17 gps:setup:cfg?(type|ser|firm) .................................................... 339
4.9.18 gps:setup:cfg?(addr) ................................................................. 340
4.9.19 gps:setup:pulse(<LED ch>, <sync type>, <edge type0>, <edge
type1>) ...................................................................................... 341
4.9.20 gps:setup:pulse? ....................................................................... 343
4.9.21 gps:setup:cable? ....................................................................... 344
4.9.22 gps:setup:cable(<delay>) ......................................................... 345
4.9.23 gps:setup:save .......................................................................... 346
4.10 Sequencer Commands ........................................................................ 347
4.10.1 seq:begin .................................................................................. 349
4.10.2 seq:end ..................................................................................... 350
4.10.3 seq:clr ....................................................................................... 352
4.10.4 seq:exec ................................................................................... 353
4.10.5 seq:set (loop|count(1)|count(2)|timer|timeout, <value>) ........... 354
4.10.6 seq:add (count(1) > count(2), <rel_steps>) .............................. 355
4.10.7 seq:status? (step|loop|count(1)|count(2)|mem) ........................ 356
4.10.8 seq:stop .................................................................................... 357
4.10.9 seq:wait ( [<trigger_condition>, <trigger_jump_distance>,]
[<timeout_condition>, <timeout_jump_distance>] ) .................. 358
4.10.1 seq:set(exttime(id),
0<year>,<month>,<day>,<hour>,<minute>,<second>) .............. 364

12

OMICRON CMEngine

4.10.1 seq:set(exttime(id),
1<year>,<doy>,<hour>,<minute>,<second>) ............................. 365
4.10.1 Sequencer hints ........................................................................ 366
4.10.12Sequencer examples ................................................................ 367
3
4.11 Multimeter Commands ......................................................................... 371
4.11.1 inp:ana(<input_list>):rms?(<itime>) .......................................... 374
4.11.2 inp:ana(<input_list>):peak?(<rtime>) ........................................ 376
4.11.3 inp:ana(<input_list>):phase?(<itime>) ..................................... 378
4.11.4 inp:ana(<input_list>):freq?(<#periods>,<start level>) ............... 380
4.11.5 inp:ana(<input_list>):power?(<itime>) ...................................... 382
4.11.6 inp:ana(<input_list>):sum?(<itime>) ......................................... 384
4.11.7 inp:ana(<input_list>):diff?(<itime>) ........................................... 386
4.11.8 inp:ana:sync .............................................................................. 389
4.11.9 inp:ana:get?(<command handle>) ............................................ 390
4.11.1 inp:ana:clr(<command handle>) / inp:ana:clr(all) ..................... 392
4.12 Scope0 Mode Commands ..................................................................... 393
4.12.1 Configuration and Status Commands ....................................... 394
4.12.2 Trigger Commands ................................................................... 401
4.12.3 Block Transfer Commands ....................................................... 409
4.12.4 Harmonic Commands ............................................................... 415
4.13 CB Simulation Commands ................................................................... 422
4.13.1 cb:time(<trip>,<close>,<auto>,<52a% trip>,<52b% trip>,<52a
% close>,<52b% close) ............................................................ 423
4.13.2 cb:time? .................................................................................... 424
4.13.3 cb:def(trip[(<idx>)]|close|cb52a[(<idx>)]|cb52b[(<idx>)]|cb52a
or|cb52b or|cb52a and|cb52b and,<bool_expr>) ...................... 425

13

OMICRON CMEngine

4.13.4 cb:def? (trip[(<idx>)]|close|cb52a[(<idx>)]|cb52b[(<idx>)]|cb52a


or|cb52b or|cb52a and|cb52b and) ........................................... 426
4.13.5 cb:def(clr) .................................................................................. 427
4.13.6 cb:start(on|off) ........................................................................... 428
4.13.7 cb:stop ...................................................................................... 429
4.13.8 cb:lock ....................................................................................... 430
4.13.9 cb:free ....................................................................................... 431
4.13.1 cb:status? ................................................................................. 432
0
4.14 Time Synchronization
Commands ....................................................... 433
4.14.1 sys:time:cfg(<timeConfiguration>) ............................................ 437
4.14.2 sys:time:cfg? ............................................................................. 438
4.14.3 sys:time:cfg?(<timeConfiguration>) .......................................... 439
4.14.4 sys:time:def? ............................................................................. 440
4.14.5 sys:time:datetime? .................................................................... 441
4.14.6 IRIG-B Commands ................................................................... 443
4.14.7 PTP Commands ....................................................................... 463
4.14.8 NTP Commands ....................................................................... 469
4.15 Obsolete Commands ........................................................................... 475
5

Appendix ...................................................................................................... 477


5.1

Syntax Diagrams ................................................................................. 477


5.1.1 System Commands .................................................................. 478
5.1.2 Input Commands: Analog ......................................................... 479
5.1.3 Input Commands: General, Binary, Counter ............................. 480
5.1.4 Output Commands .................................................................... 481
5.1.5 Sequencer Commands ............................................................. 483
5.1.6 Amplifier Commands ................................................................ 484

14

OMICRON CMEngine

5.1.7 GPS Commands ....................................................................... 485


5.1.8 IRIG-B Commands ................................................................... 486

5.2

Block diagram of Generators/Outputs of a CMC Test Set ................... 487

5.3

IEEE C37.118 control function details ................................................. 488

Support ........................................................................................................ 489


Index .............................................................................................................. 491

15

OMICRON CMEngine

16

Preface

Preface

Note: The CMEngine documentation was initially conceived to be a software-accompanying Help. You
can launch the Help from anywhere in Test Universe, either by clicking the Help Topics... command
on the Help pull-down menu or the respective Help Topics toolbar icon, by clicking available Help
buttons or via the context-sensitive Help feature at the toolbar. Pressing the <F1> key does the same.
However, to offer you the possibility of reading the CMEngine documentation without the necessity of
having to sit in front of a computer, and in order to ease the printing, we additionally provide the
CMEngine documentation as a user manual the one you are currently reading. This manual is
stored as CMEngine.pdf on your hard disk at installation folder\Test Universe\Doc. However, you
wont have to access this folder to view the manual. You find a direct hyperlink for the PDF manual in
the CMEngine Help topic Preface.
Contents of CMEngine Help and manual are identical.
This user manual is derived from the same source as the Help. The Help is regarded the reference
CMEngine documentation, and while we focussed on a correct formatting of the Help, the manual's
look and feel derives widely from stylesheet-controlled automatisms. We ask for your kind
understanding if you should come across page breaks, table or image dimensions that may not always
appear ideal to you. If you particularly dislike something and expect us to improve it, please contact us
( Support on page 489).
About CMEngine
The CMEngine is a program library for software developers to conveniently control and program one
or more CMC test sets.
The software developer is able to create a program for his special purposes in any of the common
programming languages like "C/C++", Visual Basic, VBA (Visual Basic for Applications), C# etc. In this
application program, he can use the CMEngine library to communicate with one or more CMC test
systems connected to the PC or to the notebook computer. The CMEngine provides an interface with
functions to the application program that can be used to control one or more CMC devices.
With a particular interface function, the Exec() function, the application program can send string
commands to the CMCs, which are then analyzed and executed. There are string commands to set a
CMC to a specific state, e.g. to output a certain voltage, and there are such commands to get
measurement data or other information from a CMC. This kind of command returns detailed string
answers containing the information desired by the programmer. The returned information may be
analyzed and processed further by the application program.
More:
Which tasks can be performed using the CMEngine? on page 18
Command overview on page 18
Operating systems and compilers on page 21

17

OMICRON CMEngine

Accessing the CMEngine from your program on page 21


Typical program sequence on page 21
CMEngine license administration on page 24
Handling special cases on page 25

1.1

What tasks can be performed using CMEngine?

With the CMEngine command set, all functions of one or more CMCs connected to the PC can be
controlled:

Emit voltages or currents with selectable waveforms and waveform parameters. You may select
one of any predefined waveforms like sine, exponential function, square etc.

Load transient or periodic signals as user-defined waveforms into the CMCs memory and put them
out.

Emit additive or multiplicative superposition of predefined and/or user-defined waveforms.

Measure signals fed into the analog and the binary inputs.

Set binary outputs.

Execute fast real-time measurements on the CMC's analog and binary inputs.

Store command sequences in a CMC for real-time command execution and control these
sequences.

Emit signals through external voltage or current amplifiers (e.g. CMA 56).

1.2

Command overview

There are two types of CMEngine commands:

The functions of CMEngine's programming interface.


These functions can be imported from the CMEngine library into your program to control the
CMEngine itself. The definition of these functions depends on the programming language and the
compiler or the programming system you use.

The string commands to control CMC devices connected to the PC.


They make up the essential command set of the CMEngine and are sent to CMCs via the
CMEngine using the Exec() interface function of CMEngine.

18

Preface

Overview of the functions of the CMEngine programming interface:


CMC Device Access functions
DevScanForNew Scan ports for connected CMCs.
DevLock

Lock CMCs to an application program.

DevUnlock

Unlock CMCs.

DevGetList

Get a list of all connected CMCs.

Execute function
Exec Send commands to one or more CMCs connected to the PC.
Error handling functions
GetError

Get numerical error information.

GetErrorText

Get textual error information.

GetStatusText Get textual status information from a 32-bit status register.


Log functions
LogNew

Open a new log file.

LogAppend

Append to a log file.

LogSetLevel Set logging level.


LogWrite

Write text to a log file.

LogGetInfo

Get logging level and log file name.

Miscellaneous functions
Version

Get the CMEngine version number.

OutUserApp Appends samples to a specified user signal.

19

OMICRON CMEngine

String commands
CMEngine's string commands are organized in groups and every group has a tree structure. So all
logically related string commands form a tree; the command diagrams in the appendix supply an
overview of these command trees. You usually assemble a string command walking along the
command tree from its root to the end of a branch, then you use the interface function Exec() to send
the string to a CMC via CMEngine.
System commands "sys:..."

Use the system commands to change the system settings of a


CMC, to ask for the CMCs system status or to get some
information about the CMCs hardware.

Output commands "out:..."

The output commands control everything related to the output of


analog or binary signals. You may also select predefined
waveforms or define your own ones.

Input commands "inp:..."

The input commands control everything related to the


measurement of analog or binary signals on the CMCs inputs. In
addition, some special commands perform real-time
measurements.

Amplifier commands "amp:..."

The relations between your defined signals and the outputs used
for these signals, i.e., which signal is assigned to which output, are
set by default. Using the amplifier commands, you can change
these default settings according to your needs. Furthermore, you
may inform the CMEngine about an external amplifier's
parameters and then use this external amplifier for current or
voltage output.

GPS commands "gps:... "

The GPS commands let you configure all aspects of a connect


GPS device, e.g., retrieving time and position, set triggers, etc.

Sequencer commands "seq:..." The sequencer commands control everything related to


sequences, i.e. CMC commands executed in real-time mode.
They enable you to build sequences out of commands (signal
output etc.) that you can load into a CMC and then execute them.
That is the way you can start and control real-time executions of
your commands.

20

Preface

1.3

Operating systems and compilers

Operating systems
CMEngine is tested to be compliant with the same versions of Microsoft Windows operating systems
as the Test Universe version it is working with. Detailed up-to-date information about the operating
system and PC hardware requirements necessary to run CMEngine and Test Universe can be found
in a file named Requirements.txt on the Test Universe installation DVD.
Compilers
CMEngine is developed and tested with the compiler system Microsoft Visual C++. Nevertheless you
can use any compiler or application that can act as an OLE-Automation client.
The OLE Automation interface works in any directory if the OLE Automation server is registered
appropriately, which the installation program does.
The registration for the OLE Automation server (CMEngAL.exe) is done by the installation program. If
you move the OLE Automation server, you have to register it at its new location. To re-register the
server, start it with the command line parameter "/register" ("CMEngAL.exe /register").
Please tell us if you make your own adaptations for other compiler systems or applications so that we
can include them in future versions of the CMEngine.
If you want to contact the OMICRON Technical Support, visit our website www.omicron.at for the
OMICRON Service Center address of your region, please.

1.4

Accessing the CMEngine from your program

Before your application program can use the CMEngine, you have to add to your project a reference
to the OMICRON CMEngine Adapter Layer 2.0. Then your application program has to create an
cmEngine object (e.g CreateObject("cmEngine.cmEngine")). When it does not need access to
CMEngine anymore, it has to release the object. This releases all resources the CMEngine reserved
for your application program.

1.5

Typical program sequence

A program that controls CMCs via the CMEngine must use at least the following of the CMEngine's
interface functions in logical order. Thus every program that controls CMCs using the CMEngine
consists of at least the following typical command structure.

21

OMICRON CMEngine

Example in VBA:
Sub Main()
Dim engine As cmEngine.cmEngine ' Declare engine as object used for OLE
Automation
Dim result As String ' Variable for the result string returned by
CMExec
On Error GoTo EngineError
' Create OLE Automation object
Set engine = New cmEngine.cmEngine
engine.DevScanForNew (False)
Dim deviceList As String
Dim devId As Integer
deviceList = engine.DevGetList(lsAllAssociatedAny)
If ExtractParameter(3, deviceList) = "0" And ExtractParameter(4,
deviceList) = "0" Then ' We have a net-1 device
devId = Val(ExtractParameter(1, deviceList))
If Not engine.Associated(devId) Then
engine.DevAssociateAppend (devId)
End If
ElseIf deviceList <> "" Then
devId = Val(ExtractParameter(1, deviceList))
Else
GoTo ApplicationEnd
End If
engine.DevLock (devId)
' The CMC can now be used by this application program
result = engine.Exec(devId, "sys:cfg?(cal)") ' Execute commands on this
CMC
engine.DevUnlock (devId)
GoTo ApplicationEnd
EngineError:
MsgBox Err.Description
Err.Clear

22

' Unlock the locked CMC

Preface

ApplicationEnd:
Set engine = Nothing
End Sub

' Release the CMEngine

Function ExtractParameter(ByVal ParNumber As Integer, ByVal CmdResult As


String) As String
Dim textpos1 As Integer
Dim textpos2 As Integer
Dim Counter As Integer
ExtractParameter = ""
Counter = 0

' For the moment we assume no return

If ((ParNumber <= 0) Or (CmdResult = Null)) Then


ExtractParameter = ""
Exit Function
End If
' First, let's find the last comma before the parameter
' For parameter N there are N-1 commas
textpos1 = 0
Counter = 0
While Counter < (ParNumber - 1)
textpos1 = InStr(textpos1 + 1, CmdResult, ",", 0)
If ((textpos1 = 0) Or (textpos1 = Null)) Then ' We cannot find a comma
that we need,
ExtractParameter = "" ' so the parameter does not exist in this
string
Exit Function
End If
Counter = Counter + 1
Wend
' If we leave the loop, then the comma is found. Let's find the closing
character
textpos2 = InStr(textpos1 + 1, CmdResult, ",", 0)
If (textpos2 = 0) Then ' We cannot find more commas
textpos2 = InStr(textpos1 + 1, CmdResult, ";", 0) ' Perhaps a
semicolon?
If (textpos2 = 0) Then ' No closing character. Probably wrong string.

23

OMICRON CMEngine

ExtractParameter = ""
Exit Function
End If
End If
ExtractParameter = Mid$(CmdResult, textpos1 + 1, textpos2 - textpos1 - 1)
End Function
This script searches for available CMC test sets and turns their outputs on. It will furthermore
find NET-1 test sets. So make sure that there is no NET-1 test set in your local network
before you run this script.
Before compiling this script, make sure to add the Omicron CM Engine Adapter Layer 2.0
Type Library at Tools > Preferences in MS Excel or Script > References in
Control Center, respectively. Else you will get a compilation error.

For more information about CMEngine programming, see Programming the CMEngine on page 29.

1.6

CMEngine license administration

A CMEngine is licensed to one or more of your CMC devices. Thus your CMEngine can only control
the CMC devices that it is licensed to.
The license number(s) are kept in a license file "OMICRON.LIC". CMEngine needs a specific license
number in this file for every CMC. This license file uses the same syntax as Windows INI files. Each
device has its own section with keys for every application/component. The section name is built from
the serial number of the CMC and the device type (CMC 56, CMC 151, CMC 156). The name of the
key is CMENG for the CMEngine. The following is an example for the CMC 56 with the serial number
DA345D:
; OMICRON License File
[DA345D,CMC 56]
CMENG=7TUCU-RE2SR
The necessary license numbers are provided on the distribution disks or on an accompanying letter.
The license numbers provided on the disk are entered automatically. If you get the license numbers on
a letter you can use the "Add License" Windows program to enter them. For a description on how to
use this program, just start it without any parameters. The license file has to be in the directory ...
\Program Files\Common Files\OMICRON.

24

Preface

1.7

Handling special cases

This section explains how some special cases in the interaction between the CMEngine and CMC
devices must be handled by a programmer. If you read this manual for the first time, you may skip this
section.
More:
Automatic output switch off on page 25
CMC in use was switched OFF and ON again on page 27
Automatic output switch off
Under some special circumstances, the power outputs of a CMC are disconnected for the security of
the CMC and its user, which can occur for three different reasons:
a. If the communication between CMEngine and CMC is interrupted for more than two seconds
(communication cable disconnected etc.).
b. If there is an overtemperature on one of the built-in power amplifiers.
c. If there is an external infeed (CMC 151, CMC 156 and e only)
These special cases are to be handled accordingly.
Detect these cases by getting the contents of the primary status register with Exec ("sys:status?"):
case a)

In the primary status register


- the bit ST_BIT_COMM (Bit 0),
- the bit ST_BIT_CMC_INTL (Bit 1)
- or both
are set.

case b) In the primary status register


- the bit ST_BIT_OVERTEMP_V (Bit 4),
- the bit ST_BIT_OVERTEMP_I (Bit 5)
- or both
are set.

25

OMICRON CMEngine

case c) In the primary status register


- the bit ST_BIT_CMC_INTL (Bit 1)
is set.

Reactivate a CMC with outputs that are already switched OFF (switch outputs ON again) by the
following calls to CMEngine commands:
case a)
Get the secondary status registers 0 and 1 using Exec("sys:status?(0)") and
Exec("sys:status?(1)") until both registers contain a zero (no bits set any more).
Furthermore call GetError() until zero (= CMERR_OK) is returned.

case b)
Get the secondary status registers 4 and 5 using Exec("sys:status?(4)") and
Exec("sys:status?(5)") until both registers contain a zero (no bits set any more).
Furthermore call GetError() until zero (= CMERR_OK) is returned.

case c)
Remove the cause for the external infeed.
Get the secondary status register 1 using Exec("sys:status?(1)") until the register contains
a zero (no bits set any more).
Furthermore call GetError() until zero (= CMERR_OK) is returned.
For a sample implementation, refer to the EasyDiff sample program provided with CMEngine.

26

Preface

CMC in use was switched OFF and ON again


After a new and still unknown CMC is connected to a PC with the CMEngine running, you usually will
register and initialize the unknown device by the command DevScanForNew().
The same procedure is necessary if an already known CMC is switched OFF and then ON again. In
this case, the command DevScanForNew() will recognize that this CMC was previously connected and
will assign the previous device ID number to this CMC again.
You should handle the case of a CMC that is known to the CMEngine, but was switched OFF and then
ON again (cable is still connected to the same printer port of the PC):
If there is a communication error after you have sent a string command to CMEngine (function Exec()
returns FALSE and then GetError() returns CMERR_COMM), you should assume that this is the case
of a CMC in use that was switched OFF and then ON again.
Try to reactivate this CMC with the following procedure:
Execute the command Exec("sys:status?") and analyze the register bits. Then get the related
secondary status register for every bit set. Get the same secondary status registers again and again
until they all contain a zero. Furthermore call GetError() repeatedly until zero (= CMERR_OK) is
returned. Then a reset and the re-initialization of the CMC follows. The CMC now gets the same ID
number as it had before but is in the power-on state.

27

OMICRON CMEngine

28

Programming the CMEngine

Programming the CMEngine

This section describes how to program the OMICRON test devices by means of the CMEngine
programming interface. It is not intended to describe in detail the CMEngine commands, their syntax
or usage, but to help the programmer in becoming familiar with the CMEngine way of programming. It
should serve as an introduction and companion to the CMEngine documentation, and should help the
programmer to make the most out of it. Therefore, the document is written in descriptive style, and few
detailed examples are included since what we want to show here is the global picture.
The CMEngine programming interface allows the use of all the capabilities of the CMC test devices.
This programming interface is implemented in different forms for different programming environments,
but in all cases it provides a set of interface control functions plus a gateway to communicate with the
CMC device. This communication takes place as an exchange of strings, where the system sends a
command in string format and gets back an answer, also in string format. For commands that require
no answer, an empty string is returned. To simplify parsing of the answer strings, the response for a
given command has a fixed format, although this format varies across commands.
To use CMEngine programming from within a given application, it will first be necessary to have the
CMEngine interface available. This can be done either linking statically to the CMEngine library, or
loading the CMEngine dynamic link library at run time, according to the design of the application and
to the capabilities of the programming environment and the operating system. Afterwards, the
programmer will use the CMEngine interface functions to scan the communication ports for connected
CMCs and lock those that he intends to use.
Once the CMCs have been successfully locked, the programmer will send the appropriate commands
to perform the desired operations, and to get back the desired information from the CMC device.
Before finishing, the application must unlock the locked CMCs and release the CMEngine interface.
The easiest way to abstract oneself from these details is to use the "Batcher" application, delivered as
a sample with the CMEngine programming environment. This small application provides in effect a
command line interface to the CMC device. It will automatically load the CMEngine and lock any CMC
devices found. Afterwards, it will take the user input as a command to the CMC, and will display the
answer string, if any. In this way it is possible to concentrate on the control of the CMC. In all the
examples in this document it will be assumed that the CMC is already locked, except where the
scanning and locking functions are specifically discussed.
In normal programming, the application will generate the strings by whatever means are adequate,
and will then parse the answer string to get back the necessary information. This information will in
turn enable the programmer to react to the events going on in the test.
The Exec function is the gateway by which all the strings are sent to the CMC. It is Boolean, returning
"true" if the execution of the command in the CMC device was successfully performed. A return value
of "false" means that the command could not be performed; the results of the command are returned
in the return string, and the possible system errors (overloads, hardware problems, etc.) are found in
the status registers.
The PC-CMC protocol is designed as a master-slave communication type. The CMC will never initiate
communication, all data must be extracted by polling.

29

OMICRON CMEngine

More:
System Overview on page 30
Analog outputs on page 33
Using the Input Buffer on page 48
Using the Sequencer on page 53
Counter inputs on page 61
System control unit on page 68
The CMC 256 on page 69
VBA functions on page 75

2.1

System Overview

Internal structure of a CMC device


From the CMEngine programmers point of view, a standard CMC test set consists of the following
components:
1. Analog outputs

A set of signal generators grouped in triples (4 triples = 12 generators in the CMC 156)

A routing and scaling layer

A set of amplifiers (voltage or current). These amplifiers can be external or internal.

2. Binary outputs

Relay outputs (dry contacts)

Open-collector transistor outputs

3. Analog inputs

DC-measuring inputs for voltage and for current

4. Binary inputs

Binary inputs configurable as dry-contact or voltage sensing with programmable thresholds

5. Event buffer

The event buffer, or input buffer (both terms will be used in this document), stores all the
relevant events in the system, with a high precision time-tag for each event.

6. Sequencer

30

The sequencer allows internal storage of sequences of commands, which are later executed
internally.

Programming the CMEngine

7. Supervisory section

Self-test and system status, system information.

While the configuration of other CMC devices may be more complex, the above elements are found in
all of them and are amply sufficient for the purpose of this document.
The first four parts are used to output analog and binary signals, and to read back analog and binary
information. The event buffer and the sequencer allow the use of the high-precision system timer to
control the input and output sections.
Designing a CMEngine application
Before writing the first line of code, it is necessary to decide how the timing will be controlled. The
CMC timer is much more sophisticated than a normal timer device that is controlled by the closing of a
contact. Rather, the CMC timer can be said to have multiple virtual inputs, supervising changes in the
analog outputs and analog and binary inputs. These changes are then stored in the input buffer, as
will be described in detail in section Analog inputs on page 47. This gives the CMC device a very
high power and flexibility, at the cost of an increase in complexity since the contents of the input buffer
must be analyzed to extract the desired times.
The timer can also be used to control the analog outputs, thus allowing extremely sensible tuning of
the generated signals. Again, this comes at the cost of a certain added complexity, as the only way to
take advantage of the system timer to control the outputs is programming the Sequencer and
executing the test sequence from within the CMC. Programs in the CMC are harder to program and
debug than those in standard high-level programming languages, since the need for exact timing and
low memory usage does not allow for a high number of variables or complex flow-control structures.
There are three main ways to use the CMC from an application through the CMEngine programming
interface:

The CMC timer is not used:


In this case, the commands to the outputs are given on-line, without the use of the Sequencer, and
the state of the binary and analog inputs are read by polling. This is the simplest way of
programming with the CMEngine, where all the control structures are provided by the language
used.
This method cannot provide accurate timing, and is therefore only appropriate for applications
where measurement of operating time or accuracy in the timing of the outputs is not required. For
example, to apply a given voltage and current and check that the device under test closes a
contact, as long as the time of operation is not interesting.

31

OMICRON CMEngine

Only the Input Buffer is used:


Here the outputs are still controlled on-line, but the state of the inputs is analyzed by processing the
entries in the event buffer.
This method provides accurate timing of the detected events, but it cannot provide accurate control
of the outputs. It is quite useful for low-complexity applications, where the controlling program can
be fully dedicated to the handling of the CMC. For advanced programs, it has the inconvenience
that it shifts the responsibility for controlling the CMC output to the PC application, and so it
requires more complex task handling on the side of the program.

Both the Sequencer and the Input Buffer are used:


The application downloads a Sequence to the CMC and starts execution. When the Sequence is
finished, the program analyzes the contents of the Input buffer to find out what happened while the
Sequence was running. A complex application may consist of several sequences, which are
programmed, executed, analyzed and then deleted to make room for the next one.
This method is required whenever the state of the outputs must be tightly controlled. For instance,
if the output values must be ramped, this method is the only one that can ensure a precise step
time and a linear ramp.
While the Sequencer can be used without the input buffer, it is very seldom done, since it is not
common that applications requiring a high degree of precision in the control of the outputs do not
require the same precision when it comes to the inputs. Additionally, it is practically impossible to
extract information about or influence the running of the sequence from the outside, as well see
when the Sequencer is discussed in more detail. The Sequencer and the Event Buffer have been
designed to work together, and in this way the full potential of the CMC device can be unleashed.

Debugging a CMEngine application


It is not always easy to determine where and why a CMEngine program is failing to perform as
expected. While the error information provided by the CMEngine environment is complete and
detailed, the fact that the CMEngine instructions have usually to be built before being sent to the CMC,
and the building blocks do not have concrete values until runtime, makes the relationship between the
error detected and the source code the user is creating something that is not always evident.
The best solution is to create a log file while the development process lasts. To achieve this, we would
use the following commands at the beginning of the code:
LogNew(HEngine, "c:\develop.log")
LogSetLevel(HEngine, 1)

32

Programming the CMEngine

The file name can of course be any valid file name in the host operating system. Such a file will
register the CMEngine commands as were actually received, and the CMEngines evaluation of them.
This level is usually more than enough to detect wrongly built commands and out-of-range command
arguments. If the problem is still not clear, this log file or even better, one created with log level 2 will
be the best information to send when you request support from OMICRON.

2.2

Analog outputs

As we advanced in section Internal structure of a CMC device on page 30, the analog output section
can be separated in three components: The signal generators, the routing and scaling layer and the
voltage and current amplifiers. This separation is only important when the system must be configured.
Otherwise, the programmer addresses only a voltage or current output, and cares not what is behind.
The signal generators are grouped in triples; they perform all the required calculations to produce an
analog voltage signal of the desired characteristics. This signal is emitted between +7.071 Vpeak and
-7.071 Vpeak (10Vpeak on a CMC 256 or newer test set); in the case of a sine wave, this allows for a
maximum rms value of 5V (7.071Vrms on a CMC 256 or newer test set). The signal can then be
routed to an amplifier, either external or internal. Only triples can be routed to amplifiers, the routing of
individual signals is not possible. One specialty to note here is that a triple does not necessarily
always consist of 3 generators. It rather is a logical group of generators belonging together (in a
CMC 151 the triples only contain one generator and the fourth internal voltage of a CMC 256 is also
considered a triple).
Before an amplifier can be used, it has to be defined. The system needs to know the amplifiers limits,
time delays for each channel and amplification factor, so all the necessary scaling calculations can be
carried out. The CMEngine is later programmed in absolute Amps or Volts at the amplifiers exit, so
the programs are totally portable across hardware as long as the amplifiers parameters are redefined
should the amplifier be changed.
After definition, the signal path from the signal generators to the physical magnitudes is established.
One additional step is necessary: to allow the CMEngine to address the amplifiers, they must be
routed to one of the logical triples. These triples are i(1), i(2). for current signals and v(1), v(2)
for voltage signals. All the CMEngines commands use the logical triples to set signal parameters.
Additionally, it is also possible to route a triple to a configuration. A configuration is a virtual amplifier,
which can involve one or more outputs in one or more physical amplifiers. The CMEngine will handle
all the necessary calculations to make these outputs behave as a single amplifier. For instance, such
a configuration allows using two current outputs of the CMC connected in series as a single-phase
amplifier with double the compliance voltage. The CMEngine distributes the current between both
outputs and takes care of the phase adjustments so the result is as desired the user deals simply
with a logical amplifier.
All signals in a triple have in common:

Being voltage or current signals

Being assigned to the same amplifier

All the rest: waveform, frequency, amplitude, phase, etc. can be defined independently for each signal.

33

OMICRON CMEngine

More:
Definition and routing of amplifiers on page 34
Amplifier Configurations on page 37
Defining the signal parameters on page 41

2.2.1

Definition and routing of amplifiers

As we said in the previous section, before a signal triple can be used it must be routed to a
configuration, or to an amplifier, which must in turn have been properly defined before. This section
deals with amplifier definition, routing to configurations will be described later.
The CMEngine distinguishes between internal and external amplifiers, and between intelligent and
standard amplifiers. An intelligent amplifier is one that can provide its own definition data to the CMC
unit; at this moment, only OMICRON amplifiers are intelligent. Any other amplifiers must be defined by
the user before they can be used.
For each amplifier that is defined, the CMC requires the following information:

Voltage or current amplifier

Amplification factor for the control signal, in A/V (current amplifiers) or V/V (voltage amplifiers).
OMICRON amplifiers typically have an input signal range of 5Vrms. Therefore you get the
amplification factor by dividing the maximum rms output value of the amplifier by 5Vrms.

Maximum rms output of the amplifier, in A or V. Must be equal to or smaller than the amplification
factor times the maximum low level output voltage of the CMC (5Vrms for CMCs prior to CMC 256,
7.071Vrms for CMC 256 or newer test sets). CMEngine will not allow giving values higher than the
maximum value to any signal routed to the amplifier.

Minimum and maximum frequency, in Hz. This defines the frequency range for which the amplifier
operates. If the amplifier is capable of outputting DC values, the minimum frequency should be set
to 0.

Propagation delays for each of the possible phases, in seconds. The CMEngine will use this
information to shift waves so differences between channels are compensated and the phases of
the signals are correct.

More:
Handling of internal amplifiers on page 34
Handling of external amplifiers on page 36

2.2.1.1

Handling of internal amplifiers

To know the number and nature of internal amplifiers, we use the out:cfg? command. This command
will return the analog and binary outputs of the CMC. For a standard CMC 156, this command would
return this string: 1,4,1/3/i,2/3/i,3/3/e,4/3/e;

34

Programming the CMEngine

This tells us that the device has 4 binary relay outputs, amplifiers 1 and 2 are 3-phase and internal,
and amplifiers 3 and 4 are equally 3-phase and external.
Afterwards, we ask how many amplifiers are defined, using the command amp:def? and getting the
following answer: 1,1,2;
We see that amplifiers 1 and 2 are defined; we can then request their definition data, as follows:
amp:def?
1,1,2;
amp:def?(1
Result:
1,int,v,2.500000E+001,1.250000E+002,0.000000E+000,1.000000E+003,0.000000E
+000,
0.000000E+000,0.000000E+000,CMC156,BC284H;
amp:def?(2)
Result:
1,int,i,-2.500000E+000,1.250000E+001,0.000000E+000,1.000000E+003,0.000000E
+000,
0.000000E+000,0.000000E+000,CMC156,BB270T;
The internal amplifiers of the CMC 156 are routed and defined by the CMEngine upon start-up; usually
there is no need to redefine them, but it is possible to do so if required. Lets analyze one of the
strings, for instance amplifier 1:
int

This amplifier is internal

Voltage amplifier

The amplifier is not capable of grouping

2.500000E+001 Amplification factor: 25 V/V applied to the control signal of 5Vrms


1.250000E+002 Maximum output value: 125 V
0.000000E+000 Frequency range: the amplifier is capable of outputting DC voltages, and its
1.000000E+003 maximum frequency is 1 kHz
0.000000E+000 Channel delays
0.000000E+000
0.000000E+000
CMC 156

Device type

BC284H

Serial number of the amplifier

35

OMICRON CMEngine

2.2.1.2

Handling of external amplifiers

External amplifiers are connected to the CMC via the CM Exif board. Intelligent amplifiers not only
provide their definition data to the CMC, but also can be turned off by the software when they have not
been defined. In this way, intelligent amplifiers can be daisy-chained and controlled by software.
Well look first at the definition of an external amplifier using the CMA 156 as example. This amplifier,
as it is known, contains two current triples that can be used independently or grouped to create a
single triple with double the output current as each one of the individual triples. When connected to a
CMC device, we must use first the amp:scan? command to obtain the list of external amplifiers
connected to the CM Exif board; afterwards, well use the amp:param? command for each of the IDs
returned:
amp:scan?
Result : 1,1,2;
amp:param?(1)
Result : 1,ext,i,A,5.000000E+000,2.500000E+001,0.000000E+000,1.000000E
+003,
0.000000E+000,0.000000E+000,0.000000E+000,CMA156,DL373C;
amp:param?(2)
Result : 1,ext,i,B,5.000000E+000,2.500000E+001,0.000000E+000,1.000000E
+003,
0.000000E+000,0.000000E+000,0.000000E+000,CMA156,DL373C;
As we see, external amplifier 1 is triple A of the CMA 156, and amplifier 2 is triple B.
These parameters are read directly from the amplifiers by the amp:param? command. Before they
are available for use, we must define them; in the case of the CMA 156, we can choose whether we
want to use the triples independently or coupled. Lets do it both ways:
1) Two independent triples
amp:def(3,ext,1)
amp:def(4,ext,2)
amp:def?(3)
Result : 1,ext,i,A,5.000000E+000,2.500000E+001,0.000000E+000,1.000000E
+003,5.944444E-005,
5.944444E-005,5.944444E-005,CMA156,DL373C;
amp:def?(4) Result : 1,ext,i,B,5.000000E+000,2.500000E+001,0.000000E
+000,1.000000E+003,5.944444E-005,
5.944444E-005,5.944444E-005,CMA156,DL373C;
amp:route(i(2),3)
amp:route(i(3),4)

36

Programming the CMEngine

We have assigned the two amplifiers available for external use to the triples in the CMA 156, and we
have obtained two totally independent current triples, each capable of outputting 25A as the definition
command reports to us. After assignation, we route them to two current logical triples so CMEngine
can use them.
2) One coupled triple continued from last example
amp:route(i(2),clr)
amp:route(i(3),clr)
amp:def(3,clr)
amp:def(4,clr)
amp:def(3,ext,1,2)
amp:def?(3)
Result : 1,ext,i,-,1.000000E+001,5.000000E+001,0.000000E+000,1.000000E
+003,5.944444E-005, 5.944444E-005,5.944444E-005,,;
The routing must be cleared first, then the definition; it is not possible to undefine an amplifier that is
routed. Afterwards, we use the amp:def command with a list of external amplifiers; the software
couples them if possible, otherwise the command fails. After definition, we are left with a single
amplifier capable of outputting 50A. The software takes care of all details, and the user must only wire
both amplifiers in parallel and use them as one.
For non-intelligent amplifiers, we must provide all the required parameters. The system cannot check
their presence in the bus or whether they are turned on; this is the responsibility of the user. For
example, to define an amplifier with the same characteristics as the triple A in the CMA 156 we would
use the following command:
amp:def:(3,ext,i,1.000000E+001,5.000000E+001,0.000000E+000,1.000000E
+003,5.944444E-005,5.944444E-005,5.944444E-005)

2.2.2

Amplifier Configurations

As mentioned before, a configuration is a virtual amplifier. Configurations are pre-defined in the


amplifier, and cannot be modified. Only OMICRON amplifiers support configurations.
The main advantage of using configurations is that they allow access to the full power of the hardware.
It allows using more power, or more output, or both in exchange usually for the available number of
phases. For amplifiers that admit paralleling of their outputs, like the CMA 156, CMC 256-6 or newer
test sets, some configurations will involve outputs in both amplifiers.
The configurations can be queried using the amp:cfg? command. It will return the available number of
configurations, which can then be individually queried by using the second form of the command:
amp:cfg?(n) where n is a number from 1 up to the value returned by the general query. If there are
intelligent amplifiers connected, their configurations follow those of the CMC; please note that an
amp:scan? command must be executed before the external amplifiers configurations are available.

37

OMICRON CMEngine

For a CMC 156 with a CMS 156 amplifier connected, the commands would be like this:
amp:cfg?
Result : 1,6;
amp:scan?
Result : 1,1,2;
amp:cfg?
Result : 1,11;
amp:cfg?(1)
Result : 1,9,3,1.275000e+002,5.000000e+001,1.250000e
+002,4.000000e-001,std,0,amp_no,1;
The data in the result string that follow the device ID can be decomposed as follows:
9
3
1.275000E+002
5.000000E+001
1.250000E+002
4.000000E-001
std
0
amp_no, 1

Routing ID on page 38
Number of Phases on page 38
Maximum Output on page 39
Maximum Power on page 39
Output at Maximum Power on page 39
Source Amplitude on page 39
Mode on page 39
Wiring Index on page 40
List of amplifiers involved in the configuration on page 41

Routing ID
The routing ID is the argument we must pass to the amp:route command to use the given
configuration. The routing IDs from 1 to 8 are reserved for amplifiers defined with the amp:def
command.
It is very important to remember that the mechanisms to obtain the parameters for a defined amplifier
and for a configuration are different. In the first case, we directly use the number returned by the
amp:route? command to query the system via amp:def?.
With configurations, the number returned by the amp:route? command is the routing ID, not the
configuration number. This means that the programmer must maintain the link between routing IDs
and configuration numbers.
Alternatively, it is possible to store the parameters of all configurations indexed by the routing ID. The
configuration number is only necessary for the amp:cfg? command, and can be discarded once all
configurations have been queried and all data obtained.
Number of Phases
This value represents the number of independent phases of the configuration. It is the number of
phases that will be addressable in the logical triple.

38

Programming the CMEngine

Maximum Output
Maximum output value of the configuration.
Maximum Power
The maximum power in VA that the configuration can reach.
Output at Maximum Power
This field represents the output value for which the maximum power is reached. It is not necessarily
equal to the maximum output.
Source Amplitude
Value of the maximum voltage (in current amplifiers) or current (in voltage amplifiers) that the system
can output. Please note that these values are just an indication the power curves of the amplifiers
are not linear, and their representation is to be found in the devices manual.
Mode
String that conveys information about how to perform the external wiring that is required so the
configuration can be used. The possible modes a configuration can be wired are as follows (CMC 256
or newer test sets, CMS251 and CMS252 not included):
Mode

Phases

Description

std

Standard. Each generator is


used against N

Standard for CMS 151

ser12

Generator 1 is signal, generator


2 is reference

ser13

Generator 1 is signal, generator


3 is reference

ser4

Four generators tied together in


series. Generator 1 in amplifier
1 is signal, generator 1 in
amplifier 2 is reference.
Generator 2 in both amplifiers
are connected

39

OMICRON CMEngine

Mode

Phases

Description

gen2

Generator 2 is signal, N is
reference

par1

All three generators tied


together are signal, N is
reference

par3

Each generator tied together in


parallel with the corresponding
generators in all amplifiers
involved; 1 with 1, 2 with 2, etc.
Also N with N

parser

All generators in amplifier 1 tied


together are signal, all
generators in amplifier 2 tied
together are reference. Neutrals
in both amplifiers are tied
together.

For more detailed wiring instructions, and for the cases where the use of adapting resistors is needed,
please consult the hardware manuals.
Wiring Index
For OMICRON internal use index of an illustration of the wiring required for the configuration.
Lets see as an example on how to set the CMC 156 current amplifier to get 80VA in single phase
mode:
amp:cfg?
Result : 1,6;

amp:cfg?(5)
Result: 1,13,1,1.250000e+001,8.000000e+001,1.250000e+001,6.400000e+000,
ser12,2,amp_no,2;
amp:route(i(1),clr)
amp:def(2,clr)
amp:route(i(1),13)
After executing this code, only i(1:1) will be available, with the characteristics returned by the
amp:cfg?(5) command. Connect the CMC test set as shown in the following illustration:

40

Programming the CMEngine

Please note that the use of adapting resistors is required, for example those in the SPA
device.
List of amplifiers involved in the configuration
This is an enumeration of the amplifiers that are required to form the configuration. Each entry in the
list is composed of two parts: an amplifier descriptor and an amplifier number.
The descriptor is a string, which may be either amp_no (internal amplifiers) or amp_id (external
amplifiers). In both cases, the amplifier number follows, with type integer.
For amp_no amplifiers, the number allows finding the amplifiers description in the return string of the
amp:def? command; for amp_id amplifiers, the number corresponds to the id returned by amp:scan?
and the information about the amplifier can be obtained by using the number as argument in the
amp:param? command.

2.2.3

Defining the signal parameters

The signal parameters can be defined independently for each generator of each triple. To facilitate
programming, it is possible to address multiple generators simultaneously. For instance, a command
such as this would program all generators in triple v(1):
out:ana:v(1):
The next one would program all generators in triples v(1) and v(2):
out:ana:v(1,2):
Finally, this command would program generators 1 and 2 of triple v(1) and generator 3 of triple v(2):
out:ana:v(1:1,1:2,2:3):
The changes done to the generators are propagated to the outputs only when an on command is
issued. The on command turns the outputs on if they happened to be off, and reprograms them with
the values set for the generators. Therefore, it is possible to change the signal parameters in any
order, knowing that all changes will be applied simultaneously when the on command is issued. This
command accepts a generator list or it can be applied to all analog signals simultaneously.
More:
Waveform on page 42
Amplitude, phase and frequency on page 43

41

OMICRON CMEngine

Waveform
Each generator in the CMC can use up to two signal components, named sig(1) and sig(2); each of
these components can be independently programmed, and then be added or multiplied together to
form the signal for that generator. A generator can then use sig(1) only (default), sig(2) only, sig(1) +
sig(2), sig(1) * sig(2) or it can be disabled (set to off). These relationships are programmed using the
mix command.
In its turn, each of the signal components can be set to one of the following waveforms:
- Sine (default)
- Square
- Triangle
- DC
- Exponential
- Sum of harmonics
- User defined (sampled)
Please note that the DC wave is an independent waveform, and it is not the same as setting
the frequency of the signal to 0. Setting the frequency to 0 is not permitted, and the
CMEngine will issue an error if it is attempted.
Each of the two signal components can have a different waveform, amplitude, phase and frequency.
This approach provides the user with huge power and flexibility when it is needed, while staying out of
the way for simple cases where only a sine wave is required. By default, all commands apply to sig(1),
which is programmed to be the sole component of the generators signal, so outputting a voltage sine
wave of 50V through the internal voltage amplifier (defined and routed to v(1) by default) is as simple
as this:
out:v(1):a(50);f(50)
out:on
The ana qualifier is not required if the command applies to the analog outputs.
A certain amount of care is necessary when using multiplication of signal components to set up the
waveform. Each signal is assigned a "weight" equal to the ratio between the amplifiers maximum
output and the signals amplitude. If the signal is set to the same amplitude as the maximum output
value of the amplifier, its weight is 1; if it is set to half the output value of the amplifier, its weight is 0.5,
and so on.
It is extremely important to take into account that the values for the amplifiers definition are rms
values; this makes the handling of sine waves straightforward, but can bring confusion when DC or
square waves are used. The internal voltage amplifiers of a CMC 156, for example, return a maximum
output value (rms) of 125V. This means that a sine wave with amplitude of 125V has a weight of 1.
However, a DC component with a weight of 1 would have an amplitude of 125*2, or 176.775V. It is all

42

Programming the CMEngine

right to assign an amplitude of 176.775V to a DC or square wave signals, since due to their shape no
part of the wave would be outside of the amplifiers peak limit. The same applies to the triangle wave,
as there the amplitude command is taken as the peak value of the triangle.
A small example will help to clarify matters. Lets multiply a sine wave by a square wave of the same
frequency and 50% duty cycle so we rectify the sine wave and make all its cycles positive. We
program the square waves amplitude to the amplifiers maximum, so its weight is 1 and it does not
modify the sine wave in any way.
Our first instinct would be to write the code like this:
out:v(1):a(50);f(50)
out:v(1):sig(2):wav(square)
out:v(1):sig(2):a(125);f(50)
out:v(1):mix(mult)
out:v(1):on
Since we know, or have obtained from the CMEngine, that 125 is the maximum amplifiers output. The
output of this code, though, would be a wave smaller than expected. The correct code would be:
out:v(1):a(50);f(50)
out:v(1):sig(2):wav(square)
out:v(1):sig(2):a(176.775);f(50)
out:v(1):mix(mult)
out:v(1):on
Amplitude, phase and frequency
By default, these values are set to 0. It must be noted that 0 is a valid value for amplitude and phase,
but not for frequency. Therefore, it must be set to a value within the CMC range before issuing the on
command.
When the values for a generator have not been modified, and we issue an on command that affects
that generator, the amplitude and frequency are not altered. The phase however is set to the original
value, which may cause an unintended phase jump. For example, if we execute the following set of
commands:
out:v(1):a(50);f(60)
out:v(1:1):p(0)
out:v(1:2):p(-120)
out:v(1:3):p(120)
out:on
#wait 5
out:v(1:3):a(1);p(180)
out:on

43

OMICRON CMEngine

It is obvious that we want to output a balanced three-phase voltage system, with amplitude 50V and
frequency 60Hz, and after 5 seconds to set the voltage in L3 to 1V.
The system should stay unchanged except for the magnitude and phase of VL3; but with these
commands there will be a phase jump as the other two phasors shift to their original phase angles of 0
and -120 from whatever phase angle they happened to have when the second out:on was issued.
VL3 will also jump to 180 absolute degrees, which is not probably what we intended to achieve most
likely we wanted to reverse the phase angle the wave had when we issued the on command.
To avoid this, the CMEngine allows setting how the phase parameter should be interpreted. In
absolute phase mode, the phases are applied with each new on command as described above. In
differential mode though the difference between the newly set phase value and the previous phase
value is applied to the phase angle of the wave the instant the on command is issued. Using
differential mode for the previous example would give us the following
out:pmode(abs)
out:v(1):a(50);f(60)
out:v(1:1):p(0)
out:v(1:2):p(-120)
out:v(1:3):p(120)
out:on out:pmode(diff)
#wait 5
out:v(1:3):a(1);p(180)
out:on
Once set, the phase mode remains until it is changed or the system is reset (phase mode = absolute).
It is necessary that the phase mode is absolute the first time the on command is issued, so the CMC
can compensate for the amplifiers delays. When the system is set to differential mode, the on
command applies to the analog signals the difference between the new setting and the previous
setting. This value is applied to the signals at whatever status they are when the on command is
issued. In this example, VL1 and VL2 will continue unchanged, and VL3 will be shifted 180 - not set
to 180 as before.
There is a third phase mode than can be set, and it is setting the phase mode of the generators
relative to one of them. For that we use the following command:
out:ana:pmode(diff(v|i(<reference_generator>))
where <reference_generator> must be an individual voltage or current generator, not a triple. The
main usefulness of this command is to keep the phase shifts between generators when their
frequencies change independently to each other. Ordinarily, each on command would consider only a
given generators phase settings to set the generators phase. With the differential mode with
reference channel, the on command applies the differences between the generators phase and the
reference generators phase. This mode can be considered as an extension of the diff mode for
generators with different frequencies. If this mode did not exist, only the abs mode would keep the
phase shifts between generators having different frequencies.

44

Programming the CMEngine

Note that the current implementation of this command requires the phase of the reference
generator to be set to 0 in order to provide correct operation. If it is set to a different value,
the behavior is undefined.
There is also a restriction of the phase modes concerning signal generation: when mixing two signals
by either adding (mix(add)) or multiplying (mix(mult)) them, only the absolute phase mode is
available. When using a different phase mode, an error will be issued.
A small example will help to clarify the concepts. Lets assume that we set two voltage generators with
different frequencies and then we change the amplitude of one of them. The results would be different
with each phase mode, as follows:
out:ana:v(1:1):a(100);f(50);p(0)
out:ana:v(1:2):a(100);f(51);p(-120)
out:on
. . . . . The previous code would be common to all phase modes . . . . .
out:pmode(abs)
out:ana:v(1:1):a(50)
out:ana:v(1:2):a(20);p(0)
out:on
This code would cause both generators to jump to phase 0, v(1:1) because that was its original setting
and v(1:2) because that is the new set value.
out:pmode(diff)
out:ana:v(1:1):a(50)
out:ana:v(1:2):a(20);p(0)
out:on
This code would leave v(1:1) unchanged and would add 120 degrees to whatever phase the generator
already had. Since both generators have different frequencies, the phase shift between them after the
command could be anything, depending only on the moment the command was issued.
out:pmode(diff(v(1:1)))
out:ana:v(1:1):a(50)
out:ana:v(1:2):a(20);p(0)
out:on
We have now defined v(1:1) as reference. The reference generator behaves in normal diff mode, so
this code would leave v(1:1) unchanged; v(1:2) on the other hand would be set to the phase shift
between itself and v(1:1). With the new settings this shift is 0, so v(1:2) would experiment a phase
jump to set it to the same phase as v(1:1).
An interesting and useful feature that CMEngine provides is the possibility to set a step value for each
magnitude and then apply all steps simultaneously. This allows for easy and convenient variation of
amplitude, phase and/or frequency for each or all signals. All step values will be added simultaneously
upon the execution of the out:step command. Since it is not possible to read back the values that are

45

OMICRON CMEngine

being output, the user must keep count of the number of step commands issued. Also, after an off
command, the next on will return the original values set to the generators, losing all the increments
applied with the step command.
It is most likely that you will want to use the differential phase mode (pmode(diff)) when using the
stepping feature since the phase angles of all affected generators would be reset to the originally
specified value for each step. This is because a step command is a variation of the on command and
therefore performs the same calculations which would cause setting the phase angle to what was
specified based on the out:ana:..:p() command.

2.3

Binary outputs

The handling of binary outputs is simple. The commands are effective the moment they are issued,
and are of three kinds: on, off and set; respectively, they allow to turn individual inputs on, to turn
them off or to set all inputs to a provided binary configuration.
Binary outputs are grouped in "virtual" output modules, and the module index is used as qualifier in all
output commands. "Virtual" means that it stands for any kind of hardware that can host the outputs,
such as the CMC front panel, the transistor outputs in an EXIF/EXTOP board and any auxiliary output
module located in an external IO expansion device (like CMB IO). The exact details about this virtual
module can be retrieved by using the out:bin(<out_module_idx>):cfg? command. Whenever there is
a CMC with a connected CMB the available virtual output modules consist of the CMC internal relay
outputs (accounting for one virtual module), the CMC internal transistor outputs when available (a
second virtual module) and the output modules of the CMB, if any. Within a module, the outputs are
divided in groups according to the output type and the way the ground or reference is wired.
The method to address any given binary output is to use first the out:bin:cfg? command to get the
number of modules, and then issue a out:bin(<out_module_idx>):cfg? for each of those modules to
get information about them, including the number of groups. Then for each group we may issue a
out:bin(<out_module_idx>,<group_idx>):cfg? command to get the groups characteristics, although
this is not necessary to handle the outputs from CMEngine (it is useful to know how to wire the outputs
though). If we know that we are addressing only a CMC unit, then we know in advance there will be
one or two output modules, module 1 being the four contact outputs in the front panel and module 2
being the transistor outputs in the back panel (when available), so there is no need to go through the
full process. We must be aware though that, by hard-coding the module numbers in our program, we
are blocking the possibility of using external IO modules such as CMB.
For example, to close the relay contacts 1 and 3 in the front panel without altering the state of all the
others, we would issue this command: out:bin(1):on(1,3). If we had wanted to close those two and at
the same time make sure that contacts 2 and 4 are open, we would have issued (since we know we
address virtual module 1) the command out:bin(1):set(0b0101). The equivalent commands operating
on the transistor outputs would be out:bin(2):on(1,3) and out:bin(2):set(0b0101).

46

Programming the CMEngine

2.4

Analog inputs

The analog inputs can be used both by polling their status and by recording their changes as events
into the input buffer. This latter method is far more powerful, and will be dealt with in the next section.
The status of the analog inputs can be polled at any time; the commands inp:ana:i(1):get? and
inp:ana:v(1):get? will read the DC inputs of a CMC 56CMC 56/151/156 and will return the readings in
A and V respectively. At present all CMC devices having analog DC inputs have one DC Voltage input
and one DC current input, so there are no indexes above 1 for these commands.

2.5

Binary inputs

The binary inputs can be used both by polling their status and by recording their changes as events
into the input buffer. This latter method is far more powerful, and will be dealt with in the next section.
Binary inputs are grouped in "virtual" input modules, and the module index is used as qualifier in all
input commands. "Virtual" means that it stands for any kind of hardware that can host the inputs, such
as the CMC front panel or any auxiliary input module located in an external IO expansion module (like
CMB IO). The exact details about a virtual module can be retrieved by passing its index to the
inp:bin(<out_module_idx>):cfg? command. Whenever there is a CMC with a connected CMB the
available virtual input modules consist of the CMC internal inputs (accounting for one virtual module)
and the input modules of the CMB, if any. Within a module, the inputs are divided in groups; inputs in
a group share debounce and deglitch times, and can be addressed as one for the inp:bin:def
commands.
The status of the binary inputs can be polled at any time; the inp:bin(<inp_module_idx>):get?
command will return the state of the binary inputs in a given module.
Binary inputs can be configured either as potential-free or potential-sensing; in the latter case, it is
possible to configure a voltage range and a detection threshold. The commands for configuration and
handling of the inputs accept always a module index and a group index, and optionally an input index
if the inputs admit individual configuration.
For example, to configure all the binary inputs in module 1, group 1 as potential-free, the command
would be: inp:bin(1:1):def(pf). Please note that the actual consequences of this command depend on
the hardware that is addressed. For instance, in a CMC 156, inputs 1 to 4 would be affected, since the
10 binary inputs on the front panel are separated in two groups: 1 to 4 and 5 to 10. In a CMC 256 or
newer test set, however, only input 1 would be affected, since each input on the front panel has its
own group. It is important therefore to query all the data for the binary inputs before configuring them.
For that we would use first the inp:bin:cfg? command to get the number of modules, and then for
each of those modules we would issue a inp:bin(<out_module_idx>):cfg? command to get
information about them, including the number of groups. Then we would request each groups
characteristics by means of a out:bin(<out_module_idx>,<group_idx>):cfg? command.

47

OMICRON CMEngine

2.6

Using the Input Buffer

The input buffer is a FIFO (first in first out) ring buffer where the CMC stores all system events as
they happen. Each event is time-tagged with the reading of the CMC timer when the event happened.
The first event is stored with time 0, and the times grow from there.
There are two kinds of events: those that are logged expressly and those that are logged
automatically. The latter are only logged if automatic logging is enabled. To log an event in the input
buffer expressly, the inp:buf:sam(<src>,<indx>) command is used. Basically, this command allows
recording the status of one of the analog inputs, or of the binary inputs, and to assign an index to such
an event. For analog inputs, the index is the number of the input to be sampled, while for binary inputs
it is an identifier to allow recognition of the event and facilitate the task of buffer analysis. If automatic
logging is enabled, the system automatically records all changes in the binary inputs, or in both the
binary inputs and the analog outputs, depending on the type of automatic logging selected. The index
0 is automatically entered for changes in the analog outputs, and the index 1 is also automatically
entered for changes to the binary inputs. While it is possible to force a sampling of the binary inputs
and assign index 1 to it, with the command inp:buf:sam(<src>,<indx>), this will in most cases lead
only to confusion. It is better to leave the index 1 for automatic recording of changes, and use any of
the other indexes available to the user (from 2 to 9) to expressly sample the binary inputs, or just to
mark our way through a program (more in section Using the Sequencer on page 53).
Perhaps the most common use of the user events is to make sure that the event buffer timer does not
overflow. Times are computed using an internal CMC counter, which overflows every 27 minutes
(1677.7216 seconds to be totally precise). CMEngine is capable of handling this overflow by itself, as
long as at least one event is generated within those 27 minutes. Thus you must make sure that no
period of 27 minutes can elapse without event generation. The best form to achieve this is to use a
timer in your application, and to generate a user event every 15 minutes or so. When the buffer is later
analyzed, these events are simply discarded.
The event buffer is the core of CMC programming. Most CMEngine programs work by arranging the
output commands in such a way as to create a certain stream of events in the buffer, and later
analyzing the contents of the buffer to find out what happened and to extract the timings. In general,
the more thought over the output control is, the simpler the buffer analyzer can be built. In general, the
buffer is cleared and automatic logging enabled, if required, just before the events we are interested in
take place.
An event stored in the input buffer contains the following fields:

Type
String describing what kind of event has been stored. It determines which subsystem in the test
device originated the event or whether it contains buffer-management information (empty,
overrun).

Time
Time-tag of the event.

48

Programming the CMEngine

Data
Event data, to be interpreted according to the Type.

Index
Identifier, to be interpreted according to the Type.

Optional
Additional information for some events.

The most common event and probably the most useful too is the one of type bin. When automatic
logging is enabled, these events record any changes in the binary inputs and in the analog outputs. To
enable full automatic logging, the command inp:buf:sam(bin,on) is used. If only the automatic
recording of the changes in the binary inputs is desired, the command inp:buf:sam(bin,bin) is used
instead. inp:buf:sam(bin,off) will turn off automatic event logging. Most times we will want to
measure the time elapsed between a change in the analog outputs and the test object reaction,
detected as changes in the binary inputs. For this, full automatic logging is required.
As an application of all the concepts described this far, the following example, written in VBA (Visual
Basic for Applications) will output a 3-phase overcurrent fault and wait until the relay trips. The trip will
be detected by the activation of the binary input 1. The control of the program flow will be done in the
PC, and the contents of the input buffer will later be analyzed to determine the exact time elapsed
between the onset of the fault and the reaction of the relay.
The VBA auxiliary functions used in this and other VBA programs will be provided in section VBA
functions on page 75.
Declare Sub Sleep Lib "kernel32" (ByVal time As Long) '
Operating Time Version 1 '
----------------------------------------------------------------------------Option Explicit
Dim
Dim
Dim
Dim

result As String
Frequency As Double
IFault As Double
TripTime As Double

' Trip Time = result of the test

Sub OvcTest()
Dim engine As cmEngine.cmEngine
' Declare engine as object used for
OLE Automation
Dim result As String
' Variable for the result string returned by
Exec
Dim deviceList As String
Dim devId As Integer

49

OMICRON CMEngine

On Error GoTo EngineError


' Create OLE Automation object
Set engine = New cmEngine.cmEngine
engine.DevScanForNew (False)
deviceList = engine.DevGetList(lsAllAssociatedAny)
If ExtractParameter(3, deviceList) = "0" And ExtractParameter(4,
deviceList) = "0" Then
' We have a net-1 device
devId = Val(ExtractParameter(1, deviceList))
If Not engine.Associated(devId) Then
engine.DevAssociateAppend (devId)
End If
ElseIf deviceList <> "" Then
devId = Val(ExtractParameter(1, deviceList))
Else
GoTo ApplicationEnd
End If
engine.DevLock (devId)
Frequency = 50
IFault = 3
' We look for trip in binary input 1
result = engine.Exec(devId, "inp:buf:clr")
result = engine.Exec(devId, "inp:buf:sam(bin, on)")
result = engine.Exec(devId,
result = engine.Exec(devId,
result = engine.Exec(devId,
result = engine.Exec(devId,
");p(0)")
' Ia
result = engine.Exec(devId,
");p(-120)")
' Ib
result = engine.Exec(devId,
");p(120)")
' Ic
result = engine.Exec(devId,
Dim Inputs As Integer

50

"out:i(1):mix(sig(1))")
"out:i(1):sig(1):wav(sin)")
"out:i(1):f(" & Str(Frequency) & ")")
"out:i(1:1):a(" & Str(IFault) &
"out:i(1:2):a(" & Str(IFault) &
"out:i(1:3):a(" & Str(IFault) &
"out:on")

' outputs on

Programming the CMEngine

Do
Sleep (100) ' Return control to the operating system and suspend task
for 100ms
result = engine.Exec(devId, "inp:bin:get?")
Inputs = Val(ExtractParameter(2, result))
Loop While ((Inputs And 1) = 0)
' We leave when the binary input 1
is active
result = engine.Exec(devId, "out:ana:off(zcross)")
result = engine.Exec(devId, "inp:buf:sam(bin, off)")
' Variables for buffer analysis
Dim
Dim
Dim
Dim
Dim

BufType As String
BufData As String
BufIndex As Integer
BufTime As Double
BinaryState As Integer

Dim EndOfBuffer As Boolean


Dim Tripped As Boolean
Dim ReferenceTime As Double
EndOfBuffer = False
Tripped = False
ReferenceTime = 0
TripTime = 0
Do
result = engine.Exec(devId, "inp:buf:get?")
' Extract measurement value out of result string
' (e.g. "1,<type>,<time>,<data>,<index>;").
BufType = ExtractParameter(2, result)
BufTime = Val(ExtractParameter(3, result))
BufData = ExtractParameter(4, result)
BufIndex = Val(ExtractParameter(5, result))
If BufType = "empty" Then
EndOfBuffer = True
ElseIf BufType = "bin" And BufIndex = 0 Then
output change (fault time)
ReferenceTime = BufTime

' This is the analog

51

OMICRON CMEngine

ElseIf BufType = "bin" And BufIndex = 1 Then


BinaryState = Val(BufData)
If (BinaryState And 1) <> 0 Then
' If Binary input 1 was active
TripTime = BufTime - ReferenceTime
Tripped = True
End If
End If
Loop While Tripped = False And EndOfBuffer = False
If Tripped = True Then
MsgBox "Relay tripped with operating time = " & Str(TripTime)
Else
MsgBox "Error - trip not found in the input buffer"
End If
result = engine.DevUnlock(devId)
EngineError:
MsgBox Err.Description
Err.Clear
ApplicationEnd:
Set engine = Nothing
End Sub
It is easy to expand this simple program by providing a prefault state to let the relay stabilize before
the fault magnitudes are applied, and especially by defining a maximum fault time to limit the
application of the fault values to the relay: in this example, the values are applied until the binary input
goes active. An example with all these improvements will be provided in section Using the
sequencer on page 53.

52

Programming the CMEngine

2.7

Using the Sequencer

Description of the Sequencer


The Sequencer allows downloading a series of CMEngine commands into the CMC memory, to be
executed there under the control of the test set. These commands can be almost any of the CMC
commands, with a few exceptions (please consult the Reference Manual to see which commands
cannot be executed in Sequence mode) plus some flow control commands that are specific to the
sequence.
The Sequencer allows tight control of the execution times, so it is possible to be sure that the times
between commands will be as we program it, with the same precision and resolution as the internal
CMC timer. This is very important for exact control of the analog outputs in those cases where the
waveform and timing of the applied waves must be carefully controlled.
There can be only one sequence in the CMC at any given time; if a different sequence is desired, the
previous sequence must be cleared and the new one uploaded to the CMC. During the uploading of
the sequence the commands are only stored, not executed. When the sequence is executed, its
commands are processed one by one in the same order as they have been uploaded. A sequence
can be executed any number of times once it is in memory.
The commands that are specific to the sequence are the following:
seq:clr

Deletes the contents of the CMC memory

seq:begin

Signals to the CMC that the commands that


follow are to be stored as a sequence

seq:end

End of the sequence mode commands


following this one will be executed upon
reception

seq:set()

Sets one of the counters or timers to a value

seq:add

Adds a quantity to the value in one of the


counters

seq:status?

Gets different data about the sequence and the


sequence memory

seq:stop

Stops the sequence

seq:wait

Decision point in the flow of the sequence. In a


wait command, different values can be evaluated
and the execution can jump to different steps of
the sequence according to the results of these
evaluations

53

OMICRON CMEngine

It is important to keep clearly in mind that, aside from the control commands, there is absolutely no
difference between a command issued during a sequence and a command issued outside of a
sequence. There are no special commands or hidden resets either at the beginning or at the end of
the execution of a sequence. It is perfectly possible to divide the work between in-sequence and outof-sequence commands if required by the application.
The sequence is executed autonomously in the CMC, so the PC is free to do other tasks. Normally,
the main program waits until the sequence is finished, then it extracts whatever data it needs from the
sequence and continues with the processing. Sometimes, however, it can be useful to leave the
sequence running and extract the data from the input buffer as it is generated. This is usually required
only when very complex trigger conditions are needed that cannot be implemented with the seq:wait()
command, or when it is feared that the input buffer might overflow unless continuously emptied. Using
seq:status?(step) we can find out which sequence block, or step, is being executed (please see
section Branching within a sequence the seq:wait() command on page 54 for the way the
sequence blocks are delimited). When the step is 0, the sequence is stopped and we can proceed.
To get data out of a sequence, the best and practically the only way is to analyze the contents of the
input buffer. There are no variables in which to store results that can be read from outside the
sequence, except for the loop counter; but since this counter is decremented automatically with each
seq:wait() command, it is highly sensitive to changes in the sequence. It is therefore much better to
write user-defined events into the buffer, by means of the inp:buf:sam(bin,<index>) command with
indexes from 2 to 9. These events can be used as markers to know which branch did a sequence
actually take, or as counters to know how many times a given loop was executed, or for any other
transfer of information from within the sequence to the main program.
Branching within a sequence - the seq:wait() command
The seq:wait() command is the key of sequence programming. It serves both as trigger condition and
as jump destination.
1. As a trigger condition, it allows combining a trigger condition with a timeout condition, and will jump
to different points in the program according to what happens first. The trigger condition can also be
used alone, in which case execution stops until the trigger condition is fulfilled. It is equally possible
to use the timeout alone, to implement a fixed wait in the sequence.
Trigger conditions can be:

54

Status of the sequence counters (count(1), count(2), loop)

Status of the user-defined timer

Status of the binary inputs

Activation of the dedicated, external input (used by the CMGPS device)

Logical (AND/OR/NOT) combinations of the above

Programming the CMEngine

2. The seq:wait() command is used to divide the sequence in blocks of code. It is only possible to
transfer execution to the first command in a block. Each block ends with a seq:wait() command,
except the last one that ends with the seq:end command. The jump destinations in the seq:wait()
command must be considered relative to the block that is currently being executed that is, the
block that ends with the seq:wait() command that is the origin of the jump. Therefore, a jump offset
of 0 will repeat the block (i.e., jump back in the sequence) while a jump offset of 1 will execute the
next sequence instruction after the seq:wait() command, since that would be the beginning of the
next block of code. Jump offsets that point before the beginning of the sequence will be taken as
pointing to the first instruction of the sequence, while jump offsets that point after the end of the
sequence will stop execution. The allowed offsets go from 127 to 127.
It is often necessary to jump to an instruction that is not the beginning of a block. In these cases, the
instruction must be made the first of a block, by inserting an empty seq:wait() command before it. This
command would have a timeout condition only, the timeout time would be 0, and the jump would be to
the instruction immediately following it; its syntax would then be seq:wait(0,1).
Please note that, if a new trigger condition is inserted in any point of the sequence, all jump
destinations must be revised to make sure they are still correct. Jumps across the newly inserted
instruction will have to be changed. It is therefore highly advisable to design the sequence on paper
before implementing it in code; this will greatly reduce the need for changes to the actual code and will
increase the reliability of the sequence.
The following examples will provide an introduction to the wide possibilities the use of the sequencer
allows.
Declare Sub Sleep Lib "kernel32" (ByVal time As Long)
' This program will adjust the fault inception to a given angle
' It shows how the sequence can be used to control the analog
' output with great precision
'
----------------------------------------------------------------------------Option Explicit
Dim
Dim
Dim
Dim
Dim
Dim

Frequency As Double
InceptionAngle As Double
PrefaultCycles As Integer
IFault As Double
IPreFault As Double
FaultTime As Double

Sub FaultInception()
Dim engine As cmEngine.cmEngine
' Declare engine as object used
for OLE Automation
Dim result As String
' Variable for the result string returned by
Exec

55

OMICRON CMEngine

Dim deviceList As String


Dim devId As Integer
On Error GoTo EngineError
' Create OLE Automation object
Set engine = New cmEngine.cmEngine
engine.DevScanForNew (False)
deviceList = engine.DevGetList(lsAllAssociatedAny)
If ExtractParameter(3, deviceList) = "0" And ExtractParameter(4,
deviceList) = "0" Then
' We have a net-1 device
devId = Val(ExtractParameter(1, deviceList))
If Not engine.Associated(devId) Then
engine.DevAssociateAppend (devId)
End If
ElseIf deviceList <> "" Then
devId = Val(ExtractParameter(1, deviceList))
Else
GoTo ApplicationEnd
End If
engine.DevLock (devId)
Frequency = 50
InceptionAngle = 90
' The fault will strike at 90 degrees
PrefaultCycles = 100
IPreFault = 1
IFault = 5
FaultTime = 1
' We keep the fault for 1 second
Dim DelayTime As Double
Dim Period As Double
Period = 1 / Frequency
DelayTime = (Period * PrefaultCycles) + (Period * (InceptionAngle /
360))
' The delay time now is equal to an entire number of cycles, plus the
part
' of a cycle corresponding to the inception angle. This code assumes
that the

56

Programming the CMEngine

' original phase of the wave was 0


result = engine.Exec(devId, "seq:clr")

' STEP 1 of the sequence


result = engine.Exec(devId,
result = engine.Exec(devId,
result = engine.Exec(devId,
result = engine.Exec(devId,
result = engine.Exec(devId,
result = engine.Exec(devId,
");p(0)")
result = engine.Exec(devId,
values applied
result = engine.Exec(devId,
result = engine.Exec(devId,
result = engine.Exec(devId,
' STEP 2
result = engine.Exec(devId,
applied
result = engine.Exec(devId,
' STEP 3
result = engine.Exec(devId,
result = engine.Exec(devId,
result = engine.Exec(devId,

"seq:begin")
"out:pmode(abs)")
"out:i(1):mix(sig(1))")
"out:i(1):sig(1):wav(sin)")
"out:i(1):f(" & Str(Frequency) & ")")
"out:i(1:1):a(" & Str(IPreFault) &
"out:on")

' outputs on - prefault

"out:pmode(diff)")
"out:i(1:1):a(" & Str(IFault) & ");p(0)")
"seq:wait(" & Str(DelayTime) & ",1)")
"out:on")

' outputs on - fault values

"seq:wait(" & Str(FaultTime) & ",1)")


"out:off")
"seq:end")
"seq:exec")

Dim Step As Integer


Do
Sleep (100)
' Return control to the operating system and
suspend task for 100ms
result = engine.Exec(devId, "seq:status?(step)")
Step = Val(ExtractParameter(2, result))
Loop While (Step <> 0)
' Wait for the sequence to end
result = engine.DevUnlock(devId)
GoTo ApplicationEnd
EngineError:
MsgBox Err.Description
Err.Clear
ApplicationEnd:
Set engine = Nothing
End Sub

57

OMICRON CMEngine

Declare Sub Sleep Lib "kernel32" (ByVal time As Long)


' Operating Time Version 2
'
' Rewriting of Version 1 using the Sequencer
'
----------------------------------------------------------------------------Option Explicit
Dim Frequency As Double
Dim IFault As Double
Dim MaxTFault As Double
Dim TripTime As Double
' Trip Time = result of the test
Const NoTripEvent As Integer = 9
Sub OvcTest()
Dim engine As cmEngine.cmEngine
' Declare engine as object used
for OLE Automation
Dim result As String
' Variable for the result string returned by
Exec
Dim deviceList As String
Dim devId As Integer
On Error GoTo EngineError
' Create OLE Automation object
Set engine = New cmEngine.cmEngine
engine.DevScanForNew (False)
deviceList = engine.DevGetList(lsAllAssociatedAny)
If ExtractParameter(3, deviceList) = "0" And ExtractParameter(4,
deviceList) = "0" Then
' We have a net-1 device
devId = Val(ExtractParameter(1, deviceList))
If Not engine.Associated(devId) Then
engine.DevAssociateAppend (devId)
End If
ElseIf deviceList <> "" Then
devId = Val(ExtractParameter(1, deviceList))
Else
GoTo ApplicationEnd
End If

58

Programming the CMEngine

engine.DevLock (devId)
Frequency = 50
IFault = 3
MaxTFault = 5

' Maximum fault time is 5 seconds

' We look for trip in binary input 1


result =
result =
' STEP 1
result =
result =
result =
result =
result =
result =
");p(0)")
result =
");p(-120)")
result =
");p(120)")
result =
result =
", 1)")
' STEP 2
result =
")")
result =
' STEP 3
result =
result =
result =

engine.Exec(devId, "seq:clr")
engine.Exec(devId, "inp:buf:clr")
engine.Exec(devId,
engine.Exec(devId,
engine.Exec(devId,
engine.Exec(devId,
engine.Exec(devId,
engine.Exec(devId,
' Ia
engine.Exec(devId,
' Ib
engine.Exec(devId,
' Ic
engine.Exec(devId,
engine.Exec(devId,

"seq:begin")
"inp:buf:sam(bin, on)")
"out:i(1):mix(sig(1))")
"out:i(1):sig(1):wav(sin)")
"out:i(1):f(" & Str(Frequency) & ")")
"out:i(1:1):a(" & Str(IFault) &
"out:i(1:2):a(" & Str(IFault) &
"out:i(1:3):a(" & Str(IFault) &
"out:on")
' outputs on
"seq:wait(bin(1), 2, " & Str(MaxTFault) &

- Case when no trip is detected


engine.Exec(devId, "inp:buf:sam(bin, " & Str(NoTripEvent) &
engine.Exec(devId,
- Outputs off
engine.Exec(devId,
engine.Exec(devId,
engine.Exec(devId,

"seq:wait(0, 1)")
"out:ana:off(zcross)")
"inp:buf:sam(bin, off)")
"seq:end")

result = engine.Exec(devId, "seq:exec")


Dim Step As Integer
Do
Sleep (100)
' Return control to the operating system and
suspend task for 100ms
result = engine.Exec(devId, "seq:status?(step)")
Step = Val(ExtractParameter(2, result))
Loop While (Step <> 0)
' Wait for the sequence to end

59

OMICRON CMEngine

' Variables for buffer analysis


Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim

BufType As String
BufData As String
BufIndex As Integer
BufTime As Double
BinaryState As Integer
EndOfBuffer As Boolean
NoTrip As Boolean
TripDetected As Boolean
ReferenceTime As Double

EndOfBuffer = False
NoTrip = False
ReferenceTime = 0
TripTime = 0
Do
result = engine.Exec(devId, "inp:buf:get?")
'Extract measurement value out of result string
' (e.g. "1,<type>,<time>,<data>,<index>;").
BufType = ExtractParameter(2, result)
BufTime = Val(ExtractParameter(3, result))
BufData = ExtractParameter(4, result)
BufIndex = Val(ExtractParameter(5, result))
If BufType = "empty" Then
EndOfBuffer = True
ElseIf BufType = "bin" And BufIndex = 0 Then
' This is the
analog output change (fault time)
ReferenceTime = BufTime
ElseIf BufType = "bin" And BufIndex = NoTripEvent Then
' The
relay did not trip
NoTrip = True
ElseIf BufType = "bin" And BufIndex = 1 Then
BinaryState = Val(BufData)
If (BinaryState And 1) <> 0 Then
' If Binary input 1 was
active
TripTime = BufTime - ReferenceTime
TripDetected = True
End If
End If

60

Programming the CMEngine

Loop While NoTrip = False And TripDetected = False And EndOfBuffer =


False
If TripDetected = True Then
MsgBox "Relay tripped with operating time = " & Str(TripTime)
ElseIf NoTrip = True Then
MsgBox "Relay did not trip for the fault magnitudes applied"
Else
MsgBox "ERROR - trip not found in the input buffer"
End If
engine.DevUnlock (devId)
GoTo ApplicationEnd
EngineError:
MsgBox Err.Description
Err.Clear
ApplicationEnd:
Set engine = Nothing
End Sub

2.8

Counter inputs

The binary inputs in the CMC devices can be used as hardware counters, to count 1 > 0 or 0 > 1
transitions (programmable). This usage is independent of the standard operation, and both can
proceed in parallel. The value of the count can be polled at any time; additionally, certain events
create an entry in the input buffer for exact handling. The standard binary inputs in the CMC front
panel can count up to frequencies of 3 kHz; two high-speed counter inputs, sensitive to TTL-level
signals in the back panel can go up to 100 kHz. The standard counters use the identifier bcount
(binary counter) in the counter commands and in the input buffer entries. The high-speed counters use
the identifier ecount (extended counter).
The registers where the count is stored are 24-bit wide. Therefore, the maximum value they can hold
is 2^24 1, or 16777215. The next pulse causes an overflow, which is registered as an event in the
input buffer together with the time at which the event was registered and the count at that moment.
That count will most times be zero, but not always; due to the architecture of the extended input
counters it may happen that the entry in the buffer is not zero as expected but already has advanced
to a value up to 15. The time in the buffer is the time when the count in the event entry was reached,
not the time of the zero crossing. The user must calculate the zero-crossing time from the given data.
A counter may be configured as "master" or "slave" counter. By default, all counters are configured as
masters. To configure them as slaves, the inp:count:join command is used. This command defines a
master-slave relationship between two counters. The following rules are applicable:

A counter cannot be slave and master at the same time.

A slave counter must have at least one master.

61

OMICRON CMEngine

A slave counter may have several masters.

A master counter may have several slaves.

For instance, to define the standard counter 3 as an slave of the high-speed counter 1 the following
command would be used: inp:count:join(ecount(1),bcount(3))
When a counter is defined as slave, it generates additional events. As was already mentioned, all
counters generate an overflow event when rolling over from 16777215 to 0. An slave counter will
generate two additional events in the following cases:

The slaves counter first pulse after the masters first pulse

The slaves counter first pulse after the masters overflow

The counters overflow is marked by the zcross keyword in the Optional field in the generated event.
Any counter events not so marked are generated by a slave counter, and must be processed together
with the masters overflow events to determine the exact sequence of events.
The following example will display the functionality of the counter inputs. We will count a fixed number
of pulses in one of the counters, and will determine how many pulses in a second counter are
detected during that time. This configuration is useful when testing energy meters, where a fixed
number of pulses (corresponding to a given energy value) is detected from the meter under test, while
pulses detected from a reference meter during the same period will give us the reference value for
evaluation. To count a given number of pulses, we program the counter with an initial value such that
the last of the desired pulses triggers the overflow event. The initial value to be programmed into the
counter would then be: COUNTER_MAX DESIRED_PULSES + 1. In the example we will count eight
pulses; therefore, the initial value of the counter will be 16777215 8 + 1 = 16777208.
Please note that the counters are not self-reloading, and after the overflow the initial value will be lost
and the counter will continue counting from 1. We will use the CMCs own voltage outputs to create
the pulses.
; OMICRON electronics

1998-10-08

; Script to test the counter functionality


; For use with CMEngine sample program Batcher
; The voltage output 1 has to be connected to binary input 1.
; The voltage output 2 has to be connected to binary input 2.
; Create a log file for easier analysis
#lognew Counter.log
; Set binary input group 1 to potential-sensing
; with a 10V threshold to measure voltages. We assume a CMC156,
; so this will set inputs 1 to 4

62

Programming the CMEngine

inp:bin(1:1):def(10)
; Set up the counters
inp:count:clr
inp:count:set(bcount(1),16777208,+)
inp:count:set(bcount(2),0,+)
inp:count:join(bcount(1),bcount(2))
inp:count:on
; Read the counters (should display 16777208 and 0)
inp:count:get?(bcount(1))
inp:count:get?(bcount(2))
; Program the sequence
seq:begin
inp:buf:clr
; Make a time reference entry in the measurement buffer
inp:buf:sam(bin,1)
out:pmode(abs)
out:v(1:1):a(20);f(20);p(0);wav(sin)
out:v(1:2):a(20);f(50);p(180);wav(sin) out:on
out:pmode(diff)
seq:wait(0.400,1)
out:v(1:1):off
seq:wait(0.050,1)
out:v(1:2):off
seq:end
; Run it
seq:exec
; Wait until completed
#wait 2
; Read the results
#loop 6 inp:buf:get?

63

OMICRON CMEngine

The program output should look like this:


(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)

Result
Result
Waiting
Result
Result
Result
Result
Result
Result

:
:
2
:
:
:
:
:
:

1,16777208;
1,0;
seconds ...
1,bin,0.0000000E+000,0,1,-;
1,bcount,3.4991632E-003,16777209,1,-;
1,bcount,1.1797179E-002,1,2,-;
1,bcount,3.5351546E-001,0,1,zcross;
1,bcount,3.7181109E-001,19,2,-;
1,empty,0.0000000E+000,0,0,-;

Lines 4 to 9 are the events extracted from the input buffer. The following graphic will help to relate the
sequence of pulses to the events:

64

Programming the CMEngine

2.9

Circuit Breaker Simulation

The CMC 256 and newer test sets provide functionality to simulate the behavior of a circuit breaker.
When the simulation is active the binary inputs of the test set are monitored and if trip or close
commands are detected, the auxiliary contacts are simulated with the appropriate timing. The
simulation can be a single-phase or a three-phase simulation.
Architectural Concept of the CB Simulation

65

OMICRON CMEngine

Trip and Pole Action Logic

66

Programming the CMEngine

State Machine in the CMC Firmware


The state machine is responsible for the reaction on the simulation inputs and the correct timing of the
simulation outputs. Once activated, the state machine is running even if the CMC is not connected to a
computer (usage as stand-alone CB simulator). When powering-up the CMC test set, the
CB simulation is inactive.

67

OMICRON CMEngine

When the binary input sampling is active each state transition creates entries in the event buffer (time
stamp, index of new state, state of the binary inputs and outputs).

2.10 System control unit


The system control unit allows checking the status of the CMC device, resetting the hardware and
obtaining information about the different elements of the device. The commands and their use are
clearly described in the Reference Manual; in this section we will provide some hints about how to use
them in a CMEngine program.
At the beginning of the program, the sys:test? command may be used to make sure our test device is
operating correctly. It is sufficient to use this command once, when the program starts. The
sys:status? command though will inform us of errors or anomalies that happen during program
execution, such as output overload, output switch-off due to overtemperature, communication errors,
etc. Since the CMC will never initiate transmission, it must be polled by periodically calling this
command to make sure that no anomalies are appearing during test.
The way to implement such a feature depends entirely on the operating system, on which our program
is running, and on the complexity we want to give to the program itself. The cleanest way to implement
this feature is to assign it to a separate process or thread. If this is not convenient, a timer-invoked
routine can also be a good way to poll the CMC. The simplest way is to include the polling in a
program loop if sequences are used, the loop where we wait for the sequence to end is a very
common place to put it.
This last way has the inconvenience that it mixes what are really two independent tasks in the same
code, and it makes the code harder to debug and to understand. On the other hand, it allows knowing
exactly in which part of the test the error condition happened; this information may be very useful to
correct the problem.
The status registers are organized in a two-level structure. The first level is a 32-bit register, called
"Primary Register", which is returned by a call to sys:status? without parameters. Each bit in this
register is the logic OR of all bits in a second-level ("Secondary") 32-bit register that holds the actual
error codes. The secondary registers are accessed by passing their number as parameter to the
sys:status? command.
The method of operation is to read the primary status register and check that it is 0. If it is, no errors
are detected anywhere and there is no need to read further. If any bit is 1, then the corresponding
secondary register should be read to find out the exact reason for the error.
For example:
sys:status? Result : 1,0; No errors
. . . . . . . . . . . . . . . . . . . . . . .
sys:status?
Result : 1,8; Secondary register 3 holds errors
sys:status?(3)
Result : 1,5; i(1:1) and i(1:3) are in overload

68

Programming the CMEngine

In this case, you may choose to cancel the test, since an overload makes the results unreliable, or
finish it and record the overload condition together with the tests results. Please note that no user
action is required in any of the error conditions; the CMCs firmware will take appropriate action for all
critical conditions. For example, if overtemperature is detected at the analog outputs, the generators
will be turned off automatically while the condition persists, and restored to operation after the
generators have cooled themselves. The user will know of this condition through the secondary status
registers 4 and 5, but should (and in fact can) take no action.

2.11 The CMC 256


The CMC 256 offers the user the many additional capabilities respect to the CMC 156. The following
list enumerates those most visible to the CMEngine programmer:

One fourth voltage output V4

One additional current triple (CMC 256-6)

Auxiliary DC power

Analog measurement and recording capabilities added to the front-panel binary inputs.

In this section we will describe the CMC 256-6, as the CMC 256-3 is less complex due to the lack of
the second current triple.
More:
Amplifiers on page 69
The DC auxiliary output on page 71
The AC analog inputs on page 72

2.11.1 Amplifiers
It is important to note that, upon start-up, the CMC 256 is fully compatible with any software written for
the CMC 156. When the CMEngine initializes, all inputs are configured as potential-free binary inputs.
The fourth voltage and the second current triple are left undefined for maximum software compatibility.
Therefore, programs expecting the CMC 156 configuration will require no modification. Only when we
wish to take advantage of the CMC 256 unique features do we need to modify the existing software.
The first change is noticed when we request the output configuration; in a CMC 256-6, the returned
string will look like this: 1,4,1/3/i,2/3/i,3/3/e,4/3/e,5/1/i,6/3/i;
As we see, there are two new internal amplifiers added after the previously existing internal and
external amplifiers. The single-phase internal amplifier, number 5, is the 4th voltage output, while
number 6 is the second current triple.
These amplifiers can be defined in the standard way, and used as independent triples; but the full
power of the CMC 256 is reached through the use of amplifier configurations. Detailed descriptions
about available amplifier configurations for a test set can be found in the hardware manual.

69

OMICRON CMEngine

The following example shows the configurations of a CMC 256-6:


amp:cfg?
Result : 1,11;
amp:cfg?(1)
Result : 1,9,3,3.000000e+002,8.500000e+001,8.500000e+001,1.000000e
+000,std,0,amp_no,1;
amp:cfg?(2)
Result : 1,10,1,3.000000e+002,1.500000e+002,7.500000e+001,2.000000e
+000,std,14, amp_no,5;
amp:cfg?(3)
Result : 1,11,3,3.000000e+002,5.000000e+001,7.500000e
+001,6.600000e-001,zero,13,amp_no,1,amp_no,5;
amp:cfg?(4)
Result : 1,12,1,6.000000e+002,1.500000e+002,1.500000e+002,1.000000e
+000,ser13,4,amp_no,1;
amp:cfg?(5)
Result : 1,13,2,6.000000e+002,1.500000e+002,1.500000e+002,1.000000e
+000,ser2,17,amp_no,1,amp_no,5;
amp:cfg?(6)
Result : 1,14,3,1.250000e+001,7.000000e+001,7.500000e+000,1.000000e
+001,std,18,amp_no,2;
amp:cfg?(7)
Result : 1,15,3,1.250000e+001,7.000000e+001,7.500000e+000,1.000000e
+001,std,19,amp_no,6;
amp:cfg?(8)
Result : 1,16,3,2.500000e+001,1.400000e+002,1.500000e+001,1.000000e
+001,par3,5,amp_no,2,amp_no,6;
amp:cfg?(9)
Result : 1,17,1,7.500000e+001,4.200000e+002,4.500000e+001,1.000000e
+001,par1,7,amp_no,2,amp_no,6;
amp:cfg?(10)
Result : 1,18,1,1.250000e+001,2.800000e+002,7.500000e+000,4.000000e
+001,ser4,10,amp_no,2,amp_no,6;
amp:cfg?(11)
Result : 1,19,1,3.750000e+001,4.200000e+002,2.250000e+001,2.000000e
+001,parser,11,amp_no,2,amp_no,6;
amp:cfg?(11)
Result : 1,19,1,3.750000e+001,4.200000e+002,2.250000e+001,2.000000e
+001,parser,11,amp_no,2,amp_no,6;
where we see the full range of capabilities that the CMC 256-6 hardware offers us.
There are some additional connection modes for the CMC 256-6, as follows:

70

Programming the CMEngine

Mode

Phases

Description

zero

Three phases plus an


automatically calculated
resultant, which is output via an
additional generator. Each
phase is active against its
corresponding Neutral.

ser2

For phase 1, Generator 1 is


active and generator 2 is
reference. For phase 2,
generator 3 is active and the
extra generator is reference.

par6

Involves two physical


amplifiers. Generators 1, 2 and
3 of both amplifiers, tied
together (the 6 of them) are
signal. Both Neutrals tied
together are reference.

Please note that configuration 8 is the only way to set both current triples in parallel to obtain a threephase, 25A current triple. The method described for the CMA 156 in section Handling of external
amplifiers on page 36 is not applicable for the CMC 256.
Configuration 3 creates an amplifier with 4 voltages, three of which are accessible to the user while
the fourth outputs the automatically-calculated resultant of the other three. It is worth noting that the
resultant is calculated with instantaneous values, and is therefore accurate for whatever wave form is
being output.

2.11.2 The DC auxiliary output


The CMC 256 incorporates a DC power source that can be used to power up the equipment under
test. Due to its intended use, this output does not have the same precision as the test outputs, and is
therefore not handled with the standard analog output commands. Instead, the commands to control
the DC auxiliary output all begin with out:aux.
The analog output can be programmed to be active with a preset value when the CMC 256 is
powered-up. That value will be output immediately even when no PC is attached to the CMC. To set
this value, the user would use the command out:aux:def(), passing the desired power-on value as an
argument. For instance, to set the CMC so that 48V are output on power-up, we would issue the
following command: out:aux:def(48). The command has no effect until the CMC is powered off and
on again, but we can query the power-on value with the out:aux:def? command.

71

OMICRON CMEngine

At any time we can set the DC value with the out:aux:a() command. This command has immediate
effect and will set the output to the value that we pass as parameter. The complementary command
out:aux:a? queries the status and characteristics of the DC auxiliary output. It returns the current
status as a string ("on" or "off"), plus the value being output and the maximum value that can be
output. Both the out:aux:def() and the out:aux:a() commands will fail if values higher than the
maximum possible are passed to them.
For example, assuming we wish to have the CMC 256 output 110VDC upon being powered-up, we
would program it like follows:
out:aux:def(110)
out:aux:def(110) out:aux:def?
Result : 1,1.100000E+002;
The next time we power up the CMC, it would immediately output 110VDC through the DC auxiliary
output without the need for intervention from us. We can make sure that it is doing so by querying the
status of the auxiliary output:
out:aux:a?
Result : 1,on,1.099566E+002,2.640000E+002;
We see here that the output is on, outputting the programmed value, and that the maximum value the
source can output is 264V. We can then use the out:aux:a() command to change the value if we want
to.
Please note that it is not possible to program negative values in the DC auxiliary output. The
acceptable range is from 0 to the maximum value returned by the out:aux:a() command.

2.11.3 The AC analog inputs


The CMC 256 includes ten binary / analog inputs accessible via the front panel. These inputs can be
programmed to perform the same functions as the binary inputs in the CMC 156, but they can also be
used in analog mode to perform a wide range of measurements. At present, these are:

RMS

Peak values

Phase

Frequency

Power

Sum

72

Programming the CMEngine

In binary mode, the inputs can work as potential-free or potential-sensing inputs, as described before
for the CMC 156. In analog mode, they can be configured as voltage or current inputs. Please note
that the hardware can measure only voltages; in the case of current inputs, the hardware needs a
current clamp or a shunt resistor, whose ratio is used as a configuration parameter of the input.
CMC356 test sets needs the ELT-1 option to have the AC analog inputs available.

To configure an analog input, we must provide the input type, the desired range and, for current
inputs, the CT ratio in Volts / Amp. For instance, the following commands:
inp:ana(1,3,5):def(v,120)
inp:ana(2,4,6):def(i, 10, 1)
will program inputs 1, 3 and 5 as voltage inputs with a range of 120V, and inputs 2, 4 and 6 as current
inputs with a range of 10V and a transformer ratio of 1V/A (allowing us to measure up to 10A). In fact,
in a CMC 256 the range set for the voltage inputs will be 650V, but it is still worth the effort to adjust
the range to the expected inputs, to take advantage of future improvements without any changes in
the code.
Once we have defined the inputs as analog, we can start measuring tasks on them. The way to
proceed is always the same: the command to set the task needs one or more configuration
parameters, usually the integration time for the measurement; it returns a handle that we later pass to
the inp:ana:get?() command to obtain the results of the task.
Each result comes with an integer that contains its validity flags. These flags are as follows:

Bit 0: Result Already Read


The results of most commands are updated at the end of the integration time. Therefore, it is
possible to read the same result more than once. This flag warns you that you have already read
this result.

Bit 1: Not Ready


This means that the command hasn't got any results yet. For example if you ask for the results of a
command that has just been issued, without waiting for the integration time to be finished, you will
get this bit set.

Bit 2: Weak Signal


This only occurs for the results of the frequency command. It means that there are valid results, but
the signal is too weak to measure the frequency accurately.

Bit 3: Overload
This means that the signal at the input is higher than the maximum for the current range and, as a
result, the readings will be wrong.

Bit 4: Real Time Violation


This indicates that the measuring DSP cannot process all the measurement tasks within the
sample time. This may be caused by putting too many tasks on the task vector at a high sampling
frequency (e.g. 28 kHz). Real time violations are also shown using the sys:status? command.

73

OMICRON CMEngine

Lets get all the measurements we can on a V and I 3-phase system:


inp:ana(1,3,5):def(v,120)
inp:ana(2,4,6):def(i,10,1)
inp:ana:cal(ac)
inp:ana(1,2,3,4,5,6):rms?(1.0)
Result : 1,1;
inp:ana(1,2,3,4,5,6):peak?(1.0)
Result : 1,2;
inp:ana(1):freq?(50, 1)
Result : 1,3;
inp:ana(1,2,3,4,5,6):phase?(1.0)
Result : 1,4;
inp:ana(1,2,3,4,5,6):power?(1.0)
Result : 1,5;
inp:ana(1,3,5):sum?(1.0)
Result : 1,6;
inp:ana(1,3,5):diff?(1.0)
Result : 1,7;
inp:ana:sync
We have then defined three voltage and three current inputs, set their parameters, re-calibrated them
after the change in ranges (convenient but not mandatory) and started measuring values in them.
Note that one single command creates one single task, regardless of the number of inputs that form
the input list.
After issuing all the commands, we have the following tasks running:
Task

Measured quantity

RMS value of all signals, with 1 second integration time

Peak value of all signals, with 1 second integration time

Frequency of the first V signal, with 50 periods detection time and 1 volt
trigger level

Phase of all signals relative to the first voltage signal

Three power measurements, for the three V/I pairs

Resultant of the three V inputs (Vo)

Line to line voltages

74

Programming the CMEngine

The inp:ana:sync command ensures that all measuring tasks with the same integration time are
synchronized so the results are obtained simultaneously and are applicable to the same batch of
samples. If this command is not used, each task begins getting results the moment it is started, and
there would be an unavoidable time shift in the results. In this case, all tasks would be synchronized
except the frequency measurement, which has a number of periods instead of a time as integration
parameter.
The tasks remain active until they are removed with the inp:ana:clr() command. The command allows
removal of one task or of all active tasks. If only one task is removed, the rest is not affected.
To finish the example, lets get the results of some of the measurement tasks we have started:
inp:ana:get?(1)
Result :
1,4.967285e+001,0,1.198608e+000,0,1.319092e+000,0,1.146973e
+000,0,4.968555e+001,0,9.019012e-001,0,4.969406e-001,0,1.006195e
+000,0,4.969238e+001,0, 1.081421e+000,0,5.218201e-001,0,9.777374e-001,0;
This command returns the readings of the RMS measurement task. The readings are in the same
order as the inputs appeared in the input list when the command was issued. For each input in the list,
two readings are provided, each with its validity flags: the first reading is the AC RMS value and the
second reading is the DC component. This way, we see that the first voltage is approximately 50V with
1.19V of DC component; the first current (input 2) is 1.31A with 1.14A of DC component, and so forth.

2.12 How to extract a parameter from a result string


' This function extracts one parameter from a string, and returns it
' Returns a non-empty string if the parameter was found, an empty string
if the function could not extract the parameter
' String format: <parameter1>,<parameter2>,......<parameterN>;
' so there are N-1 commas before the Nth parameter, and a comma or a
semicolon after the parameter
' The user will later convert the parameter as required
Function ExtractParameter(ByVal ParNumber As Integer, ByVal CmdResult As
String) As String
Dim textpos1 As Integer
Dim textpos2 As Integer
Dim Counter As Integer

ExtractParameter = ""
Counter = 0

' We assume no return, for the moment

75

OMICRON CMEngine

If ((ParNumber <= 0) Or (CmdResult = Null)) Then


ExtractParameter = ""
Exit Function
End If
' First, let's find the last comma before the parameter
' For parameter N there are N-1 commas
textpos1 = 0
Counter = 0
While Counter < (ParNumber - 1)
textpos1 = InStr(textpos1 + 1, CmdResult, ",", 0)
If ((textpos1 = 0) Or (textpos1 = Null)) Then
' We cannot find
a comma that we need,
ExtractParameter = ""
' so the parameter does not exist in
this string
Exit Function
End If
Counter = Counter + 1
Wend

' If we leave the loop, then the comma is found. Let's find the
closing character
textpos2 = InStr(textpos1 + 1, CmdResult, ",", 0)
If (textpos2 = 0) Then
' We cannot find more commas
textpos2 = InStr(textpos1 + 1, CmdResult, ";", 0)
' Perhaps a
semicolon?
If (textpos2 = 0) Then
' No closing character. Probably wrong
string.
ExtractParameter = ""
Exit Function
End If
End If
ExtractParameter = Mid$(CmdResult, textpos1 + 1, textpos2 - textpos1 1)
End Function

76

Programming the CMEngine

' Routine to issue a command and get the return string


Sub Command(ByVal stringCommand As String, ByRef Info As String)
Info = CMEng.Exec(1, stringCommand)
End Sub
' Routine to issue a command when no answer is expected
Sub CommandNoAnswer(ByVal stringCommand As String)
Dim DumpResult As String
DumpResult = CMEng.Exec(1, stringCommand)
End Sub

77

OMICRON CMEngine

78

Interface Functions

Interface Functions

As already described in the chapter Typical program sequence on page 21, you can use the
CMEngine's interface functions in your program.
First, the following chapter supplies a quick overview of all error codes that the CMEngine's interface
may cause. This is followed by a detailed description of every interface function, the error codes a
specific function may cause and the reasons are explained in this description. Each function
description also contains an entry called "Compatibility" which indicates for which platforms the
function is available.
Furthermore, you can get a more practical approach to the use of the interface functions if you read
the source code examples like BATCHER!, which are supplied with the CMEngine.
More:
Error codes overview... on page 79
Which error codes can be caused by a specific function? on page 90
Interface function reference on page 91

3.1

Error Codes Overview

The functions in the following chapter like Exec() throw an exception if there is an error.. In this case,
you can use the function GetError() to get the error code. Some Engine errors have an additional
extended error code which represents the error code returned by DOS or by the Windows-API.
The error codes CMERR_XXX are partitioned into three groups: common Engine errors, file input/
output errors and errors from the interface of Windows 95 or Windows NT (Win32 API). Accordingly,
the error numbers are partitioned into three groups: CM_ENG, CM_FIL and CM_API.
If an error of the groups CM_FIL or CM_API occurs, the function GetError() returns an extended error
code in addition to the CMERR error code. If the CMERR error is of the group CM_FIL, the extended
error code is equivalent to the DOS error code (e.g. 2 = "file not found"). If the CMERR error code
belongs to the group CM_API, the extended error code is the value returned by the last call to a
Win32-API function or a call to GetLastError(). The error codes of the Win32-API are defined like the
DOS error codes and you can find them in the Win32 documentation. Use the Win32 function
FormatMessage()) to translate the API error code into a text message.
An interface function throws an exception it indicates that one or more errors occurred; thus the error
queue that stores the errors can contain one or more errors. That's the reason why you always have to
call the function CMGetError() in a loop until the error code returned is zero to get all the errors out of
the queue.
All possible error codes returned by the CMEngine interface are listed in the following table for an
overview:

79

OMICRON CMEngine

No

Error code mnemonic

Group

Description

000 CMERR_OK

CM_ENG Operation successful

001 CMERR_INIT

CM_API

002 CMERR_NO_LOCKED_CMC

CM_ENG There is no locked CMC

003 CMERR_CMC_NOT_FOUND

CM_ENG Selected CMC was not found

004 CMERR_CMC_NOT_LOCKED

CM_ENG Selected CMC is not locked

005 CMERR_CMC_ALREADY_LOCKED

CM_ENG CMC is already locked

006 CMERR_FILE_LOG

CM_FIL

007 CMERR_BUF_TOO_SMALL

CM_ENG Buffer too small

008 CMERR_OUT_OF_RANGE

CM_ENG Value out of range

009 CMERR_SYNTAX

CM_ENG Syntax error

010 CMERR_PARSER_STACK_OVFL

CM_ENG Parser stack overflow

011 CMERR_TOKEN_BUF_OVFL

CM_ENG Token buffer overflow

012 CMERR_PUSHBACK_BUF_OVFL

CM_ENG Push-back buffer overflow

013 CMERR_INVALID_INT

CM_ENG Invalid integer

014 CMERR_INVALID_FLOAT

CM_ENG Invalid float

015 CMERR_OUT_OF_MEMORY

CM_ENG Out of memory

016 CMERR_DOWNLOAD_FILE

CM_FIL

017 CMERR_DOWNLOAD

CM_ENG Download file format error

018 CMERR_TRIPLE_NOT_DEF

CM_ENG Triple not defined

019 CMERR_LOCK_UNLOCK_PORT

CM_API

020 CMERR_NO_CMC_CONNECTED

CM_ENG No CMC is connected to PC

021 CMERR_COMM_API

CM_API

022 CMERR_COMM

CM_ENG Communication error

023 CMERR_STILL_WORKING

CM_ENG Engine is still working

80

Fatal initialization error

I/O error with log file

File error at download

Could not lock/unlock port

Communication error (from API)

Interface Functions

No

Error code mnemonic

Group

Description

024 CMERR_IN_SEQ_MODE

CM_ENG Not allowed in sequence mode

025 CMERR_NOT_IN_SEQ_MODE

CM_ENG Not in sequence mode (seq:begin


missing)

026 CMERR_NO_AMP_AVAIL

CM_ENG No amplifier available with


specified number or location

027 CMERR_NOT_SUPPORTED

CM_ENG Not supported on this device

028 CMERR_MIN_GT_MAX

CM_ENG Min value greater than max value

029 CMERR_AMP_IN_USE

CM_ENG Amplifier is in use (routed)

030 CMERR_KINDS_DONT_MATCH

CM_ENG Kind of triple doesn't match


amplifier

031 CMERR_DOWNLOAD_NO_FW

CM_API

032 CMERR_OUT_OF_CMC_MEM

CM_ENG Out of CMC memory

033 CMERR_INVALID_USER_SIG

CM_ENG Invalid user signal number

034 CMERR_USER_SIG_IN_USE

CM_ENG User signal is in use

035 CMERR_INVALID_BOOL

CM_ENG Invalid boolean expression in


seq:wait

036 CMERR_PROT_FILE

CM_FIL

037 CMERR_CALDATA_CHECKSUM

CM_ENG Calibration data checksum


mismatch

038 CMERR_INCOMPATIBLE_DRIVER

CM_ENG Incompatible driver version

040 CMERR_LICENSE_FORMAT

CM_ENG Invalid license number format

041 CMERR_INVALID_LICENSE

CM_ENG The license information you have


provided has an invalid format

042 CMERR_PROC_EXHAUST

CM_ENG CMC signal processing exhausted

043 CMERR_TIMER

CM_ENG Error creating/removing timer

044 CMERR_TIMER_API

CM_API

Firmware not found

Protocol file error

Error creating/removing timer


(Win32)

81

OMICRON CMEngine

No

Error code mnemonic

Group

Description

045 CMERR_PMODE_DIFF

CM_ENG Phase mode diff not possible

046 CMERR_HW_OUT_OF_TOL

CM_ENG CMC hardware out of tolerance

047 CMERR_AMP_INCOMP

CM_ENG Amplifiers incompatible

048 CMERR_EXT_AMP_COMM

CM_ENG External amplifier communication


error

049 CMERR_INVALID_HANDLE

CM_ENG Invalid engine handle

050 CMERR_CANNOT_GET_ERR

CM_ENG Cannot get error code

051 CMERR_PROT_FILE_API

CM_API

052 CMERR_SWITCH_RANGE

CM_ENG Error when switching amplifier


range

053 CMERR_COUNTER_ON

CM_ENG Not allowed when counting is on

054 CMERR_COUNTER_NOT_ACTIVE

CM_ENG Selected counter(s) not active

055 CMERR_COUNTER_MASTER_SLAVE

CM_ENG Slave counter cannot be master

056 CMERR_GPS_NOT_FOUND

CM_ENG GPS Device hasn't been found

057 CMERR_INVALID_DATE

CM_ENG Invalid date

058 CMERR_GPS_BAD_RESPONSE

CM_ENG Invalid response from GPS

059 CMERR_GPS_COMM_ERR

CM_ENG Communication error CMC to GPS

060 CMERR_GPS_HW_ERR

CM_ENG GPS Hardware error

061 CMERR_GPS_BUSY

CM_ENG GPS is busy and cannot process


command

062 CMERR_ALREADY_LOGGED

CM_ENG Shouldn't get this message

063 CMERR_INIT_MEAS

CM_ENG Error initializing the Measuring


DSP

064 CMERR_NONEXIST_MEASJOB

CM_ENG Specified job does not exist

065 CMERR_TASK_VECTOR_FULL

CM_ENG Task vector is full, no more


measuring tasks can be issued

82

Protocol file error

Interface Functions

No

Error code mnemonic

Group

Description

066 CMERR_DCTASK_OFF

CM_ENG Cannot get results, DC task is


switched off

067 CMERR_BIN_INPUT

CM_ENG Potential Free channel was used in


AC function

068 CMERR_INVALID_NO_INPUTS

CM_ENG An invalid number of channels was


specified

069 CMERR_INVALID_VI_PAIR

CM_ENG The channel list wasn't made up of


VI pairs

070 CMERR_256_CMD

CM_ENG Command can only be executed


on a CMC 256 or higher

071 CMERR_RES_NOT_AVAIL

CM_ENG The requested resource is not


available

072 CMERR_RES_ALREADY_LOCKED

CM_ENG The requested resource is already


locked

073 CMERR_RES_NOT_LOCKED

CM_ENG A necessary resource is not locked

074 CMERR_POWER_SUPPLY

CM_ENG Could not activate power supply

075 CMERR_TRANS_START

CM_ENG The transfer has already been


started

076 CMERR_TRANS_NOT_START

CM_ENG The transfer hasn't been started


yet

077 CMERR_NO_CHANNELS_SEL

CM_ENG At least one channel must be


acquired

078 CMERR_GEN_MEAS

CM_ENG An error occurred in the


measurement DSP

079 CMERR_NOT_MM_MODE

CM_ENG This command is only allowed in


multi-meter mode

080 CMERR_NOT_SCOPE_MODE

CM_ENG This command is only allowed in


scope mode

081 CMERR_ANA_OUT_NOT_AVAIL

CM_ENG Analog output not available

83

OMICRON CMEngine

No

Error code mnemonic

Group

Description

082 CMERR_ANA_OUT_ALREADY_LOCKED

CM_ENG The requested Analog output is


being used by another application

083 CMERR_ANA_OUT_NOT_LOCKED

CM_ENG A necessary Analog output is not


locked

084 CMERR_AUX_DC_NOT_AVAIL

CM_ENG The connected device has no Aux


DC

085 CMERR_AUX_DC_ALREADY_LOCKED

CM_ENG The Aux DC is being used by


another application

086 CMERR_AUX_DC_NOT_LOCKED

CM_ENG The Aux DC is not locked

087 CMERR_MPINPUT_NOT_AVAIL

CM_ENG Multipurpose input not available

088 CMERR_MPINPUT_ALREADY_LOCKED

CM_ENG The requested multipurpose input


is being used by another
application

089 CMERR_MPINPUT_NOT_LOCKED

CM_ENG A necessary multipurpose input is


not locked

090 CMERR_BIN_INP_NOT_AVAIL

CM_ENG Binary input not available

091 CMERR_BIN_INP_ALREADY_LOCKED

CM_ENG The requested binary input is


being used by another application

092 CMERR_BIN_INP_NOT_LOCKED

CM_ENG A necessary binary input is not


locked

093 CMERR_BIN_OUT_NOT_AVAIL

CM_ENG Binary output not available

094 CMERR_BIN_OUT_ALREADY_LOCKED

CM_ENG The requested binary output is


being used by another application

095 CMERR_BIN_OUT_NOT_LOCKED

CM_ENG A necessary binary output is not


locked

096 CMERR_TRANS_OUT_NOT_AVAIL

CM_ENG Transistor output not available

097 CMERR_TRANS_OUT_ALREADY_LOCKED CM_ENG The requested transistor output is


being used by another application
098 CMERR_TRANS_OUT_NOT_LOCKED

84

CM_ENG A necessary transistor output is


not locked

Interface Functions

No

Error code mnemonic

Group

Description

099 CMERR_DC_INP_NOT_AVAIL

CM_ENG The DC Inputs are not available

100 CMERR_DC_INP_ALREADY_LOCKED

CM_ENG The DC Inputs are being used by


another application

101 CMERR_DC_INP_NOT_LOCKED

CM_ENG The DC Inputs are not locked

102 CMERR_COUNTER_NOT_AVAIL

CM_ENG Counter not available

103 CMERR_COUNTER_ALREADY_LOCKED

CM_ENG The requested counter is being


used by another application

104 CMERR_COUNTER_NOT_LOCKED

CM_ENG A necessary counter is not locked

105 CMERR_GPS_NOT_AVAIL

CM_ENG The GPS is not available

106 CMERR_GPS_ALREADY_LOCKED

CM_ENG The GPS is being used by another


application

107 CMERR_GPS_NOT_LOCKED

CM_ENG The GPS is not locked

108 CMERR_SEQ_NOT_AVAIL

CM_ENG The sequencer is not available

109 CMERR_SEQ_ALREADY_LOCKED

CM_ENG The sequencer is being used by


another application

110 CMERR_SEQ_NOT_LOCKED

CM_ENG The sequencer is not locked

111 CMERR_SAMPLE_BUFF_NOT_AVAIL

CM_ENG The sample buffer is not available

112 CMERR_SAMPLE_BUFF_ALREADY_LOCK
ED

CM_ENG The sample buffer is being used by


another application

113 CMERR_SAMPLE_BUFF_NOT_LOCKED

CM_ENG The sample buffer is not locked

114 CMERR_MEAS_DSP_NOT_AVAIL

CM_ENG The Measuring DSP is not


available

115 CMERR_MEAS_DSP_ALREADY_LOCKED

CM_ENG The Measuring DSP is being used


by another application

116 CMERR_MEAS_DSP_NOT_LOCKED

CM_ENG The Measuring DSP is not locked

117 CMERR_ALL_PORTS_LOCKED

CM_ENG All parallel ports are locked by


other applications

118 CMERR_FLASH_PROG

CM_ENG Error in flash programming

85

OMICRON CMEngine

No

Error code mnemonic

Group

Description

119 CMERR_NO_BIN_OUT_TASKS

CM_ENG No more binary output tasks


available

120 CMERR_EXT_AMP_SHUTDOWN

CM_ENG External amplifier has been shut


down

121 CMERR_OBSOLETE

CM_ENG This command is obsolete

122 CMERR_SYNC_LOST

CM_ENG Synchronzation between master


and slave lost

123 CMERR_CANNOT_ADD_NEW_SLAVE

CM_ENG Cannot add new slave because of


multiple clients accessing the
master

124 CMERR_CANNOT_REMOVE_LOST_SLAV
E

CM_ENG Cannot remove lost slave because


of multiple clients accessing it

125 CMERR_LICENSE_EXPIRED

CM_ENG The found timed license number


has expired

126 CMERR_HARM_NOT_RUNNING

CM_ENG No harmonic analysis running

127 CMERR_HARM_NOT_RUNNING_CH

CM_ENG No harmonic analysis is running on


this channel

128 CMERR_INVALID_LOCK_INFO

CM_ENG Invalid lock information

129 CMERR_CANNOT_INIT_MIC_FLASH

CM_ENG Error initializing MIC flash memory


driver

130 CMERR_CANNOT_READ_MIC_FLASH

CM_ENG Error reading from MIC flash


memory

131 CMERR_CANNOT_WRITE_MIC_FLASH

CM_ENG Error writing to MIC flash memory

132 CMERR_MIC_FLASH_WRITE_FAILURE

CM_ENG A value cannot be successfully


stored in MIC flash memory (the
flash location was probably written
to before)

133 CMERR_MIC_FLASH_PROTECTED

CM_ENG Error writing to MIC flash memory


because the flash sector that is to
be changed is write protected

134 CMERR_REGISTRY_ERROR

CM_API

86

Registry access error

Interface Functions

No

Error code mnemonic

Group

Description

135 CMERR_CANNOT_REGISTER_DEVICE

CM_ENG Cannot add test set because it is


not reachable or there is already
an automatically discovered one
with the same IP address

136 CMERR_CANNOT_GET_IP_CONFIG

CM_API

Cannot retrieve IP configuration

137 CMERR_CANNOT_SET_IP_CONFIG

CM_API

Cannot set IP configuration

138 CMERR_CANNOT_GET_OPERATING_INF
O

CM_API

Cannot get operating information

139 CMERR_REMOTE_CMD_EXEC_ERROR

CM_API

Error executing remote command

140 CMERR_CANNOT_GET_CPU_ID

CM_API

Cannot get CPU ID

141 CMERR_SET_DATETIME_FAILED

CM_API

Setting date and time failed

142 CMERR_INVALID_CMC_TYPE

CM_ENG CMC type is invalid (value and its


complement on two are not
matching)

143 CMERR_INVALID_GZIP_HEADER

CM_ENG Invalid GZIP header in flash sector

144 CMERR_NOT_ASSOCIATED

CM_ENG Cannot lock device, because it is


not associated

145 CMERR_IFC_NOT_INITIALIZED

CM_ENG CMEngine interface not properly


initialized (call RegisterClient on
the _ITrackClientProcess interface
or provide a process ID when
calling CMGetEngineHandle on
IDualCMEngine)

146 CMERR_GET_LPTNAME_ERROR

CM_API

Retrieving parallel port name failed

147 CMERR_OMFIND_ERROR

CM_API

Error calling OMFind

148 CMERR_HARM_CORR_ON

CM_ENG Not allowed when harmonic


correction is on

149 CMERR_HARM_CORR_NOT_SUPPORTED CM_ENG Harmonic correction not supported


for this amplifier
150 CMERR_TIMESOURCE_NOT_AVAIL

CM_ENG Time source resource is not


available

87

OMICRON CMEngine

No

Error code mnemonic

Group

Description

151 CMERR_TIMESOURCE_ALREADY_LOCKE
D

CM_ENG Time source resource is being


used by another application

152 CMERR_TIMESOURCE_NOT_LOCKED

CM_ENG Time source resource is not locked

153 CMERR_OVERTEMP_RECONN

CM_ENG Cooling down - please try it again


in a few minutes

154 CMERR_SV_CFG_NOT_ALLOWED

CM_ENG Sampled Values configuration not


allowed while analog outputs are
switched on

155 CMERR_GOOSE_CFG_SET_FAILED

CM_API

Could not set GOOSE


configuration

156 CMERR_GOOSE_CFG_GET_FAILED

CM_API

Could not retrieve GOOSE


configuration

157 CMERR_SV_CFG_SET_FAILED

CM_API

Could not set Sampled Values


configuration

158 CMERR_SV_CFG_GET_FAILED

CM_API

Could not retrieve Sampled Values


configuration

159 CMERR_CA_A_ACTIVATON_ERROR

CM_ENG Error activating current amplifier


system A

160 CMERR_CA_B_ACTIVATON_ERROR

CM_ENG Error activating current amplifier


system B

161 CMERR_ASSOC_MAX_CLIENT

CM_ENG Could not associate client because


maximum number of clients is
reached

162 CMERR_NOT_ALLOWED_NOMFREQ

CM_ENG Not allowed for current nominal


frequency

163 CMERR_PROP_DELAY_TOO_HIGH

CM_ENG Defined propagation delay is too


high

164 CMERR_OTHER_TP_RUNNING

CM_ENG Not permitted because another


time protocol is currently in use

88

Interface Functions

No

Error code mnemonic

Group

Description

165 CMERR_LONG_CMD_PENDING

CM_ENG The execution of another


command currently blocks the
CMEngine for (incoming) calls

166 CMERR_TIMESRV_NOT_AVAILABLE

CM_ENG The specified time server is not


available

167 CMERR_NO_LICENSE

CM_ENG Either the requested license


number could not be found in the
license file, or there is no license
file at all

168 CMERR_FILE_TRANSFER_RUNNING

CM_ENG A file transfer is already running

169 CMERR_FILE_TRANSFER_TIMEOUT

CM_ENG Timeout during file transfer

170 CMERR_FILE_OPEN_FAILED

CM_ENG Could not open local file

171 CMERR_OTIMED_ERROR

CM_ENG OMICRON time daemon


communication error

172 CMERR_CORRUPT_FILE

CM_ENG Corrupt file format

173 CMERR_NOT_YET_IMPLEMENTED

CM_ENG Command not yet implemented

Example:
LogNew() is called and returns FALSE. GetError() returns CMERR_FILE_LOG and an extended error
code of 5. Here the extended error code supplied with the log file error is equivalent to the DOS error
code. An extended error code of 5 indicates that the access to a file was denied.
The reasons for a license related error are explained in the following table:
Error code

Explanation

CMERR_LICENSE_FORMAT

The license information you have provided has


an invalid format.

CMERR_NO_LICENSE

The Engine started up correctly; a


CMDevScanForNew() was executed. However,
either the requested license number could not be
found in the license file, or there is no license file
at all.

89

OMICRON CMEngine

Error code

Explanation

CMERR_INVALID_LICENSE

The Engine started up correctly; a


CMDevScanForNew() was executed but you
have tried to lock a CMC with no valid license
number provided.

3.2

Which error codes can be caused by a specific function?

There are general errors that can be caused by all interface functions or string commands. They are
listed in the following table:
Error code

Explanation

CMERR_COMM

Communication error during command


execution.

CMERR_COMM_API

Communication error (detailed information is


provided with the extended API error code).

CMERR_OUT_OF_MEMORY

FATAL: RAM memory of personal computer is


exhausted!

CMERR_OUT_OF_RANGE

A parameter in the function/command is out of


range.

CMERR_STILL_WORKING

The interface function can't be executed because


CMEngine is busy executing another
command.This error can occur for 16-bit
Windows versions of CMEngine only.

CMERR_HW_OUT_OF_TOL

When the hardware check (which is performed


when a CMC is locked for the first time or with
the sys:test? command) fails due to a defect of
the internal voltage or current generators all
commands except the sys commands are
disabled and return this error.

The other error codes that may only be caused by specific interface functions are listed with the
description of the function in section Interface Functions on page 79.
The error codes that may be caused by the interface function Exec() depend on the string command
that is executed; thus these error codes are listed with the description of the string commands in
chapter String commands on page 119.

90

Interface Functions

3.3

Interface function reference

The interface functions are listed in alphabetical order. For the syntax descriptions of OLE-Automation
clients, the function and subroutine declarations from Visual Basic for Applications (VBA) are used.
For other OLE-Automation clients, these declarations must be converted accordingly.
For clients using the OLE-Automation interface, only OLE-Automation compatible types are used and
no special declarations are necessary.
Association
Associated on page 93
AssociationMode on page 93
DevAssociateAppend on page 93
DevAssociateAppendSpecific on page 94
DevAssociationCount on page 94
DevAssociationInfo on page 94
DevAssociationTime on page 95
DevAssosciationRequest on page 95
DevAssosiationRequestCancel on page 95
DevDisassociate on page 95
DevDisassociateSpecific on page 96
MaxAssociationTime on page 106
Device
DevGetList on page 96
DeviceAddress on page 97
DeviceType on page 97
DevLock on page 97
DevScanForNew on page 98
DevUnlock on page 99
Exec on page 100
FriendlyName on page 101
GetDevIDbyIPAddress on page 101
GetOfflineCfg on page 101
GetOfflineCfg2 on page 102
ImgDevTypePrefix on page 102
IPAddress on page 103
MinReqImgVersion on page 106
OutUserApp on page 106
ParallelPort on page 107
RemoveDevice on page 108
ResGetList on page 108

91

OMICRON CMEngine

ResLock on page 108


ResUnlock on page 109
SerialNumber on page 109
SetLicInfo on page 110
Manualy register testset
AddRegDev on page 93
RegDevCount on page 107
RegDevItemInfo on page 107
RegDevItemIPAddress on page 107
RemoveRegDev on page 108
Logging
LogAppend on page 103
LogGetInfo on page 104
LogNew on page 104
LogSetLevel on page 105
LogWrite on page 105
Engine
GetStatusText on page 102
LanguageForMessages on page 103
Version on page 110
Functions for Real-time Playback of Transient Signals
Functions for Real-time Playback of Transient Signals on page 111
RealtimeBegin on page 115
RealtimeEnd on page 116
RealtimeSetCheckChl on page 118
RealtimeStatus on page 118
RealtimeWrite on page 116

92

Interface Functions

3.3.1

AddRegDev

Syntax VBA

Sub AddRegDev(IPAddress as String)

Description

Add device to registry

Parameters

IPAddresss
The IP Address of the CMC

3.3.2

Associated

Syntax VBA

Property Associated(DevId as Long) as Boolean

Description

Returns if a device is associated (only valid for ethernet devices)

Parameters

DevId
The device ID of the CMC

3.3.3

AssociationMode

Syntax VBA

Property AssociationMode(DevId as Long) as AssociationModeType

Description

Association Mode

Parameters

DevId
The device ID of the CMC for which the AssociationMode should be returned or
set

3.3.4

DevAssociateAppend

Syntax VBA

Sub DevAssociateAppend(DevId as Long)

Description

Append association for client

Parameters

DevId
The device ID of the CMC to which an associated should be appended

93

OMICRON CMEngine

3.3.5

DevAssociateAppendSpecific

Syntax VBA

SubDevAssociateAppendSpecific(DevId as Long, MACAddress as String)

Description

Append association for a specific client

Parameters

DevId
The device ID of the CMC to which a client should be associated
MACAddress
MAC Address of the client

3.3.6

DevAssociationCount

Syntax VBA

Property DevAssociationCount(DevId as Long) as Long

Description

Get device association count

Parameters

DevId
The device ID of the CMC

3.3.7

DevAssociationInfo

Syntax VBA

Property DevAssociationInfo(DevId as Long, Index as Long) as String

Description

Get device association information

Parameters

DevId
The device ID of the CMC
Index
The association index

94

Interface Functions

3.3.8

DevAssociationTime

Syntax VBA

Property DevAssociationTime(DevId as Long, Index as Long) as Date

Description

Get device association time (only valid for ethernet devices)

Parameters

DevId
The device ID of the CMC
Index
The association index

3.3.9

DevAssociationRequest

Syntax VBA

Sub DevAssociationRequest(DevId as Long)

Description

Request association using the button

Parameters

DevId
The device ID of the CMC

3.3.10 DevAssosiationRequestCancel
Syntax VBA

Sub DevAssociationRequestCancel(DevId as Long)

Description

Cancel association request

Parameters

DevId
The device ID of the CMC

3.3.11 DevDisassociate
Syntax VBA

Sub DevDisassociate(DevId as Long)

Description

DisassociateClient

Parameters

DevId
The device ID of the CMC

95

OMICRON CMEngine

3.3.12 DevDisassociateSpecific
Syntax VBA

Sub DevDisassociateSpecific(DevId as Long, MACAddress as String)

Description

Disassociate a specific client

Parameters

DevId
The device ID of the CMC
MACAddress
The MAC address of the client which should be dissociated

3.3.13 DevGetList
Syntax VBA

Sub DevGetList(ListSelect As ListSelectType) As String

Description

Returns a list of CMC devices with the following information for every device:
device ID number, serial number, number of the printer port used (LPT1, LPT2
etc.) and the device address on this printer port.

Parameters

listSelect (VBA: ListSelect):


lsAllAssociated all associated devices
lsUnlockedAssociated only unlocked (but associated) devices
lsLockedAssociatedonly locked (but associated) devices
lsAllUnassociated all unassociated devices
lsUnlockedUnassociated only unlocked (and unassociated) devices
lsLockedUnassociated only locked (and unassociated) devices
lsAllAssociatedAny all devices (with any association state)
lsUnlockedAssociatedAny only unlocked devices (with any association state)
lsLockedAssociatedAny only locked devices (with any association state)

Return Value

A string is returned as an answer: "2,DE349J,1,3;1,JA254S,0,0;"


This means that the CMEngine found 2 CMCs. The return has the following
order: DevId, Serial Number, LPT Port, Device address, DevId 2, Serial Number
2
The first device has the Device Id 2. The serial number is DE349J and it is
connected to the LPT Port 1 with the device address 3. The second device has
the device id 1. The serial number is JA245S and it is a net-1 device (LPT Port 0
and device address 0).

Be careful if you want to use a NET-1 device. Make sure to associate it; else you will not be
able to lock it

96

Interface Functions

3.3.14 DeviceAddress
Syntax VBA

Property DeviceAddress(DevId as Long) as Integer

3.3.15 DeviceType
Syntax VBA

Property DeviceType(DevId as Long) as String

Description

Returns the device type of a specific CMC (e.g CMC 256)

Parameters

DevId
The device ID of the CMC

3.3.16 DevLock
Syntax VBA

Sub DevLock(DevID as Long)

Description

Use this function to reserve ("lock") one or more of the connected CMCs for your
application program.
When a CMC is locked by a program, only this program can communicate with
this CMC.
You can get a list of the CMCs that are known to the CMEngine and that are not
locked now with the function DevGetList(IsUnlocked) (see description of that
command).

Parameters

DevId
The parameter DevId is long value that contains a device ID number (e.g. 1). To
lock all unlocked CMCs use 0 for DevId.

You must lock a device before you can send string commands to it using Exec() !
When you do not need the communication channel to the CMC anymore, you should release
it with the function DevUnlock() described below.
Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_CMC_ALREADY_LOCKED

The CMC is already locked

97

OMICRON CMEngine

Error code

Explanation

CMERR_CMC_NOT_FOUND

The CMC was not found

CMERR_FILE_LOG

Log file related problem (detailed information is


provided with the extended API error code)

CMERR_INVALID_INT

An integer value in device ID list is invalid

CMERR_LOCK_UNLOCK_PORT

Port could not be locked

CMERR_NO_LICENSE

Either the requested license number could not


be found in the license file, or there is no license
file at all.

3.3.17 DevScanForNew
Syntax VBA

Sub DevScanForNew(ErrorWhenNoDeviceFound as Boolean = False)

Description

Description Scans all available parallel ports of the PC for connected CMCs. If a
new (not yet known) CMC is found, it is entered into the device list and a device
ID number (1,2,3,..) is assigned to it. Then the command initializes the unknown
CMC.
Devices in the list that are no longer connected are removed from the list.

Return Value

Boolean value that indicates if the command was executed without errors
(TRUE) or with errors (FALSE).

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_CALDATA_CHECKSUM

Calibration data checksum mismatch

CMERR_DOWNLOAD

Error downloading data to CMC

CMERR_DOWNLOAD_FILE

Problem downloading data from file to CMC


(detailed information is provided with the
extended API error code)

CMERR_DOWNLOAD_NO_FW

Problem downloading the firmware (detailed


information is provided with the extended API
error code)

98

Interface Functions

Error code

Explanation

CMERR_FILE_LOG

Log file related problem (detailed information is


provided with the extended API error code)

CMERR_INCOMPATIBLE_DRIVER

Version numbers of Engine and driver for parallel


interface are not compatible

CMERR_INIT

Problem with Engine initialization related to


Windows Registry (the extended API error code
returned with this error says which)

CMERR_LICENSE_FORMAT

The license information you have provided has


an invalid format

CMERR_LOCK_UNLOCK_PORT

A port could not be locked/unlocked

CMERR_NO_CMC_CONNECTED

There is no CMC connected at all

3.3.18 DevUnlock
Syntax VBA

Sub DevUnlock(DevId As Long)

Description

This function is used to release one or more previously locked CMCs.

Parameters

DevId
The parameter DevId is long value that contains the device ID number (e.g.
1,2,4).

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_CMC_NOT_FOUND

The CMC was not found

CMERR_FILE_LOG

Log file related problem (detailed information is


provided with the extended API error code)

CMERR_INVALID_INT

An integer value in device ID list is invalid

CMERR_LOCK_UNLOCK_PORT

Port could not be unlocked

99

OMICRON CMEngine

3.3.19 Exec
Syntax VBA

Function Exec(DevID As Long, Command As String) As String

Description

The application program uses the function Exec() to send command strings to
one or more connected CMCs.

Parameters

DevID
Selects the CMC device that receives the command string with this parameter.
Command
The zero terminated command string is passed in this parameter. The structure
of a command string is explained in chapter String Commands on page 119.

Return Value

String value that contains the result from the CMC.

Before you can send string commands to a CMC, you must reserve this device for your
application program with the function DevLock() on page 97!
Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_CMC_NOT_FOUND

The CMC was not found

CMERR_CMC_NOT_LOCKED

The CMC is not locked to the application

CMERR_FILE_LOG

Log file related problem (detailed information is


provided with the extended API error code)

CMERR_INVALID_INT

The integer value in DevId is invalid

CMERR_NO_LOCKED_CMC

When "0" is used as DevId: there is no locked


CMC that can receive commands

CMERR_SYNTAX

Syntax error in string Command

CMERR_PARSER_STACK_OVFL or
CMERR_PUSHBACK_BUF_OVFL or
CMERR_TOKEN_BUF_OVFL

An expression is too complex or too long for the


parser

Example:Exec(1,"out:off") - switch OFF all analog outputs of the CMC with DevId 1.

100

Interface Functions

Data returned by Exec():


On every string command with a question mark, e.g., "sys:status?", the function Exec() returns an
answer that is a zero terminated string. The answer of a CMC starts with its device number and ends
with a semicolon.
Example 1
Task:

Get the number of analog and binary inputs of device 1.

Command:

Exec(1,"inp:cfg?")

Answer:

"1, 1, 1, 10, 7;"


Device number 1 returns the values 1, 1, 10 and 7. It
has one analog voltage input, one analog current input
and 10 binary inputs, and the I/O boards version is 7.

3.3.20 FriendlyName
Syntax VBA

Property FriendlyName(DevId as Long) as String

Description

Friendly name of device

Parameters

DevId
The device ID of the CMC

3.3.21 GetDevIDbyIPAddress
Syntax VBA

Function GetDevIDbyIPAddress(IPAddress as String) as Long

Description

Get device ID for IP address of device (only valid for Ethernet devices)

Parameters

IPAddress
The IP Address of the CMC

3.3.22 GetOfflineCfg
Syntax VBA

FunctionGetOfflineCfg(CmcType as String, AmpList as String) as String

Description

Get output configurations for specified CMC/amplifier(s) combination

101

OMICRON CMEngine

3.3.23 GetOfflineCfg2
Syntax VBA

Function GetOfflineCfg2(CmcType as String, AmpList as String, Return as


String) as String

Description

Get output configurations for specified CMC/amplifier(s) combination plus trigger


on overload information

3.3.24 GetStatusText
Syntax VBA

Function GetStatusText(Register As Integer, Mask As Long) As String

Description

When you get the content of the primary status register using the sys:status?
string command and at least one of the register bits is set, then normally you
fetch the content of the related secondary status register(s) (with a 2nd call to
sys:status?) to get the reason(s) for the error.
Then you pass the number of the secondary status register and its content you
received from the sys:status? string command to this function. The function
returns a string that contains a status message in the language CMEngine is
compiled for.

Parameters

Register
Number of the secondary status register you received from a preceding
sys:status? string command.
Mask
Bit mask you received with the above register number from a preceding
sys:status? string command.

Return Value

String value for the status message.

3.3.25 ImgDevTypePrefix
Syntax VBA

Property ImgDevTypePrefix(CmcType as String) as String

Description

Get software image device type for specified device type

102

Interface Functions

3.3.26 IPAddress
Syntax VBA

Property IPAdress(DevId as Long) as String

Description

IP address of device (only valid for Ethernet devices)

Parameters

DevId
The device id of the CMC you are interested

3.3.27 LanguageForMessages
Syntax VBA

Property LanguageForMessages as Short

Description

Language for error and status messages (Win32 LANGID)

3.3.28 LogAppend
Syntax VBA

Sub LogAppend(Filename As String)

Description

This function enables logging data to a log file with the name Filename. All
logging data will be appended to this file. If this file does not exist it is then
created. The log level is set to 1 (see LogSetLevel() on page 105).

Parameters

Filename
File name of the log file. The file name is a zero terminated string.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_FILE_LOG

Log file related problem (detailed information is


provided with the extended API error code)

103

OMICRON CMEngine

3.3.29 LogGetInfo
Syntax VBA

Sub LogGetInfo(ByRef Level As Integer, ByRef Filename As String)

Description

Use this function to get for the current logging level and filename. If there is no
log file defined, an empty string is returned as a filename.

Parameters

Level
This buffer returns the current logging level (see CMLogSetLevel()).
Filename
Buffer for the file name of the log file. The file name is returned as a zero
terminated string.

3.3.30 LogNew
Syntax VBA

Sub LogNew(Filename As String)

Description

A new log file with the name FileName is created and opened with log level 1. If
a file with this name already exists it is deleted before creating the log file.

Parameters

Filename
File name of the log file. The file name is a zero terminated string.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_FILE_LOG

Log file related problem (detailed information is


provided with the extended API error code)

104

Interface Functions

3.3.31 LogS etLevel


Syntax VBA

Sub LogSetLevel(Level As Integer)

Description

Changes the current log level to byLevel. A level of zero means that the logging
is OFF, thus you can also turn the logging ON or OFF with this function.
The logging level defines which and how much information is to be written into
the log file:
In log level 1 the device list, the command string and the answer string of every
string command will be written into the log file.
In logging level 2, much of the Engine-internal information is additionally written
into the log file. This information is not useful for the application programmer but
is required for diagnostic purposes.
The logging level 2 should not normally be used by an application for the
CMEngine since it writes a large amount of data to the hard disk and thus could
slow down the working speed of the application.

Parameters

Level
The new log level to set.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_INVALID_INT

Parameter byLevel is invalid

3.3.32 LogWrite
Syntax VBA

Function LogWrite(Text As String)

Description

The string Text is appended to the current log file. A new line is appended to the
text.

Parameters

Text
Zero terminated string to be appended at current log file.

Possible Errors
This command may cause the following CMEngine error codes:

105

OMICRON CMEngine

Error code

Explanation

CMERR_FILE_LOG

Log file related problem (detailed information is


provided with the extended API error code)

3.3.33 MaxAssociationTime
Syntax VBA

Property MaxAssociationTime(DevId as Long,) as Long

Description

Max. association time

Parameters

DevId
The device id of the CMC from which the MaxAssociationTime should be
returned

3.3.34 MinReqImgVersion
Syntax VBA

PropertyMinReqImgVersion(CmcType as String) as Long

Description

Get minimum required version of the software image for the specified device type

Parameters

3.3.35 OutUserApp
Syntax VBA

Sub OutUserApp(DevID As Long, UserSigNo As Long, Samples As String)

Description

Appends samples to the specified user signal. This interface function can be
used as an alternative to the out:[ana:]user:app string command, saving the
user the need to convert the samples to text. The supplied samples are
appended to the user id provided in the function call.

Parameters

DevId
The deviceID of the target CMC.
UserSigNo
The User Signal Number to which we wish to append the sample; it must have
been allocated with out:[ana:]user:alloc() prior to use.
Samples (VBA)
Buffer containing the samples. Each byte in the buffer contains an individual
sample, according to the scaling conventions described in the String
Commands > Output Commands topic out:[ana:]user:app (<user_sig_no>,
<user_data>) on page 202.

106

Interface Functions

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_INVALID_INT

Parameters DevId and/or UserSigNo are invalid.

CMERR_IN_SEQ_MODE

The CMC is executing a sequence.

CMERR_USER_SIG_IN_USE

The signal UserSigNo is assigned to a generator


and cannot be changed.

3.3.36 ParallelPort
Syntax VBA

Property ParallelPort(DevId as Long) as Short

Description

Parallel port number (only valid parallel port devices)

Parameters

DevId
The device id of the CMC you are interested

3.3.37 RegDevCount
Syntax VBA

Property RegDevcount as Long

Description

Get manually registered device count

3.3.38 RegDevItemInfo
Syntax VBA

Sub RegDevItemInfo(Index as Long, By Ref DeviceType as String, By Ref


SerialNumber as String, By Ref FriendlyName as String)

Description

Get manually registerd device info

Parameters

3.3.39 RegDevItemIPAddress
Syntax VBA

Property RegDevItemIPAddress(Index as Long) as String

Description

Get manually registered device IP address

107

OMICRON CMEngine

3.3.40 RemoveDevice
Syntax VBA

Sub RemoveDevice(DevId as Long)

Description

Remove Device

3.3.41 RemoveRegDev
Syntax VBA

Sub RemoveRegDev(IPAddress as String)

Description

Remove device from registry

3.3.42 ResGetList
Syntax VBA

Function ResGetList(ListSelect as ListSelectType, DevId as Long, ResGroup as


ResGroupType) as String

Description

Get a list of resources of a CMC

Parameters

ListSelect
DevId
The device ID of the CMC

3.3.43 ResLock
Syntax VBA

Sub ResLock(DevId as Long, ResGroup as ResGroupType, ResIndex as Long)

Description

Lock specified resource of a CMC for an application

Parameters

DevId
The device ID of the CMC
ResGroup
ResGroup can have the following values:
rgAnaOut analog outputs
rgAuxDC
rgBinInp
rgBinOut
rgCounter
rgDCInp
rgFirst

108

Interface Functions

rgGPS
rgInternalCmds
rgInvalid
rgJustKeepConn
rgLast
rgMeasDSP
rgMultiInp
rgSampleBuf
rgSeq
rgTransOut
ResIndex

3.3.44 ResUnlock
Syntax VBA

Sub ResUnlock(DevId as Long, ResGroup as ResGroupType, ResIndex as


Long)

Description

Unlock specified resource of a CMC for an application

Parameters

DevId
The device ID of the CMC
ResGroup
See function ResLock on page 108

3.3.45 SerialNumber
Syntax VBA

Property SerialNumber(DevId as Long) as String

Description

Serial number

Parameters

DevId
The device id of the CMC from which the SerialNumber should be returned

109

OMICRON CMEngine

3.3.46 SetLicInfo
Syntax VBA

Sub SetLicInfo(DevId as Long, LockInfo)

Description

Set license information

Parameters

DevId
The device id of the CMC from which you want to set the license information

3.3.47 Version
Syntax VBA

Function Version(ByRef Version As String) As Long

Description

Asks for the version of CMEngine.


The version number is returned as a string in the buffer Version and also as a
return value of the function. If you pass a NULL pointer for Version, the string
information is omitted.

Parameters

Version
Buffer for the version information string. The zero terminated string returned in
this buffer has the format V.RE.NNN[.B]. It always contains the following
information:
V - version number
R - revision number of the version
E - current error correction revision number
NNN - build number
and optionally contains the following information:
B - beta flag (character)

Return Value

110

The return value of the function is a double word (four bytes):


Bits 31..24 - version number
Bits 23..20 - revision number of the version
Bits 19..16 - current error correction revision number
Bits 15..04 - build number
Bits 03..00 - beta flag (0 for beta, 1 for release version)

Interface Functions

3.3.48 Functions for Real-time Playback of Transient Signals


The CMC has limited memory for the playback of transient signals (CMC 156: 98816 samples,
CMC 256 or newer test set: 393216 samples). The out:user: commands are bound to these
limitations. If longer signals have to be played back they have to be downloaded to the CMC while the
playback is running. This functionality is available through the Realtime functions of the CMEngine
interface. All functions in this group are declared in CMEngFuncsEx.h.
The basic principle is illustrated by this pseude-code sequence:
Prepare the CMC for real-time playback (RealtimeBegin)
Fill the CMC memory with transient data (RealtimeWrite)
Start playback
loop
if one or more blocks free (RealtimeStatus)
download next block(s) (RealtimeWrite)
endif
until all blocks downloaded
Wait until playback is finished
Bring CMC back to normal operation (RealtimeEnd)
Arrangement of the playback data in CMC memory
The data has to be arranged in blocks of samples. A sample is a 2-byte (16 bit) signed integer value.
A sample value of 32767 corresponds to the peak amplitude of the generator. This picture shows the
arrangement of the samples for n generators within one data block:
Sample 0
Sample 0
Sample 0
Sample 1
Sample 1
Sample 1

generator 0 generator 1
generator n-1 generator 0 generator 1
generator n-1
The number of samples per generator in a block is the return value of RealtimeBegin, the number of
blocks that fit into the CMC memory is returned in the pnBlocks parameter of this function.
For a CMC 156 with 3 voltage and 3 current generators in use you will get 7 blocks with 2048 samples
per generator in one block:

111

OMICRON CMEngine

When the playback is started, the playback pointer moves from sample to sample with the specified
sampling rate. When it reaches the end of the CMC memory (in this example the last sample of block
6), it jumps back to the beginning of the CMC memory again. Until then the application must have
replaced the data of block 0 with the data of block 7 (the next one after block 6). Actually block 0 can
already be overwritten as soon as the playback pointer reaches the first sample of block 1:

The faster the playback pointer moves (= the higher the sampling rate is), the less time is available to
provide the data. The download of a data block of course needs some time (depends on the PC
hardware and CMC). It might be useful to arrange the data in the necessary block structure before the
download begins, so that no data processing during download is needed.
The status of the playback can be queried with RealtimeStatus. In plStatus it returns the number of
samples in the CMC memory which are not yet played back. The difference between the maximum
number of samples in the CMC memory and this value is the number of samples, which can be
overwritten. If this number is bigger than the block size, a new block can be downloaded:
**** pseudo code ****
BlockSize = RealtimeBegin(, pnBlocks);
MaxSamplesInCMCMemory = (*pnBlocks) * BlockSize;

RealtimeStatus(, SamplesToPlay);
FreeSamples = MaxSamplesInCMCMemory SamplesToPlay;
if (FreeSamples > BlockSize )
download new block(s)
endif
The CMC can check for data underflow (the PC does not download data blocks fast enough see
parameter bCheckGen in function RealtimeWrite). The result of this check is also returned by
RealtimeStatus.

112

Interface Functions

Arrangement of the playback data in PC memory


The data blocks can be arranged in various ways. You can have one block for one channel, or several
blocks for several channels in one PC memory block.

The mapping of the channels in a data block to the CMC generators is done with RealtimeWrite().
Each call to RealtimeWrite() maps one channel to one CMC generator and downloads the necessary
samples to the CMC.
The example in the following picture uses a data block containing 5 channels with 3 blocks per
channel. Channel 4 contains the data for generator I1, channel 1 those for generator I2, channels 0, 2
and 3 are currently not used for playback:

113

OMICRON CMEngine

Addressing of the generators


The Realtime functions address the generators via their (hardware-dependent) index:
Generator

CMC 56/156

V1

V2

V3

I1

I2

I3

CMC 850/CMC 356/


CMC 353/CMC 256plus/
CMC 256

V1

V2

V3

I1A

I2A

I3A

Generator

10

11

CMC 56/156

Gen.out 7 Gen.out 8 Gen.out 9 Gen.out 10 Gen.out 11 Gen.out 12

CMC 850/CMC 356/


CMC 353/CMC 256plus/
CMC 256

LL out 1

LL out 2

LL out 3

LL out 4

LL out 5

LL out 6

The generators V4 and IB are currently not supported.


Setting the amplitudes
As already mentioned a sample is a 2-byte (16 bit) signed integer value. A sample value of 32767
corresponds to the peak amplitude of the generator.
The actual amplitude of a sample is:

where Sample is the integer value of the sample and A is the amplitude set with the out:ana:v|i():a()
command.
Timing
The CMC does not know when to stop the playback. It continues until it receives a out:ana:off
command, even if no more samples are downloaded, in which case it would play back garbage or
already played back data, which is not yet overwritten with new data. So it is up to the application to
switch the outputs off as soon as no more data is available. The easiest way to do this is to use a
sequence. Here is an example how this could look like:

114

Interface Functions

Prepare the CMC for real-time playback (RealtimeBegin)


Fill the CMC memory with transient data (RealtimeWrite)
seq:begin
out:ana:v():a()
out:ana:i():a()
out:ana:on
seq:wait(<total playback duration in seconds>, 1)
out:ana:off
seq:end
seq:exec
loop
if one or more blocks free (RealtimeStatus)
download next block(s) (RealtimeWrite)
endif
until all blocks downloaded
Wait until playback is finished (i.e. seq:status?(step) returns 0)
Bring CMC back to normal operation (RealtimeEnd)
Please note that the maximum time for the seq:wait command is 838 seconds. If you have
longer signals you have to use several seq:wait commands or use a loop.
Some additional notes
For performance reasons the Realtime functions are implemented on a very low level. They override
settings made with the amp:def and amp:route commands. Furthermore they should not be used
together with out:ana commands other than those needed to set the amplitudes and switch the
outputs on and off.
These functions have an experimental status and might change in future releases of CMEngine.

3.3.48.1

RealtimeBegin

Syntax VBA

Function RealtimeBegin(DevID as Long, dSampleRate, UseVS as Long, Usels Is


Long, Blocks as Long) as Long

Description

Prepares a CMC for real-time playback of transient signals.

Parameters

DevId
Id of the CMC device to be prepared for real-time playback.
dSampleRate

115

OMICRON CMEngine

Sampling rate of the transient signal to be played back (in samples/second).


Must be > 0 and 10000.
nUseVs
Number of voltage triples to be used.
nUseIs
Number of current triples to be used.
pnBlocks
Pointer to a buffer which receives the number of blocks that fit into CMC
memory.

nUseVs and nUseIs do not affect the generator indices in any way.
They are only used for block size calculation.
Return Value

The return value is the size of one block (in samples) or zero if the function
failed.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_NOT_SUPPORTED

The connected CMC does not support this


function.

3.3.48.2

RealtimeEnd

Syntax VBA

Sub RealtimeEnd()

Description

Ends real-time playback and brings CMC back to normal operation.

3.3.48.3

RealtimeWrite

Syntax VBA

Sub RealtimeWrite(ChanNo as Long, BlockNo as Long, Block as String, Channel


As Word, NumChls as Word, By Ref CheckChl as Boolean)

Description

Write a block of transient data for one generator to the CMC for realtime
playback. The block may contain data for several channels, even ones which are
not played back.

116

Interface Functions

Parameters

nCMCGen
Generator index in the CMC (see description above)
nBlockNo
Block number in data block
pnBlock
Data block in 16 bit signed integer format
wChannel
Index of channel in data block to transfer
wNumChls
Number of channels in data block
bCheckGen
Set to TRUE if this CMC generator should be checked for underflow of data

Return Value

Boolean value that indicates if the command was executed without errors
(TRUE) or with erors (FALSE).

117

OMICRON CMEngine

3.3.48.4

RealtimeStatus

Syntax VBA

BOOL RealtimeStatus(Channel As Word,By Ref Status as Long);

Description

Read realtime playback status of selected generator

Parameters

wGenerator
Generator number to be checked (must be the last generator in use in the
current implementation).
plStatus
Pointer to buffer which receives the status.
Meaning of the bits in the returned status:
Bit 23: Error in data transfer occurred
Bit 22: Data underflow, data was transferred too slowly
Bits 0-21: Number of samples in CMC memory, which are not yet played back

3.3.48.5

RealtimeSetCheckChl

Syntax VBA

Function RealtimeSetCheck(Channel as Word) as Long

Description

Set channel which should be checked for underflow

Parameters

Channel

118

String Commands

String Commands

The following chapter explains everything that is important to assemble string commands for the
CMEngine: syntax rules of the string commands, parameter types used in string commands, symbols
used in string commands and the syntax and the usage of every string command. The string
commands are listed in groups of related commands.
Each command description also contains an entry called "Compatibility" which indicates which
platforms the command is available for.

4.1

Symbols used in string commands

The following symbols are used for notation purposes only (do not insert them into your string
commands):
Symbol

Meaning

<...>

parameters are enclosed like this, e.g., <filename>.

[]

the command, parameter or keyword in brackets is optional.

the "pipe sign" between keywords states that you can either use the keyword
to the left or the keyword to the right of this sign.

The following symbols can be used within CMEngine string commands:


Symbol

Meaning

separates sub-commands, e.g., sys:reset,


or
separates triple number and signal number in a <triple_list_type>, e.g., v(1:2)
or
in the command out:ana:app:
separates the sample value from the number of its repetitions.

shortcut symbol that combines multiple sub-commands of the same hierarchy


level.
This feature only exists for some special sub-commands described later.

..

symbol to define a range in <enumeration>.

separator between parameters of a command.

The special symbols used by the CMEngine in the string answers returned for string commands
containing a question mark are explained with the Exec() interface function.

119

OMICRON CMEngine

A note about this manual's index


When you look for a certain string command in this manual's Index section, consider a dot (".") rather
than a colon (":"). That means, when you need information about the string command amp:cfg?
(<amp_id>,firm), for example, look for amp.cfg?(<amp_id>,firm) as a keyword at Index.
This work-around has technical reasons: This manual was generated directly from the CMEngine Help
in a "single-sourcing" environment, and in a Windows Help's index the colon (":") is a reserved
character and cannot be displayed in the keywords list.

4.2

Syntax rules for string commands

The following section describes the syntax rules needed to assemble the string commands you send
to CMEngine via the Exec() interface function.

Any command consists of sub-commands that are separated by colons, e.g., out:ana:on.

The string commands are not case sensitive (command strings are accepted no matter if they are
capitalized or not).
E.g., SYS:RESET is accepted just as sys:reset or Sys:Reset.
In this manual, all string commands are written in lower case.

Some of the string commands have a trailing question mark, e.g., sys:cfg?. The question mark
must be appended to the command without spaces. The "?" states that the command returns an
answer in a zero terminated string.

After the keyword of a sub-command like wav or route there are possibly some additional
command parameters. A pair of parentheses encloses all these parameters.
Format: ... sub-command(parameter1, parameter2, parameter3, ... ) ...
Example:
sys:cfg?(ser)
Some sub-commands can be written with or without parameters. If the parameters are omitted, the
parentheses are omitted too.
Example:
sys:status?
sys:status?(1)

120

String Commands

The sub-commands a, f, p, and wav from the out command tree can be connected with a
semicolon instead of the colon you normally use to separate two sub-commands. The difference is
that after a colon, you must append a sub-command that is in a lower hierarchical position in the
command tree, whereas after a semicolon, you can proceed at the same level of the command
tree's hierarchy. This feature was introduced to reduce the number of string commands needed for
carrying out these frequent tasks.
Example 1:
You can assemble the three commands out:ana:v(1):sig(1):wav(sin), out:ana:v(1):sig(1):a(10)
and out:ana:v(1):sig(1):f(60) into the following command
out:ana:v(1):sig(1):wav(sin);a(10);f(60)
Example 2:
out:ana:v(1):sig(1):a(30);a(100) sets the amplitude to 30V, the a(100) is ignored.

There are sub-commands that can be omitted when building a string command. These
subcommands are used very often and are thus defined as default sub-commands to shorten the
string commands. Optional parts are shown in square brackets [] in the command tree.
In a string command for signal output (out: ...) you may omit the optional sub-commands ana or
sig(1).
If there is no ana or bin sub-command in the string command, ana is assumed. If there is no sig(1)
or sig(2) sub-command in the string command, sig(1) is assumed.
The command in the previous example 1 may be shortened further as follows:
Instead of out:ana:v(1):sig(1):wav(sin);a(10);f(60) you may write out:v(1):wav(sin);a(10);f(60)

Spaces are ignored between the sub-commands and their parameters, but do not insert spaces
within keywords of sub-commands, within keywords of parameters or within numerical parameters.

121

OMICRON CMEngine

4.3

Parameter types used in the string commands

Overview of the parameter types for the parameters used in CMEngine string commands:
<integer>

Integer number between -231 and 231-1 (the precise limits of an integer
parameter are described with each command). This type corresponds to a 32
bit signed integer.
Normally you write the number in decimal notation.
With a prefix "0" (zero) it is octal,
with a prefix "0x" (zero-x) it is hexadecimal and
with a prefix "0b" (zero-b) it is binary.
The hexadecimal numbers are not case-sensitive. All numbers can be signed
or unsigned.
Examples for <integer>:
"1456", "0b10010111", "0x1F4C", "0x1f4c", "-22", "-0x1f4c".

<enumeration>

Combination of <integer> in the following ways: <integer>


(specifies one item, e.g. a generator)
<integer>,<integer>, ...
(specifies a list of items, e.g. of generators)

<triple_list_type>

Combination of <integer> in the following ways:


<integer>,<integer>, ...
<integer>:<integer>
You can also assemble such combinations, e.g.:
<integer>:<integer>,<integer>
<integer>:<integer>,<integer>:<integer>
This parameter type defines the generators in an out:ana: ... command:
1 - first generator triple.
1,2 - first and second generator triple.
1:3 - third generator of first generator triple.
1:3,2:1 - third generator of first generator triple and first generator of second
generator triple.

<float>

122

Whole or real number, with or without exponent, signed or unsigned; range is


1.7E308. This type corresponds to an IEEE floating point type with double
precision. Format of real number:
[+-] integer_digits "." fraction_digits [eE [+-] exponent_digits]
[+-] integer_digits "." [fraction_digits] [eE [+-] exponent_digits]
[+-] [integer_digits] "." fraction_digits [eE [+-] exponent_digits]

String Commands

4.4

System Commands

At the left-hand side table of contents find the system command of your choice and click the
corresponding entry.

123

OMICRON CMEngine

4.4.1

sys:reset

Function

Executes a reset on a CMC device.

Description

All parameters of the device are reset to their startup values. All memories for
measurement data etc. are cleared. All data structures for this CMC in the
CMEngine are set to startup values.
The following operations are executed:
amp:route (v (<triple_no>), clr) for all generator triples
amp:route (i (<triple_no>), clr) for all generator triples
amp:def (<amp_no>, clr) for all amplifiers
amp:def (1, int)amp:def (2, int)
amp:route (v (1), 1)
amp:route (i (1), 2)
out:ana:clr
inp:buf:clr
inp:bin:thres(0)
seq:clr

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_CALDATA_CHECKSUM

Calibration data checksum mismatch

CMERR_DOWNLOAD

Error downloading data to CMC

CMERR_DOWNLOAD_FILE

Problem downloading data from file to CMC


(detailed information is provided with the
extended API error code)

CMERR_DOWNLOAD_NO_FW

Problem downloading the firmware (detailed


information is provided with the extended API
error code)

CMERR_IN_SEQ_MODE

Command not allowed within sequence

124

String Commands

4.4.2

sys:test? [(<filename>)]

Function

Starts a self test of a CMC.

Description

Starts a self test and finally returns a message stating whether the execution was
OK or not OK.
If you specify the sys:test? command with an additional filename, a report file
with various system parameters (all serial numbers, the tolerances of all
generators etc.) is created.

Parameters

<filename>
Name of the report file. This parameter is optional.

Answer

Returns a string which is the shortcut for a diagnostic message (see the following
table).

After a sys:test? a CMC is in the power-on state (same as after sys:reset).

Returned string Diagnostic message


ok

no errors were detected

v1

voltage at internal voltage generator 1 is outside of tolerance limits

v2

voltage at internal voltage generator 2 is outside of tolerance limits

v3

voltage at internal voltage generator 3 is outside of tolerance limits

vtemp

temperature of internal voltage generators is above the limit

i1

current at internal current generator 1 is outside of tolerance limits

i2

current at internal current generator 2 is outside of tolerance limits

i3

current at internal current generator 3 is outside of tolerance limits

itemp

temperature of internal current generators is above the limit

ad

errors occurred on AD/DA converters or AD/DA board is not present

bin

errors occurred on at least one of the binary inputs or an input has voltage above
250 Volts

125

OMICRON CMEngine

The answer string can consist of one or more of the above strings. If any combination of v1,
v2, v3, i1, i2, i3 is returned all commands except the sys commands are disabled and return
CMERR_HW_OUT_OF_TOL.
Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence

CMERR_PROT_FILE

There is a problem with the given report file


(detailed information is provided with the
extended API error code)

Example
The string command sys:test? is sent to CMC #1 and the following string is returned:
"1,v2,ad;"
This means that in CMC #1 the voltage at internal voltage generator 2 is outside of tolerance limits
and errors occurred on the AD/DA converters.

126

String Commands

4.4.3

sys:cfg? (type|ser|hard|firm|cal)

Function

Gets system information of a CMC.

Parameters

You must specify one of the keywords type, ser, hard, firm or cal.

Answer

The command causes a string that contains the following data as shown in the
following table.

Keyword Returned data


type

CMC model information string ("CMC 56" or "CMC151") and model number.

ser

Serial number of device.Answer is e.g. "1, DA345D; ": Device 1 has the serial number
DA345D.

hard

Version number and clock frequency of signal processor board.Answer is e.g. "1, 5,
3.300000000E+007;": Device 1 has a signal processor board version 5 with a clock
frequency of 33 MHz.

firm

Version numbers of the firmware (monitor and overlay programs).Answer is e.g. "1, 4.20,
4.20;": Device 1 has a monitor program with version number 4.20 and an overlay
program with version number 4.20.

cal

Date of last factory calibration.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence

127

OMICRON CMEngine

4.4.4

sys:status? [ (<bit_number>) ]

Function

Get the status of a CMC device.

Description

When you do not specify the optional parameter <bit_number>, this command
gets the primary status register (32 bits; bit 0 to bit 31).
The optional parameter <bit_number> denotes one of the secondary status
registers. If you specify a secondary register as parameter <bit_number> the
content of this register is returned (32 bits; bit 0 to bit 31).

Parameters

<bit_number>
This parameter is of type <integer> and is optional. It specifies the number of the
secondary register.

Answer

The content of the register specified is returned in a zero terminated string.

Compatibility

DOS, Win16, Win32

When you get the content of a secondary status register, the register content is deleted.

Error code

Explanation

CMERR_CALDATA_CHECKSUM Calibration data checksum mismatch


CMERR_DOWNLOAD

Error downloading data to CMC

CMERR_DOWNLOAD_FILE

Problem downloading data from file to CMC (detailed


information is provided with the extended API error code)

CMERR_DOWNLOAD_NO_FW

Problem downloading the firmware (detailed information is


provided with the extended API error code)

CMERR_IN_SEQ_MODE

Command not allowed within sequence

CMERR_INVALID_INT

<bit_number> is not a valid integer

Example
The command sys:status?(2) returns the content of secondary status register 2:
The answer string is e.g. "1, 512;". This means that the secondary status register of the device
contains the decimal number 512. In this register bit, number 9 is set to "1" (29=512) and the other bits
are "0". With the list of status register bits below you can find out that there is an overload on the 1st
generator of voltage generator triple 4.

128

String Commands

4.4.5

Organization of the Status Command Register Structure

There is a primary status register. Every bit of the 32 bits of this primary status register (0 to 31) has a
related secondary status register (32 bits too).
The bits of a secondary status register are combined with a logical OR and this result is stored in the
related bit of the primary status register.
Thus every bit of a primary status register shows a summary of the related bits in the secondary status
register. If at least one of the bits in the secondary register is set, the related bit in the primary status
register is set too. Currently only the 10 secondary status registers 0 to 9 exist.
Example:
Bit 2 in the primary status register indicates if there is an overload on one or more voltage generators.
The bit(s) set in the secondary status register 2 show(s) which generator has an overload.
The following tables list the bits of the status registers and their meanings. All bits for which no
meaning is given are reserved by OMICRON for future enhancements.
Primary status register
Bit Meaning
0

Communication errors

Internal error in a CMC

Overload at voltage generators

Overload at current generators

Overtemperature at voltage generators

Overtemperature at current generators

GPS/PTP errors

Overload at inputs

Current amplifier internal errors

IRIG-B errors

10
11
12
13

129

OMICRON CMEngine

Bit Meaning
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Secondary status register #0: communication errors
Bit Meaning
0

Initialization failed

Wrong version of the signal processor board

Overflow in read buffer while reading from a CMC

Timeout while writing to a CMC

130

String Commands

Bit Meaning
4

Timeout while reading from a CMC

Timeout while executing a command (host vector)

Timeout while waiting on a signal processor reset

Signal processor confused

Communication interrupted

Command execution timeout

10

Internal hardware module communication error

11

Measurement module communication error

12

Master-slave synchronization lost

13

Master-slave sequence synchronization lost

14
15
16
17
18
19
20
21
22
23
24
25
26
27

131

OMICRON CMEngine

Bit Meaning
28
29
30
31
Secondary status register #1: CMC-internal errors
Bit Meaning
0

Interrupt not available

CMC-internal command code not defined

AD/DA board not present

3
4

Timeout of software watchdog (host timeout)

Timeout in AD converter

Error in shift register

License violation [1]

External infeed current output

Ground-wire break

10

Line input power too high

11

Voltage amplifier supply error

12

Error in measurement module

13

Wrong number of command parameters (CMC-internal command)

14

Frequency limit exceeded

15
16
17

132

String Commands

Bit Meaning
18
19
20
21
22
23
24
25
26
27
28
29
30
31
[1]: Should not occur in normal operation mode. If it occurs all commands except sys:status? are
disabled. Switch the CMC OFF and ON again to get back to normal operation mode (a reset with
"sys:reset" does not help).
Secondary status register #2: overload at voltage generators
Bit Meaning
0

Voltage overload triple 1, generator 1

Voltage overload triple 1, generator 2

Voltage overload triple 1, generator 3

Voltage overload triple 2, generator 1

Voltage overload triple 2, generator 2

Voltage overload triple 2, generator 3

133

OMICRON CMEngine

Bit Meaning
6

Voltage overload triple 3, generator 1

Voltage overload triple 3, generator 2

Voltage overload triple 3, generator 3

Voltage overload triple 4, generator 1

10

Voltage overload triple 4, generator 2

11

Voltage overload triple 4, generator 3

12

Voltage overload triple 5, generator 1

13

Voltage overload triple 5, generator 2

14

Voltage overload triple 5, generator 3

15

Voltage overload triple 6, generator 1

16

Voltage overload triple 6, generator 2

17

Voltage overload triple 6, generator 3

18

Voltage overload triple 7, generator 1

19

Voltage overload triple 7, generator 2

20

Voltage overload triple 7, generator 3

21

Voltage overload triple 8, generator 1

22

Voltage overload triple 8, generator 2

23

Voltage overload triple 8, generator 3

24
25
26
27
28
29

134

String Commands

Bit Meaning
30

Voltage overload Aux DC

31
Secondary status register #3: overload at current generators
Bit Meaning
0

Current overload triple 1, generator 1

Current overload triple 1, generator 2

Current overload triple 1, generator 3

Current overload triple 2, generator 1

Current overload triple 2, generator 2

Current overload triple 2, generator 3

Current overload triple 3, generator 1

Current overload triple 3, generator 2

Current overload triple 3, generator 3

Current overload triple 4, generator 1

10

Current overload triple 4, generator 2

11

Current overload triple 4, generator 3

12

Current overload triple 5, generator 1

13

Current overload triple 5, generator 2

14

Current overload triple 5, generator 3

15

Current overload triple 6, generator 1

16

Current overload triple 6, generator 2

17

Current overload triple 6, generator 3

18

Current overload triple 7, generator 1

19

Current overload triple 7, generator 2

135

OMICRON CMEngine

Bit Meaning
20

Current overload triple 7, generator 3

21

Current overload triple 8, generator 1

22

Current overload triple 8, generator 2

23

Current overload triple 8, generator 3

24
25
26
27
28
29
30
31
Secondary status register #4: overtemperature at voltage generators
Bit Meaning
0

Voltage overtemperature: triple 1, generator 1

Voltage overtemperature: triple 1, generator 2

Voltage overtemperature: triple 1, generator 3

Voltage overtemperature: triple 2, generator 1

Voltage overtemperature: triple 2, generator 2

Voltage overtemperature: triple 2, generator 3

Voltage overtemperature: triple 3, generator 1

Voltage overtemperature: triple 3, generator 2

Voltage overtemperature: triple 3, generator 3

Voltage overtemperature: triple 4, generator 1

136

String Commands

Bit Meaning
10

Voltage overtemperature: triple 4, generator 2

11

Voltage overtemperature: triple 4, generator 3

12

Voltage overtemperature: triple 5, generator 1

13

Voltage overtemperature: triple 5, generator 2

14

Voltage overtemperature: triple 5, generator 3

15

Voltage overtemperature: triple 6, generator 1

16

Voltage overtemperature: triple 6, generator 2

17

Voltage overtemperature: triple 6, generator 3

18

Voltage overtemperature: triple 7, generator 1

19

Voltage overtemperature: triple 7, generator 2

20

Voltage overtemperature: triple 7, generator 3

21

Voltage overtemperature: triple 8, generator 1

22

Voltage overtemperature: triple 8, generator 2

23

Voltage overtemperature: triple 8, generator 3

24
25
26
27
28
29
30

Voltage overtemperature Aux DC

31
Secondary status register #5: overtemperature at current generators

137

OMICRON CMEngine

Bit Meaning
0

Current overtemperature: triple 1, generator 1

Current overtemperature: triple 1, generator 2

Current overtemperature: triple 1, generator 3

Current overtemperature: triple 2, generator 1

Current overtemperature: triple 2, generator 2

Current overtemperature: triple 2, generator 3

Current overtemperature: triple 3, generator 1

Current overtemperature: triple 3, generator 2

Current overtemperature: triple 3, generator 3

Current overtemperature: triple 4, generator 1

10

Current overtemperature: triple 4, generator 2

11

Current overtemperature: triple 4, generator 3

12

Current overtemperature: triple 5, generator 1

13

Current overtemperature: triple 5, generator 2

14

Current overtemperature: triple 5, generator 3

15

Current overtemperature: triple 6, generator 1

16

Current overtemperature: triple 6, generator 2

17

Current overtemperature: triple 6, generator 3

18

Current overtemperature: triple 7, generator 1

19

Current overtemperature: triple 7, generator 2

20

Current overtemperature: triple 7, generator 3

21

Current overtemperature: triple 8, generator 1

22

Current overtemperature: triple 8, generator 2

23

Current overtemperature: triple 8, generator 3

138

String Commands

Bit Meaning
24
25
26
27
28
29
30
31
Secondary status register #6: GPS/PTP errors
Bit Meaning
0

Hardware failure

Internal Communications Error

Initialization error

Trigger fail channel 0

Trigger fail channel 1

GPS communications error

6
7
8
9
10
11
12
13

139

OMICRON CMEngine

Bit Meaning
14
15
16

No valid pulse per second (PPS) from PTP grandmaster

17
18
19
20
21
22
23
24
25
26
27
28
29
30

Synchronization to external PTP grandmaster lost

31
Secondary status register #7: overload at inputs
Bit Meaning
0

Overload input 1

Overload input 2

Overload input 3

Overload input 4

140

String Commands

Bit Meaning
4

Overload input 5

Overload input 6

Overload input 7

Overload input 8

Overload input 9

Overload input 10

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

141

OMICRON CMEngine

Bit Meaning
28
29
30
31
Secondary status register #8: current amplifier internal errors
Bit Meaning
0

A: Supply error

A: Range error

A: Power supply shutdown

A: Fuse protection error

A: Controller stack error

A: Offset error

A: Fast register error

A: Invalid LDAC signal

A: Current on neutral line too high

A: Power supply current too high

10
11
12
13
14
15
16

B: Supply error

17

B: Range error

142

String Commands

Bit Meaning
18

B: Power supply shutdown

19

B: Fuse protection error

20

B: Controller stack error

21

B: Offset error

22

B: Fast register error

23

B: Invalid LDAC signal

24

B: Current on neutral line too high

25

B: Power supply current too high

26
27
28
29
30
31

143

OMICRON CMEngine

Secondary status register #9: IRIG-B error


Bit Meaning
0

Decoder State 0: Wait for IRIG-B reference marker (no signal)

Decoder State 2: Frame or bit error

Decoder: High pulse length was wrong

Decoder: Bit period length was wrong

Decoder: Frame error

Decoder: Parity error

6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

144

Encoder: No valid pulse per second (PPS)

String Commands

Bit Meaning
23
24
25
26
27
28
29
30

Synchronization to external time base lost

31

CMIRIG-B device not connected to CMC

145

OMICRON CMEngine

4.4.6

sys:goose:cfg(<filename>)

Function

Configures the GOOSE settings of a CMC.

Description

Transfers the GOOSE configuration specified in the file <filename> to the CMC
and activates it.
GOOSE operation is only supported on network-based CMC devices.

Parameters

<filename>
Name of the file holding the new GOOSE configuration.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_NOT_SUPPORTED

Command is not supported on this device

CMERR_GOOSE_CFG_SET_FAILED

Could not set GOOSE configuration

See also: command sys:goose:cfg?(<filename>) on page 147

146

String Commands

4.4.7

sys:goose:cfg?(<filename>)

Function

Retrieves GOOSE configuration of a CMC.

Description

Reads the GOOSE configuration from the CMC and stores it in the specified file
<filename>.
GOOSE operation is only supported on network-based CMC devices.

Parameters

<filename>
Name of the file where the current GOOSE configuration will be stored.

Answer

Returns a string which is the shortcut for a diagnostic message (see the following
table).

Returned string Diagnostic message


ok

The CMC contained a GOOSE configuration which was stored in <filename>.

noconfigfile

The CMC did not contain a GOOSE configuration file, thus no file could be
retrieved.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_NOT_SUPPORTED

Command is not supported on this device

CMERR_GOOSE_CFG_GET_FAILED

Could not retrieve GOOSE configuration

See also: command sys:goose:cfg(<filename>) on page 146

4.5

Output Commands

The output command tree is divided into an analog part out:ana:... for the output of analog signals
and a binary part out:bin:... for the output of binary signals. Furthermore there is a command
out:cfg? related to all outputs.
The <out_module_idx> parameter contained in many of the binary output commands is a number
(starting at 1) identifying a "virtual" output module. "Virtual" means that it not only stands for real output
modules of the CMB but also all other kinds of outputs like the relay outputs on the front panel of a
CMC or the transistor outputs on the EXIF/EXTOP board of a CMC. The exact details about this virtual
module can be retrieved by using the out:bin(<out_module_idx>):cfg? command. Whenever there is
a CMC with a connected CMB the available virtual output modules consist of the CMC internal relay
outputs (accounting for one virtual module), the CMC internal transistor outputs (a second virtual

147

OMICRON CMEngine

module) and the output modules of the CMB. This makes these new/modified commands a complete
replacement for the original commands thus allowing the handling of all outputs by a single command
set.
For the analog outputs, the CMEngine uses an output concept that maps logical generators to
physical outputs. A logical generator outputs a signal, which can consist of two signal components.
Three logical generators are combined to a generator triple (or just triple), which is mapped (or routed)
to a physical amplifier with three outputs. With the output commands out:... you can specify all
parameters for the logical generators (amplitude, phase, frequency, waveform of signal components
and the mix-mode that defines the way the signal components are superimposed).
In the output command tree the parameter type <triple_list_type> specifies the logical generator(s) or
triple(s) the sub-commands are applied.
Examples:
Command

Applies to the
following
generators:
as parameter

Applies to the following generators:


in words

out:ana:v(1): ...

v(1)

1st generator triple v(1), i.e. the voltage generators


v(1:1), v(1:2) and v(1:3)

out:ana:v(2:1): ...

v(2:1)

1st generator in 2nd voltage triple

out:ana:v(1,3): ...

v(1,3)

1st and 3rd triple of the voltage generators

out:ana:i(1:2,3:3): ... i(1:2, 3:3)

2nd generator in the 1st triple and 3rd generator in


3rd triple of the current generators

With the amplifier commands amp:... you can specify the amplifier parameters and the routing of the
logical generators to the physical outputs (= amplifiers). Because there is a predefined routing of the
logical generators to the physical outputs, in most cases you don't need to use amp:... commands.
After startup of the CMEngine the following amplifier routings are predefined:
Logical generator
triple

Generators in this triple Predefined routing to outputs ...

Logical generator triple

Generators in this triple

Predefined routing to outputs ...

v(1)

v(1:1), v(1:2), v(1:3)

outputs "Voltage 1,2,3" on front panel of CMC

i(1)

i(1:1), i(1:2), i(1:3)

outputs "Current 1,2,3" on front panel of CMC

148

String Commands

An analog voltage signal or an analog current signal consists of either one signal component or a
superposition of two signal components. The way of superposition can be defined with the mixcommand (see below). After the startup of CMEngine the mix-mode is set to sig(1) (signal component
1 only). In the following description of output string commands the sub-command sig(<no>) selects
either the first signal component sig(1)or the second signal component sig(1)of the generator(s)
defined in parameter <generator_list>.
In CMEngine there are two different ways to calculate new values for amplitude, frequency and phase.
Every parameter amplitude, frequency and phase has two related buffers; a buffer stores absolute
values and the other stores step values (6 buffers). If you use the commands to set amplitude,
frequency and phase without the keyword step the new values are interpreted as absolute values and
written directly into the parameter's absolute buffer. When you add the optional keyword step to the
command the new values are written into the parameter's step buffer. Then the command
out:ana:step adds the step buffer's value to the absolute buffer. The next on command takes the
values in the absolute buffers for the new output signal.
You can also write a negative value into the step buffer for stepwise subtractions with step. The initial
value in all step buffers is zero.
When you assemble your own string commands, you can omit the sub-commands ana and sig(1)
used in the following command descriptions, because they are default sub-commands as described
earlier.
In the left side table of contents find the output command of your choice and click the corresponding
entry.

149

OMICRON CMEngine

4.5.1

out:[ana:]v|i (<generator_list>):[sig(<no>):]a (<amplitude> [, step ] )

Function

This command defines the amplitude for the selected signal component of all
generators in <generator_list>.

Description

Whether the parameter <amplitude> is interpreted as RMS value or as peak


value of the amplitude depends on the current waveform of this signal
component. This is specified with the waveform (see wav-command).
You can define a negative amplitude to mirror the current waveform at the time
axis.
Use the command amp:def?(<amp_no>) to get the highest possible value of the
amplitude. The command returns a value <max_out> that is the highest possible
value you can define as amplitude. The returned amplitude represents the RMS
value of a sine wave.
You can add the optional keyword step after the amplitude value. Then the
amplitude value is not interpreted as the new amplitude to be set, but is written
into the step buffer for the amplitude.
The default value is zero for the voltage amplitude and (for command
out:ana:i()... ) zero for the current amplitude.

Parameters

<generator_list>
This parameter is of type <triple_list_type>.
<no>
This parameter is 1 or 2 and selects either signal component 1 or component 2.
<amplitude>
This parameter is of type <float>.
The keyword step is optional.

The new amplitude is defined with this command but is not set until the next on command
(e.g. out:ana:on).

150

String Commands

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_INVALID_FLOAT

Parameter of type <float> has errors

CMERR_INVALID_INT

Parameter <generator_list> contains a number that is not of type


integer

CMERR_TRIPLE_NOT_DEF A triple in <generator_list> is not defined


See also commands out:ana:v(...):[sig(<no>):]wav(...) & out:[ana:]on.

151

OMICRON CMEngine

4.5.2

out:[ana:]v|i (<generator_list>):[sig(<no>):]f (<frequency> [, step ] )

Function

This command defines the frequency <frequency> (in Hertz) for the selected
signal component of all generators in <generator_list>.

Description

Use the command amp:def?(<amp_no>) described below to get the upper and
lower limits of the frequency for a specific CMC. The frequency limits are
returned in the parameters <f_min> and <f_max> of the amp:def? command.
You can add the optional keyword step after the frequency value. Then the
frequency value is not interpreted as the new frequency to be set, but is written
into the step buffer for the frequency.
The default value for the frequency is 0 Hz.
When the current waveform is wav(dc), you cannot set a frequency.

Parameters

<generator_list>
This parameter is of type <triple_list_type>.
<no>
This parameter is 1 or 2 and selects either signal component 1 or component 2.
<frequency>
This parameter is of type <float>.
The keyword step is optional.

The new frequency is defined with this command but is not set until the next on command
(e.g. out:ana:on).
Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_INVALID_FLOAT

Parameter of type <float> has errors

CMERR_INVALID_INT

Parameter <generator_list> contains a number that is not of type


integer

CMERR_TRIPLE_NOT_DEF A triple in <generator_list> is not defined


See also command: out:ana:on on page 181.

152

String Commands

4.5.3

out:[ana:]v|i (<generator_list>):[sig(<no>):]t (<period_time>)

Function

This command defines the period time <period_time> (in seconds) for the
selected signal component of all generators in <generator_list>.

Description

When the current waveform is wav(exp) or wav(dc), you cannot set a period
time.

Parameters

<generator_list>
This parameter is of type <triple_list_type>.
<no>
This parameter is 1 or 2 and selects either signal component 1 or component 2.
<period_time>
This parameter is of type <float>.

The newperiod time is defined with this command but is not set until the next on
command (e.g. out:ana:on).

With a wav(exp) command this command does not define the period time but the time
constant of the exponential decay.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_INVALID_FLOAT

Parameter of type <float> has errors

CMERR_INVALID_INT

Parameter <generator_list> contains a number that is not an integer

CMERR_TRIPLE_NOT_DEF A triple in <generator_list> is not defined


See also command: out:ana:on on page 181.

153

OMICRON CMEngine

4.5.4

out:[ana:]v|i (<generator_list>):[sig(<no>):]p (<phase> [, step ] )

Function

This command defines the phase <phase> (in degrees) for the selected signal
component of all generators in <generator_list>.

Description

You can add the optional keyword step after the phase value. Then the phase
value is not interpreted as the new phase to be set, but is written into the step
buffer for the phase.
The default value for all phases is 0 degrees.
If the current waveform is wav(dc), only a phase of 0 degrees is allowed.

Parameters

<generator_list>
This parameter is of type <triple_list_type>.
<no>
This parameter is 1 or 2 and selects either signal component 1 or component 2.
<phase>
This parameter is of type <float>.
The keyword step is optional.

The new phase is defined with this command but is not set until the next on command (for
example, out:ana:on).
Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_INVALID_FLOAT

Parameter of type <float> has errors

CMERR_INVALID_INT

Parameter <generator_list> contains a number that is not an integer

CMERR_TRIPLE_NOT_DEF A triple in <generator_list> is not defined


See also commands:
out:ana:on on page 181
out:ana:pmode on page 190

154

String Commands

4.5.5

out:[ana:]v|i (<generator_list>):[sig(<no>):]wav (<waveform>, ...)

Function

This command defines the waveform <waveform> for the selected signal
component of all generators in <generator_list>.

Description

After the startup of CMEngine the signal components of all generators are set to
a sine wave.
Every waveform you can choose has its own set of parameters. Therefore every
selectable waveform is described below as a different command.

After a new waveform is set, the signal parameters amplitude, frequency and phase are
reset to zero. You must set new values for the amplitude, phase and frequency when you
have changed the waveform, because amplitude, frequency and phase are interpreted in
different ways for every waveform. Therefore it is not possible to take the values from a
previous waveform for a new waveform.
When you use the ; to connect multiple commands like a(), f(), p() and wav(), the wav
command is always executed first, so any order of the commands is correct to define a new
waveform and its parameters amplitude, frequency and phase.

155

OMICRON CMEngine

4.5.6

out:[ana:]v|i (<generator_list>):[sig(<no>):]wav (sin)

Function

This defines a sine as new waveform for the selected signal component of the
generators in <generator_list>.

Description

The amplitude value you define after the waveform has been changed is
interpreted according to the waveform defined.
After the waveform has been changed to sine the signal parameters are set to
zero, as described above. Please note that 0 is a valid value for the amplitude
and the phase, but not for the frequency. The frequency must be expressly set
for all waveforms except DC, where it cannot be set.

Parameters

<generator_list>
This parameter is of type <triple_list_type>.
<no>
This parameter is 1 or 2 and selects either signal component 1 or component 2.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_INVALID_INT

Parameter <generator_list> contains a number that is not of type


integer

CMERR_TRIPLE_NOT_DEF A triple in <generator_list> is not defined


See also command: out:ana:v(...):[sig(<no>):]a(...) on page 150

156

String Commands

4.5.7

out:[ana:]v|i (<generator_list>):[sig(<no>):]wav
(sum,<amplitude_factor1>, ...)

Function

Defines asignal that is a sum of a sine (the fundamental) and its harmonics for
the selected signal component of the generators in <generator_list>.

Description

The frequency and phase of the fundamental is to be defined by the commands


f() and p(). The first parameter <amplitude_factor1> after wav(sum, ...) sets the
amplitude of the fundamental relative to the setting of the a() command. The
following parameters define the harmonics.
A harmonic is defined by the three parameters
<harmonicX>,<amplitude_factorX> and <phaseX>. They define the order of the
harmonic, its amplitude relative to the setting of the a() command and its phase
relative to the fundamental. For the definition of every harmonic you must define
its three parameters <harmonicX>, <amplitude_factorX> and <phaseX>.
The parameter <harmonicX> defines the order of a harmonic. If e.g. the
fundamental has a frequency of 50 Hz, then <harmonic2> = 2 defines a second
harmonic of 100 Hz.
The parameter <amplitude_factorX> (for the fundamental and the harmonics)
defines the amplitude in the following way:
The amplitude set with the a() command is multiplied with <amplitude_factorX>
to obtain the amplitude of the fundamental or harmonic respectively.
For a sum signal, an amplitude value you define with the a() command is
interpreted as the RMS value of the fundamental with <amplitude_factor1> = 1.
The parameter <phase> defines the phase of the harmonic.
You can obtain a sum signal without fundamental by setting the
<amplitude_factor1> to zero.

Parameters

The related parameters <harmonic>, <magnitude> and <phase> must be defined


once for every harmonic.
<generator_list>
This parameter is of type <triple_list_type>.
<no>
This parameter is 1 or 2 and selects either signal component 1 or component 2.
<harmonicX>
These parameters are of type <integer> and have to be greater or equal to 2.

157

OMICRON CMEngine

<amplitude_factorX>
These parameters are of type <float> and are valid in the interval [0, 106].
<phaseX>
These parameters are of type <float> and are valid in the interval [-360, 360].
The amplitude sum of fundamental and harmonics can exceed 1. This reduces the maximum
amplitude which can be set with the a() command.
Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence

CMERR_INVALID_FLOAT

Parameter of type<float> has errors.

CMERR_INVALID_INT

Parameter <generator_list> or <harmonicX> contains a number


that is not of type integer

CMERR_OUT_OF_CMC_MEM Internal CMC memory exhausted; cannot download and use this
waveform
CMERR_TRIPLE_NOT_DEF

A triple in <generator_list> is not defined

Example
The command string out:ana:v(1):sig(1):wav(sum,1,3,0.33,0);a(20);f(50) defines the following signal
for (the first signal component of) the first triple of voltage generators:
A sum signal that consists of a fundamental wave with 50Hz and the amplitude 1 20Vrms = 20Vrms
and its third harmonic with the amplitude 0.33 20Vrms = 6.6Vrms.

158

String Commands

See also command:


out:ana:v(...):[sig(<no>):]a(...) on page 150

159

OMICRON CMEngine

4.5.8

out:[ana:]v|i (<generator_list>):[sig(<no>):]wav (sumcorr,


<fund_frequency>,<amplitude_factor1>, ...)

Function

Defines asignal that is a sum of a sine (the fundamental) and its harmonics for
the selected signal component of the generators in <generator_list>. This
command allows to output signals with harmonics up to 3 kHz.

Description

The phase of the fundamental is to be defined by the command p(). The first
parameter <fund_frequency> after wav(sumcorr, ...) sets the frequency of the
fundamental. Notice that the frequency of the fundamental can NOT be changed
afterwards. This command can only be used for static output of a harmonic
signal.
The parameter <amplitude_factor1> sets the amplitude of the fundamental
relative to the setting of the a() command. The following parameters define the
harmonics.
A harmonic is defined by the three parameters <harmonicX>,
<amplitude_factorX> and <phaseX>. They define the order of the harmonic, its
amplitude relative to the setting of the a() command and its phase relative to the
fundamental. For the definition of every harmonic you must define its three
parameters <harmonicX>, <amplitude_factorX> and <phaseX>.
The parameter <harmonicX> defines the order of a harmonic. If e.g.: the
fundamental has a frequency of 50 Hz, then <harmonic2> = 2 define a second
harmonic of 100 Hz.
The parameter <amplitude_factorX> (for the fundamental and the harmonics)
defines the amplitude in the following way:
The amplitude set with the a() command is multiplied with <amplitude_factorX>
to obtain the amplitude of the fundamental or harmonic respectively.
For frequencies higher than 1.5 kHz there is a limitation of the amplitude to 150V
for each harmonic.

160

String Commands

For a sumcorr signal, an amplitude value you define with the a() command is
interpreted as the RMS value of the fundamental with <amplitude_factor1> = 1.
The parameter <phase> defines the phase of the harmonic relativ to the
fundamental.
You can obtain a sumcorr signal without fundamental by setting the
<amplitude_factor1> to zero.
Parameters

The related parameters <harmonicX>, <amplitude_factorX> and <phaseX> must


be defined once for every harmonic.
<generator_list>
This parameter is of type <triple_list_type>.
<no>
This parameter is 1 or 2 and selects either signal component 1 or component 2.
<fund_frequency>
This parameter is of type <float> and specifies the frequency of the fundamental.
<harmonicX>
These parameters are of type <integer> and have to be greater or equal to 2.
<amplitude_factorX>
These parameters are of type <float> and are valid in the interval [0, 106].

161

OMICRON CMEngine

<phaseX>
These parameters are of type <float> and are valid in the interval [-360, 360].
The amplitude sum of fundamental and harmonics can exceed 1. This reduces the maximum
amplitude which can be set with the a() command.
This command is only supported on a CMC 256 or newer test sets with a 3 kHz calibration. It
is not allowed for external OMICRON amplifiers and the current amplifier of the CMC356.
Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence

CMERR_INVALID_FLOAT

Parameter of type<float> has errors.

CMERR_INVALID_INT

Parameter <generator_list> or <harmonicX>


contains a number that is not of type integer

CMERR_OUT_OF_CMC_MEM

Internal CMC memory exhausted; cannot download


and use this waveform

CMERR_HARM_CORR_NOT_SUPPORTED Harmonic correction not supported for this amplifier


CMERR_OUT_OF_RANGE

The specified fundamental frequency or a harmonic


frequency is out of range.

CMERR_TRIPLE_NOT_DEF

A triple in <generator_list> is not defined

See also commands:


out:ana:v(...):[sig(<no>):]a(...) on page 150
amp:def?(<amp_no>,harm) on page 253

162

String Commands

4.5.9

out:[ana:]v|i (<generator_list>):[sig(<no>):]wav (tri [ ,<duty_cycle>] )

Function

Defines a triangular signal as waveform for the selected signal component of the
generators in <generator_list>.

Description

This waveform is a triangular waveform where the positive and the negative
amplitudes have the same size. The parameter <duty_cycle> can be used to
change the signal form.
The default <duty_cycle> of 0.5 causes the following waveform:

A <duty_cycle> of zero causes the following waveform:

A <duty_cycle> of 1 causes the following waveform:

163

OMICRON CMEngine

This command interprets the amplitude value defined with the a() command as
peak value of the amplitude.
Parameters

<generator_list>
This parameter is of type <triple_list_type>.
<no>
This parameter is 1 or 2 and selects either signal component 1 or component 2.
<duty_cycle>
This parameter is of type <float>.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence

CMERR_INVALID_FLOAT

Parameter of type <float> has errors

CMERR_INVALID_INT

Parameter <generator_list> contains a number that is not of type


integer

CMERR_OUT_OF_CMC_MEM Internal CMC memory exhausted, cannot download and use this
waveform
CMERR_TRIPLE_NOT_DEF

A triple in <generator_list> is not defined

See also command: out:ana:v(...):[sig(<no>):]a(...) on page 150.

164

String Commands

4.5.10 out:[ana:]v|i (<generator_list>):[sig(<no>):]wav (square


[ ,<duty_cycle>] )
Function

Defines a square signal as waveform for the selected signal component of the
generators in <generator_list>.

Description

This waveform is a square waveform with symmetric positive and the negative
amplitudes. The parameter <duty_cycle> can be used to change the duty factor
of the waveform. The default value for the duty factor is 0.5 (time of positive and
time of negative signal are equal) but you can change this when you specify the
parameter <duty_cycle>:
The amplitude value defined with the a() command is interpreted here as the
peak value of the amplitude.
The default <duty_cycle> of 0.5 generates the following waveform:

A <duty_cycle> of 1 generates a positive DC signal and a <duty_cycle> of 0


generates a negative DC signal.
Parameters

<generator_list>
This parameter is of type <triple_list_type>.
<no>
This parameter is 1 or 2 and selects either signal component 1 or component 2.
<duty_cycle>
This parameter is of type <float>.

165

OMICRON CMEngine

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence

CMERR_INVALID_FLOAT

Parameter of type <float> has errors

CMERR_INVALID_INT

Parameter <generator_list> contains a number that is not of type


integer

CMERR_OUT_OF_CMC_MEM Internal CMC memory exhausted; cannot download and use this
waveform
CMERR_TRIPLE_NOT_DEF

A triple in <generator_list> is not defined

See also command: out:ana:v(...):[sig(<no>):]a(...) on page 150.

166

String Commands

4.5.11 out:[ana:]v|i (<generator_list>):[sig(<no>):]wav (user, <user_sig_no>


[,single] )
Function

Defines a user-defined waveform as waveform for the selected signal component


of the generators in <generator_list>.

Description

Before you can use a user-defined waveform you must define it with the
commands out:ana:user:...: use the command out:ana:user:alloc? to reserve
memory for the new waveform.
The command out:ana:user:alloc? returns a number for the user-defined
waveform that you need to specify this waveform. Store the amplitude samples
for this waveform into the previously allocated memory using the command
out:ana:user:app. Finally pass the number of the user-defined waveform to this
command as <user_sig_no> to use the new waveform as a generator's signal.
A user waveform is replayed periodically with the frequency set by the f()
command, but you can use the optional keyword single to define a non repetitive
playback of the user waveform. In this case the f() command sets the sampling
frequency.

Parameters

<generator_list>
This parameter is of type <triple_list_type>.
<no>
This parameter is 1 or 2 and selects either signal component 1 or component 2.
<user_sig_no>
The parameter is of type <integer>.
The keyword single is optional.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_INVALID_INT

Parameter <generator_list> or <user_sig_no> contain number that


is not of type integer

CMERR_INVALID_USER_SIG Parameter <user_sig_no> is not a valid user signal


CMERR_TRIPLE_NOT_DEF

A triple in <generator_list> is not defined

See also commands:


out:ana:user:alloc? on page 201

167

OMICRON CMEngine

out:ana:user:app on page 202

168

String Commands

4.5.12 out:[ana:]v|i (<generator_list>):[sig(<no>):]wav (dc)


Function

Defines a DC signal as waveform for the selected signal component of the


generators in <generator_list>.

Description

The amplitude value defined with the a() command is interpreted as the value of
the DC signal.

Parameters

<generator_list>
This parameter is of type <triple_list_type>.
<no>
This parameter is 1 or 2 and selects either signal component 1 or component 2.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_INVALID_INT

Parameter <generator_list> contains number that is not of type


integer

CMERR_TRIPLE_NOT_DEF A triple in <generator_list> is not defined

169

OMICRON CMEngine

4.5.13 out:[ana:]v|i (<generator_list>):[sig(<no>):]wav (exp)


Function

Defines a decaying exponential function as waveform for the selected signal


component of the generators in <generator_list>.

Description

The following formula illustrates the relation between the time constant, the
amplitude factor and the instantaneous value of the amplitude.

A is the peak value of the exponential signal defined with the a() command and T
is the time constant of the exponential function defined by a t() command.
This waveform is not periodical, i.e. when you define this waveform for a signal
only one exponential decay is put out after the on command.
Parameters

<generator_list>
This parameter is of type <triple_list_type>.
<no>
This parameter is 1 or 2 and selects either signal component 1 or component 2.
<timeconstant>
This parameter is of type <float>.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_INVALID_FLOAT

Parameter of type <float> has errors

CMERR_INVALID_INT

Parameter <generator_list> contains a number that is not of type


integer

CMERR_TRIPLE_NOT_DEF A triple in <generator_list> is not defined

170

String Commands

Example:
The following commands define a sine waveform with an amplitude of 1A and a frequency of 50 Hz for
the first current generator triple with a decaying displacement (time constant 0.5 s):
out:ana:i(1):sig(1):wav(sin)
out:ana:i(1):sig(1):a(1)
out:ana:i(1):sig(1):f(50)
out:ana:i(1):sig(2):wav(exp)
out:ana:i(1):sig(2):a(0.5)
out:ana:i(1):sig(2):t(0.5)
out:ana:mix:i(1, add)

171

OMICRON CMEngine

4.5.14 out:[ana:]v|i (<generator_list>):on


Function

Switches ON the generators or generator triples enumerated in <generator_list>.

Description

Use this command to switch ON your already defined output signals.

Parameters

<generator_list>
This parameter is of type <triple_list_type>.

After you have defined your signals you must execute an on command to switch ON the
defined signals. This method enables you to set or change multiple generators
simultaneously.
Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_INVALID_INT

Parameter <generator_list> contains a number that is not of type


integer

CMERR_TRIPLE_NOT_DEF A triple in <generator_list> is not defined


Example:
out:ana:v(2):on
All 3 generators of the 2nd voltage generator triple are switched ON.
See also command:
amp:route
For another version of this command see out:ana:on on page 181.

172

String Commands

4.5.15 out:[ana:]v|i (<generator_list>):off


Function

Switches OFF the generators or generator triples enumerated in


<generator_list>.

Description

Use this command when you want to switch OFF generators but leave the signal
parameters defined. You can use an on command to switch them ON again.

Parameters

<generator_list>
This parameter is of type <triple_list_type>.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_INVALID_INT

Parameter <generator_list> contains a number that is not of type


integer

CMERR_TRIPLE_NOT_DEF A triple in <generator_list> is not defined


For another version of the off command see out:ana:off on page 182
Example:
out:ana:v(2):off
Switches OFF the 3 generators of the 2nd voltage generator triple of a CMC.

173

OMICRON CMEngine

4.5.16 out:[ana:]v|i (<generator_list>):clr


Function

Switches OFF the generators or generator triples enumerated in <generator_list>


and clears all signal definitions.

Description

This command sets all signal component amplitudes, frequencies and phases of
the selected generators to zero. The waveform of all signal components is set to
sine. The mix-mode for all selected generators is set to the initial values (sig(1)
or off, see table with out:ana:v():mix(sig(<no>)|add|mult|off)).

Parameters

<generator_list>
This parameter is of type <triple_list_type>.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_TRIPLE_NOT_DEF A triple in <generator_list> is not defined


For another version of the clr command see out:ana:clr on page 185
Example:
out:ana:v(2):clr
Switches OFF the 3 generators of the 2nd voltage generator triple of a CMC and clears all signal
definitions for these generators.

174

String Commands

4.5.17 out:[ana:]v|i (<generator_list>):mix (sig(<no>)|add|mult|off)


Function

Defines how the two signal components sig(1) and sig(2) of every generator are
mixed together.

Description

The setting sig(1) defines that the output signal of this generator only consists of
signal component 1 and signal component 2 is ignored. The setting sig(2)
defines that the output signal of this generator only consists of signal component
2 and signal component 1 is ignored.
The keyword add defines that the output signal of the generator consists of the
sum of the two signal components.
When two signal components are mixed with mult, the amplitude of the resulting
signal is calculated in relation to the scaling amplitude of the signal components.
The scaling amplitude is the maximum amplitude calculated from the
amplification specified in the amp:def command (instantaneous, not rms). When
you overlay two signal components that have this maximum scaling amplitude,
the resulting signal has the same maximum scaling amplitude too. A signal
component that has an amplitude less than the maximum scaling amplitude
reduces the amplitude of the resulting signal in direct proportion.
The option off allows to switch off the signal generation for the generators
named in the generator list. When the error code CMERR_PROC_EXHAUST
indicates that the number of signals to calculate exceeds the capacity of the
CMC's signal generation unit, this feature has to be used to switch off some of
the signals you have defined. The calculation capacity depends on the DSP
board version of the CMC.
The default settings for the signal component mixers of the generators are listed
in the table below.

Parameters

<generator_list>
This parameter is of type <triple_list_type>.
<no>
This parameter is 1 or 2 and selects either signal component 1 or component 2.
Thus you must specify one of the keywords sig(1), sig(2), add, mult or off here.

Default settings for the signal component mixers of the generators:


Triple

Generators

Default

v(1)

v(1:1), v(1:2), v(1:3) sig(1)

175

OMICRON CMEngine

Triple

Generators

Default

i(1)

i(1:1), i(1:2), i(1:3)

sig(1)

generators v(2), v(3) etc. ...

off

generators i(2), i(3) etc.

off

...

Overview of keywords:
Keyword Explanation
sig(1)

Use only the first signal component to get the signal.

sig(2)

Use only the second signal component to get the signal.

add

Add both signal components to get the signal.

mult

Multiply both signal components to get the signal.

off

Switch off signal generation for the generators in list.


The settings sig(2), add and mult can only be used when the phase mode is set to abs (see
command out:ana:pmode).
The setting mult is not supported in the following cases:
- for CMS 151 devices
- for series configuration of voltage amplifiers
- for parallel configuration of current amplifiers
Therefore, all voltage amplifiers configurations with the "ser" string in their mode parameter,
and all current amplifiers configurations with the "par" string in their mode parameter, cannot
use signal multiplication. Please see the amp:cfg?() command for details.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_INVALID_INT

Parameter <generator_list> contains number that is not of type


integer

CMERR_ TRIPLE_NOT_DEF A triple in <generator_list> is not defined

176

String Commands

Error code

Explanation

CMERR_PROC_EXHAUST

Signal calculation capacity of CMC exhausted (too many signals


defined)

CMERR_PMODE_DIFF

Operation not possible in diff mode (see "Please note!" above)

CMERR_NOT_SUPPORTED

Command is not supported on this device

See also commands:


out:ana:pmode on page 190
amp:cfg?() on page 239

177

OMICRON CMEngine

4.5.18 out:[ana:]save
Function

Saves signal parameters for all generators.

Description

Use this command to save the signal parameters for all generators. These
parameters include amplitude, phase and frequency for both signal components.
This command is useful when the signal parameters are not the same as were
originally set.
The parameters that are set with the analog output parameters commands
(out:ana:a(), out:ana:f(), etc.) are stored in a buffer, and passed to the
generators when an out:ana:on command is issued. There is therefore a
separation between the parameters set and the values actually output by the
generators.
Additionally, the out:ana:step command acts upon the generator values, without
modifying the parameters set. This command allows storing the values that the
generators are actually outputting to restore them later.

See also commands:


out:ana:restore on page 179
out:ana:clr on page 185
out:ana:off on page 182

178

String Commands

4.5.19 out:[ana:]restore
Function

Restores signal parameters for all generators.

Description

Use this command to restore the signal parameters for all generators. These
parameters include amplitude, phase and frequency for both signal components,
and must have been saved with a previous out:ana:save command.
The command does not output the values to the generators for that, a further
out:ana:on or out:ana:step command are required.

To use the out:ana:restore command, the outputs must be already on. If they are off, the
restored values will be overwritten by the next out:ana:on command with the originally set
commands.
See also commands:
out:ana:save on page 178
out:ana:clr on page 185
out:ana:off on page 182

179

OMICRON CMEngine

4.5.20 out:[ana:]v|i (<triple_no>):zero(<zero_factor>)


Function

Sets the zero component factor.

Description

When a triple is routed to an amplifier configuration that supports automatic


calculation of the zero component, this command allows setting a factor that will
be multiplied by the resultant of the three phase magnitudes before it is output.
The command must refer to a triple, attempts to apply it to individual generators
will have no effect.

Parameters

<triple_no>
This parameter is of type <integer>.
<zero_factor>
Parameter of type <float>.
The zero factor range is: 4.0 = factor < 4.0
Negative factors will cause the output wave to be reversed in phase respect to
the calculated one. This factor is by default equal to 1.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_INVALID_INT

Parameter <generator_list> contains a number that is not of type


integer

CMERR_INVALID_FLOAT

The <zero_factor> parameter is not of type float

CMERR_ TRIPLE_NOT_DEF A triple in <generator_list> is not defined


CMERR_NOT_SUPPORTED

A triple in <generator_list> is not routed to a configuration with


automatic calculation of the zero component

CMERR_OUT_OF_RANGE

The zero factor is out of range

See also command:


amp:cfg?[(<cfg_no>)] on page 239
Example:
Assuming v(1) is correctly routed: out:ana:v(1):a(30);f(50)
out:ana:on: the zero component is output with a = 90V and phase = 0
out:ana:v(1):zero(0.5): the zero component is output with a = 45V and phase = 0
out:ana:v(1):zero(-1.5): the zero component is output with a = 135V and phase = 180

180

String Commands

4.5.21 out:[ana:]on
Function

Switches ON all generators with defined signals.

Description

Use this command to switch ON all generators with previously specified voltage
or current signals, or to apply all changes done to the generators parameters
since the last out:[ana:]on command.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_OUT_OF_RANGE A generator has wrong signal parameter definitions. Typically, the


amplitude has been set but the frequency has been left as 0.
After you have defined your signals you must execute an on command to switch ON these
defined signals. This method enables you to set or change multiple generators
simultaneously.
For another version of this command see out:ana:<generator_list>:on on page 172.

181

OMICRON CMEngine

4.5.22 out:[ana:]off [(zcross [,<off_generator_list>])]


Function

Switches OFF all the generators, but leaves their signal parameters defined.

Description

The generators are switched OFF, but their signal parameters are still defined.
For CMS 151 and CMS 156 the power supplies are additionally switched to
stand-by mode (see amp:ctrl). You can use an on command to switch them ON
again.
You can use the optional keyword zcross (derived from zero crossing) to
simulate the behavior of a power switch, i.e. to switch off signals in their zero
crossing. When you specify zcross without a generator list, all the signals of the
active generators are switched OFF at their next zero crossing. The out:ana:off
command with the zcross keyword is not supported for the CMS 151.
When you specify zcross with a <off_generator_list>, only the generators
selected in the list are switched off at their next zero crossing.
When you want to switch some signals OFF simultaneously with other signals,
you can specify these signals in the parameter <off_generator_list> in the
following way:
First specify the generator (or generator triple) that is to be switched off in its
zero crossing, then add "&" then and specify one or more generators (or
generator triples) that are to be switched off simultaneously.
When the parameter before "&" is a single generator, the parameters after "&"
must be single generators too:
Example: i(2:3) & v(2:3)
generator 3 of current triple 2 is switched off in its zero crossing and generator 3
of voltage triple 2 is switched off simultaneously.
When the parameter before "&" is a generator triple, the parameters after "&"
must be generator triples too:
Example: i(2) & v(1) & v(2)
The 3 current generators of the current triple 2 are switched off in their zero
crossings and the generators of voltage triples 1 and 2 are switched off
simultaneously, i.e.
generators v(1:1) and v(2:1) are switched off with generator i(2:1),
generators v(1:2) and v(2:2) are switched off with generator i(2:2) and

182

String Commands

generators v(1:3) and v(2:3) are switched off with the generator i(2:3).
Parameters

The keyword zcross is optional.


<off_generator_list>
This parameter is optional and can only be used when zcross is specified first.
Its structure is a comma-separated list of generator triples, generators and
combinations of generators or generator triples connected using "&" (see
examples). The list would look like this:
v|i(int)&v|i(int)... , v|i(int)&v|i(int)..., ...

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_INVALID_INT

Parameter <off_generator_list> contains a number that is not of type


integer

CMERR_TRIPLE_NOT_DEF

A triple in <generator_list> is not defined

CMERR_PROC_EXHAUST

Not enough calculation capacity left for zcross

CMERR_NOT_SUPPORTED Command is not supported on this device


For another version of this command where you can specify generators or generator triples to be
switched OFF see out:ana:v():off on page 182.
Examples:
out:ana:off
Switches OFF all generators of a CMC immediately.
out:ana:off (zcross)
Switches OFF all generators of a CMC at their next zero crossing.
out:ana:off (zcross, v(1))
Switches OFF the 3 generators of the 1st voltage generator triple of a CMC at their next zero crossing.
out:ana:off (zcross, v(1), i(3))
Switches OFF the 3 generators of the voltage triple 1 and the 3 generators of current triple 3 of a CMC
at their next zero crossing.
out:ana:off (zcross, v(1:2) & i(1:2) & i(2:2))
Switches OFF the 2nd generator of the 1st voltage generator triple at its next zero crossing.
Simultaneously switches OFF the 2nd current generator of the 1st current generator triple and the 2nd
generator of the 2nd current generator triple.
out:ana:off (zcross, v(1:2) & i(1:2), v(1:3) & i(1:3), i(2))

183

OMICRON CMEngine

Switches OFF v(1:2) at its zero crossing and i(1:2) with it. Switches OFF v(1:3) at its zero crossing and
i(1:3) with it. Switches OFF the generators of the 2nd current generator triple in their next zero
crossing.

184

String Commands

4.5.23 out:[ana:]clr
Function

Switches OFF all generators and clears all signal definitions.

Description

This command sets all signal component amplitudes, frequencies and phases to
zero. The waveform of all signal components is set to sine. The mix-mode for all
generator triples is set to the initial values (sig(1) or off, see table with
out:ana:v():mix(sig(<no>)|add|mult|off)).
For CMS 151 and CMS 156 the power supplies are switched to stand-by mode
additionally (see amp:ctrl).

See also command: out:ana:off on page 182

185

OMICRON CMEngine

4.5.24 out:[ana:]step [(load|exec)]


Function

After you have set the step buffers of amplitude, frequency and phase you can
use this command to add the contents of the three step buffers to the current
values of amplitude, frequency and phase.

Description

You have to use the amplitude, frequency or phase commands a(), f() or p() with
the additional keyword step to store values into the step buffers before you
execute the out:ana:step command.
The execution of out:ana:step adds the values of all amplitude step buffers to
the current amplitudes, the values of all frequency step buffers to the current
frequencies and the values of all phase step buffers to the current phases.
All step values are buffered twice, in the CMEngine and in the CMC. A step
command downloads the current step values into the CMC and executes a step
operation. With the two optional parameters load and exec you can perform a
separate download of the new step values or perform a separate step operation
using the CMC's current step value.

Parameters

You can use the command without additional keywords, with the keyword load or
with the keyword exec.

Through the execution of multiple out:ana:step commands an overflow (greater than the
maximum) or underflow (smaller than the minimum) of the amplitude and frequency values
can occur. The resulting output values are not predictable. So take care that out:ana:step
does not produce any overflows (e.g. using a timeout condition within seq:wait).
See also commands:
out:ana:v():[sig(<no>):]a() on page 150
out:ana:v():[sig(<no>):]f() on page 152
out:ana:v():[sig(<no>):]p() on page 153

186

String Commands

4.5.25 out:[ana:]pmode (abs|diff[(v|i(<reference_generator>)])


Function
Set the phase mode. The phase mode defines the way the CMEngine interprets the phase parameter
of the command out:ana:v():[sig(<no>):]p().
Description
The phase value you send with a p() command to a CMC can be interpreted in three ways explained
below.
Variable names used in the following formulas:
Variable

Description
Voltage or current signal e.g. i(1:2)
Instantaneous phase belonging to sample k of
signal x
Instantaneous phase belonging to the following
sample k+1 of signal x
Old phase pointer

New phase pointer set with the command


out:v():p()
Phase difference between two samples k and k
+1
Keyword Phase interpretation
abs
The new instantaneous phase belonging to the sample (k+1) is determined by setting
the new phase pointer in the command out:v():p() in absolute relation to the zero phase
of this signal.
At the moment of the on command the signal phase is set to the start phase p() of the
new signal, no matter which phase the old signal has at that moment.
E.g. for sine signals this has the following result (here the old and the new signal both
have a phase of zero p(0), but a different amplitude):

187

OMICRON CMEngine

Keyword Phase interpretation

diff
The new instantaneous phase belonging to the sample (k+1) is determined by the
current instantaneous phase and the difference between new and old phase pointer.
At the moment of the on-command the new signal starts with the old signal's current
phase.
E.g. for sine signals this has the following result (here the old and the new signal both
have a phase of zero p(0), but a different amplitude):

diff(v|i())

188

This mode allows defining one single voltage or current generator as reference. In this
case, when the on command is issued, the generator selected as reference operates in
diff mode, as described in the previous paragraph.

String Commands

Keyword Phase interpretation


All other generators are shifted so the original phase differences between them and the
reference generator are reapplied, whatever the frequency of each generator may be.
In the image, we can see a reference generator (in red) and a second generator (green).
Both have phase 0, but generator 2 has a higher frequency than the reference
generator. At a given moment (vertical line) the frequency of generator 2 is made equal
to that of the reference generator; the phases are not changed. We see in the diagram
how the phase of the reference generator does not change, while the second generator
is shifted so the original phase shift between it and the reference generator is restored.
This shift was equal to zero, so both generators are in phase after the change.

The default phase mode is abs.


The option diff should only be activated for the execution of a specific on or off
command and then should be set back to abs.
The option diff can only be activated when all generator(s) run in sig(1) mode (or are off).
If a reference generator is used, the phase for that particular generator must always be 0.
The results if the reference generators phase is not set to 0 are undefined.
Parameters
You must specify one of the keywords abs or diff as command parameter. When specifying a
reference generator, only single generators can be used, not triples.
Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_PMODE_NOT_ALLOWED Cannot switch to diff mode (see above)

189

OMICRON CMEngine

4.5.26 out:[ana:]pmode?
Function

Gets the phase mode currently set.

Answer

Returns a string that contains the device number and the keyword corresponding
to the phase mode set.
For example:
out:pmode(abs)
out:pmode?
Return: 1,abs;
out:pmode(diff)
out:pmode?
Return: 1,diff;
out:pmode(diff(v(1:1)))
out:pmode?
Return: 1,diff(v(1:1));

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE Command not allowed within sequence


Phase mode definition command:
out:ana:pmode

190

String Commands

4.5.27 out:[ana:]resetopt
Function

The amount of data sent to the CMC is optimized automatically. With this
command you can reset this optimization. This command is related to the string
commands for the sequencer and is only useful in conjunction with these
commands.

Answer

To minimize the communication between PC and CMC, the amount of data is


optimized automatically. When you execute an on command, only the signal
parameters that have changed since the last on command are sent to the CMC.
The resetopt command inactivates this optimization and, when the next on
command is executed, all parameters are sent to the CMC. This feature is useful
when you work with sequencer commands.

Example:
The following sequence does not work properly because of this data optimization:
seq:begin
seq:wait(bin(1),2,1,1) begin and end of sequence step #1
out:v(1):a(100)

beginning of step #2

out:on
seq:wait(1,1)

end of step #2

out:i(1):a(100)

beginning of step #3

out:v(1):a(100)
out:on
seq:end
Due to data optimization the second out:v(1):a(100) command is not downloaded into the sequence
buffer, because this command seems to be redundant.
seq:begin
seq:wait(bin(1),2,1,1)
out:v(1):a(100)
out:on

191

OMICRON CMEngine

seq:wait(1,1)
out:i(1):a(100)
out:on
seq:end
But when the trigger condition bin(1) in the seq:wait(bin(1),2,1,1) command becomes true, a forward
jump to the 3rd sequence step is executed.
seq:begin
seq:wait(bin(1),2,1,1)
out:v(1):a(100)
out:on

f bin(2) is true jump forward 2 steps

seq:wait(1,1)
out:i(1):a(100)
out:on
seq:end
After this jump the omitted command out:v(1):a(100) is needed and not redundant any more. Thus
the sequence only works properly when you insert an out:resetopt at the beginning of the second
sequence step. The full sequence including the second out:v(1):a(100) is downloaded then:
seq:begin
seq:wait(bin(1),2,1,1)
out:v(1):a(100)
seq:wait(1,1)
seq:wait(1,1)
out:resetopt
out:i(1):a(100)

192

String Commands

out:v(1):a(100)
out:on
seq:end

193

OMICRON CMEngine

4.5.28 out:[ana:]buf:sam[(lock|free)]
Function

Samples all signal settings of all generators.

Description

This command performs a "snapshot" of the instantaneous signal settings of all


routed generators. It stores amplitude, phase and frequency of each signal
component of every generator, together with a time tag that allows
synchronization of the output and input buffers, if the automatic recording is
activated (see inp:buf:sam(bin, on)). The values are the ones being output
when the command was processed, not the ones originally programmed in the
generators.
There is room in the CMC memory for just one set of data. Each new sampling
overwrites the previously stored data.

Parameters

The command may have the parameter lock, the parameter free or no
parameter.
The command without parameters performs a sampling of the signal settings, as
described, unless the buffer is locked; in this case it has no effect.
The command with the lock parameter performs a sampling and locks the buffer
so future sampling commands will have no effect. The sampled values are
therefore protected from being overwritten until the buffer is freed. If the buffer
was already locked, the command has no effect.
The command with the free parameter performs a sampling of the signal settings
and stores the results in the buffer. If the buffer was locked, it is unlocked.

The command does not store wave form, mix mode or range information. It is the users
responsibility to make sure that the recorded values are meaningful when they are read.
See also:
out:ana:buf:get? on page 195

194

String Commands

4.5.29 out:[ana:]buf:get? (v|i (<triple>:<gen>) [:sig (<sig_no>)])


Function

Reads sampled signal settings of specified generator/signal.

Description

Reads the signal parameters stored by out:ana:buf:sam.

Answer

Returns a string containing: the device ID, a time tag, the amplitude, phase and
frequency of the selected generator and signal component. All values are of type
double, except the device ID, which is integer.
The time tag is 0 unless the automatic logging of binary inputs is turned on in the
input buffer. In this case, the time when the sample was taken is recorded, and
can be matched against the times of events in the input buffer.

Parameters

<triple>:<gen>
Couple of integer values to identify the generator for which the values are
requested.
sig<sig_no>
Optional parameter to select the signal component of the generator for which the
values are requested. Default is sig(1).

The time tags will remain 0 until the command inp:buf:get? is executed at least once.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence

CMERR_TRIPLE_NOT_DEF Triple is not defined (routed)


See also:
out:[ana:]buf:sam[(lock|free)] on page 194
inp:buf:sam(bin, on|off|bin) on page 299
inp:buf:get? on page 302
Example:
The following example uses a sequence to generate a ramp, in order to determine the value for which
a trigger (bin(1) in this case) becomes active. While the sequence is running, the PC program samples
the analog outputs to update the user interface with the signal values. When the sequence detects the

195

OMICRON CMEngine

trigger, it samples the values and locks the buffer so the PC task does not overwrite the readings at
the operating point. To simplify the code, no check is done to limit the number of ramp steps if no trip
is detected.
The ramp step time is 0.5s
seq:begin
out:v(1:1):a(50);f(50);p(0)
out:v(1:1):a(1,step)
out:on
out:ana:buf:sam(free)

Makes sure the buffer is unlocked

seq:wait(bin(1),2,0.5,1)
out:step
seq:wait(bin(1), 1, 0.5,0)
out:ana:buf:sam(lock)

Sample and protect the operating point

out:off
seq:end
......
The PC program would run like this:
seq:exec

The sequence begins executing

DO WHILE NOT SequenceEnded


out:ana:buf:sam

Sample to refresh the UI

out:ana:buf:get?(v(1:1))

Get the values and display them

......

When convenient, use seq:status?(step)to set


SequenceEnded

END DO
out:ana:buf:get?(v(1:1))

Get the values written and locked by the sequence

Result: 1,0.000000E+000, 1.200000E+002, -3.321039E+001, 5.000000E+001

196

String Commands

As we see, the trigger was detected at an amplitude of 120V and a phase of -33.21. The frequency
was unchanged and equal to 50Hz. The phase indicates the angle of the v(1:1) phasor at the moment
the sample was taken, not the original setting, which was 0.
Please note that it is possible that some of the last readings within the DO loop may have already
gotten the locked values, due to the asynchronous way both loops are executed. However, the one
reading after the DO loop exits is guaranteed to have the operating point values, while all the others
may have been taken at any time during the execution of the sequence.

197

OMICRON CMEngine

4.5.30 out:[ana:]sync(ext, +|-)


Function

Synchronizes the frequency of all analog outputs to an external signal.

Description

The frequency of the external signal must be between 40 and 70 Hz. All other
frequencies are ignored and the last valid frequency measured in the
synchronization input is used.
All generators ignore the frequency settings and adjust their frequencies to the
external source.

Parameters

ext:
The synchronization signal in the external interface is used.
+|-:
The positive (+) or negative (-) slope of the external signal will be used for
synchronization.

This command is only supported on a CMC 256 or newer test set.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_NOT_SUPPORTED

Command not supported in this device

CMERR_ TRIPLE_NOT_DEF A triple in <generator_list> is not defined


CMERR_IN_SEQ_MODE

Command not allowed within sequence

See also:
command out:[ana:]sync(off) on page 199

198

String Commands

4.5.31 out:[ana:]sync(off)
Function

Turns the frequency synchronization to an external signal off.

Description

The synchronization to an external signal is switched off and the frequency of the
analog outputs will stay on the last measured frequency.

This command is only supported on a CMC 256 or newer test set.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_NOT_SUPPORTED Command not supported in this device


CMERR_IN_SEQ_MODE

Command not allowed within sequence

See also:
command out:[ana:]sync(ext, +|-) on page 198

199

OMICRON CMEngine

4.5.32 out:[ana:]user:...
Description

200

The following commands out:ana:user ... are used to work with user-defined
waveforms. A user-defined waveform is sent to the CMC as a sequence of
samples. When you have defined a new waveform, you can assign this
waveform to one or more signal components of voltage or current signals with
wav(user,...).

String Commands

4.5.33 out:[ana:]user:alloc? (<no_of_samples>)


Function

Use this command to prepare a CMC for the definition of a new waveform.

Description

A CMC device has a memory for all waveforms. The alloc? command allocates
memory in the CMC for a user-defined signal that is made up of the number of
samples specified in <no_of_samples>. Then this allocated memory segment is
prepared for the download of samples that is done with the command
out:ana:user:app.

Parameter

<no_of_samples>:
This parameter is of type <integer>.

Answer

The command returns an answer string that contains the device number of the
CMC and the user signal number (type <integer>) assigned to the allocated
memory. Use the waveform command wav() to define your new waveform as
output signal for a generator.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence

CMERR_INVALID_INT

Parameter <no_of_samples> is not an integer

CMERR_OUT_OF_CMC_MEM No internal CMC memory for new user-defined signals any more
See also:
out:ana:v(...):[sig(<no>):]wav
Examples:
Use the alloc?(1024) command to allocate memory for 1024 samples; the user signal number
returned is 1. Then download 1024 samples into the CMC using the out:ana:user:app command.
Use out:ana:v(1):sig1:wav(user,1) to set signal component 1 of all 3 generators of voltage triple 1
(these are v(1:1), v(1:2) and v(1:3)) to your user-defined waveform 1.

201

OMICRON CMEngine

4.5.34 out:[ana:]user:app (<user_sig_no>, <user_data>)


Function

Defines samples for a user-defined signal initialized with out:ana:user:alloc?.

Description

With this command you can store samples into the memory segment of the
waveform <user_sig_no> that you have allocated before. The parameter
<user_data> contains the list of samples.
The samples in parameter <user_data> are either written at the beginning of the
memory segment of the user-defined waveform <user_sig_no> or are appended
to the samples that were already downloaded in a previous app. There must be
enough free memory for the new samples in the waveform's memory segment
(this information can be queried with the out:ana:user:status? command).
Samples are signed integers in the range -32767 to 32767 (-0x7FFF to 0x7FFF
in hexadecimal notation). The actual amplitude of a sample is:

where Sample is the integer value of the sample and A is the amplitude set with
the out:...:a() command.
The resulting signal is calculated through linear interpolation between two
consecutive sample values. This effect is seen most obvious if you use only a
small number of sample values.
Parameters

<user_sig_no>:
This parameter is of type <integer>.
<user_data>:
This parameter is a list of comma-separated samples of type <integer>.

An out:ana:user:alloc? command must be successfully executed before you can use the
out:ana:user:app command.
The user signal you append data to must not be in use!

202

String Commands

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence

CMERR_INVALID_INT

Parameters <user_sig_no> or <user_data> contain a number that


is not a valid integer

CMERR_INVALID_USER_SIG

Parameter <user_sig_no> is not a valid user signal

CMERR_OUT_OF_CMC_MEM Internal CMC memory for this user-defined signal is full; no free
samples left
CMERR_USER_SIG_IN_USE

The user signal <user_sig_no> is in use. Thus appending samples


is not possible

See also:
command out:ana:user:alloc? on page 201
command out:ana:user:status? on page 205
interface function CMOutUserApp
Example:
The following commands
out:user:alloc?(10) (returns e.g. a user signal number of 2)
out:user:app(2, 32767:5, -32767:5)
out:ana:v(1:1):sig(1):wav(user, 2)
out:ana:v(1:1):sig(1):a(100)
out:ana:v(1:1):sig(1):f(50)
out:ana:v(1:1):on
define as user waveform a trapeze wave consisting of 5 samples with the normalized value 1 and 5
samples with the normalized value -1 with interpolated slopes.
Then signal 1 of generator 1 is set to this user waveform 2 with an amplitude of 100V and a frequency
of 50Hz.

203

OMICRON CMEngine

4.5.35 out:[ana:]user:free [(<user_sig_no>)]


Function

Frees the memory of a specific user-defined waveform or frees the memory used
by all user-defined waveforms.

Description

This command clears all samples in the memory segment of the waveform with
number <user_sig_no>. When you don't specify a user signal number
<user_sig_no> the memory sections of all user-defined waveforms are freed.

Parameter

<user_sig_no>:
This parameter is of type <integer> and is optional.

The user signal of the memory you want to free must not be in use!

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence

CMERR_INVALID_INT

Parameter <user_sig_no> is not an integer

CMERR_INVALID_USER_SIG Parameter <user_sig_no> is not a valid user signal


CMERR_USER_SIG_IN_USE

The user signal <user_sig_no> is in use. Thus freeing this user


signal is not possible

See also
command out:ana:user:alloc? on page 201
command out:ana:user:app on page 202
interface function CMOutUserApp

204

String Commands

4.5.36 out:[ana:]user:status? [(<user_sig_no>)]


Function

Gets status and memory information for a specific user waveform or for all user
waveforms together.

Parameter

<user_sig_no>:
This parameter is of type <integer> and is optional.

Answer

Without parameter the command returns the number of user signals defined, the
maximum number of samples that can be stored in the CMC's memory, the
number of samples that are still free (not allocated) and the number of samples
that can be stored in the largest block of free memory.
When you specify a user-defined waveform by its <user_sig_no>, the command
returns the number of samples allocated for this waveform and the amount of
free samples in this allocated memory segment.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence

CMERR_INVALID_INT

Parameter <user_sig_no> is not an integer

CMERR_INVALID_USER_SIG Parameter <user_sig_no> is not a valid user signal

205

OMICRON CMEngine

4.5.37 out:bin:cfg?
Function

Gets the number of available output modules.

Description

Use this command to get the number of output modules available in a device.

Answer

An integer number is returned that represents the number of output modules


available in the addressed device.

See also:
out:bin(<out_module_idx>):cfg? on page 207
out:bin(<out_module_idx>:<group_idx>):cfg? on page 207
Example:
Command: out:bin:cfg?
Answer: "1,2;"
Device 1 has 2 binary output modules.

206

String Commands

4.5.38 out:bin(<out_module_idx>):cfg?
Function

Gets configuration information for the selected output module.

Description

Use this command to get a complete description of each output module in the
addressed device.

Parameter

<out_module_idx>
Integer id of the output module for which information is desired. This value must
be greater than 0, and smaller or equal than the value returned by the
out:bin:cfg? command.

Answer

<dev_id>,<#groups>,<loc>,<loc_idx>,<mod_type>,<mod_ser_no>,<hard_ver>,<
dev_type>,<dev_ser_no>;
The return string contains the CMCs device number, plus the following data for
the selected output module:
Number of Groups
The binary outputs are divided in groups. All outputs in a group share location
and output type.
Location of Outputs
String describing the location of the outputs in the device. The following values
can be returned:
front - Outputs situated in the front panel of the device
back - EXIF/EXTOP board on the back of the device
slot - Outputs mounted in a backplane slot
Location Index
1 for "front" and "back", mounting slot number for "slot". The slots are numbered
starting at 1.
Module Type
The kind of module where the outputs are located. For instance: OUT1-16R
Module Serial Number
The serial number of the output module. Please note that the output modules
have serial numbers independent from those of the device that hosts them.
Hardware Version
The version number of the hardware.
Device Type

207

OMICRON CMEngine

Type of device in which the outputs are included. For instance, CMC 256-6, CMB
IO-7, etc.
Device Serial Number
The serial number of the host device.
See also:
out:bin:cfg? on page 206
out:bin(<out_module_idx>:<group_idx>):cfg? on page 209
Example:
Command: out:bin(1):cfg?
Answer: "1,4,front,1,CMC156-EP,DB011D,0,CMC156-EP,DB011D; "
Module 1 has 4 output groups and is located in the front of the device. The location index is 1. Module
type and serial number are the same as those of the host CMC156-EP.

208

String Commands

4.5.39 out:bin(<out_module_idx>:<group_idx>):cfg?
Function

Gets configuration information for the selected output group.

Description

Use this command to get a complete description of each output group within a
given module.

Parameters

<out_module_idx>
Integer id of the output module for which information is desired. This value must
be greater than 0, and smaller or equal than the value returned by the
out:bin:cfg? command.
<group_idx>
Integer id of the output group within the output module for which information is
desired. This value must be greater than 0, and smaller or equal than the value
returned by the out:bin(<out_module_idx>):cfg? command (return field
<#groups>).

Answer

<dev_id>,<#out>,<type>,<gnd_conn>,<common>,<res_group_type>,<res_group
_idx>;
The return string contains the CMCs device number, plus the following data for
the selected output group:
Number of Outputs
Number of binary outputs in this group (integer).
Type
String indicating the type of the outputs in the group. The following values can be
returned:
relay - Relay (dry contact, normally open) outputs.
transistor - Transistor (TTL level) outputs.
Ground Connector
String indicating the configuration of the ground connector. The following values
can be returned:
group - There is one single ground connector for the whole group.
single -Each output has its own ground connector.

209

OMICRON CMEngine

Please note that in the single case, the existence of a separate ground
connector for each output does not necessarily mean that such
grounds are electrically independent too. In the case of relay contacts,
where there is no voltage applied, "signal reference" should be
understood instead of "ground".

Common
String indicating the polarity of the common ground connector. It must be one of
the following values:
neutral - Common ground connector is neutral.
plus - Common ground connector is positive.
Resource group type
String indicating the resource group of this output group. It must be one of the
following values:
binout -Resource group rgtBinOut.
transout - Resource group rgtTransOut.
Resource group index
Integer value of the index for this groups resource group.
See also:
out:bin:cfg? on page 206
out:bin(<out_module_idx>):cfg? on page 207
Examples:
Command: out:bin:cfg?
Answer: "1,2;"
The device has 2 output modules.
Command: out:bin(1):cfg?
Answer: "1,4,front,1,CMC156-EP,DB011D,0,CMC156-EP,DB011D;"
Module 1 has 4 output groups and is located in the front of the device. As is the case with CMC
devices, the modules type and serial number are the same as the CMCs.
Command: out:bin(2):cfg?
Answer: "1,1,back,1,CMC156-EP,DB011D,0,CMC156-EP,DB011D;"
Module 2 has 1 output group and is located in the back of the device.
Command: out:bin(1:1):cfg?
Answer: "1,1,relay,single,binout,1;"

210

String Commands

Group 1 in module 1 has 1 output, of relay type, with independent signal reference connection. The
answer for the other three groups would be the same.
Command: out:bin(2:1):cfg?
Answer: "1,4,transistor,group,transout,1;"
Group 1 in module 2 has 4 outputs of transistor type, with one ground connection for the complete
group.

211

OMICRON CMEngine

4.5.40 out:bin(<out_module_idx>):on(<output_list>)
Function

Sets binary outputs within a given module to "1".

Description

With this command you can set binary outputs to "1". The outputs are specified
through the parameter <output_list>.
In the output list, all binary outputs within a module can be specified. You can get
the number of available outputs with the command
out:bin(<out_module_idx>):cfg?. Thus you can specify in the <output_list>
numbers between 1 and this maximum.

Parameters

<out_module_idx>
Integer id of the output module that is the target of this command. This value
must be greater than 0, and smaller or equal than the value returned by the
out:bin:cfg? command.
<output_list>:
This parameter is of type <enumeration>.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_INVALID_INT Parameter in <output_list> is not an integer


Example:
Command: out:bin(1):on(1,2,3)
Sets outputs 1, 2 and 3 in output module 1. Relays are closed and transistor outputs are set to 5V.

212

String Commands

4.5.41 out:bin(<out_module_idx>):off (<output_list>)


Function

Sets binary outputs to "0".

Description

With this command you can set binary outputs to "0". The outputs are specified
through the parameter <output_list>.
In the output list, all binary outputs within a module can be specified. You can get
the number of available outputs with the command
out:bin(<out_module_idx>):cfg?. Thus you can specify in the <output_list>
numbers between 1 and this maximum.

Parameters

<out_module_idx>
Integer id of the output module that is the target of this command. This value
must be greater than 0, and smaller or equal than the value returned by the
out:bin:cfg? command.
<output_list>:
This parameter is of type <enumeration>.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_INVALID_INT Parameter in <output_list> is not an integer


Example:
Command: out:bin(1):off(1,2,3)
Clears outputs 1, 2 and 3 in output module 1. Relays are open and transistor outputs are set to 0V.

213

OMICRON CMEngine

4.5.42 out:bin(<out_module_idx>):set (<data>)


Function

Simultaneously sets and/or clears multiple binary outputs in an output module.

Description

The desired states are specified in a number of parameter type <integer>. In this
number bit 0 defines the desired state of the binary output 1, bit 1 the state of
output 2 etc. (see table):

The logic of the set command follows the binary code system:
20 = 0001bin = 1dec ; sets BINARY OUTPUT 1
21 = 0010bin = 2dec ; sets BINARY OUTPUT 2
22 = 0100bin = 4dec ; sets BINARY OUTPUT 3
23 = 1000bin = 8dec ; sets BINARY OUTPUT 4.

(Least significant bit at the right; most significant bit at the left).
Commands overview to set the 4 binary outputs of a single CMC test set:
Note: To reflect the BINARY OUTPUTS array of a real CMC test set, the table below now shows the
least significant bit (= OUTPUT 1) at the left and the most significant bit (= OUTPUT 4) at the right.

BINARY OUTPUTS
Set command
out:bin(1):set(0)

214

2
0

3
0

4
0

String Commands

BINARY OUTPUTS
Set command

out:bin(1):set(1)

out:bin(1):set(2)

out:bin(1):set(3)

out:bin(1):set(4)

out:bin(1):set(5)

out:bin(1):set(6)

out:bin(1):set(7)

out:bin(1):set(8)

out:bin(1):set(9)

out:bin(1):set(10)

out:bin(1):set(11)

out:bin(1):set(12)

out:bin(1):set(13)

out:bin(1):set(14)

out:bin(1):set(15)

Examples:
The command out:bin(1):set(1) sets output 1 in module 1 and clears all the rest (1dec = 0001bin).
The command out:bin(1):set(11) sets outputs 1, 3 and 4 in module 1 and clears output 2
(11dec = 1011bin).

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_INVALID_INT Parameter <data> is not an integer

215

OMICRON CMEngine

4.5.43 out:bin(<out_module_idx>):get?
Function

Gets the states of the selected modules binary outputs.

Description

Use this command to get the states of all binary outputs in a module.

Parameter

<out_module_idx>
Integer id of the output module for which the output state must be read. This
value must be greater than 0, and smaller or equal than the value returned by the
out:bin:cfg? command.

Answer

A decimal number is returned that represents a 32 bit integer value. Bit 0 (LSB)
indicates the state of binary output 1; bit 1 indicates the state of binary output 2
etc. If the module had fewer than 32 outputs, the bits corresponding to the nonexisting outputs would be 0:

Bit

15 14 13 12 11 10 9

8 7 6 5 4 3 2 1 0

Output 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE Command not allowed within sequence


Example:
Command: out:bin(1):get?
Answer: "1,1;"
Output 1 in module 1 is "off", all the rest are "on".

216

String Commands

4.5.44 out:bin(<out_module_idx>:<group_idx>):name(<name>)
Function

Sets the group name.

Description

This command allows setting a label to a group, to be retrieved later.

Parameters

<out_module_idx>
Integer id of the output module for which information is desired. This value must
be greater than 0, and smaller or equal than the value returned by the
out:bin:cfg? command.
<group_idx>
Integer id of the output group within the output module for which information is
desired. This value must be greater than 0, and smaller or equal than the value
returned by the out:bin(<out_module_idx>):cfg? command (return field
<#groups>).
<name>
String enclosed in single or double quotes.

See also:
out:bin(<out_module_idx>:<group_idx>):name? on page 218

217

OMICRON CMEngine

4.5.45 out:bin(<out_module_idx>:<group_idx>):name?
Function

Queries

the group name.

Description

Use this command to retrieve a groups name.

Parameters

<out_module_idx>
Integer id of the output module for which information is desired. This value must
be greater than 0, and smaller or equal than the value returned by the
out:bin:cfg? command.
<group_idx>
Integer id of the output group within the output module for which information is
desired. This value must be greater than 0, and smaller or equal than the value
returned by the out:bin(<out_module_idx>):cfg? command (return field
<#groups>).

Answer

<dev_id>,<name>;
The return string contains the CMCs device number, plus the name assigned to
the group enclosed in quotes. If no name has been set for the group, then the
command returns an empty string.

See also: out:bin(<out_module_idx>:<group_idx>):name(name) on page 217


Examples:
out:bin(1:1):name?
Result: 1,""; // Group 1 in module 1 has no name assigned
out:bin(1:1):name("Output block 1")
out:bin(1:1):name?
Result: 1,"Output block 1";

218

String Commands

4.5.46 out:aux:cfg?
Function

Gets the number of available auxiliary VDC outputs.

Description

Use this command to get the number of auxiliary VDC outputs in a device.

Answer

An integer number is returned that represents the number of auxiliary outputs


available in the addressed device.

Example:
Command: out:aux:cfg?
Answer: "1,1;"
Device 1 has 1 auxiliary output.

219

OMICRON CMEngine

4.5.47 out:aux(<idx>):cfg?
Function

Gets information about an auxiliary VDC output.

Description

Use this command to get information about an auxiliary VDC output in a device.

Answer

<dev_id>,<dev_type>,<ser_no>,idx_on_dev>;
The return string contans the CMCs device number, the device type of the
device that the auxiliary VDC output belongs to, the device serial number and the
index of the auxiliary VDC output on that device.

Example:
Command: out:aux(1):cfg?
Answer: "1,CMC256,AG153F,1;"
Device 1 is a CMC 256 with serial number AG153F. The addressed auxiliary VDC output has index 1.

220

String Commands

4.5.48 out:aux(<idx>):on|off
Function

Turns on or off an auxiliary VDC output.

Description

This command switches the targeted auxiliary VDC output on or off, according to
the keyword used.

Parameter

<idx>
Integer id of the auxiliary output that is being addressed. This value must be
greater than 0, and smaller or equal than the value returned by the out:aux:cfg?
command.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_AUX_DC_NOT_LOCKED The auxiliary output DC is not locked and cannot be accessed


CMERR_NOT_SUPPORTED

Command not supported in this device

CMERR_OUT_OF_RANGE

VDC value or <idx> out of range

Unlike other outputs, the auxiliary DC output does not turn itself off automatically upon being
unlocked. Therefore, if we actually desire to turn it off, it must be expressly done before
exiting the software.
See also:
out:aux(<idx>):a() on page 222
out:aux(<idx>):a? on page 223

221

OMICRON CMEngine

4.5.49 out:aux(<idx>):a(<v_dc>)
Function

Sets the output value of an auxiliary VDC output.

Description

This command sets the value of the DC voltage to be output in the targeted
auxiliary output. If the output is on, the new voltage is output immediately upon
execution of this command.

Parameters

<idx>
Integer id of the auxiliary output that is being addressed. This value must be
greater than 0, and smaller or equal than the value returned by the out:aux:cfg?
command.
<v_dc>
Value of the DC voltage to be output. This parameter is of type <float> and must
be zero or positive.

The VDC auxiliary outputs are intended to provide power to the devices being tested. Due to
this intended use, they do not have the same accuracy as the test signal generators and
cannot be set to negative values.
Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_AUX_DC_NOT_LOCKED The VDC auxiliary output is not locked and cannot be


accessed
CMERR_INVALID_FLOAT

Parameter <v_dc> is not a double

CMERR_NOT_SUPPORTED

Command not supported in this device

CMERR_OUT_OF_RANGE

VDC value out of range

See also:
out:aux(<idx>):a? on page 223 and out:aux(<idx>):def() on page 224.

222

String Commands

4.5.50 out:aux(<idx>):a?
Function

Queries the parameters of a VDC auxiliary output.

Description

This command returns the status of the targeted VDC auxiliary output: whether it
is on or off, the set value and the maximum value.

Parameter

<idx>
Integer id of the auxiliary output that is being addressed. This value must be
greater than 0, and smaller or equal than the value returned by the out:aux:cfg?
command.

Answer

A string containing the device ID list, the output status ("on" or "off"), the set
voltage (<float>) and the maximum voltage of the output (<float>).

See also:
out:aux(<idx>):a() on page 222 and out:aux(<idx>):def().
Example:
out:aux(1):a(25)
out:aux(1):on
out:aux(1):a?
Return: 1,on,2.500000E+001,2.640000E+002;

223

OMICRON CMEngine

4.5.51 out:aux(<idx>):def(<pwr_on_v>)
Function

Sets the power-on value of a VDC auxiliary output.

Description

When the host device is powered on, the VDC auxiliary output can be turned on
automatically. This is achieved by setting a non-zero value to the <pwr_on_v>
parameter. The value set will be stored in non-volatile memory so it is not lost
when the power is removed.
When the host device is powered on, the DC voltage of the auxiliary output is set
to <pwr_on_v>; if this value is greater than 0, the VDC output is automatically
turned on.

Parameters

<idx>
Integer id of the auxiliary output that is being addressed. This value must be
greater than 0, and smaller or equal than the value returned by the out:aux:cfg?
command.
<pwr_on_v>
Value of the DC voltage to be output on power-on. This parameter is of type
<float>.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_AUX_DC_NOT_LOCKED The VDC auxiliary output is not locked and cannot be accessed
CMERR_INVALID_FLOAT

Parameter <pwr_on_v> is not a double

CMERR_NOT_SUPPORTED

Command not supported in this device

CMERR_OUT_OF_RANGE

VDC value out of range

See also:
out:aux(<idx>):a? on page 223
Examples:
out:aux(1):def(110)
Power-down a CMC 256, then power it up again; the VDC output will go on automatically. Please note
that you must restart "Batcher" at this point, or you will get cached results.
out:aux(1):a?
Return: 1,on,1.100000E+002,2.640000E+002;

224

String Commands

4.5.52 out:aux(<idx>):def?
Function

Queries the power-on value of a given VDC auxiliary output.

Description

This command returns the value stored in non-volatile memory for the VDC value
on power-up. To find out the current status of the VDC output please use the
out:aux(<idx>):a? command.

Parameter

<idx>
Integer id of the auxiliary output that is being addressed. This value must be
greater than 0, and smaller or equal than the value returned by the out:aux:cfg?
command.

Answer

String containing the device number and the power-on value of the auxiliary VDC
(<float>).

See also:
out:aux(<idx>):def() on page 224
out:aux(<idx>):a? on page 223

225

OMICRON CMEngine

4.5.53 out:cfg?
Function

Gets information about the analog and binary outputs of a CMC.

Description

This command returns the number of binary outputs in the CMC and a list of all
available amplifier numbers, consisting of the following information:
- Amplifier number.
- Number of generators.
- Information if the amplifier number can be used for internal and/or external
amplifiers.

Answer

A string with the device number, the number of binary outputs (type <integer>),
the amplifier number (type <integer>) followed by a slash ("/" ), the number of
generators (type <integer>) followed by a slash ("/" ) and the possible location
information ("n" for none, "i" for internal, "e" for external and "b" for both internal
and external) is returned.

Example:
The command out:cfg? returns e.g. the string "1,2,1/3/b,2/3/b,3/3/e,4/3/e;". This means that the CMC
with device number 1 has 2 binary outputs, its amplifiers 1 and 2 have 3 generators and can be used
for internal and external amplifiers, its amplifiers 3 and 4 also have 3 generators but can be used for
external amplifiers only.

4.6

Sampled Values Commands

The following section contains the commands that are needed to configure sampled values
generation. These commands work on each network-based CMC device. Each device supports up to
3 sampled values streams. The third stream is only available if the device has a LLO-2 board
assembled (12 low level outputs).
The sampled values streams are bound to the following amplifiers:
Sampled values
stream

Output type

Amplifier

Output range

Voltage

internal voltage
amplifier

highest of amplifier,
e.g. 300 V for CMC256

Current

internal current
amplifier A

highest of amplifier,
e.g. 12.5 A for
CMC256

Voltage

low level outputs 1-3

fixed to 250 V

Current

low level outputs 4-6

fixed to 25 A

226

String Commands

Sampled values
stream

Output type

Amplifier

Output range

Voltage

low level outputs 7-9

fixed to 250 V

Current

low level outputs 10-12

fixed to 25 A

In the left side table of contents find the sampled values command of your choice and click the
corresponding entry.

227

OMICRON CMEngine

4.6.1

out:[ana:]sv:def(<#blocks>, <nom_freq>)

Function

Configures the general sampled values settings.

Description

This command configures the general sampled values settings for all available
sampled values streams.
Note:
If a sampled values stream is already running, it is stopped and restarted with the
new general settings.

Parameters

<#blocks>:
Number of blocks per transfer: 1, 2, or 4. This setting determines the amount of
sampled values network packets being sent together as well as the frequency of
sending them. Full sampling frequency is 80 times the nominal frequency. When
#blocks equals 2 the actual frequency is only half and when #blocks equals 4 its
only a quarter of the full frequency.
<nom_freq>:
Nominal frequency for sampled values generation as double. Only the values
50Hz and 60Hz are supported.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_NOT_SUPPORTED

Command not supported on this device

CMERR_SV_CFG_SET_FAILED

Could not set Sampled Values configuration

CMERR_SV_CFG_NOT_ALLOWED Sampled Values configuration not allowed while analog


outputs are switched on
CMERR_OUT_OF_RANGE

One of the parameter value is out of range

See also:
command out:ana:sv:def? on page 229

228

String Commands

4.6.2

out:[ana:]sv:def?

Function

Gets the current general sampled values settings.

Description

This command reads the current general sampled values settings of the device.

Answer

The command returns 2 values:


<#blocks>,<nom_freq>
<#blocks>:
Number of blocks per transfer: 1, 2, or 4. This setting determines the amount of
sampled values network packets being sent together as well as the frequency of
sending them. Full sampling frequency is 80 times the nominal frequency. When
#blocks equals 2 the actual frequency is only half and when #blocks equals 4 its
only a quarter of the full frequency.
<nom_freq>:
Nominal frequency for sampled values generation as double.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence

CMERR_NOT_SUPPORTED Command not supported on this device


See also
command out:ana:sv:def() on page 228

229

OMICRON CMEngine

4.6.3

out:[ana:]sv:cfg(<sv_idx>, <fact_i>, <fact_v>, <adapter>,


<dest_mac_adr>, <eth_type>, <app_id>, <vlan_tag>, <quality>,
<svId_name>[,<simulate>])

Function

Configures the selected sampled values stream and turn the generation on.

Description

This command configures the sampled values stream which is selected with the
parameter <sv_idx>. The generation of the sampled values stream <sv_idx> is
turned on.
Note:
The range switching is turned off for the amplifiers and the phase correction is
set to zero. Thus the generator outputs are not corrected.

Parameters

<sv_idx>:
Integer id of the sampled values stream which is the target of this command.
Allowed values are 1, 2 and 3.
<fact_i>:
Scaling factor for current sampled values as double. This factor is calculated with
the following formula:

<fact_v>:
Scaling factor for voltage sampled values as double. This factor is calculated with
the following formula:

<adapter>:
Ethernet adapter number as integer. 0 corresponds to ETH1 and 1 corresponds
to ETH2.
<dest_mac_adr>:
Destination MAC address as string without '-'. The allowed range is
010CCD040000 to 010CCD0401FF.

230

String Commands

<eth_type>:
Type of Ethernet frame as 16bit integer. Only the value for sampled values
0x88BA is allowed.
<app_id>:
Application ID for Ethernet frame. The default value is 0x4000. The allowed
range is 0x4000 to 0x7FFF.
<vlan_tag>:
16 bit integer value.
Bit 0 to 11 define the VLAN ID.
Bit 12 defines CFI (usually 0).
Bit 13 to 15 define VLAN Priority.
<quality>:
The value given here specifies the 13 quality bits as defined in IEC 61850-7-3.
The default value is 0. The 14th bit (derived) is always set according to the
context by the firmware.
<svId_name>:
The sample value ID name as string with a minimum length of 10 and a
maximum length of 34 characters. The allowed character set is ISO 646 (also
called IA5 IRV International Alphabet No. 5), which is essentially 7-bit ASCII with
some exceptions. In Windows it is represented by code page 20105.
<simulate>:
Specify if the simulation flag should be set or not. 0 does not set the flag, and 1
activates it.
Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_NOT_SUPPORTED

Command not supported on this device

CMERR_SV_CFG_SET_FAILED

Could not set Sampled Values configuration

CMERR_SV_CFG_NOT_ALLOWED Sampled Values configuration not allowed while analog


outputs are switched on
CMERR_OUT_OF_RANGE

One of the parameter value is out of range

231

OMICRON CMEngine

See also:
command out:ana:sv:cfg?(...) on page 233

232

String Commands

4.6.4

out:[ana:]sv:cfg?(<sv_idx>)

Function

Gets the current sampled values stream settings of the device.

Description

This command reads the current sampled values settings of the device for the
specified stream <sv_idx>.

Parameters

<sv_idx>:
Integer id of the sampled values stream for which information is desired. Allowed
values are 1, 2 and 3.

Answer

The command returns 11 values:


<on_off>,<fact_i>,<fact_v>,<adapter>,<dest_mac_adr>,<eth_type>,<app_id>,<vl
an_tag>,<quality>,<svId_name>,<simulated>
<on_off>:
Is sampled values generation turned on or off.
<fact_i>:
Scaling factor for current sampled values as double.
<fact_v>:
Scaling factor for voltage sampled values as double.
<adapter>:
Ethernet adapter number as integer. 0 corresponds to ETH1 and 1 corresponds
to ETH2.
<dest_mac_adr>:
Destination MAC address as string without '-'.
<eth_type>:
Type of Ethernet frame as 16bit integer.
<app_id>:
Application ID for Ethernet frame.
<vlan_tag>:
16 bit integer value.
Bit 0 to 11 define the VLAN ID.
Bit 12 defines CFI (usually 0).
Bit 13 to 15 define VLAN Priority.
<quality>:
13 quality bits. Integer value between 0 and 0x1FFF.

233

OMICRON CMEngine

<svId_name>:
Name of the sampled values ID as string.
<simulated>:
Is the simulation flag set for that stream or not. Returns on or off.
Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within


sequence

CMERR_SV_CFG_GET_FAILED

Could not retrieve Sampled


Values configuration

CMERR_OUT_OF_RANGE

The parameter value is out of


range

CMERR_NOT_SUPPORTED

Command not supported on


this device

See also
command out:ana:sv:cfg() on page 230

234

String Commands

4.6.5

out:[ana:]sv:off(<sv_idx>)

Function

Turns generation of selected sampled values stream off.

Description

This command turns the generation of the sampled values stream <sv_idx> off.

Parameters

<sv_idx>:
Integer id of the sampled values stream which is the target of this command.
Allowed values are 1, 2 and 3.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_SV_CFG_SET_FAILED

Could not set Sampled Values


configuration

CMERR_OUT_OF_RANGE

The parameter value is out of


range

CMERR_NOT_SUPPORTED

Command not supported on


this device

See also commands:


out:ana:sv:cfg() on page 230
out:ana:sv:cfg?(...) on page 233

235

OMICRON CMEngine

4.6.6

out:[ana:]sv:status?(<sv_idx>)

Function

Gets the current status of the selected sampled values stream.

Description

This command reads the current status of the sampled values stream <sv_idx>
out of the device.

Parameters

<sv_idx>:
Integer id of the sampled values stream for which information is desired. Allowed
values are 1, 2 and 3.

Answer

The command returns 7 values:


<on_off>,<#blocks>,<packets_sent>,<samples_lost>,<read_DSP>,<fetch_buffer
>,<submit_fail>
<on_off>:
Is sampled values generation turned on or off.
<#blocks>:
Number of blocks per transfer: 1, 2, or 4. This setting determines the amount of
sampled values network packets being sent together as well as the frequency of
sending them. Full sampling frequency is 80 times the nominal frequency. When
#blocks equals 2 the actual frequency is only half and when #blocks equals 4 its
only a quarter of the full frequency.
<packets_sent>:
Number of network packets sent.
<samples_lost>:
Number of samples lost during processing.
<read_DSP>:
Number of failed sample readings from DSP. This counter is increased if sample
number does not match to the inverted one.
<fetch_buffer>:
Number of failed allocations for network frames from "Send" buffer. Is increased
if no buffer is available.
<submit_fail>:
Number of failed network frame sendings.

236

String Commands

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within


sequence

CMERR_COMM

Communication error

CMERR_OUT_OF_RANGE

The parameter value is out of


range

CMERR_NOT_SUPPORTED

Command not supported on


this device

237

OMICRON CMEngine

4.7

Amplifier Commands

The following section contains the commands that are needed to change the default routing of the
generators to the outputs described above. Furthermore you can use these commands to inform the
CMEngine about an external amplifier's parameters and then use this external amplifier for current or
voltage output. You even can change the parameters of a predefined amplifier or optimize the power
output of an amplifier.
After the startup of CMEngine the following default settings are defined:
Logical generator
triple

Generators in this triple Predefined routing to the following outputs

v(1)

v(1:1), v(1:2), v(1:3)

outputs "Voltage 1,2,3" on front panel of CMC.

i(1)

i(1:1), i(1:2), i(1:3)

outputs "Current 1,2,3" on front panel of CMC.

In the left side table of contents find the amplifier command of your choice and click the corresponding
entry.

238

String Commands

4.7.1

amp:cfg?[(<cfg_no>)]

Function

Queries the number of possible amplifier configurations that the device plus all its
attached intelligent amplifiers allow, or the characteristics of one of them if the
optional <cfg_no> parameter is provided.

Description

An amplifier configuration is a virtual amplifier that is obtained by wiring together


outputs from one or more physical amplifiers in a given configuration. Such a
virtual amplifier serves two purposes:
1) To allow access to special capabilities of the software that are not available for
all the elements of a triple. For instance, the output V2 of the CMC 156 is
capable of outputting more power than V1 and V3. If the three are assigned to
the same voltage triple, this capability is lost, since only the power of the weaker
outputs can be guaranteed. A virtual single-phase amplifier connected only to
V2-N can be used where higher power is needed.
2) To simplify rearranging the physical amplifiers into logical amplifiers more
adapted to our requirements. In a CMC 256, for instance, the four voltages V1,
V2, V3 and V4 are part of two separate physical amplifiers, one of them 3-phase
and the other single-phase. The use of the amp:def command would allow us
only to route one voltage triple to each of these amplifiers. There is a
configuration, however, where the four outputs are considered as 3-phase
amplifiers, while V4 outputs the resultant of the three phase voltages. When we
route a triple to this configuration, we address only the three phase voltages, and
the CMC internal DSP calculates the resultant. V4 is no longer directly
addressable.
It must be noted that this functionality could be achieved in some (but not all)
cases by assigning two triples to the amplifiers with the amp:def command and
calculating the resultant vector in the program. The design of the out:on
command ensures that the four voltages would be in sync. This command saves
the user a lot of effort and the possibility of calculation or synchronization errors,
and also ensures that the resultant is correct in all possible cases, even when
some of the signals have harmonic content, exponential decay component, etc.

Parameter

The optional <cfg_no> parameter is of type int.

Answer

The command without arguments returns a string that contains the CMC's device
number and the number of available configurations of type <integer>.
If a configuration number is provided, the command returns a string with the
following structure:

239

OMICRON CMEngine

<dev_ID>, <config_ID>, <phase_count>, <max_out>, <max_power>,


<max_out_at_max_power>, <src_amp>, <mode>, <wiring_ID>, {type
(amp_no / amp_id), no.};
The type and meaning of these return fields are:
<dev_id>
The CMCs device number integer
<config_ID>
ID of the configuration to be used in the amp:route command, if we want to
route a triple to this configuration. It is completely independent of the
configuration number, which is the parameter that we have passed to the
amp:cfg? command. This is a number of type integer.
Please note that the configuration ID is not guaranteed to be the same in all
cases; it may change if the hardware is different or the CMEngine version has
changed.
<phase_count>
Number of phases of the virtual amplifier. It is the number of phases that can be
independently addressed and set with the out:ana commands. The number of
phases that are actually output may be different (for instance, when Vo is
automatically calculated from the three phase voltages in the CMC 256 or newer
test set). This is a number of type integer.
<max_out>
Maximum output value of the configuration. It may be in V or A, depending on the
type of the amplifier. Number of type double.
<max_power>
Maximum output power of the configuration (approximate please refer to the
HW manual for exact data), in VA. Number of type double.
<max_out_at_max_power>
Output value for which the maximum power is reached (approximate please
refer to the HW manual for exact data). Number of type double.
<src_amp>
Maximum complementary magnitude (that is, V for I amplifiers and I for V
amplifiers) that the configuration can reach. If the amplifier power curves were
linear, it would happen that <src_amp> * <max_out_at_max_power> =
<max_power>
This value is a double.

240

String Commands

<mode>
Value of type string. It encodes the way the different outputs of the physical
amplifiers involved in the configuration are to be tied together to achieve the
configurations characteristics.
<wiring_id>
Internal OMICRON identifier. It refers to a connection diagram depicting the
connections encoded in <mode>. This field is of integer type.
The correspondence between the <mode> strings and the wiring_id is not 1:1
one string may correspond to several ids if the involved amplifiers change. The
table below provides an example of connection diagram for each of the mode
strings.
{type (amp_no / amp_id), no.}
List of all physical amplifiers involved in the configuration. It is composed of one
or more double entries. Each entry is composed of two parts: an amplifier
descriptor and an amplifier number.
The descriptor is a string, which may be either "amp_no" or "amp_id", if the
amplifier is respectively internal or external. In both cases, the amplifier number
follows, with type integer. If the amplifier is identified as amp_no, the number
corresponds to that returned by the out:cfg? command, whereas for amplifiers
identified as amp_id, the number corresponds to the id returned by amp:scan?
This allows the user to identify the amplifiers and find out whether they are
Voltage or Current amplifiers.
String Phases Description
std

Standard. Each generator is used against N

ser12

Generator 1 is signal, generator 2 is reference.

Example connection diagram

241

OMICRON CMEngine

String Phases Description


ser13

Generator 1 is signal, generator 3 is reference.

ser4

Four generators tied together in series.


Generator 1 in amplifier 1 is signal, generator 1
in amplifier 2 is reference. Generators 2 in both
amplifiers are connected.

gen2

Generator 2 is signal, N is reference.

par1

All three generators tied together are signal, N


is reference.

par3

Each generator tied together in parallel with the


corresponding generators in all amplifiers
involved; 1 with 1, 2 with 2, etc. Also N with N

parser 1

All generators in amplifier 1 tied together are


signal, all generators in amplifier 2 tied together
are reference. Neutrals in both amplifiers are
tied together.

242

Example connection diagram

String Commands

String Phases Description


zero

Three phases plus an automatically calculated


resultant, which is output via an additional
generator. Each phase is active against its
corresponding Neutral.

ser2

For phase 1, Generator 1 is active and


generator 2 is reference. For phase 2, generator
3 is active and the extra generator is reference.

par6

Involves two physical amplifiers. Generators 1,


2 and 3 of both amplifiers, tied together (the 6 of
them) are signal. Both Neutrals tied together are
reference.

ser21

Two single-phase amplifiers (in a CMS251 for


instance) set in series. Generator 1 in amplifier
1 is active, Generator 1 in amplifier 2 is
reference, and both Neutrals are connected.

par31

Three single-phase amplifiers (in a CMS252 for


instance) set in parallel. Generators in amplifiers
1, 2 and 3 are tied together and provide the
signal. All three Neutrals are connected and
provide the reference.

par61

Six single-phase amplifiers (in a CMS252 for


instance) set in parallel. Generators in amplifiers
1, 2 and 3 of both amplifier banks are tied
together and provide the signal. All six Neutrals
are connected and provide the reference.

std31

Three single-phase amplifiers (in a CMS252 for


instance) set as a three-phase system.
Generators in amplifiers 1, 2 and 3 are the three
signals. All three Neutrals are connected and
provide the reference.

Example connection diagram

243

OMICRON CMEngine

Example:
How to parallel the two current triples of a CMA 156 intelligent current amplifier, to obtain a threephase amplifier that can output 50A per phase.
The code would be as follows:
amp:scan?
Result : 1,1,2;
amp:cfg?
Result : 1,14;
amp:cfg?(11)
Result : 1,19,3,5.000000e+001,1.400000e+002,1.500000e+001,1.000000e+001,
par3,5,amp_id,1,amp_id,2;
amp:route(i(2),19)
After scanning the bus for amplifiers, we request the available number of configurations. Ordinarily, we
would have to parse them one by one to find that configuration we are interested in. In this case, we
have gone directly to #11, which is a 3-phase amplifier with maximum output of 50 that involves
external amplifiers 1 and 2 (see the list of amplifiers at the end of the result string) in wiring
configuration par3. Then we route i(2) to <config_ID>
Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence

CMERR_OUT_OF_RANGE The int parameter supplied does not correspond to an existing


configuration
CMERR_COMM

Communication error during command execution.

The configuration(s) of the amplifiers, if any, will not be available until an amp:scan?
command is performed.
See also:
amp:scan? on page 255
amp:def on page 251
amp:route on page 258
out:cfg? on page 239

244

String Commands

4.7.2

amp:cfg?(<amp_id>,firm)

Function

Returns the firmware versions (boot and main) for the specified amplifier.

Description

This command reads the firmware versions from the specified amplifier and
returns them as a string.

Parameter

<amp_id>:
This parameter is of type <integer>.

Answer

The command returns a string that contains the main firmware version and the
boot firmware version.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence

CMERR_OUT_OF_RANGE There is no amplifier with the specified ID


CMERR_COMM

Communication error during command execution.

See also:
amp:cfg?(<amp_id>,addr) on page 245
gps:setup:cfg?(firm) on page 245
Example:
Suppose you have connected a CMA 156 to the CMC you would get an answer like this to the
command amp:cfg?(1,firm): "1,V1.05,V1.01;". This means that the intelligent external amplifier with ID
1 has a boot firmware of version 1.01 and a main firmware of version 1.05.

245

OMICRON CMEngine

4.7.3

amp:def (<amp_no>, ...)

Function

246

Use this command to provide the parameters of an external amplifier or change


the predefined parameters of an internal amplifier. You can also auto-define an
"intelligent" amplifier (not available in the DOS version of CMEngine) or undefine
an amplifier. Because of the significant differences across the four variations of
this command, each variation is described separately.

String Commands

4.7.4

amp:def (<amp_no>, int|ext , v|i, <amplification>, <max_out>, <f_min>,


<f_max>, <t_corr1>, <t_corr2>, <t_corr3>)

Function

Use this command to provide the parameters of an external amplifier or change


the predefined parameters of an internal amplifier.

Description

The command uses the following parameters:

The parameter <amp_no> is the number of the amplifier whose parameters


are specified.

The keywords int or ext define if the amplifier is one of the CMC-internal ones
with output at the front panel or an external one which is connected at the
back of the CMC (socket "Gen. Out X").

The keywords v or i specify if the amplifier is to be defined is a current or a


voltage amplifier.

The parameter <amplification> is the voltage or current amplification of the


amplifier.
The voltage amplification of a voltage amplifier is calculated as follows:

The current amplification of a current amplifier is calculated as follows:

The maximum input voltage is 5Vrms. Through the amplification the scaling
amplitude for the signals is defined which is used with out:ana:mix(mult).

The parameter <max_out> defines the maximum output voltage of the voltage
amplifier (in Volt) or the maximum output current of a current amplifier (in
Ampere) as RMS value of a sine wave. This value is used to limit the possible
amplitude values set by out:ana:a() and has to be smaller than or equal the
scaling amplitude.

The parameters <f_min> and <f_max> define the minimum and maximum
output frequency of the amplifier (in Hz). A minimum frequency of zero Hertz
enables DC for this amplifier.

The parameters <t_corr1>, <t_corr2> and <t_corr3> define the three


corrective propagation delays for the three amplifiers (in seconds).

247

OMICRON CMEngine

The internal amplifiers of the CMC and their parameters are already predefined,
but you can change their parameters. This can be useful if you connect a voltage
or current transformer to a CMC-internal amplifier.
Parameters

<amp_no>:
This parameter is of type <integer>.
<int|ext>:
Here you must specify one of the keywords int or ext.
<v|i>:
Here you must specify one of the keywords v or i.
<amplification>:
This parameter is of type <float>.
<max_out>:
This parameter is of type <float>.
<f_min>, <f_max>:
These parameters are of type <float>.
<t_corr1>, <t_corr2>, <t_corr3>:
These parameters are of type <float>.

The parameters of the internal amplifiers of the CMC are already predefined.
Before you can use an external amplifier, you must define the amplifier with amp:def.
Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_AMP_IN_USE

Amplifier is in use (routed)

CMERR_IN_SEQ_MODE

Command not allowed within sequence

CMERR_INVALID_FLOAT Parameter of type <float> has errors


CMERR_INVALID_INT

Parameter <amp_no> is not an integer

CMERR_MIN_GT_MAX

Min. value of frequency greater than max. value

CMERR_NO_AMP_AVAIL No amplifier available with specified number or location

248

String Commands

4.7.5

amp:def (<amp_no>, int) / amp:def (<amp_no>, ext, <id_list>)

Function

Use this command to auto-define an "intelligent" amplifier. An intelligent amplifier


is an amplifier that is able to communicate with the CMC and to tell its
parameters to the CMC.

Description

The command uses the following parameters:

The parameter <amp_no> is the number of the amplifier to be defined.

The keywords int or ext define if the amplifier is one of the CMC-internal ones
with output at the front panel or an external one which is connected at the
back of the CMC (socket "Gen. Out X").

The parameter <id_list> specifies the IDs of the intelligent external amplifiers.
For an explanation of external amplifier IDs see the amp:scan? command.
Auto-definition of an amplifier means setting its parameters to default values.
You can use this command to reset its parameters after you have overridden the
parameters with the long variant of the amp:def command or to define an
amplifier without explicitly specifying all its parameters.
Auto-definition of external amplifiers is not supported for the DOS version of
CMEngine.
When you want to auto-define an intelligent external amplifier you have to
provide a list of amplifier IDs. Currently only OMICRON amplifiers connected to
the CM Exif board (see also the amp:route command) are considered intelligent.
If <id_list> contains more than one ID, CMEngine tries to "combine" the
amplifiers. This means that CMEngine assumes an amplifier with cumulated
parameters:
Suppose you have connected a CMA 156 to the CMC which consists of two
amplifiers with 25A output current. The amp:scan? command would report two
IDs, 1 and 2. If you define an external amplifier with amp:def (3, ext, 1, 2),
CMEngine assumes that you have an amplifier with 50A output current. The only
thing you would have to do is to connect the corresponding outputs of the
amplifier (L1 of current output A with L1 of current output B and the same for L2,
L3 and N).
The combination is performed successfully when all amplifiers are of the same
type (voltage or current) and have the same amplification.
The other parameters are merged in the following way: output values are
summed up, the minimum frequency is set to the highest of a values, the
maximum frequency is set to the lowest of all values and the corrective
propagation delays are set to the average value of all amplifiers.
Parameters

<amp_no>:

249

OMICRON CMEngine

This parameter is of type <integer>.


<int|ext>:
Here you must specify one of the keywords int or ext.
<id_list>
This parameter is of type <enumeration>.
The parameters of the internal amplifiers of the CMC are already predefined.
Before you can use an external amplifier, you must define the amplifier with amp:def.
Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_AMP_IN_USE

Amplifier is in use (routed)

CMERR_IN_SEQ_MODE

Command not allowed within sequence

CMERR_INVALID_INT

Parameter <amp_no> is not an integer

CMERR_NO_AMP_AVAIL No amplifier available with specified number or location

250

String Commands

4.7.6

amp:def ([<amp_no>,] clr|clrnooff)

Function

Use this command to undefine an amplifier.

Description

The command uses the following parameters:

The parameter <amp_no> is the number of the amplifier you want to


undefine.
The result of this command is that an amplifier with number <amp_no> is not
available for an amp:route command. If this amplifier is currently routed, the
clear does not take place and the error code CMERR_AMP_IN_USE is returned.
To make an amplifier with number <amp_no> available again use the amp:def
command as described above.
If the keyword clrnooff is specified, the amplifier parameters are cleared, but the
amplifier itself is not turned off. This reduces the wear of the equipment due to
on/off cycles.
Please note that the output signals are removed with both keywords, it is only the
amplifiers power supply that is turned off (clr) or not (clrnooff).
If no amplifier number is provided, the clr or clrnooff keyword applies to all
amplifiers.
Parameter

<amp_no>:
This optional parameter is of type <integer>.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_OUT_OF_RANGE The desired amplifier is not defined


CMERR_AMP_IN_USE

Amplifier is in use (routed)

CMERR_IN_SEQ_MODE

Command not allowed within sequence

CMERR_INVALID_INT

Parameter <amp_no> is not an integer

251

OMICRON CMEngine

4.7.7

amp:def(off)

Function

Turns off unused external amplifiers.

Description

When this command is issued, all external amplifiers that are currently not
defined will be turned off.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_EXT_AMP_COMM Communication error with an external amplifier.

252

String Commands

4.7.8

amp:def? [(<amp_no>[,harm])]

Function

Returns the parameters of an amplifier or a list of all defined amplifiers.

Description

The number of the desired amplifier can be specified as parameter <amp_no>.


The command then returns the amplifier's parameters.
When no amplifier number is specified, a list of all defined amplifiers (predefined
or user-defined with amp:def) is returned. After startup of the CMEngine the
amplifier list only contains the internal amplifiers of the CMC.

Parameter

<amp_no>:
This parameter is of type <integer> and is optional.

Answer

When an amplifier number is specified, the command returns a string that


contains the CMC device number and the following information (the parameters
and their types are explained with the amp:def command):
<int| ext>
Internal or external amplifier.
<v|i>
Type of amplifier (voltage or current).
<-|A|B>
Amplifier output group.
<amplification>
Amplification factor.
<max_out>
Maximum voltage for a voltage amplifier (in V) or maximum current for a current
amplifier (in A)
<f_min>, <f_max>
Minimum and maximum frequency (in Hz).
<t_corr1>, <t_corr2>, <t_corr3>
The 3 corrective propagation delays of the amplifier (in seconds).
<device_type>
Device type string (OMICRON amplifiers only).
<ser_no>
Serial number (OMICRON amplifiers only).

253

OMICRON CMEngine

The amplifier output group refers to the output sockets of the amplifier: All
amplifiers that do not have more than one amplifier of the same type in the same
case return "-". The others return "A" for output group A and "B" for output group
B.
With the harm keyword, the command returns the maximum frequency for
harmonic signals of the specified amplifier.
When no amplifier number is specified the command returns a string that
contains the CMC device number and a list of all defined amplifiers in or
connected to a CMC. For every amplifier the following information is returned:
<amp_no> Amplifier number
Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_OUT_OF_RANGE The desired amplifier is not defined


CMERR_IN_SEQ_MODE

Command not allowed within sequence

CMERR_INVALID_INT

Parameter <amp_no> is not an integer

See also: command amp:def on page 251


Examples:
The command amp:def? returns the string "1,1,2;". This means that the CMC with device number 1
contains the definitions of an amplifier 1 and an amplifier 2. You can thus route generator triples to the
amplifiers 1 or 2.
The command amp:def?(1) returns "1,int,v,-,2.5000E+001,1.2500E+002,0,1.000E
+003,0,0,0,CMC 56,DA345D;". This means that in CMC #1 the amplifier #1 is a voltage amplifier with
an amplification factor of 25, its maximum output voltage is 125V, the frequency range is from 0 to
1000 Hz and the corrective propagation delays are all zero.
The command amp:def?(1,harm) returns the string "1,3.000000E+003;". This means that the
amplifier 1 in the CMC with device number 1 can output harmonic signals up to 3 kHz.

254

String Commands

4.7.9

amp:scan?

Function

Searches for intelligent external amplifiers and returns a list of IDs.

Description

This command searches for connected intelligent external amplifiers. Currently


only OMICRON amplifiers connected to the CM Exif board (see also the
amp:route command) are considered intelligent. Each amplifier found is assigned
an ID for further reference.
These IDs are integer values and are not necessarily consecutive. If the optional
parameter list is specified the scan is only done at the first call. Further calls will
only return the ID list.

This command performs a lengthy operation. It typically lasts more than 10 s.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE Command not allowed within sequence


CMERR_AMP_IN_USE

Amplifier is in use. This error code is returned if any intelligent amplifier


is defined using the amp:def command.

See also
command amp:param? on page 256
command amp:def on page 251
Examples:
Suppose you have connected a CMA 156 to the CMC, which consists of two amplifiers, you would get
the following answer to the command amp:scan?: "1,1,2;". This means that two intelligent external
amplifiers are connected to the CMC #1 and the IDs are 1 and 2.

255

OMICRON CMEngine

4.7.10 amp:param? (<id> [,cal])


Function

Returns the parameters of an intelligent external amplifier.

Description

The ID of the desired external amplifier can be specified as parameter <id>. The
command then returns the amplifier's parameters. If the optional keyword cal is
specified, the command returns the date of the last factory calibration of the
device.

Parameter

<id>:
This parameter is of type <integer>.

Answer

Without the cal keyword, the command returns a string that contains the CMC
device number and the following information (the parameters and their types are
explained with the amp:def command):
<int|ext>
Internal or external amplifier.
<v|i>
Type of amplifier (voltage or current).
<-|A|B>
Amplifier output group.
<amplification>
Amplification factor.
<max_out>
Maximum voltage for a voltage amplifier (in V) or maximum current for a current
amplifier (in A)
<f_min>, <f_max>
Minimum and maximum frequency (in Hz).
<t_corr1>, <t_corr2>, <t_corr3>
The 3 corrective propagation delays of the amplifier (in seconds).
<device_type>
Device type string.
<ser_no>
Serial number (OMICRON amplifiers only).

256

String Commands

The amplifier output group refers to the output sockets of the amplifier: All
amplifiers that do not have more than one amplifier of the same type in the same
case return "-". The others return "A" for output group A and "B" for output group
B.
With the cal keyword, the command returns a string that contains the CMC
device number, followed by the year, month and day of the last factory
calibration, separated by commas. The three numbers are of type <int>.
Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_OUT_OF_RANGE There is no amplifier with the specified ID


CMERR_IN_SEQ_MODE

Command not allowed within sequence

See also:
command amp:scan? on page 255
command amp:def on page 246
Example:
Suppose you have connected a CMA 156 to the CMC, which consists of two amplifiers with 25A
output current, you would get the following answer to the command amp:param?(1):
"1,ext,i,A,1.000E+1,2.500E+1,0.000E+0,1.000E+3,5.944E-5, 5.944E-5, 5.944E-5,CMA156,BF176A;".
This means that the amplifier with ID 1 is a current amplifier CMA 156 with serial number BF176A and
output on the output group A. The amplification factor is 10, its maximum output current is 25A, the
frequency range is from 0 to 1000 Hz, the corrective propagation delay is 59.44s.

257

OMICRON CMEngine

4.7.11 amp:route(clr|clrnooff)
Function

Clears the routings of all triples.

Description

With this command it is possible to clear the routings of all triples, whether they
are routed to amplifiers or to amplifier configurations.
You can replace the keyword clr by clrnooff; in this case, if the triple was routed
to an amplifier configuration, the physical amplifier(s) are not turned off when the
virtual amplifiers definition is cleared. Please note that the output signals are
removed with both keywords, it is only the amplifiers power supply that is turned
off (clr) or not (clrnooff).

Parameters

Keyword clr or clrnooff.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE Command not allowed within sequence


See also:
amp:route (v|i (<triple_no>), <amp_no>|clr |clrnooff) on page 259

258

String Commands

4.7.12 amp:route (v|i (<triple_no>), <amp_no>|clr|clrnooff)


Function

With this command you can define which generator triple <triple_no> (voltage or
current triple) is logically connected to which amplifier <amp_no>, i.e. to which
outputs.

Description

This command connects the three logical generators of a generator triple


(voltage or current triple) to an amplifier, i.e. to three outputs of the CMC or of an
external amplifier.
The table below shows the relationship between the amplifier number <amp_no>
and the outputs for the three generators (see also chapter "Block diagram of
Generators/Outputs of the CMC 56 on page 487 in the appendix).
You can replace the parameter <amp_no> by the keyword clr to clear the
connection between the generator triple <triple_no> and its currently routed
amplifier or amplifier configuration. This generator triple's routing is explicitly set
to "undefined". If the triple was routed to an amplifier configuration, the
corresponding virtual amplifiers definition is also cleared.
You can replace the parameter <amp_no> by the keyword clrnooff; in this case,
if the triple was routed to an amplifier configuration, the physical amplifier(s) are
not turned off when the virtual amplifiers definition is cleared. Please note that
the output signals are removed with both keywords, it is only the amplifiers
power supply that is turned off (clr) or not (clrnooff).

Parameters

<v|i>:
For this parameter you must specify one of the keywords v or i.
<triple_no>:
This parameter is of type <integer>.
<amp_no>:
This parameter is of type <integer>; it can be replaced by the keywords clr and
clrnooff.

Before you can use the amp:route command to route a generator triple to an external
amplifier, you must use the amp:def command to define the parameters of this external
amplifier. This does not apply to amplifier configurations (see amp:cfg?[(cfg_no)]
command).

259

OMICRON CMEngine

Due to the hardware architecture of a CMC, there are two restrictions for the routing (see
also chapter "Block diagram of Generators/Outputs of the CMC 56 on page 487 in the
appendix).
The outputs "Voltage 1-3" (front panel) and the outputs for external amplifiers "Gen.Out
4-6" (back panel) are mutual exclusive, i.e. you can only use one of these output groups
at the same time.
The same is valid for the outputs "Current 1-3" (front panel) and the outputs for external
amplifiers "Gen.Out 1-3" (back panel).

Amplifier number

Name of the related outputs


in case of an internal
amplifier

Name of the related outputs


in case of an external
amplifier

Banana sockets "Voltage 1-3"


or big, black socket (Neutrik
socket)

Socket "Gen. Out 1-6" (contacts


4, 5 and 6).

Banana sockets "Current 1-3"


or big, black socket (Neutrik
socket)

Socket "Gen. Out 1-6" (contacts


1, 2 and 3).

Socket "Gen. Out 7-12"


(contacts 7, 8 and 9).(Only
available with CM Exif board
installed!)

Socket "Gen. Out 7-12"


(contacts 10, 11 and 12). (Only
available with CM Exif board
installed!)

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_AMP_IN_USE

The amplifier is already routed to a different triple

CMERR_IN_SEQ_MODE

Command not allowed within sequence

CMERR_INVALID_INT

Parameter <triple_no> or <amp_no> is not an integer

CMERR_KINDS_DONT_MATCH The parameters <triple_no> and <amp_no> are not of the same
generator type (voltage gen./ current gen.)

260

String Commands

See also:
command amp:def on page 246
command amp:cfg? [(<cfg_no>)] on page 239
Example:
amp:route (i(1), 2)
This command routes the generator triple 1 for current output to amplifier number 2. This means that
the generators i(1:1), i(1:2) and i(1:3) are routed to the outputs "Current 1-3" on the front panel of the
CMC or to the outputs "Gen.Out 1-3" at the back panel of the CMC.

261

OMICRON CMEngine

4.7.13 amp:route? ( v|i, <triple_no>)


Function

Use this command to get the current route settings of a voltage or current triple
(predefined settings or settings set with amp:route).

Description

The type of the triple (voltage or current triple) is specified with the keywords v or
i and the number of the generator triple is passed to CMEngine as parameter
<triple_no>.
The command returns the number of the amplifier the logical generator triple is
routed to.

Parameters

<v|i>:
Here you must specify one of the keywords v or i.
<triple_no>:
This parameter is of type <integer>.

Answer

The command returns a string that contains the CMC's device number and the
generator triple of type <integer>.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE Command not allowed within sequence


CMERR_INVALID_INT

Parameter <triple_no> is not an integer

See also:
command amp:route on page 258
Example:
The command amp:route?(v(1)) returns the string "1,1;". This means that in CMC #1 the voltage
generator triple 1 is routed to amplifier 1.

262

String Commands

4.7.14 amp:range(v|i(<triple_no>), <range>)


Function

This command selects an amplifier range in the CMC.

Description

Use this command to tell the CMC which maximum amplitude (rms) is needed.
The CMC automatically selects the appropriate range.
This command internally executes the out:ana:<triple_no>:clr command. The
keywords v or i specify the type of the amplifier (voltage or current amplifier). The
parameter <triple_no> specifies the number of the generator triple. The
parameter <range> specifies the maximum rms value that is needed on this
amplifier output. The CMC will select the smallest range that fits the specified
value.
If you know the maximum value that will be output during usage, the use of this
command allows the amplifier to optimally operate for the set range.

Parameters

<v|i>:
Here you must specify one of the keywords v or i.
<triple_no>:
This parameter is of type <integer>.
<range>:
This parameter is of type <float>.

Changing the range of a triple will affect all triples that are routed to an amplifier using the
same power supply.
For example: i(1) is routed to current amplifier A, i(2) to current amplifier B. The changes you
set for range for i(1) will also apply to i(2). For details check the according user manual of
your CMC test set.
Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence

CMERR_INVALID_FLOAT Parameter <range> has errors


CMERR_INVALID_INT

Parameter <triple_no> is not an integer

263

OMICRON CMEngine

See also:
command amp:range? on page 263
Compatibility: Win32

264

String Commands

4.7.15 amp:range?(v|i(<triple_no>))
Function

Returns the currently selected amplifier range and a list of possible ranges.

Description

Parameters:
The keywords v or i specify the type of the amplifier (voltage or current amplifier).
The parameter <triple_no> specifies the number of the generator triple.

Parameters

<v|i>:
Here you must specify one of the keywords v or i.
<triple_no>:
This parameter is of type <integer>.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence

CMERR_INVALID_FLOAT Parameter of type <float> has errors


CMERR_INVALID_INT

Parameter <triple_no> is not an integer

See also:
command amp:range on page 263
Example:
The command amp:range?(i(1)) returns the string
"1,1.250000E+001,1.250000E+000,1.250000E+001;"
when executen on a CMC156EP. This means that the currently selected range is 12.5A and that there
are 2 ranges, one 1.25A and one 12.5A.
Compatibility: Win32

265

OMICRON CMEngine

4.7.16 amp:ctrl (i (<triple_no>), <v_ctrl>)


Function

This command executes a power optimization of an amplifier for a specific CMC


application.

Description

The command optimizes the output power of the three generators of a voltage or
current triple for a specific application. Use this command to tell the CMC which
maximum voltage you need for your application and the CMC automatically
optimizes the power output for this case.
Parameters:
- The keyword i specifies the current amplifier (this command is not supported for
voltage amplifiers).
- The parameter <triple_no> specifies the number of the generator triple.
- The parameter <v_ctrl> specifies the peak no-load output voltage (in V) of the
amplifier outputs.

Parameters

<i>:
Here you must specify the keyword i.
<triple_no>:
This parameter is of type <integer>.
<v_ctrl>:
This parameter is of type <float>.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence

CMERR_INVALID_FLOAT

Parameter of type <float> has errors

CMERR_INVALID_INT

Parameter <triple_no> is not an integer

CMERR_NOT_SUPPORTED

Command is not supported on this device

CMERR_NO_YET_IMPLEMENTED Command is not yet implemented.


This error code is returned only when the triple is routed to an
intelligent external amplifier.

266

String Commands

4.7.17 amp:ctrl? (v|i , <triple_no>)


Function

Gets the settings specified with the amp:ctrl command.

Description

The type of amplifier v or i and the number of the generator triple <triple_no>
must be specified. Then the command returns the current value of the parameter
<v_ctrl> for a voltage or current amplifier (specified before with the command
amp:ctrl) as well as the valid range of the <v_ctrl> setting.

Parameters

<v|i>:
Here you must specify one of the keywords v or i..
<triple_no>:
This parameter is of type <integer>.

Answer

The device number, the current, minimum and maximum voltage (type <float>).
If the amp:ctrl command is not supported for this device, the min and max return
values are zero.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE Command not allowed within sequence


CMERR_INVALID_INT

Parameter <triple_no> is not an integer

See also:
command amp:ctrl on page 266
Example:
The command amp:ctrl? (i(1)) returns the string:
"1,5.600E+000,3.000E+000,6.000E+000;".
Thus the current generators of generator triple i(1) in CMC #1 supply a peak no-load output voltage of
5.6V. The valid range is 3V to 6V. If the same command is executed on an CMC 56, the answer would
be "1,0.000E+000,0.000E+000,0.000E+000;". This means that power control is not supported.

267

OMICRON CMEngine

4.7.18 amp:reset(<amp_id>)
Function

Performs a reset on an external amplifier.

Description

This command performs a reset on the specified intelligent external amplifier.

Parameters

<amp_id>:
This parameter is of type <integer>.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence

CMERR_OUT_OF_RANGE There is no amplifier with the specified ID


CMERR_COMM

Communication error during command execution

See also:
command gps:reset on page 321
Example:
Suppose you have connected a CMA 156 to the CMC then the command amp:reset(1) will perform a
reset on the amplifier with the ID 1.

268

String Commands

4.8

Input Commands

The following commands are related to the analog and binary inputs of a device: measurements,
querying of configuration data, etc. Analog inputs are available in the CMC devices, while the binary
inputs may be physically located in a CMC or in an IO expansion module (CMB).
In the binary input commands, the <inp_module_idx> parameter contained in them is a number
(starting at 1) identifying a "virtual" input module. "Virtual" means that it not only stands for real input
modules of the CMB but also all other kinds of inputs like the inputs on the front panel of a CMC. The
exact details about this virtual module can be retrieved by using the inp:bin(<inp_module_idx>):cfg?
command. When there is a CMC with a connected CMB the available virtual input modules consist of
both the CMC internal inputs (accounting for one virtual module) and the input modules of the CMB.
In the left side table of contents find the input command of your choice and click the corresponding
entry.

269

OMICRON CMEngine

4.8.1

inp:[ana:]v|i(<input_list>):get?[(all)]

Function

Measures the voltage/current in one or more DC analog inputs and return the
results.

Description

This command measures the voltage/current at one or more analog DC inputs.


The inputs for which the measurement is to be performed are specified in
<input_list>.
The number of existing DC analog voltage and current inputs can be queried with
the inp:cfg? command.

Parameters

<input_list>:
This parameter is of type <enumeration>.
all:
Causes the validity of the measurement to be returned after the actual
measurement. See command inp:ana:get?(<command handle>) for the
meaning of the validity flags.

Answer

Returns the measurement data as one or more values of type <float>. When a
voltage measurement was executed, the return value is in Volts and when a
current measurement was executed the return value is in Amperes. If the
parameter all has been specified, each measurement is followed by an <integer>
with the validity flags.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE Command not allowed within sequence


CMERR_INVALID_INT

Parameter <input_list> contains a number that is not an int

CMERR_DCTASK_OFF

The DC task has been turned off no measurement is possible

If the DC task is turned off in a CMC 256 or newer test set, the command will fail. In a
CMC 156, it is not possible to turn off the DC task, even if the inp:ana:dc(off) command will
be accepted.
See also:
inp:cfg? on page 317
inp:ana:dc(on|off) on page 298

270

String Commands

Examples:
inp:i(1):get?
Answer: "1, 0.145E-001;"
The DC current input 1 returned a current of 14.5 mA.
inp:v(1):get?(all)
Answer: "1, 1.000E+001,0;"
The DC voltage input 1 measured 10V. The measurement is valid.

271

OMICRON CMEngine

4.8.2

inp:[ana:]v|i(<input_list>):range?

Function

Returns the selected and possible ranges of one or more DC analog inputs.

Description

This command replaces inp:[ana:]v|i (<input_list>):param?, which is now


obsolete. It returns the currently selected range followed by the list of available
ranges.

Parameters

<input_list>:
Comma separated list of the DC analog inputs on which the command applies.
The maximum number for the analog voltage and current input can be queried by
the inp:cfg? command.
v:
Means the analog DC voltage inputs are read. Results are returned as a floating
point number in Volts.
i:
Means the analog DC current inputs are read. Results are returned as a floating
point number in Amps.

Answer

The returned string contains the device number, followed by a series of floating
point numbers. The first number is the selected range, and the numbers that
follow are the available ranges. All DC inputs are symmetrical, and can measure
from -<range> to +<range>.

See also:
inp:[ana:]v|i(<input_list>):range(<range>) on page 273
Example:
inp:ana:i(1):range?
Result: 1,2.000000e-002,1.000000e-003,2.000000e-002;
The example shows that the currently selected range is 20 mA and the available ranges are 1 mA and
20 mA. This is the case for a CMC 256.

272

String Commands

4.8.3

inp:[ana:]v|i(<input_list>):range(<range>)

Function

Sets the range of the current or voltage analog DC input. Some CMCs only have
one range (in which case this command will have no effect). You can use the
inp:[ana:]v|i(<input_list>):range? command to see how many ranges are
supported beforehand.

Parameters

<input_list>:
Comma separated list of the DC analog inputs on which the command applies.
The maximum number for the analog voltage and current input can be queried by
the inp:cfg? command.
v:
Means the analog DC voltage input is read. Results are returned as a floatingpoint number in volts.
i:
Means the analog DC current input is to be read. Results are returned as a
floating-point number in amps.
<range>
Floating point number. Specifies the range. The next equal or higher range is
selected. If it is above the maximum then and error will be returned.

See also:
inp:[ana:]v|i(<input_list>):range? on page 272
Example:
inp:ana:i(1):range(0.001)
Sets the range of the DC current input to 1mA.

273

OMICRON CMEngine

4.8.4

inp:bin:cfg?

Function

Gets the number of available input modules.

Description

Use this command to get the number of input modules available in a device.

Answer

An integer number is returned that represents the number of input modules


available in the addressed device.

See also:
inp:bin(<inp_module_idx>):cfg? on page 275
inp:bin(<inp_module_idx>:<group_idx>):cfg? on page 277
Example:
Command: inp:bin:cfg?
Answer:"1,1;"
Device 1 has 1 binary input module.

274

String Commands

4.8.5

inp:bin(<inp_module_idx>):cfg?

Function

Gets configuration information for the selected input module.

Description

Use this command to get a complete description of each input module in the
addressed device.

Parameter

<inp_module_idx>
The integer id of the input module for which the information is desired. This value
must be greater than 0, and smaller or equal than the value returned by the
inp:bin:cfg? command.

Answer

<dev_id>,<#groups>,<loc>,<loc_idx>,<mod_type>,<mod_ser_no>,<hard_ver>,<
dev_type>,<dev_ser_no>;
The return string contains the CMCs device number, plus the following data for
the selected input module:
Number of Groups
The binary inputs are divided in groups. All inputs in a group share debounce
and deglitch times, and can be addressed as one for the inp:bin:def commands.
Location of Inputs
String describing the location of the inputs in the device. The following values
can be returned:
front - Inputs situated in the front panel of the device
back - EXIF/EXTOP board on the back of the device
slot - Inputs mounted in a backplane slot
Location Index
1 for "front" and "back", mounting slot number for "slot". The slots are numbered
starting at 1.
Module Type
The kind of input module where the inputs are located. For instance: INP1-24
Module Serial Number
The serial number of the input module. Please note that the input modules have
serial numbers independent from those of the device that hosts them.
Hardware Version
The version number of the hardware.
Device Type

275

OMICRON CMEngine

Type of device in which the inputs are included. For instance, CMC 256-6, CMB
IO-7, etc.
Device Serial Number
The serial number of the host device.
See also:
inp:bin:cfg? on page 274
inp:bin(<inp_module_idx>:<group_idx>):cfg? on page 277
Example:
Command: inp:bin(1):cfg?
Answer: "1,10,front,1,CMC256-6,BJ611F,0,CMC256-6,BJ611F;"
Module 1 has 10 input groups and is located in the front of the device. The location index is 1. Module
type and serial number are the same as those of the host CMC 256.

276

String Commands

4.8.6

inp:bin(<inp_module_idx>:<group_idx>):cfg?

Function

Gets configuration information for the selected input group.

Description

Use this command to get a complete description of each input group within a
given module.

Parameters

<inp_module_idx>
The integer id of the input module for which the information is desired. This value
must be greater than 0, and smaller or equal than the value returned by the
inp:bin:cfg? command.
<group_idx>
Integer id of the input group within the input module for which information is
desired. This value must be greater than 0, and smaller or equal than the value
returned by the inp:bin(<inp_module_idx>):cfg? command (return field
<#groups>).

Answer

<dev_id>,<#inp>,<nom_min>,<nom_max>,<thres_min>,<thres_max>,<thres_gra
n>, <gnd_conn>,<common>,<res_group_type>,<res_group_idx>,<func>[,];
The return string contains the CMCs device number, plus the following data for
the selected input group:
Number of Inputs
Number of binary inputs in this group (integer).
Minimum Nominal Value
Floating point value representing the minimum value the input can accept (in
VDC).
Maximum Nominal Value
Floating point value representing the maximum value the input can accept (in
VDC).
Minimum Threshold Value
Floating point value representing the minimum sensing threshold that can be
programmed for the inputs in this group (in VDC).
Maximum Threshold Value
Floating point value representing the maximum sensing threshold that can be
programmed for the inputs in this group (in VDC).
Threshold granularity
String indicating the minimum unit for which the threshold is independently
settable. The following values can be returned:

277

OMICRON CMEngine

group - There is one single ground connector for the whole group.
single - Each input has its own ground connector.
Please note that in the single case, the existence of a separate ground connector
for each input does not necessarily mean that such grounds are electrically
independent too. The CMC 256, for instance, has a separate ground connector
for each input, but each two inputs share a common ground.
Common
String indicating the polarity of the common ground connector. It must be one of
the following values:
neutral - Common ground connector is neutral.
plus - Common ground connector is positive.
Resource group type
String indicating the resource group of this input group. It must be one of the
following values:
bininp - Resource group rgtBinInp.
multiinp - Resource group rgtMultiInp.
Resource group index
Integer value of the index for this groups resource group.
Input functions
Comma-separated list of the functions that the inputs in the group support. The
list will include one or more of the following strings:
bin - Binary input function (including voltage-sensing).
count - Pulse counter function.
v - Voltage measuring function.
i - Current measuring function.
See also:
inp:bin:cfg? on page 274
inp:bin(<inp_module_idx>):cfg? on page 275
Examples:
Command: inp:bin:cfg?
Answer: "1,1;"
The device (a CMC 156 in this case) has 1 input module..
Command: inp:bin(1):cfg?
Answer: "1,2,front,1,CMC156-EP,DB011D,0,CMC156-EP,DB011D;"
The module has 2 input groups and is located in the front of the device. As is the case with CMC
devices, the modules type and serial number are the same as the CMCs.

278

String Commands

Command: inp:bin(1:1):cfg?
Answer: "1,4,0.000000E+000,2.500000E+002,7.220574E-002,1.798000E+002,single,single,bininp,
1,bin,count;"
Group 1 has 4 inputs, with range from 0 to 250V, threshold settable from 0.0722V to 179.8V,
independently for each input. Each input has a separate ground connector, and they are capable of
binary detection and pulse counting.
Command: inp:bin(1:2):cfg?
Answer: " 1,6,0.000000E+000,2.500000E+002,7.220574E-002,1.798000E+002,single,single,bininp,
2,bin,count;"
Group 2 has 6 inputs, with same characteristics as those in group 1.
It will be remembered that, in a previous example, the CMC 256 turned out to have 10 groups, each
comprising just one input. Therefore, in the CMC 256 each input must be individually configured, while
in the CMC 156 it is possible (but not compulsory) to assign values to several inputs at the same time

279

OMICRON CMEngine

4.8.7

inp:bin(<inp_module_idx>):get?

Function

Gets the states of the selected modules binary inputs.

Description

Use this command to get the states of all binary inputs in a module.

Parameter

<inp_module_idx>
The integer id of the input module for which the input state must be read. This
value must be greater than 0, and smaller or equal than the value returned by the
inp:bin:cfg? command.

Answer

A decimal number is returned that represents a 32 bit integer value. Bit 0 (LSB)
indicates the state of binary input 1; bit 1 indicates the state of binary input 2 etc.
If the module had fewer than 32 inputs, the bits corresponding to the non-existing
inputs would be 0 (see the following table).

Bit

15 14 13 12 11 10 9

8 7 6 5 4 3 2 1 0

Input 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE Command not allowed within sequence


See also:
inp:bin[(<inp_module_idx>)]:diff(reset) on page 282
inp:bin(<inp_module_idx>):diff? on page 281
Example:
Command: inp:bin(1):get?
Answer: "1,44;"
The inputs 3,4 and 6 in module 1 are set and the others are cleared.

280

String Commands

4.8.8

inp:bin(<inp_module_idx>):diff?

Function

Gets the change mask of the selected modules binary inputs.

Description

Use this command to get a bit-mask representing the binary inputs that have
changed states since the last inp:bin[(<inp_module_idx>)]:diff(reset)
command.

Parameter

<inp_module_idx>
Integer id of the input module for which the bit mask is requested. This value
must be greater than 0, and smaller or equal than the value returned by the
inp:bin:cfg? command.

Answer

A decimal number is returned that represents a 32 bit integer value. Bit 0 (LSB)
represents binary input 1; the bit is set if the inputs state has changed since the
last inp:bin[(<inp_module_idx>)]:diff(reset) command, cleared otherwise.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence

CMERR_NOT_SUPPORTED Command not supported in this device


See also:
inp:bin[(<inp_module_idx>)]:diff(reset) on page 282
Example:
Command: inp:bin(1):diff?
Answer: "1,1;"
Only binary input 1 changed state since the last inp:bin[(<inp_module_idx>)]:diff(reset) command
was issued.

281

OMICRON CMEngine

4.8.9

inp:bin[(<inp_module_idx>)]:diff(reset)

Function

Clears the change mask of the selected modules binary inputs.

Description

Use this command to reset the state-change memory for a given module, or for
all modules in a device.

Parameter

<inp_module_idx>
The integer id of the input module for which the change memory must be
cleared. This value must be greater than 0, and smaller or equal than the value
returned by the inp:bin:cfg? command. If the parameter is omitted then all input
modules in the addressed device are reset.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence

CMERR_NOT_SUPPORTED Command not supported in this device

See also:
inp:bin(<inp_module_idx>):diff? on page 281

282

String Commands

4.8.10 inp:bin(<inp_module_idx>:<group_idx>):debounce(<deb_time>)
Function

Sets the debounce time for all inputs in the selected group.

Description

After a change in a given binary input, the device starts counting the debounce
time for that input. During that time, all changes in the input are ignored.

Parameters

<inp_module_idx>
Integer id of the targeted input module. This value must be greater than 0, and
smaller or equal than the value returned by the inp:bin:cfg? command.
<group_idx>
Integer id of the input group within the input module for which we want to set the
debounce time. This value must be greater than 0, and smaller or equal than the
value returned by the inp:bin(<inp_module_idx>):cfg? command (return field
<#groups>).
<deb_time>
This floating point parameter represents the debounce time in seconds. A value
of 0 disables the feature. The maximum debounce time is 25.6ms (higher values
can be set without receiving an error message but are internally cut down do
25.6ms). Setting the debounce time changes the time resolution of the binary
inputs as shown in the following table.

Debounce time Time resolution


0 - 3.2 ms

100 s

3.2 - 6.4 ms

200 s

6.4 - 12.8 ms

400 s

12.8 - 25.6 ms

800 s

This command is not supported in CMC 156 and CMC 56 devices. The command will be
accepted for these devices, but it will have no effect.
See also:
inp:bin(<inp_module_idx>:<group_idx>):debounce? on page 284

283

OMICRON CMEngine

4.8.11 inp:bin(<inp_module_idx>:<group_idx>):debounce?
Function

Requests debounce information for the selected group.

Description

Use this command to get the debounce parameters for the selected input group.

Parameters

<inp_module_idx>
Integer id of the targeted input module. This value must be greater than 0, and
smaller or equal than the value returned by the inp:bin:cfg? command.
<group_idx>
Integer id of the input group within the input module for which we want to query
the debounce time. This value must be greater than 0, and smaller or equal than
the value returned by the inp:bin(<inp_module_idx>):cfg? command (return
field <#groups>).

Answer

<dev_id>,<deb_time>,<deb_res>;
The return string contains the CMCs device number, plus the following data for
the selected input group:
Debounce Time
Debounce time in seconds (floating point).
Debounce Resolution
Floating point value representing the debounce resolution in seconds.

In CMC 156 and CMC 56 devices, the command will return 100e-6 seconds, which is the
sampling rate of the binary inputs.
See also:
inp:bin(<inp_module_idx>:<group_idx>):debounce(<deb_time>) on page 283

284

String Commands

4.8.12 inp:bin(<inp_module_idx>:<group_idx>): deglitch (<degl_time>)


Function

Set the deglitch time for all inputs in the selected group.

Description

After a change in a given binary input, the device starts counting the deglitch
time for that input. During that time, the input must not change again. Pulses with
width shorter than the deglitch time are not considered. When the deglitch
feature is active, changes in all binary inputs are recorded with a delay equal to
the deglitch time. This affects all information and operations involving binary
inputs, including trigger conditions.

Parameters

<inp_module_idx>
Integer id of the targeted input module. This value must be greater than 0, and
smaller or equal than the value returned by the inp:bin:cfg? command.
<group_idx>
Integer id of the input group within the input module for which we want to set the
deglitch time. This value must be greater than 0, and smaller or equal than the
value returned by the inp:bin(<inp_module_idx>):cfg? command (return field
<#groups>).
<degl_time>
This floating point parameter represents the deglitch time in seconds. A value of
0 disables the feature.

This command is not supported in CMC 156 and CMC 56 devices. The command will be
accepted for these devices, but it will have no effect.
See also:
inp:bin(<inp_module_idx>:<group_idx>):deglitch? on page 286

285

OMICRON CMEngine

4.8.13 inp:bin(<inp_module_idx>:<group_idx>):deglitch?
Function

Requests deglitch information for the selected group.

Description

Use this command to get the deglitch parameters for the selected input group.

Parameters

<inp_module_idx>
Integer id of the targeted input module. This value must be greater than 0, and
smaller or equal than the value returned by the inp:bin:cfg? command.
<group_idx>
Integer id of the input group within the input module for which we want to query
the deglitch time. This value must be greater than 0, and smaller or equal than
the value returned by the inp:bin(<inp_module_idx>):cfg? command (return
field <#groups>).

Answer

<dev_id>,<degl_time>,<degl_res>;
The return string contains the CMCs device number, plus the following data for
the selected input group:
Deglitch Time
Deglitch time in seconds (floating point).
Deglitch Resolution
Floating point value representing the deglitch resolution in seconds.

In CMC 156 and CMC 56 devices, the command will return 0, since the feature is not
available.
See also:
inp:bin(<inp_module_idx>:<group_idx>):deglitch(<degl_time>) on page 285

286

String Commands

4.8.14 inp:bin(<inp_module_idx>:<group_idx>[:<inp_idx>]):def(pf|<threshold>)
Function

Configures the sensing mode of the binary inputs.

Description

This command sets the configuration parameters for all the inputs in the group,
or for an individual input. The user can either configure the inputs as potential
free, using the keyword pf, or as potential sensing by specifying a threshold
value. This command should always be issued prior to using any input as a
binary input.

Parameters

<inp_module_idx>
Integer id of the targeted input module. This value must be greater than 0, and
smaller or equal than the value returned by the inp:bin:cfg? command.
<group_idx>
Integer id of the input group within the input module whose inputs we want to
configure. This value must be greater than 0, and smaller or equal than the value
returned by the inp:bin(<inp_module_idx>):cfg? command (return field
<#groups>).
<inp_idx>
Integer id of the individual input to configure. This optional parameter is only
allowed for setting thresholds, and then only if the inputs can be individually
programmed (see the return string for the
inp:bin(<inp_module_idx>:<group_idx>):cfg? command), return field
<thres_gran>.
<threshold>
Floating point number in volts. Specifies the binary threshold. A DC voltage on
this input greater than or equal to the threshold will be taken to be a '1', a voltage
less than the threshold will be taken to be a '0'.
pf
By specifying the keyword pf the input is configured as "potential free".

In a CMC 256 or newer test set, a potential-sensing input can be used as an analog input,
and the measurement tasks can be started on it. Trying to start a measurement task in a
potential-free input will cause an error.
See also: inp:bin(<inp_module_idx>:<group_idx>[:<inp_idx>]):def? on page 289

287

OMICRON CMEngine

Examples:
inp:bin(1:1:1):def(10.0)
Configures input 1 in group 1 in module 1 as a potential sensing binary input with 10V threshold
inp:bin(1:2):def(pf)
Configures all inputs in group 2, module 1 as potential-free inputs

288

String Commands

4.8.15 inp:bin(<inp_module_idx>:<group_idx>[:<inp_idx>]):def?
Function

Queries the sensing mode of the binary inputs.

Description

This command queries the configuration parameters for all the inputs in the
group, or for an individual input.

Parameters

<inp_module_idx>
Integer id of the targeted input module. This value must be greater than 0, and
smaller or equal than the value returned by the inp:bin:cfg? command.
<group_idx>
Integer id of the input group within the input module whose inputs we want to
query. This value must be greater than 0, and smaller or equal than the value
returned by the inp:bin(<inp_module_idx>):cfg? command (return field
<#groups>).
<inp_idx>
Integer id of the individual input to query.

Answer

<dev_id>,<setting>;
The return string contains the CMCs device number, plus the setting value for
the input or the group. This setting can be the string "pf" if the setting is potentialfree sensing, or a floating point value containing the threshold value for the input
or the group. If the setting value is requested for a group whose inputs have
been individually programmed, the command will return a threshold of 0.

See also:
inp:bin(<inp_module_idx>:<group_idx>[:<inp_idx>]):def(pf|<threshold>) on page 287

289

OMICRON CMEngine

4.8.16 inp:bin(<inp_module_idx>:<group_idx>):name(<name>)
Function

Sets the group name.

Description

This command allows setting a label to a group, which is to be retrieved later.

Parameters

<inp_module_idx>
Integer id of the input module that the information is desired. This value must be
greater than 0, and smaller or equal than the value returned by the inp:bin:cfg?
command.
<group_idx>
Integer id of the input group within the input module for which information is
desired. This value must be greater than 0, and smaller or equal than the value
returned by the inp:bin(<inp_module_idx>):cfg? command (return field
<#groups>).
<name>
String enclosed in single or double quotes.

See also:
inp:bin(<inp_module_idx>:<group_idx>):name? on page 291

290

String Commands

4.8.17 inp:bin(<inp_module_idx>:<group_idx>):name?
Function

Queries the group name.

Description

Use this command to retrieve a groups name.

Parameters

<inp_module_idx>
Integer id of the input module that the information is desired. This value must be
greater than 0, and smaller or equal than the value returned by the inp:bin:cfg?
command.
<group_idx>
Integer id of the input group within the input module that the information is
desired. This value must be greater than 0, and smaller or equal than the value
returned by the inp:bin(<inp_module_idx>):cfg? command (return field
<#groups>).

Answer

<dev_id>,<name>;
The return string contains the CMCs device number, plus the name assigned to
the group enclosed in quotes. If no name has been set for the group, then the
command returns an empty string.

See also:
inp:bin(<inp_module_idx>:<group_idx>):name(name) on page 290
Examples:
inp:bin(1:1):name?
Result: 1,""; // Group 1 in module 1 has no name assigned
inp:bin(1:1):name("Input block 1")inp:bin(1:1):name?
Result: 1,"Input block 1";

291

OMICRON CMEngine

4.8.18 inp:ana(<input_list>):def(v,<range>) /
inp:ana(<input_list>):def(i,<range>,<CTRatio>)
Function

Configures the measuring mode of the AC analog inputs.

Description

This command implicitly sets all inputs in the input list as analog inputs and at the
same time sets their configuration parameters. It is only available for CMC 256 or
newer test set. This command should always be issued prior to using any input
as an analog input.

Parameters

<input_list>:
Comma separated list of the binary/analog inputs to be configured.
v,i:
v means the input is configured as a voltage input and i means a current input.
Please note that the CMC measures always voltages in its analog inputs. For the
measuring of currents, a shunt resistor or current clam with voltage output must
be provided.
<range>:
Floating point number in volts. Sets the range of the specified inputs. The range
must match the expected input in order to provide optimum resolution.
The following ranges are available for the CMC 256 or newer test set: 100mV,
1V, 10V, 100V and 600V. From these available ranges, the closest that is equal
to or greater than the provided <range> parameter is selected.
<CTRatio>:
Floating point number in V/A. This is the ratio of volts per amp of the current
clamp or current shunt being used.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_256_CMD Command requires CMC 256 or greater

292

String Commands

Examples:
inp:ana(4,2,5):def(v,5.0)
Configures inputs 4,2 & 5 as voltage inputs with 10V range.
inp:ana(6,10,8):def(i,1.0,0.1)
Configures inputs 6,10 & 8 as current inputs with a 1V range and a CT ratio of 100 mV/A.
inp:ana(1):def(i,0.1,0.01)
Configures input 1 as a current input with a 100 mV range and a CT ratio of 10 mV/A.

293

OMICRON CMEngine

4.8.19 inp:ana(<input_list>):def?
Function

Displays the inputs configuration.

Description

Displays the configuration of each analog input in the list.

Parameter

<input_list>:
Comma separated list of the analog inputs whose configuration is to be
displayed.

Answer

The return string contains the CMCs device number, plus one set of data for
each input in the list, as follows:
Input number
An integer with the input to which the following data refers.
Function
String: "v" for voltage inputs, "i" for current inputs, "pf" for potential-free inputs
and "ps" for potential-sensing inputs.
range
A floating point number containing the inputs range.
binary threshold
Floating point; for binary inputs in potential-sensing mode, value that the sensed
voltage must reach in order to be read as "active"
CT ratio
Floating point; current clamp or shunt ratio in V/A
Some of these values are of no relevance for a particular input (for instance the
CT ratio for a voltage input or the binary threshold for an analog input). In this
case the user should simply ignore them.

Example:
inp:ana(1,2,3):def?
Result: "1,1,i,1.000000e-001,2.500000e+000,1.000000e-002, 2,ps,1.000000e+002,1.200000e
+002,1.000000e+000,3,i,1.000000e-001,2.500000e+000,2.000000e-001;"
Where:
input#1 is an analog current input with 100mV range, 2.5v binary threshold and 0.01 V/A CT ratio
input#2 is a potential-sensing binary input with 100 V range and 2.5v binary threshold and 1 V/A CT
ratio
input#3 is a current input with 100 mV range, 2.5v binary threshold and 0.2 V/A CT ratio

294

String Commands

4.8.20 inp:ana(<input_list>):range?
Function

Displays the list of available ranges of each analog input.

Description

Each analog input can be set to a number of different measuring ranges. A lower
range means more resolution, whilst a higher range means being able to
measure bigger amplitudes. The ranges are applicable whether the input is being
set as voltage or current input.

Parameter

<input_list>:
Comma separated list of the binary/analog inputs whose ranges are to be
displayed.

Answer

The return string contains the CMCs device number, plus one set of range data
for each input in the list. The range data are a list of floating point numbers
sorted from lowest to highest, each of which represents one measuring range in
RMS. Please note that no indication of the input to which the values belong is
provided; it is therefore recommended to issue this command once for each input
whose ranges we wish to obtain.

See also:
inp:ana(<input_list>):def(v,<range>) on page 292
inp:ana(<input_list>):def(i,<range>,<CTRatio>) on page 292
Example:
inp:ana(1):range?
Result: "1,1.000000e-001,1.000000e+000,1.000000e+001,1.000000e+002,6.000000e+002;"
This shows that input 1 has 4 possible ranges: 100mV, 1V, 10V, 100V & 600V.

295

OMICRON CMEngine

4.8.21 inp:ana:cal(ac|dc)
Function

Calibrates the analog inputs.

Description

This command calibrates the specified inputs. It is necessary to carry out an AC


calibration at the start of your code and after you have changed the range of the
analog inputs. It is equally necessary to carry out a DC at the start of your code
and after you have changed the range of the DC analog inputs.

Parameters

dc|ac
If this command is used with the dc keyword the DC analog inputs are calibrated,
if it is used with the ac keyword the binary/analog inputs are calibrated.
This command can cause a real time violation if any other multimeter
commands running. You should clear the any errors set in the system
status register afterwards using the sys:status? command.

Examples:
inp:ana:i(1):range(0.001)
inp:ana:cal(dc)
inp:ana(4,2,5):def(v,10.0)
inp:ana:cal(ac)
sys:status?(1)
Both an AC and a DC calibration are performed after the range for the DC analog current and the
range for inputs 4, 2 & 5 has been changed. The status of the Measurement DSP is then checked to
clear any real time violations that may have occurred.

296

String Commands

4.8.22 inp:ana:cfg?(srate|avrg|firm|hard)
Function

Gets information about the configuration of the analog inputs.

Description

This command will only work on a CMC 256 or newer test set.

Parameters

See below

Answer

The returned values depend on which option you supply as a parameter.


srate:
Returns the sample rate.
avrg:
Returns the averaging factor.
firm:
Returns the firmware version of the Measuring DSP.
hard:
Returns the hardware version of the Measuring DSP.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE Command not allowed within sequence


See also:
inp:cfg?[(ecount]] on page 317
Examples:
inp:ana:cfg?(srate)
Result: "1,2.844444e+004;"
inp:ana:cfg?(avrg)
Result: "1,1.000000e+000;"
inp:ana:cfg?(firm)
Result: "1,1.0.0;"
inp:ana:cfg?(hard)
Result: "1,1.0;"

297

OMICRON CMEngine

4.8.23 inp:ana:dc(on|off)
Function

Turns on/off the DC measuring task.

Description

This command is used to switch off and on the task which measures the DC
analog inputs. By default this task is always on. You only need to use this
command if, you're not using the DC analog inputs, and you want to free extra
resources (i.e. one task on the task vector will be freed). The DC task cannot be
turned off in the CMC 156 or CMC 56.
If you switch off the DC task and you try to read the DC analog inputs
you will get an error.

Parameters

Examples:
inp:ana:dc(off)
inp:ana:dc(on)

298

on|off
The keyword on switches the dc measurement on, while off switches it off.

String Commands

4.8.24 inp:buf:sam (<source>, <index>) / inp:buf:sam (bin, on|off|bin)


Function

Executes a measurement (selectable source) and stores the result into the
measurement buffer in the CMC.

Description

Measures the voltage on the analog voltage input or the current on the analog
current input or the states of all binary inputs. The second version of this
command is used to enable or disable automatic sampling of all binary inputs on
every change on a binary input and all nominal change events in a signal output
caused by the execution of any on or off command (see inp:buf:get?). The
results are not returned but stored into the CMC-internal measurement buffer.
You can get the samples in this buffer using the inp:buf:get? command.
The buffer has a length of 2048 samples and it has a ring architecture. Thus if
you make more than 2048 samples without getting a sample, the samples 2049
and higher overwrite the samples at the beginning of the buffer. When this
overrun occurs, the next inp:buf:get? command returns the keyword overrun
(see description of inp:buf:get?).
The parameter <index> has different meanings for the different sources
(<source>) as shown in the following table.
The maximum number for the analog voltage and current input can be queried by
a inp:cfg? command. The signature for binary inputs is a number which is stored
in the buffer together with the measured value and is used to identify a
measurement result later. The valid range of signatures is 1 to 9. For the
interpretation of the different signature values see the inp:buf:get? command.
The inp:buf:sam (bin, on|bin|off) command is used to turn automatic logging of
changes ON or OFF on the binary inputs. If the automatic logging is set to ON or
BIN, every time one of the binary inputs changes its state, a snapshot of all
binary inputs is taken and stored into the measurement buffer. So every change
of a binary input causes a inp:buf:sam (bin, 1) to be executed internally.
Additionally the execution of inp:buf:sam (bin, on) causes an initial entry in the
measurement buffer with signature 1 (see inp:buf:get?).
When automatic logging is set to ON the changes of the analog outputs also
produce an entry in the measurement buffer (equivalent to a inp:buf:sam (bin, 0)
command).

Parameters

<source>:
You must specify one of the keywords dcv, dci or bin as <source>.
<index>:
This parameter is of type <integer>. Its valid range depends on the source.

299

OMICRON CMEngine

Parameter <source> Measurement source

Interpretation of <index>

dcv

Analog voltage input (origin "DC voltage") Number of analog voltage input

dci

Analog current input (origin "DC current")

Number of analog current input

bin

All binary inputs (origin "binary inputs")

Signature (see below)

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_INVALID_INT Parameter <index > is not an integer


See also:
inp:buf:sam(ext) on page 301
inp:buf:get? on page 302

300

String Commands

4.8.25 inp:buf:sam(ext)
Function

Enables extended mode for the sample buffer entries.

Description

This command changes the format in which the input buffer entries are stored. It
must be used only once, and always before any other inp:buf: command to
avoid the possibility of wrong entries in the buffer. The standard and extended
formats for the input buffer entries are described in the inp:buf:get? command.

See also:
inp:buf:get? on page 302

301

OMICRON CMEngine

4.8.26 inp:buf:get?
Function
Get the next value of all the measurements generated by inp:buf:sam commands and stored in the
buffer.
Description
The first invocation of this command returns the first entry of the measurement buffer, subsequent
invocations return the following entries.
Answer
Every returned measurement result contains at least the information about the type and the time. The
following information is type-dependent:
Type information:
The type information is one of the keywords bin, dcv, dci, bcount, ecount, zcross, empty, overrun,
switchoff, irigb-enc, irigb-dec or trigin:

The keywords dcv, dci,bin denote that the measurement data returned is a valid sample from the
source DC voltage inputs, DC current inputs or binary inputs made with inp:buf:sam.

The keyword zcross denotes that this entry was generated by a zero cross event on any signal
which was activated by a out:ana:off(zcross) command.

The keyword empty is returned as type information when there are no entries in the measurement
buffer.

The keywords bcount and ecount denote entries from counters.

The keyword overrun is returned when a buffer overrun happened (The measurement buffer in the
CMC is a ring buffer. If data are fetched too slowly, values that have not been read yet are
overwritten with new ones). In both cases all other parameters returned are 0.

When the CMC discovers an overtemperature on one of the amplifiers the CMC's outputs are
switched OFF and the entry "switchoff" is placed into the measurement buffer. In this case the
keyword switchoff is returned with inp:buf:get?.

The keywords irigb-enc and irigb-dec denote entries from the IRIG-B encoder or decoder.

The keyword trigin denotes entries from an external PPS source (e.g. CMGPS).

If the extended mode is selected (inp:buf:sam(ext) command has been issued) then the bin type
information is followed by the index of the input module for which the inputs have been sampled. The
type then is bin(<inp_module_idx>) where <inp_module_idx> is an integer from 1 to the value
returned by the inp:bin:cfg? command.
Time information:

302

String Commands

The time information represents the content of a counter in the CMC that is converted into seconds.
The difference between the time information of two measurements represents the time between these
measurements. The first entry always contains a time information of 0. The counter for the time
information is a 24-bit counter that is incremented every 0.1ms; it therefore overflows every 27 minutes
approximately. CMEngine is capable of handling this overflow by itself and provide accurate times, as
long as at least one event is generated within those 27 minutes. Thus you must make sure that no
period of 27 minutes can elapse without event generation, and manually generate events if needed.
Overview:
The following table is an overview of all type information and their measurement data returned in the
answer string:
Type
Parameter Measurement format
information count
dcv

dcv,<timeInfo>,<voltage>,<input>,<voltage> ... measured voltage on voltage input in Volts (float)


<input> ... Number of voltage input

dci

dci,<timeInfo>,<current>,<input>,<current> ... measured current on current input in mA (float) [Note: for


CMC 56 and CMC 156 in Amps]
<input> ... Number of current input

bin

bin,<timeInfo>,<binInpState>,<signature>,<binInpState> ... measured state of the binary inputs. Bit 0 represents


the state of binary input 1, bit 1 represents the state of binary input 2,
etc.
<signature> ... see description in table below.

zcross

zcross,<timeInfo>,<generator>,0,<generator> ... v(<triple_no>:<gen>) or i(<triple_no>:<gen>) voltage or


current generator that was switched off in its zero crossing.
For every single signal switched off in its zero crossing there is a
separate entry although they probably have been initiated together as a
triple. Signals specified to be switched off simultaneously with a signal in
its zero crossing do not create an entry (see out:ana:off(zcross)).

bcount or
ecount

bcount|ecount,<timeInfo>,<counterValue>,<counterNumber>,
<info>
<counterValue> ... counter value as integer
<counter Number> ... the counter number
<info> ... zcross if a zero crossing of the counter happened. Otherwise
it is -.

empty

empty,<timeInfo>,0,0,-

303

OMICRON CMEngine

Type
Parameter Measurement format
information count
overrun

overrun,<timeInfo>,0,0,-

switchoff

switchoff,<timeInfo>,0,0,-

irigb-enc

11

irigb-enc,<timeInfo>,<pps2ldac>,
0,<year>,<month>,<day>,<hour>,<minute>,<second>,<SBS>
<pps2ldac> ... PPS to LDAC edge (clocks of oscillator frequency)
<year>,<month>,<day>,<hour>,<minute>,<second> ... Date time
information of the IRIG-B encoder
<SBS> ... Straight binary seconds

irigb-dec

12

irigb-dec,<timeInfo>,<pps2ldac>,
0,<year>,<month>,<day>,<hour>,<minute>,<second>,<SBS>,<CF>
<pps2ldac> ... PPS to LDAC edge (clocks of oscillator frequency)
<year>,<month>,<day>,<hour>,<minute>,<second> ... Date time
information of the IRIG-B decoder
<SBS> ... Straight binary seconds
<CF> ... Code format

trigin

trigin,<timeInfo>,<pps2ldac>,0
<pps2ldac> ... PPS to LDAC edge (clocks of oscillator frequency)

Signature Explanation
0

Nominal Change (automatically inserted with every out:ana:on or out:ana:v():on or


out:ana:i():on if automatic logging of binary inputs changes is enabled see
inp:buf:sam(bin, on))

Entry produced by automatic logging or by inp:buf:sam(bin, 1) or by inp:buf:sam(bin,


on)

User-defined signature

User-defined signature

User-defined signature

User-defined signature

User-defined signature

User-defined signature

User-defined signature

304

String Commands

Signature Explanation
9

User-defined signature

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE Command not allowed within sequence


Example
The command inp:buf:sam (bin, 1) has been executed once.
Then inp:buf:get? returns e.g.: "1,bin,0,708,1,-;".
This means that device 1 measured the following states of the binary inputs at 0 seconds:
708 = 0b1011000100 = 22+26+27+29
The binary inputs 3, 7, 8 and 10 were set. The signature is 1, no optional information.
If extended mode had been set, the return would have been: "1,bin(1),0,708,1,-;" with the input module
1 identified as the location of the inputs that changed.

305

OMICRON CMEngine

4.8.27 inp:buf:get?(<no_of_entries>)
Function

Gets one or more of the next entries in the input buffer.

Description

Get a certain number of entries in the input buffer. If there are fewer entries in the
buffer, then all entries are returned.

Parameter

<no_of_entries>
Integer number representing the number of entries that are requested from the
buffer. Only values between 0 and 50 are supported.

Answer

<dev_id>,<entries_read>{,<type_info>,<time_info>,<meas_data>,<index>,<optio
nal>};
The returned string contains the device number, the number of entries actually
read from the buffer (integer value from 0 if the buffer was empty to
<no_of_entries> if all requested entries were successfully read) plus as many
measured buffer entries as returned in the <entries_read> parameter; each entry
has the same format as those returned by the inp:buf:get? command.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE Command not allowed within sequence


See also:
inp:buf:get? on page 302
Example:
We want to get the next 5 entries in the input buffer.
Command: inp:buf:get?(5)
Return : "1,3,bin(1),0,708,1,-,bin(1),0,708,9,-,bin(1),0,708,9,-;"
This means that only three entries were available in the buffer, the data for which follows. All entries
are binary, the second and third with index 9 meaning that they are the result of a inp:buf:sam(bin,9)
command. The extended mode is active, and all inputs have been sampled in input module 2 of the
targeted device.

306

String Commands

4.8.28 inp:buf:clr
Function

Clears the buffer for measurement data.

Description

This command executes inp:buf:sam (bin, off) and then clears all measurement
data currently stored in the measurement buffer.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE Command not allowed within sequence

307

OMICRON CMEngine

4.8.29 inp:count:on
Function

Starts counting with all activated counters.

Description

This command starts the counting of all counters that are set up with
inp:count:set.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_COUNTER_NOT_ACTIVE No counter activated


CMERR_COUNTER_ON
See also:
inp:count:set on page 311
inp:count:off on page 309
inp:count:clr on page 310

308

Counting is already on

String Commands

4.8.30 inp:count:off
Function

Stops counting of all counters.

Description

This command stops the counting of all counters that were started with
inp:count:on.

See also:
inp:count:on on page 308
inp:count:set on page 311
inp:count:clr on page 310

309

OMICRON CMEngine

4.8.31 inp:count:clr
Function

Clears all counter settings.

Description

This command stops counting by a call to inp:count:off and then clears all
counter settings made by inp:count:set and inp:count:join.

See also:
inp:count:off on page 309
inp:count:set on page 311
inp:count:join on page 313

310

String Commands

4.8.32 inp:count:set(bcount|ecount(<counter>), <count>, +|-)


Function

Sets up a binary input or a extended counter input as counter.

Description

With the parameter <counter>, select the binary input (e.g. bcount(3) for binary
input #3) or the extended counter input (e.g. ecount(1) for the first extended
counter input) to be setup. The counting is not started. To start counting use
inp:count:on.
The counters are 24 bits wide (max count is 16777215).
The value of the counter is set to <count>. It is incremented with every edge of
the input signal (rising edge if <edge> is +, falling edge if <edge> is -). Every time
when the counter overflows to zero an entry in the measurement buffer is made
(see inp:buf:get?). When the counter is zero it is not reloaded with <count> but
starts with 1.
Due to the architecture of the extended input counters it can happen that the
entry in the buffer is not zero as expected but already has advanced to a value
up to 15. The time in the buffer is the time when this count was reached not the
time of the zero crossing.

Parameters

<counter>:
This parameter is of type <integer>.
<count>:
This parameter is of type <integer>.
<edge>:
This parameter must be either + for rising edge or - for falling edge.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CM_ERR_COUNTER_ON Counting is already on


CMERR_INVALID_INT

Parameter <count> is not an integer

See also:
inp:count:join on page 313
inp:count:on on page 308
inp:count:clr on page 310
inp:buf:get? on page 302

311

OMICRON CMEngine

Example:
Starting with inp:count:set(bcount(1),16777212,+) the counting sequence looks as follows:
16777212 => 16777213 => 16777214 => 16777215 => 0 => 1 => 2.

312

String Commands

4.8.33 inp:count:join(bcount|ecount(<master_counter>), bcount|


ecount(<slave_counter>))
Function

Joins two counters for synchronized operation.

Description

This command defines a master-slave relationship between two counters. There


can be several master counters. A master counter can have several slave
counters. A slave counter cannot be a master counter at the same time but a
slave counter can have several master counters.
The first edge on a master counter and whenever a master counter goes through
zero all its slave counters make an entry in the measurement buffer with their
next edge.

Parameters

<master_counter>:
This parameter is of type <integer>.
<slave_counter>:
This parameter is of type <integer>.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_NOT_ACTIVE

Selected counter(s) are not active

CMERR_COUNTER_ON

Counting is already on

CMERR_COUNTER_MASTER_SLAVE A slave counter cannot be a master counter at the same


time
See also:
inp:count:on on page 308

313

OMICRON CMEngine

4.8.34 inp:count:get?(bcount|ecount(<counter>))
Function

Gets the count of a counter.

Description

This command reads the current count of the selected counter.

Parameter

<counter>:
This parameter is of type <integer>.

Answer

Returns a string that contains the device number and the count (type <integer>).

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_INVALID_INT Parameter <count> is not an integer


See also:
inp:count:on on page 308
inp:buf:get? on page 302

314

String Commands

4.8.35 inp:ana:cfg(<srate>,<avrg>)
Function

Sets the samplig frequency and averaging factor of the measuring DSP.

Description

The sampling rate is the rate at which time measuring DSP makes
measurements (e.g. a sampling rate of 3.16 kHz means measurements are
made 3160 times every second). Higher sampling frequencies mean a finer
resolution of the sampled wave; this is useful for applications such as powerquality analysis and fault-recording. On the other hand, it increases the load in
the DSP and may cause a "Real Time Violation" error (see inp:ana:get?
(<command handle>) for a description of the validity flags associated to
measurements). For recorded signals, more memory is required to store them as
the sampling rate increases.
The command is only available for CMC 256 or newer test set.

Parameters

<srate>:
Floating point number in hertz. Sets the sampling frequency of the Measuring
DSP. The next available range that is equal to or higher than the parameter is
selected (so for example, a value of 3000 will select the 3.16 kHz range). If it is
above the maximum range then an error is returned. For a CMC 256 or newer
test set the ranges are 3.16, 9.48 & 28.444 kHz.
<avrg>:
Floating point number. Is the averaging factor for all the multimeter commands.
The averaging factor is a value equal or less than 1 and greater than 0. It causes
the results of the multimeter commands to be averaged over a period of time. An
averaging factor of 1 means no averaging. A factor close to zero means a high
amount of averaging (0 is illegal). This affects the rms, phase, frequency and
power commands and is configured globally for all of them.
By default averaging is switched off (<avrg> set to one), however if you are
measuring a steady state signal and you need extra accuracy, setting an
averaging factor less than 1 will increase the accuracy by effectively "smoothing"
out any noise. (If the signal is varying quickly it's better to have no averaging).
The averaging uses the following formula:
result = newValue * <avrg>+ oldValue * (1 - <avrg>)
Where:
newValue is the value of the new result before averaging has been applied
oldValue is the value of the previous, averaged result

315

OMICRON CMEngine

Examples:
inp:ana:cfg(9000,0.5)
Sets the 9.48 kHz sampling rate and an averaging factor of 0.5.
inp:ana:cfg(28444,1.0)
Sets the 28.44 kHz sampling rate with no averaging.

316

String Commands

4.8.36 inp:cfg?[(ecount)]
Function

Gets information about the hardware configuration of the analog and binary
inputs.

Description

This command gets the following information about the CMC:


- number of analog inputs for DC voltage measurement
- number of analog inputs for DC current measurement
- number of binary inputs
- version number of the input/output board or
- number of 100 kHz counter inputs

Parameter

ecount (optional):
When this parameter is specified the command returns the number of 100 kHz
counter inputs.

Answer

The version without parameter of the command returns a string that contains the
CMC's device number, a sequence of four comma separated <integer> values
and a trailing ";".The version with ecount returns a string that contains the CMC's
device number, an <integer> value and a trailing ";".

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE Command not allowed within sequence


See also:
inp:ana:cfg?(srate|avrg|firm|hard) on page 297
Example:
The command inp:cfg? returns the string "1,1,1,10,7;". Thus CMC #1 has one analog input for voltage
measurement, one analog input for current measurement, 10 binary inputs and the input/output board
has the version number 7.

317

OMICRON CMEngine

4.9

GPS Commands

These commands are used to control the CMGPS synchronization unit. Please note that you must
issue a amp:scan? command so the CMGPS device is detected. Otherwise, all commands will return
the CMERR_GPS_NOT_FOUND error, even if the CMGPS is properly connected.
In the left side table of contents find the GPS command of your choice and click the corresponding
entry.

318

String Commands

4.9.1

gps:status?

Function

Gets the current status of the CMGPS.

Description

This informs the application what information the CMGPS has obtained from the
satellites and if any special conditions have occurred.

Answer

The command returns 2 values of type <integer>: <Status Register>,


<Satellites>.
<Status Register>:
16 bit word. Each bit represents the status of a certain aspect of the CMGPS as
shown in the following table.
<Satellites>:
Number of satellites tracked (0-8 satellites possible).

Meaning of <Status Register> bits:


Bit

Meaning when set

Initializing

Time available

Latitude & Longitude available

Height available

Pulse available (CMGPS in locked state)

UTC changed

Almanac Saving

Almanac Error

Antenna Open

Antenna Short

10

not used

11

not used

12

not used

319

OMICRON CMEngine

Bit

Meaning when set

13

not used

14

not used

15

not used

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence.

CMERR_GPS_BUSY

The command was issued when the CMGPS was still initializing, or
processing the previous command.

CMERR_GPS_NOT_FOUND No CMGPS present or amp:scan? not yet executed.


CMERR_COMM

Communication error during command execution.

Examples:
"1,30,5;": This means that the receiver is locked (Time, Latitude, Longitude, Height and Pulse
available) and 5 satellites tracking. (The first parameter means the CMGPS is connected to CMC 1)
1,256,0: Means the antenna is not connected and no satellites tracking.

320

String Commands

4.9.2

gps:reset

Function

Performs a reset on the GPS device.

Description

This command performs a reset on the GPS device.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence.

CMERR_GPS_NOT_FOUND No CMGPS present or amp:scan? not yet executed.


CMERR_COMM

Communication error during command execution.

See also:
command amp:reset(<amp_id>) on page 268
Example:
Suppose you have connected a CMGPS to the CMC then the command gps:reset will perform a
reset on the GPS device.

321

OMICRON CMEngine

4.9.3

gps:sigma?

Function

Gets the Sigma deviation (trigger-impulse deviation).

Description

This is a value that indicates how accurate the time pulses are. Normally the
application will not need this information.

Answer

Integer between 0-0xFFFF.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence.

CMERR_GPS_BUSY

The command was issued when the CMGPS was still initializing, or
processing the previous command.

CMERR_GPS_NOT_FOUND No CMGPS present or amp:scan? not yet executed.


CMERR_COMM

322

Communication error during command execution.

String Commands

4.9.4

gps:pos?

Function

Gets the current GPS position.

Answer

The command returns 4 values of type <float>:


<latitude>,<longitude>,<height>, <DOP>
<latitude>:
Latitude in degrees.
<longitude>:
Longitude in degrees.
<height>:
Height in meters.
<DOP>:
The DOP (ranges between 0 and 99.9) is an indication of the quality of the
results that can be expected from a GPS point position.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence.

CMERR_GPS_BUSY

The command was issued when the CMGPS was still initializing, or
processing the previous command.

CMERR_GPS_NOT_FOUND No CMGPS present or amp:scan? not yet executed.


CMERR_COMM

Communication error during command execution.

323

OMICRON CMEngine

4.9.5

gps:pos(<latitude>, <longitude>, <height>)

Function

Sets the GPS position.

Description

If the CMGPS has not already found its position, the searching process can be
sped up by loading the position manually (assuming it was previously stored.). If
the CMGPS has found its position, then this command has no affect.

Parameters

All three parameters are of type <float>


<latitude>:
Latitude in degrees. Valid range from -90 to 90.
<longitude>:
Longitude in degrees. Valid range from -180 to 180.
<height>:
Height in meters. Valid range from -1000.00 to 18000.00

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence.

CMERR_OUT_OF_RANGE

Channel or rate parameters are out of range.

CMERR_GPS_BUSY

The command was issued when the CMGPS was still initializing, or
processing the previous command.

CMERR_GPS_NOT_FOUND No CMGPS present or amp:scan? not yet executed.


CMERR_COMM

324

Communication error during command execution.

String Commands

Example:
gps:pos(63.2359,-100.3321,423.44)
Sets a position of 63.2359 latitude, -100.3321 longitude, 423.44 meters.

325

OMICRON CMEngine

4.9.6

gps:def?

Function

Indicates that a CMGPS device has been found on the specified CMC.

Description

It is useful to issue this command first to see if any CMGPS devices have been
detected before issuing any other GPS commands.

Answer

1 = CMGPS device has been found


0 = no CMGPS exists

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence.

CMERR_GPS_BUSY

The command was issued when the CMGPS was still initializing, or
processing the previous command.

CMERR_GPS_NOT_FOUND No CMGPS present or amp:scan? not yet executed.


CMERR_COMM

326

Communication error during command execution.

String Commands

4.9.7

gps:time:timemode?

Function

Gets the time mode of CMGPS.

Description

This function returns the time mode which the CMGPS is operating under.

Answer

sat or utc (sat = satellite time, utc = universal time)

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence.

CMERR_GPS_NOT_FOUND No CMGPS present or amp:scan? not yet executed.


CMERR_COMM

Communication error during command execution.

327

OMICRON CMEngine

4.9.8

gps:time:utc?

Function

Gets the time difference between UTC and GPS time.

Description

This function returns the time difference between UTC and satellite time. This
time difference has to be added to the satellite time to get UTC.

Answer

Returns two integers: <UTC diff>,<valid>.


<UTC diff>:
Time difference in seconds
<valid>:
0 = the time difference is not valid (i.e. not available yet), 1 = time difference is
valid

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence.

CMERR_GPS_BUSY

The command was issued when the CMGPS was still initializing, or
processing the previous command.

CMERR_GPS_NOT_FOUND No CMGPS present or amp:scan? not yet executed.


CMERR_COMM

328

Communication error during command execution.

String Commands

4.9.9

gps:time:sync(<ch>,<rate>,<yyyy>,<mm>,<dd>,<hh>,<mm>,<ss>)

Function

Sets the synchronization rate and time for synchronization pulses on the
specified channel.

Description

The CMGPS has two "trigger" channels. The start date and time and the rate of
pulses on both channels can configured using this command.

Parameters

All 8 parameters are of type <integer>.


<ch>:
Channel (0 or 1)
<rate>:
Synchronization rate in seconds, allowed values (0..65535). Note: a value of 0
means only a single pulse will be triggered.
<yyyy>,<mm>,<dd>,<hh>,<mm>,<ss>:
Starting time and date of the synchronization pulses.

Do not use leading zeroes in any of the parameters.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence.

CMERR_INVALID_DATE

Date/time is not valid.

CMERR_GPS_BUSY

The command was issued when the CMGPS was still initializing, or
processing the previous command.

CMERR_GPS_NOT_FOUND No CMGPS present or amp:scan? not yet executed.


CMERR_COMM

Communication error during command execution.

CMERR_OUT_OF_RANGE

Channel or rate parameters are out of range.

Examples:
gps:time:sync(0,60,1998,7,12,12,0,0)
Sets channel 0, for a repeat rate of 1 minute, starting at 12/July/1998 12:00:00.

329

OMICRON CMEngine

gps:time:sync(1,0,1998,7,12,12,0,0)
Sets channel 1, to trigger a single pulse at 12/July/1998 12:00:00.

330

String Commands

4.9.10 gps:time:sync?(<ch>)
Function

Gets the synchronization rate and time for specified channel.

Description

The CMGPS has two "trigger" channels. The configured start date and time and
the rate of pulses on either channels can be returned using this command.

Parameter

<ch>:
Channel (0 or 1)
Starting time and date of the synchronization pulses.

Answer

The command returns 7 values of type <integer>:


<rate>,<yyyy>,<mm>,<dd>,<hh>,<mm>,<ss>.
<rate>:
Synchronization rate in seconds, allowed values (0..65535). A value of 0 means
only a single pulse is triggered.
<yyyy>,<mm>,<dd>,<hh>,<mm>,<ss>:
Starting time and date of synchronization pulses.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence.

CMERR_INVALID_DATE

Date/time is not valid.

CMERR_OUT_OF_RANGE

Channel or rate parameters are out of range.

CMERR_GPS_NOT_FOUND No CMGPS present or amp:scan? not yet executed.


CMERR_COMM

Communication error during command execution.

CMERR_GPS_BUSY

The command was issued when the CMGPS was still initializing, or
processing the previous command.

Example:
gps:sync?(0)
Gets the synchronization rate and time for channel 0.

331

OMICRON CMEngine

4.9.11 gps:time:datetime(<yyyy>, <mm>, <dd>, <hh>, <mm>, <ss>)


Function

Sets the date and time of the CMGPS.

Description

Has no effect if the CMGPS is already receiving the time from the satellites.
The time has to be set in 24 hour representation.

Parameters

All six parameters are of type <integer> and denote year, month, day, hour,
minutes, seconds.

Do not use leading zeros in any of the parameters.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence.

CMERR_INVALID_DATE

Date/time is not valid.

CMERR_GPS_NOT_FOUND No CMGPS present or amp:scan? not yet executed.


CMERR_COMM

Communication error during command execution.

CMERR_GPS_BUSY

The command was issued when the CMGPS was still initializing, or
processing the previous command.

Example:
gps:time:datetime(1998,10,23,18,20,0)

332

String Commands

4.9.12 gps:time:datetime?
Function

Gets the date and time from the CMGPS.

Description

This always returns satellite time + the GMT offset, but not including seasonal
offset (i.e. Winter saving time). If the status is queried, it can be seen if the time
received from the satellites is available. If the satellite time is not available, then
this command will return the time from the internal CMGPS clock.

Answer

The command returns date and time as six values of type <integer>:
<yyyy>,<mm>,<dd>,<hh>,<mm>,<ss>.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence.

CMERR_GPS_NOT_FOUND No CMGPS present or amp:scan? not yet executed.


CMERR_COMM

Communication error during command execution.

CMERR_GPS_BUSY

The command was issued when the CMGPS was still initializing, or
processing the previous command.

Example:
The command gps:time:datetime? returns e.g. the string "1,1998,10,12,11,54,34;". This stands for
October 12, 1998, 11:54:34 am.

333

OMICRON CMEngine

4.9.13 gps:setup:mode?
Function

Returns the accuracy mode of the device.

Answer

Integer between 0-3 (see the gps:setup:mode command for the description of the
different modes).

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence.

CMERR_GPS_NOT_FOUND No CMGPS present or amp:scan? not yet executed.


CMERR_COMM

Communication error during command execution.

CMERR_GPS_BUSY

The command was issued when the CMGPS was still initializing, or
processing the previous command.

334

String Commands

4.9.14 gps:setup:mode(<accuracy_mode>)
Function

Sets the accuracy mode of the CMGPS.

Description

There are four different accuracy modes: 0-3 (see below).

After the mode has been changed the CMGPS will do a warm start (i.e.
it will go into the initializing state for a few seconds).
Parameter

<accuracy mode>:
0
In this mode it waits for an extremely accurate position before it reaches the
"locked" state. For this reason mode 0 takes a long time to lock but it guarantees
+/- 1 micro second accuracy.
1
In this mode it needs to find the three-dimensional position to reach the "locked"
state. This mode still takes a relatively short time to lock, and the pulses are
more accurate than mode 2.
2
In this mode it only needs to determine the longitude and latitude of the position
to reach the "locked" state. It doesnt try to determine the altitude. Because of
this, low accuracy mode takes the shortest time to lock and is less accurate than
the other modes, however the accuracy is still quite acceptable (within a few
micro seconds).
3
No time RAIM activated (i.e. never goes into position hold mode). This mode
should only be used when CMGPS is operating as a regular GPS and not a
timing device.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence.

CMERR_OUT_OF_RANGE

Channel or rate parameters are out of range.

CMERR_GPS_NOT_FOUND No CMGPS present or amp:scan? not yet executed.

335

OMICRON CMEngine

Error code

Explanation

CMERR_COMM

Communication error during command execution.

CMERR_GPS_BUSY

The command was issued when the CMGPS was still initializing, or
processing the previous command.

Example:
gps:setup:mode(0) - sets accuracy mode 0.

336

String Commands

4.9.15 gps:setup:gmt?
Function

Gets the offset between GMT and local time.

Description

This offset is added to the satellite time when the user issues the
gps:time:datetime? command.

Answer

The command returns 2 values of type <int>:


<hh>: Hours.
<mm>: Minutes.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence.

CMERR_GPS_NOT_FOUND No CMGPS present or amp:scan? not yet executed.


CMERR_COMM

Communication error during command execution.

CMERR_GPS_BUSY

The command was issued when the CMGPS was still initializing, or
processing the previous command.

337

OMICRON CMEngine

4.9.16 gps:setup:gmt(<hh>, <mm>)


Function

Sets the offset between GMT and local time.

Description

This offset is added to the satellite time when the user issues the
gps:time:datetime? command.

Parameters

All both parameters are of type <integer>:


<hh>:
Hours. Valid range from -23 to 23.
<mm>:
Minutes. Valid range from 0 to 59.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence.

CMERR_OUT_OF_RANGE

Channel or rate parameters are out of range.

CMERR_GPS_NOT_FOUND No CMGPS present or amp:scan? not yet executed.


CMERR_COMM

Communication error during command execution.

CMERR_GPS_BUSY

The command was issued when the CMGPS was still initializing, or
processing the previous command.

Examples:
gps:setup:gmt(-5,0)
Sets offset to Eastern time (US & Canada).
gps:setup:gmt(0,0)
Sets offset to Greenwich Mean Time.

338

String Commands

4.9.17 gps:setup:cfg?(type|ser|firm)
Function

Gets system information of the CMGPS.

Parameters

One of the keywords type, ser, hard, cal or firm must be specified.

Answer

The command returns a string that contains the following data:


type - GPS model information string (e.g. "CMGPS")
ser - Serial number of the CMGPS. (e.g. "AI150A")
firm- Version numbers of the firmware (e.g. "V1.00")

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence.

CMERR_GPS_NOT_FOUND No CMGPS present or amp:scan? not yet executed.


CMERR_COMM

Communication error during command execution.

339

OMICRON CMEngine

4.9.18 gps:setup:cfg?(addr)
Function

Returns the device address for serial communication for the GPS device.

Description

This command returns the address for serial communication as a string. This
address can be used to communicate with the device over the RS485 interface.

Answer

The command returns a string that contains the GPS device address.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence.

CMERR_GPS_NOT_FOUND No CMGPS present or amp:scan? not yet executed.


CMERR_COMM

Communication error during command execution.

See also:
command amp:cfg?(<amp_id>,addr) on page 245
Example:
Suppose you have connected a CMGPS to the CMC you would get an answer like this to the
command gps:setup:cfg?(addr): "1,3;". This means that the device address of the GPS device is
0x03.

340

String Commands

4.9.19 gps:setup:pulse(<LED ch>, <sync type>, <edge type0>, <edge type1>)


Function

Configures the synchronization channels.

Description

It is possible to set with this command:


a) Which channel the LED on the CMGPS is monitoring.
b) If channel 0 & 1 are connected together.
c) The edge type of the trigger for both channels.
If the channels are connected together then edge type0 is used and
edge type1 will be ignored.
If the edge type is changed, the change only takes effect the next time
the user configures the pulse using the gps:time:sync command.

Parameters

All 4 parameters are of type <integer>.


<LED ch>:
Channel that the LED is connected to (0 or 1).
<sync type>:
0 = channels operate separately, 1 = channels connected together (i.e. they
operate in sync).
<edge type0>:
Edge type for channel 0, 0 = negative, 1 = positive
<edge type1>:
Edge type for channel 1, 0 = negative, 1 = positive

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence.

CMERR_OUT_OF_RANGE

Channel or rate parameters are out of range.

CMERR_GPS_NOT_FOUND No CMGPS present or amp:scan? not yet executed.


CMERR_COMM

Communication error during command execution.

CMERR_GPS_BUSY

The command was issued when the CMGPS was still initializing, or
processing the previous command.

341

OMICRON CMEngine

Examples:
gps:setup:pulse(1,0,1,1)
means that the LED reflects status of channel 1, the channels are separate and the edge type is
positive for both channels.
gps:setup:pulse(0,1,0,0)
means that the LED reflects status of channel 0, both channels are in sync and the edge type is
negative.

342

String Commands

4.9.20 gps:setup:pulse?
Function

Gets the configuration of the synchronization channels.

Description

This command returns:


a) Which channel the LED on the CMGPS is monitoring.
b) If channel 0 & 1 are connected together.
c) The edge type of the trigger for both channels.

Answer

The command returns 4 values of type <int>:


<LED ch>:
Channel that the LED is connected to (0 or 1).
<sync type>:
0 = channels operate separately, 1 = channels connected together (i.e. they
operate in sync).
<edge type0>:
Edge type for channel 0, 0 = negative, 1 = positive
<edge type1>:
Edge type for channel 1, 0 = negative, 1 = positive

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence.

CMERR_GPS_NOT_FOUND No CMGPS present or amp:scan? not yet executed


CMERR_COMM

Communication error during command execution.

CMERR_GPS_BUSY

The command was issued when the CMGPS was still initializing, or
processing the previous command.

343

OMICRON CMEngine

4.9.21 gps:setup:cable?
Function

Gets the cable delay time.

Answer

Returns a single integer.


<nsec>:
Specifies the time in nanoseconds.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence.

CMERR_GPS_NOT_FOUND No CMGPS present or amp:scan? not yet executed.


CMERR_COMM

344

Communication error during command execution.

String Commands

4.9.22 gps:setup:cable(<delay>)
Function

Sets the cable delay time.


This command is only needed if using a different length antenna cable
than the one supplied with the CMGPS device.

Parameter

<delay>:
Specifies the time in nanoseconds. Integer between 0 and 999999.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence.

CMERR_GPS_NOT_FOUND No CMGPS present or amp:scan? not yet executed.


CMERR_COMM

Communication error during command execution.

CMERR_OUT_OF_RANGE

Channel or rate parameters are out of range.

345

OMICRON CMEngine

4.9.23 gps:setup:save
Function

Saves the current settings to flash memory.

Description

This command saves the current settings in memory to (permanent) flash


memory, so the next time the CMGPS is powered up it will automatically default
to these values.
The following settings are saved:

Accuracy mode

Time-zone (GMT offset)

Cable delay

Initial position (latitude/longitude/height; not initialized by default)

Startup synchronization time & date and rates for channels 0 & 1

Startup trigger polarity

LED setting/channel sync.


It takes approximately 2 seconds to execute this command.
Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence.

CMERR_GPS_NOT_FOUND No CMGPS present or amp:scan? not yet executed.


CMERR_COMM

Communication error during command execution.

CMERR_GPS_BUSY

The command was issued when the CMGPS was still in


initialization, or processing the previous command.

346

String Commands

4.10 Sequencer Commands


You can use most of the string commands in sequences of commands and store them in the
sequence buffer in the CMC for later execution. The following command group contains all commands
for handling and control of sequences.
A sequence consists of one or more steps. Every step consists of an execution part with one or more
string commands and a terminating seq:wait command. The string commands in the execution part
are common string commands (e.g. out:v(1):a(20);f(50)) or a string command to control the sequence
(e.g. seq:set or seq:add). Note: not all string commands are allowed in sequences, the commands
that are not allowed are listed below.
The following counters are available for sequence programming:
Counter

Meaning

loop

Loop counter
This counter is decremented by 1 with every
seq:wait. Its default content is 0.
You can set this counter to a value in the 0 65535 range using the seq:set command.

count(1)
count(2)

User definable counters 1 and 2


Use the command seq:set(count(..),...) to set
the counters to a value.
Use the command seq:add(count(..),...) to
increment or decrement one of these counters.
You can set these two counters to a value in the
following range using the seq:set or seq:add
commands:
0 = count(n) = 224-1

timer

This is a user definable timer that you can modify


via the seq:set and seq:add commands.
You can set it to a value in seconds in the
following range:
0 = timer = approx. 838 s.

timeout

Normally this counter is set and used in a


seq:wait command only, but you can also
modify it via the seq:set and seq:add
commands in the same range as the timer
counter.

347

OMICRON CMEngine

In a seq:wait command the values of all counters except timeout can be compared to zero; i.e. you
can ask if a specific counter equals zero or not. The timeout counter is tested in the timeout condition
of the seq:wait statement, not in the trigger condition (see seq:wait command).
In the left side table of contents find the Sequencer command of your choice and click the
corresponding entry.

348

String Commands

4.10.1 seq:begin
Function: see command seq:end on page 350.
Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN SEQ_MODE Command not allowed within sequence.

349

OMICRON CMEngine

4.10.2 seq:end
Function

Use the commands seq:begin and seq:end to mark the beginning and the end
of a string command sequence that can be executed by a CMC in real-time.

Description

All commands you send to the CMEngine between the commands seq:begin
and seq:end are not executed immediately but are interpreted as parts of a
sequence and thus are stored in the sequence buffer in the CMC.
The seq:begin command implies the execution of an out:resetopt and a
seq:clr,i.e. all signal settings are written to the sequence buffer and the
sequence buffer is cleared.
After you have stored a complete sequence in the buffer, you can start it with the
seq:exec command.
The string commands that you can't use in a sequence, i.e. that you can't send
between a seq:begin and a seq:end, are as follows:
sys:reset
sys:cfg?
sys:status?
sys:test?
amp:def
amp:def?
amp:scan?
amp:param?
amp:route
amp:route?
amp:ctrl
amp:ctrl?
inp:ana:v():get? and inp:ana:i():get?
inp:ana:v():param? and inp:ana:i():param?
inp:bin:get?
inp:bin:thres
inp:bin:thres?
inp:buf:get?
inp:cfg?
seq:begin
seq:clr
seq:exec

350

String Commands

seq:status?
seq:stop
out:pmode?
out:user:alloc?
out:user:app
out:user:status?
out:user:free
out:cfg?
The string commands that you can't use outside a sequence, i.e. that you can't
execute outside a seq:begin and a seq:end, are as follows:
seq:set(count(n), )
seq:set(timer, )
seq:add(count(n), )
The command seq:begin clears the sequence buffer and thus erases all sequence data of a
previous sequence!
Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_NOT_IN_SEQ_MODE Command can only be used after seq:begin.


See also:
command seq:exec on page 353

351

OMICRON CMEngine

4.10.3 seq:clr
Function

Clears the sequence buffer and all sequence data stored there.

Description

Use this command to erase all your previous sequence definitions from the
sequence buffer.
This command implies out:resetopt.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE Command not allowed within sequence.

352

String Commands

4.10.4 seq:exec
Function

Starts the sequence stored in the CMC's sequence buffer. This command implies
out:resetopt.

Description

If there is no sequence stored in the CMC's sequence buffer nothing happens.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE Command not allowed within sequence.


See also:
command seq:stop on page 357

353

OMICRON CMEngine

4.10.5 seq:set (loop|count(1)|count(2)|timer|timeout, <value>)


Function

With this command you can set one of the user modifiable counters to a value.

Description

All keywords specify user-modifiable counters except the timeout keyword. If


this is used, the timeout of the currently executing sequence statement is set to
the provided <value>. The sequence must be waiting as a seq:wait() statement
whith a timeout, otherwise the command is disregarded. If the timeout value is
set to 0, the execution of the sequence continues immediately, jumping to the
jump distance defined for the case of timeout elapsed. In this way, the time delay
hard-coded in the sequence programming can be modified at run-time.

Parameter

You must specify one of the keywords loop, count(1),count(2),timer or


timeout.
<value>:
The parameter <value> is of type <integer> for loop and count and of type
<float> for timer and timeout.
The possible range for every counter is described above with the description of
the counters.It is possible to set the loop counter outside of sequence
programming either before starting a sequence with seq:exec or during a
running sequence.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence.

CMERR_INVALID_INT

Parameter <value> has to be <integer>.

CMERR_INVALID_FLOAT

Parameter <value> has to be <float>.

CMERR_NOT_IN_SEQ_MODE Command can only be used after seq:begin.

354

String Commands

4.10.6 seq:add (count(1) > count(2), <rel_steps>)


Function

With this command you can add a number to the content of one of the user
modifiable counters.

Parameter

You must specify one of the keywords count(1) or count(2).


<rel_steps>:
This parameter is of type <integer>. The possible range for the two counters
count(n) is described above with the description of these counters.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_INVALID_INT

Parameter <rel_steps> is not an integer.

CMERR_NOT_IN_SEQ_MODE Command can only be used after seq:begin.

355

OMICRON CMEngine

4.10.7 seq:status? (step|loop|count(1)|count(2)|mem)


Function

This command gets different information related to sequences.

Description

When a sequence is running, you can use the keyword step (command
seq:status?(step)) to get the number of the sequence step that is currently
executed. The sequence steps in the sequence memory are numbered from 1 to
n. When the command returns a zero, there is no sequence in the buffer or the
sequence in the buffer is not running.
When a sequence is running, or after the sequence is finished, you can use the
keyword loop (command seq:status?(loop)) to get the content of the loop
counter described above.
You can equally use the keywords count(1) (command seq:status?(count(1)))
and count(2) (command seq:status?(count(2))) to read the values in these
user-modifiable counters.
With the keyword mem (command seq:status?(mem)) you can get the amount
of free memory in the sequence buffer. While storing a sequence into the CMC's
sequence buffer you can use this command to look up the amount of memory
that is still free. When you use this command before you have stored any
commands into the sequence buffer (or after a seq:clr) it returns the total
amount of memory of the sequence buffer. The number returned is in units of
memory words. But the amount of memory consumed by different commands
stored within a sequence depends on the complexity and the number of
parameters and can not be exactly specified.

Parameter

You must specify one of the keywords step, loop, count(1), count(2) or mem.

Answer

The answer string contains the device number and a value of type <integer>.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE Command not allowed within sequence.

356

String Commands

4.10.8 seq:stop
Function:
Stops a currently running sequence. Implies the command out:resetopt.
Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE Command not allowed within sequence.


See also:
command seq:exec on page 353

357

OMICRON CMEngine

4.10.9 seq:wait ( [<trigger_condition>, <trigger_jump_distance>,]


[<timeout_condition>, <timeout_jump_distance>] )
Function
Mark the end of a sequence step. The command contains one of the following conditions:

A trigger condition that halts the execution of the sequence and waits until the trigger condition is
fulfilled. When the trigger condition is fulfilled, the sequencer jumps to a sequence step defined by
<trigger_jump_distance> and continues the execution there.

A time limit in seconds. The sequencer halts the execution of the sequence until this timeout
condition is reached. When this timeout condition is fulfilled, the sequencer jumps to a sequence
step defined by <timeout_jump_distance> and continues the execution there.

When you specify both a trigger condition and a timeout condition in this command, the commands
waits until the trigger condition is fulfilled or until the timeout condition is fulfilled.

Description
The end of a sequence step is always marked by a seq:wait command.
As already described there are three possible combinations of wait conditions that can be specified in
this command:

A <trigger_condition> together with its related parameter <trigger_jump_distance>.

A <timeout_condition> together with its related parameter <timeout_jump_distance>.

A <trigger_condition> with its <trigger_jump_distance> and a <timeout_condition> with its


<timeout_jump_distance>.

For all three possible combinations the following applies:


When the trigger condition is fulfilled, the sequencer performs a relative jump with the distance
<trigger_jump_distance>. When the timeout condition is fulfilled, the sequencer performs a relative
jump with the distance <timeout_jump_distance>. The jump distance is expressed in sequence steps.
One sequence step consists of all statements between two seq:wait commands and between the
seq:begin and the first seq:wait or the last seq:wait and the seq:end command respectively.
Parameters <trigger_jump_distance> and <timeout_jump_distance>:
The relative jump distances <trigger_jump_distance> and <timeout_jump_distance> have the
following effects:

358

String Commands

<timeout_jump_distance> or
<trigger_jump_distance>

Jump target

-1

Jump 1 sequence step back:The sequencer jumps to


the first command of the sequence step before the
sequence step that is currently executed.

Restart the current sequence step:The sequencer


jumps to the first command of the currently executed
sequence step.

Jump 1 sequence step ahead:The sequencer jumps to


the first command of the next sequence step after the
current sequence step.

Jump 2 sequence steps ahead:The sequencer jumps


to the first command of the next step but one.

Jump backwards to a non-existent


sequence step before the beginning of the
sequence

Return to beginning of sequence and continue


execution at first command of first sequence step.

Jump ahead to a non-existent sequence


step past the end of the sequence

End the sequence execution.

The following picture illustrates the effects of the jump distances described above:

The two jump distances have the following limits:


-127 steps = trigger_jump_distance = 127 steps
-127 steps = timeout_jump_distance = 127 steps
Parameter <timeout_condition>:

359

OMICRON CMEngine

A timeout condition is a number of type <float> that defines the length of the time interval in seconds,
e.g.: 0.34 defines a timeout condition of 340 ms. The timeout value has the following limits:
0 = timeout = approx. 838 s.
Parameter <trigger_condition>:
In a trigger condition you can use the following expressions:

to name a specific binary input:


bin(<integer>): binary input number <integer>, e.g. bin(1).
The condition is TRUE, when this input is active ("1").

to test the global timer: timer.

to use the external trigger line: ext.

to test a counter:
loop=0
loop<>0
count(1)=0
count(1)<>0
count(2)=0
count(2)<>0

360

String Commands

as boolean operators:
not(<bin(X)>): negation of a binary input
and logical AND of 2 expressions or logical OR of 2 expressions
Use the following rules to assemble the above expressions:

At first DeMorgan's theorem is applied to the expression <trigger_condition>


It transforms e.g.
not(bin(1) or bin(2)) and bin(3)
into the valid trigger condition
not(bin(1)) and not(bin(2)) and bin(3).
The expression
not(bin(1) and bin(2)) or bin(3) and bin(4)
is transformed into the valid trigger condition
not(bin(1)) or not(bin(2)) or bin(3) and bin(4).

The resulting expression must comply with the following rules:


A binary input can either be used negated or not negated and every or expression can only
have one and expression as argument.
Examples for valid trigger conditions:
bin(1) and bin(2)
not(bin(1)) and not(bin(2))
bin(1) and bin(2) or bin(3)
bin(1) and bin(2) and not(bin(3))
bin(1) or bin(2)
not(bin(1)) or not(bin(2))
not(bin(1) or bin(2)) and bin(3) = not(bin(1)) and not(bin(2)) and bin(3)
not(bin(1) and bin(2)) or bin(3) and bin(4) = not(bin(1)) or not(bin(2)) or bin(3) and bin(4)

Examples for invalid trigger


conditions:

Error(s):

not(bin(1)) or bin(2) or bin(1)

binary input 1 used negated and not negated.

bin(1) and (bin(2) or bin(3))

equal to bin(1) and bin(3) or bin(2) and bin(3)


=> 2 and expressions at the or expression

An invalid expression as trigger condition causes the error CMERR_INVALID_BOOL.

361

OMICRON CMEngine

Absolute Time
When using time synchronization via IRIG-B or PTP, you can set an absolute time trigger condition
using
time(<yyyy>,<mm>,<dd>,<hh>,<mm>,<ss>)
time(<yyyy>,<doy>,<hh>,<mm>,<ss>)
<doy> stands for "day of year" (value from 1 to 366 allowed).
If the selected IRIG-B configuration does not contain the year information, the <yyyy> information
is ignored for the trigger.
If the trigger date and time is in the past, the trigger will never happen.

External Time Trigger


When using time synchronization via IRIG-B or PTP, you can set an absolute time trigger with
specifying the absolute time to wait for outside the sequence using
exttime(<id>)
The time trigger condition has to be set using the seq:set(exttime(id),...) command.
Currently only <id> 1 is supported.

Pulse Per Second (PPS)


When using time synchronization via IRIG-B or PTP, you can set a trigger condition for a number of
PPS using
pps(<#pulse>)

Programmable Pulse Per Second (PPX)


When using time synchronization using an IRIG-B decoder, you can trigger for a number of PPS
using
ppx(<#pulse>)
The pulse rate for the programmable pulse has to be defined with the irigb:dec:sync command.

Parameters
Parameter

Description

<trigger_condition>

This parameter is assembled as described


above.

<trigger_jump_distance>

This parameter is a number of type <integer>.

<timeout_condition>

This parameter is a value of type <float>.

<timeout_jump_distance>

This parameter is a number of type <integer>.

362

String Commands

Three combinations of these parameters are possible:


1) <trigger_condition>, <trigger_jump_distance>
2) <timeout_condition>, <timeout_jump_distance>
3) <trigger_condition>, <trigger_jump_distance>, <timeout_condition>, <timeout_jump_distance>
Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_INVALID_BOOL

Boolean expression is invalid

CMERR_INVALID_FLOAT

Parameter of type <float> has errors

CMERR_INVALID_INT

Parameter <trigger_jump_distance> or <timeout_jump_distance>


is not of type integer

CMERR_NOT_IN_SEQ_MODE Command can only be used after seq:begin


Example:
seq:wait(bin(2),2,0.5,1)
This wait-command waits until the binary input 2 is "1" or until 0.5 s have passed. The event that
occurs first determines which jump distance is taken:
If the binary input is "1" before 0.5 s have passed, a jump of 2 sequence steps ahead is executed, i.e.
the next sequence step but one is executed. If the 0.5 s are run down first, a jump of 1 sequence step
ahead is executed, i.e. the next sequence step is executed.

363

OMICRON CMEngine

4.10.10 seq:set(exttime(id), <year>,<month>,<day>,<hour>,<minute>,<second>)


Function

Sets the absolute time trigger condition of a seq:wait(exttime(<id>),...)


command outside of a sequence.

Description

With this command you can set the absolute time trigger condition of a
seq:wait(exttime(<id>),...) command. This has to be done outside of the
sequence.
This only works when using time synchronization using IRIG-B or PTP.
Specifying a date in the past returns an "Invalid Date" error.

Parameters

<id>: The index of the exttime condition to use. Currently only 1 is supported.
<year>,<month>,<day>,<hour>,<minute>,<second>: absolute time trigger
condition.

Error code

Explanation

CMERR_IN_SEQ_MODE Command can only be used outside of a sequence.


CMERR_OUT_RANGE

The <id> parameter is not 1 or current time configuration does not


support absolute time trigger conditions.

CMERR_INVALID_DATE

The specified time lies in the past.

Example:
seq:set(exttime(1),2013,6,25,12,12,15)

364

String Commands

4.10.11 seq:set(exttime(id), <year>,<doy>,<hour>,<minute>,<second>)


Function

Sets the absolute time trigger condition of a seq:wait(exttime(<id>),...)


command outside of a sequence.

Description

With this command you can set the absolute time trigger condition of a
seq:wait(exttime(<id>),...) command. This has to be done outside of the
sequence.
This only works when using time synchronization using IRIG-B or PTP.
Specifying a date in the past returns an "Invalid Date" error.

Parameters

<id>: The index of the exttime condition to use. Currently only 1 is supported.
<year>,<doy>,<hour>,<minute>,<second>: absolute time trigger condition
(<doy> stands for "day of year").

Error code

Explanation

CMERR_IN_SEQ_MODE Command can only be used outside of a sequence.


CMERR_OUT_RANGE

The <id> parameter is not 1 or current time configuration does not


support absolute time trigger conditions.

CMERR_INVALID_DATE

The specified time lies in the past.

Example:
seq:set(exttime(1),2013,123,12,12,15)

365

OMICRON CMEngine

4.10.12 Sequencer hints


If you want to use the waveforms tri, square, sum, user in a sequence, please use the following
method.
Normally you would define a waveform in a sequence like this:
seq:begin
out:ana:v(1:3):wav(sum, 1, 3, 0.33, 0)
seq:end
To use the above waveforms in a sequence you have to assign this waveform to the desired signal
before the beginning of the sequence:
out:ana:v(1:3):wav(sum, 1, 3, 0.33, 0)
seq:begin
out:ana:v(1:3):wav(sum, 1, 3, 0.33, 0)
seq:end
The reason is that sample values used within a sequence must be downloaded before the execution
of the sequence.

366

String Commands

4.10.13 Sequencer examples

The following example outputs a sine signal of 100V and 100Hz on voltage output 1 with a duration
of 5 s:
seq:begin
out:ana:v(1:1):a(100);f(100)
out:ana:v(1:1):on
seq:wait(5, 1)
out:ana:v(1:1):off
seq:end
seq:exec

The following example outputs a sine signal of 100V and 100Hz on voltage output 1 until digital
input 1 is active (HIGH):
seq:begin
out:ana:v(1:1):a(100);f(100)
out:ana:v(1:1):on
seq:wait(bin(1), 1)
out:ana:v(1:1):off
seq:end
seq:exec

The following example outputs a sine signal of 100V and 100Hz on voltage output 1 until digital
inputs 1 or 2 are active (HIGH):
seq:begin
out:ana:v(1:1):a(100);f(100)
out:ana:v(1:1):on
seq:wait(bin(1) or bin(2), 1)
out:ana:v(1:1):off
seq:end
seq:exec

367

OMICRON CMEngine

The following example outputs a sine signal of 100V and 100Hz on voltage output 1 until digital
inputs 2 and 3 are active (HIGH):
seq:begin
out:ana:v(1:1):a(100);f(100)
out:ana:v(1:1):on
seq:wait(bin(2) and bin(3), 1)
out:ana:v(1:1):off
seq:end
seq:exec

The following example outputs a sine signal of 100V and 100Hz on voltage output 1 until digital
input 3 is HIGH or digital input 5 is LOW:
seq:begin
out:ana:v(1:1):a(100);f(100)
out:ana:v(1:1):on
seq:wait(bin(3) or not(bin(5)), 1)
out:ana:v(1:1):off
seq:end
seq:exec

The following example outputs a sine signal of 100V and 100Hz on voltage output 1 and
decrements it by 10V every second. A HIGH on digital input 1 switches off this signal.
seq:begin
out:ana:v(1:1):a(100);f(100)
out:ana:v(1:1):on
out:ana:v(1:1):a(-10, step)
seq:wait(0, 1)
out:ana:step
seq:wait(bin(1), 1, 1, 0)
out:ana:v(1:1):off
seq:end
seq:exec

368

String Commands

The following example outputs a sine signal of 100V and 100Hz on voltage output 1 with a duration
of 3 s. In this example the timer is used to set the time limit.
seq:begin
out:ana:v(1:1):a(100);f(100)
out:ana:v(1:1):on
seq:set(timer, 3)
seq:wait(timer, 1)
out:ana:v(1:1):off
seq:end
seq:exec

The following example outputs a sine signal of 100V and 100Hz on voltage output 1 that is
decremented 5 times by 10V every 1 second.
seq:begin
out:ana:v(1:1):a(100);f(100)
out:ana:v(1:1):on
out:ana:v(1:1):a(-10, step)
seq:set(loop, 6)
seq:wait(1, 1)
out:ana:step
seq:wait(loop = 0, 1, 1, 0)
seq:wait(1,1)
out:ana:v(1:1):off
seq:end
seq:exec

369

OMICRON CMEngine

The following example outputs a sine signal of 100V and 100Hz on voltage output 1 that switched
on for a second and then switched off for a second. If digital input 1 is HIGH this loop is ended and
the output is switched off immediately.
seq:begin
out:ana:v(1:1):a(100);f(100)
seq:wait(0, 1)
out:ana:v(1:1):on
seq:wait(bin(2), 2, 1, 1)
out:ana:v(1:1):off
seq:wait(bin(1), 1, 1, -1)
out:ana:resetopt
out:ana:v(1:1):off
seq:end
seq:exec

370

String Commands

4.11 Multimeter Commands


All multimeter commands are available only for CMC 256 or newer test set. Measurements are carried
out in the CMC 256 in a two-stage process. First, the user issues a multimeter command and one, or
more measurement tasks are put on the task vector.
The Measurement DSP (digital signaling processor) then processes each task on the task vector once
every sample period. In order to get a more accurate reading the measuring DSP does not return the
results of these individual samples immediately, but takes a number of samples over the integration
time, and then returns an average result of all the samples.

In the above example the integration time is 10 samples, which would be 3.16 ms if the sampling
frequency were on the 3.16 kHz range.
To calculate the maximum amount of commands that can be issued simultaneously requires
considering how the measurement workload is assigned to the Measurement DSP.
Each multimeter command that the user issues, causes a certain amount of "measurement tasks" to
be issued on the task vector of the Measurement DSP. Only 15 measurement tasks are allowed on
the task vector at any one time. The DC input handling counts as one measurement task.
Each command creates measurement tasks as follows:

371

OMICRON CMEngine

RMS command:
N = RoundUp(Inp / 3)
Phase:
N = RoundUp(1 + (Inp 2) / 3)
Freq:
N = Inp
Power:
N = number of power signals being measured (i.e. Inp / 2)
DC task:
N = 1, if it's on
Inp = number of inputs specified in command
N = measurement tasks used by command
You have to apply the appropriate formula once for each multimeter command issued, then add the
results.
Example:
The following commands are issued:
inp:ana(1,2,3,4):rms?(1.0)
inp:ana(1,2,3,4):phase?(1.0)
inp:ana(1,5,2,6):power?(1.0)
inp:ana(3,4):freq?(24, 0.0)
The total tasks used are:
RMS: RoundUp(4/3) = 2
Phase: RoundUp(1 + (4 2) / 2) = 2
Power: 2
Freq: 2
Total = 2 + 2 +2 +2 + 1 = 9 (assuming DC task is on)
This is fewer than 15 tasks, so there is no problem.
If you issue two of the same commands the formulas have to be applied separately for each
of them, for example:
inp:ana(1):rms?(1.0)
inp:ana(2):rms?(1.0)
...uses 2 tasks, while
inp:ana(1,2):rms?(1.0)
...uses only one.
For this reason you should try to group all inputs into one command.

372

String Commands

In the left side table of contents find the multimeter command of your choice and click the
corresponding entry.

373

OMICRON CMEngine

4.11.1 inp:ana(<input_list>):rms?(<itime>)
Function

Starts the measurement of the RMS value.

Description

Sets up a task to measure both the AC RMS values and the DC values of the
specified inputs. The results are later retrieved using the inp:ana:get?
command.

Parameters

<input_list>
Comma separated list of the binary/analog inputs that are being measured.
<itime>
Integration Time in seconds.

Answer

The return value contains the device number and the command handle that will
be later passed as parameter to inp:ana:get?.
When invoked later, inp:ana:get? will return a string containing the device
number followed by one set of data per input in <input_list>, as follows:
<RMS_AC >
Floating point value containing the RMS value of the AC component of the
measured signal.
<rms_validity>
Integer containing the validity flags of the <RMS_AC> measurement.
<DC_value>
Floating point value containing the DC component of the measured signal.
<dc_validity>
Integer containing the validity flags of the <DC_value> measurement.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_BIN_INPUT

Some of the inputs in the input list was configured as binary


input.

CMERR_TASK_VECTOR_FULL The DSP cannot accept more tasks.


CMERR_NOT_MM_MODE

374

This command is only allowed in multimeter mode.

String Commands

See also:
inp:mode(multimeter|scope) on page 396
inp:avail?(multimeter|scope) on page 395
inp:ana:get? on page 390
Examples:
inp:ana(4,5,6):rms?(1.0)
Result: "1,1;"
inp:ana:get?(1)
Result:
"1,2.733320e-004,0,-2.831995e-003,0,5.412996e-004,0,-2.797413e-002,0,2.704000e-002,0,-2.49874
1e-001,0;"
In this example inputs 4, 5 & 6 are being measured. The integration time is 1 second.
For each input a AC and a DC result is returned (6 results for the given example), each with its
applicable validity flags.

375

OMICRON CMEngine

4.11.2 inp:ana(<input_list>):peak?(<rtime>)
Function

Starts the measurement of the peak value.

Description

Sets up a task to measure maximum and minimum peaks during a given time.
The results are later retrieved using the inp:ana:get? command.

Parameters

<input_list>
Comma separated list of the binary/analog inputs that are being measured.
<itime>
Time interval for the detection of the peak values in seconds.

Answer

The return value contains the device number and the command handle that will
be later passed as parameter to inp:ana:get?.
When invoked later, inp:ana:get? will return a string containing the device
number followed by one set of data per input in <input_list>, as follows:
<Peak_max>
Floating point value containing the maximum peak value detected during
<rtime>.
<max_validity>
Integer containing the validity flags of the < Peak_max > measurement.
<Peak_min>
Floating point value containing the minimum peak value detected during <rtime>.
<min_validity>
Integer containing the validity flags of the < Peak_min > measurement.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_BIN_INPUT

Some of the inputs in the input list was configured as binary


input.

CMERR_TASK_VECTOR_FULL The DSP cannot accept more tasks.


CMERR_NOT_MM_MODE

376

This command is only allowed in multimeter mode.

String Commands

See also
inp:mode(multimeter|scope) on page 396
inp:avail?(multimeter|scope) on page 395
inp:ana:get? on page 390
Examples:
inp:ana(4):peak?(10)
Result: "1,1;"
inp:ana:get?(1)
Result: "1,3.55423e+001,0,-3.55312e+001,0;"
In this example input 4 is set to detect the peak values of the signal during time intervals of 10s. For
each input a maximum and minimum peak are returned, each with its applicable validity flags.

377

OMICRON CMEngine

4.11.3 inp:ana(<input_list>):phase?(<itime>)
Function

Starts the measurement of the phase.

Description

Sets up a task to measure the relative phase of the specified inputs. The results
are later retrieved using the inp:ana:get? command. The first value in the input
list is the reference signal. The relative phases of all signals in the input list are
measured against the reference.

Parameters

<input_list>
Comma separated list of the binary/analog inputs that are being measured. The
first input is always the reference channel.
<itime>
Integration time in seconds.

Answer

The return value contains the device number and the command handle that will
be later passed as parameter to inp:ana:get?.
When invoked later, inp:ana:get? will return a string containing the device
number followed by one set of data per input in <input_list>, as follows:
<Phase>
Floating point value containing the phase of the AC component of the measured
signal. Since the first input in the list is the reference, the value of <Phase> for it
will always be 0.
<phase_validity>
Integer containing the validity flags of the <Phase> measurement.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_BIN_INPUT

Some of the inputs in the input list were configured as binary


input.

CMERR_TASK_VECTOR_FULL The DSP cannot accept more tasks.


CMERR_NOT_MM_MODE

378

This command is only allowed in multimeter mode.

String Commands

See also:
inp:mode(multimeter|scope) on page 396
inp:avail?(multimeter|scope) on page 395
inp:ana:get? on page 390
Examples:
inp:ana(4,5,6):phase?(1.0)
Result: "1,1;"
inp:ana:get?(1)
Result: "1,0.0,0,0.000000e+000,2,0.000000e+000,2;"
In this example inputs 4, 5 & 6 are being measured. The integration time is 1 second.

379

OMICRON CMEngine

4.11.4 inp:ana(<input_list>):freq?(<#periods>,<start level>)


Function

Starts the measurement of the frequency.

Description

Sets up a task to measure the relative phase of the specified inputs. The results
are later retrieved using the inp:ana:get? command.
Because this command measures the frequency over a set number of periods,
instead of having a fixed integration time, the lower the frequency of the signal is,
the longer it takes to return a result.

Parameters

<input_list>
Comma separated list of the binary/analog inputs that are being measured.
<#periods>
Integer. The number of periods over which the frequency is measured. Normally
25 are enough to get an accurate reading.
<start level>
Floating point. This is the level that the measurement takes as the beginning of
the cycle. For example if the start level were two volts then the period would be
measured as follows:

whilst if the level were 0V then the measurement would be like this:

380

String Commands

Answer

The return value contains the device number and the command handle that will
be later passed as parameter to inp:ana:get?.
When invoked later, inp:ana:get? will return a string containing the device
number followed by one set of data per input in <input_list>, as follows:
<Frequency>
Floating point value containing the frequency of the measured signal.
<freq_validity>
Integer containing the validity flags of the <Frequency> measurement.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_BIN_INPUT

Some of the inputs in the input list were configured as binary


input.

CMERR_TASK_VECTOR_FULL The DSP cannot accept more tasks.


CMERR_NOT_MM_MODE

This command is only allowed in multimeter mode.

See also:
inp:mode(multimeter|scope) on page 396
inp:avail?(multimeter|scope) on page 395
inp:ana:get? on page 390
Examples:
inp:ana(4):freq?(25,0.0)
Result: "1,1;"
inp:ana:get?(1)
Result: "1,5.012000e+001,0;"
This shows the frequency being measured on inputs 4, 5 & 6 over 25 periods, starting at a level of 0V.

381

OMICRON CMEngine

4.11.5 inp:ana(<input_list>):power?(<itime>)
Function

Starts the measurement of the power.

Description

This function measures the active, apparent and reactive power and the cos ?
(the power factor) for each "voltage / current" pair in <input_list>. The list must
contain an even number of inputs, which must be sorted in v/i pairs. So the first
input in the list must be a voltage input, the second one a current input, and so
on.
The results are later retrieved using the inp:ana:get? command.
Effective power is measured in Watts (W).
Apparent power is measured in Volt-Ampere (VA).
Reactive power is measured in Volt-Ampere reactive (var).
See the inp:ana:get? command for the explanation of the validity codes.

Parameters

<input_list>
For each power measurement being made, you need to specify the voltage input
and the current input, as follows:
<Power1Volt>, <Power1Current>, <Power2Volt>, <Power2Current>, etc...
<itime>
Integration time in seconds.

Answer

The return value contains the device number and the command handle that will
be later passed as parameter to inp:ana:get?.
When invoked later, inp:ana:get? will return a string containing the device
number followed by one set of data per v/i pair in <input_list>, as follows:
<Active_power>
Floating point value containing the measured active power, in Watts.
<W_validity>
Integer containing the validity flags of the <Active_power> measurement.
<Apparent_power>
Floating point value containing the measured apparent power, in VA.
<va_validity>
Integer containing the validity flags of the <Apparent_power> measurement.
<Reactive_power>
Floating point value containing the measured reactive power, in var.

382

String Commands

<var_validity>
Integer containing the validity flags of the <Reactive_power> measurement.
Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_BIN_INPUT

Some of the inputs in the input list were configured as binary


input.

CMERR_TASK_VECTOR_FULL The DSP cannot accept more tasks.


CMERR_NOT_MM_MODE

This command is only allowed in multimeter mode.

CMERR_INVALID_NO_INPUTS

The input list does not contain a valid (even) number of inputs.

CMERR_INVALID_VI_PAIR

The inputs in the input list are not correctly arranged in v/i pairs.

See also:
inp:mode(multimeter|scope) on page 396
inp:avail?(multimeter|scope) on page 395
inp:ana:get? on page 390
Examples:
inp:ana(2,1):power?(1.0)
Result: "1,1;"
inp:ana:get?(1)
Result: "1,3.662120e-006,0,3.483803e-005,0,3.464501e-005,0,1.051185e-001,0;"
In this example input 2 is configured as voltage and input 1 as current. The integration time is 1
second. The results returned are:
Active Power = 3.662120e-006 W
Apparent Power = 3.483803e-005 VA
Reactive Power = 3.464501e-005 var
cos ? = 1.051185e-001

383

OMICRON CMEngine

4.11.6 inp:ana(<input_list>):sum?(<itime>)
Function

Starts the measurement of the sum of a three-phase system.

Description

This function measures the resultant of three analog inputs considered as a


three-phase system. The number of inputs specified in the list must be a multiple
of 3.
The results are later retrieved using the inp:ana:get? command.
See the inp:ana:get? command for the explanation of the validity codes.

Parameters

<input_list>
For each sum measurement being made, you need to specify three inputs that
will be taken as a three-phase system.
<itime>
Integration time in seconds.

Answer

The return value contains the device number and the command handle that will
be later passed as parameter to inp:ana:get?.
When invoked later, inp:ana:get? will return a string containing the device
number followed by one set of data per v/i pair in <input_list>, as follows:
<RMS_SUM>
Floating point value containing the RMS value of the AC component of the
calculated resultant.
<rms_validity>
Integer containing the validity flags of the <RMS_SUM> measurement.
<DC_SUM>
Floating point value containing the DC component of the calculated resultant.
<dc_validity>
Integer containing the validity flags of the <DC_SUM> measurement.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_BIN_INPUT

Some of the inputs in the input list were configured as binary


input.

CMERR_TASK_VECTOR_FULL The DSP cannot accept more tasks.

384

String Commands

Error code

Explanation

CMERR_NOT_MM_MODE

This command is only allowed in multimeter mode.

CMERR_INVALID_NO_INPUTS

The input list does not contain a valid (multiple of three) number
of inputs.

See also:
inp:mode(multimeter|scope) on page 396
inp:avail?(multimeter|scope) on page 395
inp:ana:get? on page 390
Examples:
inp:ana(1,2,3):sum?(1.0)
Result: "1,1;"
inp:ana:get?(1)
Result: "1,3.662120e-006,0,3.483803e-005,0,3.464501e-005,0,1.051185e-001,0;"
In this example input 2 is configured as voltage and input 1 as current. The integration time is 1
second. The results returned are:
Effective = 3.662120e-006
Apparent = 3.483803e-005
Reactive = 3.464501e-005
cos ? =1.051185e-001

385

OMICRON CMEngine

4.11.7 inp:ana(<input_list>):diff?(<itime>)
Function

Starts the measurement of the line-to-line magnitudes of a three-phase system.

Description

This function measures the line-to-line magnitudes of three analog inputs


considered as a three-phase system. The number of inputs specified in the list
must be a multiple of 3.
The results are later retrieved using the inp:ana:get? command. See the
inp:ana:get? command for the explanation of the validity codes.
While it is possible to mix v and i inputs, the command only makes sense when
applied to a 3-phase voltage system. The first input in each triple in the list is
considered VA, the second VB and the third VC.

Parameters

<input_list>
For each diff measurement being made, you need to specify three inputs that will
be taken as a three-phase system.
<itime>
Integration time in seconds.

Answer

The return value contains the device number and the command handle that will
be later passed as parameter to inp:ana:get?.
When invoked later, inp:ana:get? will return a string containing the device
number followed by one set of data per v/i pair in <input_list>, as follows:
<RMS_VAB>
Floating point value containing the RMS value of the AC component of VAB.
<vab_validity>
Integer containing the validity flags of the <RMS_VAB> measurement.
<DC_VAB>
Floating point value containing the DC component of VAB.
<dcab_validity>
Integer containing the validity flags of the <DC_VAB> measurement.
<RMS_VBC>
Floating point value containing the RMS value of the AC component of VBC.
<vbc_validity>
Integer containing the validity flags of the <RMS_VBC> measurement.
<DC_VBC>

386

String Commands

Floating point value containing the DC component of VBC.


<dcbc_validity>
Integer containing the validity flags of the <DC_VBC> measurement.
<RMS_VCA>
Floating point value containing the RMS value of the AC component of VCA.
<vca_validity>
Integer containing the validity flags of the <RMS_VCA> measurement.
<DC_VCA>
Floating point value containing the DC component of VCA.
<dcca_validity>
Integer containing the validity flags of the <DC_VCA> measurement.
Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_BIN_INPUT

Some of the inputs in the input list were configured as binary


input.

CMERR_TASK_VECTOR_FULL The DSP cannot accept more tasks.


CMERR_NOT_MM_MODE

This command is only allowed in multimeter mode.

CMERR_INVALID_NO_INPUTS

The input list does not contain a valid (multiple of three) number
of inputs.

See also:
inp:mode(multimeter|scope) on page 396
inp:avail?(multimeter|scope) on page 395
inp:ana:get? on page 390
Examples:
inp:ana(1,2,3):sum?(1.0)
Result: "1,1;"
inp:ana:get?(1)
Result: "1,3.662120e-006,0,3.483803e-005,0,3.464501e-005,0,1.051185e-001,0;"

387

OMICRON CMEngine

In this example input 2 is configured as voltage and input 1 as current. The integration time is 1
second. The results returned are:
Effective = 3.662120e-006
Apparent = 3.483803e-005
Reactive = 3.464501e-005
cos ? =1.051185e-001

388

String Commands

4.11.8 inp:ana:sync
Function

Synchronization of multimeter commands.

Description

This function synchronizes all multimeter commands having the same integration
time. In other words, it ensures that these command start at exactly the same
time. You should always use this command when you are measuring things that
are related to each other (for instance, RMS and phase). Only commands that
have the same integration time will be synchronized.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_NOT_MM_MODE This command is only allowed in multimeter mode.


Examples:
inp:ana(4,5,6):phase?(1.0)
Result: "1,1;"
inp:ana(4,5,6):rms?(1.0)
Result: "1,2;"
inp:ana(4):freq?(25,0.0)
Result: "1,3;"
inp:ana:sync
The phase and rms commands will be restarted by the sync command. The freq command is
unaffected, as it has no integration time. If you had not used the sync command, the phase and rms
commands would have slightly different starting times, because of the inherent delays in executing the
commands.

389

OMICRON CMEngine

4.11.9 inp:ana:get?(<command handle>)


Description

Measurements are performed in two stages. First the particular multimeter


command is issued (e.g. inp:ana(1):phase?(1.0)). This puts the command on the
task vector of the measurement DSP and returns a command handle. This
command handle is then used to retrieve the results of the multimeter command.

Parameter

<command handle>
This is the command handle used to retrieve the results of a previously issued
multimeter command.

Return values

The return values depend on which measurement task you are retrieving the
result for, but in general it will have the form:
<result input1>,<validity>,<result input2>,<validity>, etc...
The first number is the actual result and is a floating-point number. The second
number indicates the validity of the result and is an integer.

Validity
There exist four validity conditions, which are indicated bit-wise:
bit4

bit3

bit2

bit1

bit0

real time violation

overload

weak signal

not ready

already read

Already Read
This is not an error. The results of most commands are updated at the end of the integration time. If
you read the result a second time before it has time to update, you will get this flag set.

Return values
This means that the command hasn't got any results yet. For example if you ask for the results of a
command that has just been issued, without waiting for the integration time to be finished, you will
get this validity code.

Weak Signal
This only occurs for the results of the frequency command. It means that there are valid results, but
the signal is too weak to measure the frequency accurately.

Overload
This means that the signal at the input is higher than maximum for the current range and, as a
result, the readings will be wrong.

390

String Commands

Real Time Violation


This indicates that the measuring DSP cannot process all the measurement tasks within the
sample time. This may be caused by putting too many tasks on the task vector at a high sampling
frequency (e.g. 28 kHz). Real time violations are also shown using the sys:status? command.

A combination of these validity codes can be set, for example, a validity of 0 means the result is okay,
3 means that the result is not ready & this is the second time it has already been read.
Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_NONEXIST_MEASJOB Measurement job does not exist.


Examples
inp:ana(4,5,6):rms?(1.0)
Result: "1,2;"
(This means 2 is the command handle assigned to this command)
inp:ana:get?(2)
Result: "1,1.233320e+001,8,2.831995e-003,8,5.412996e-004,0,-2.797413e-002,0 ,
2.704000e-002,0 ,-2.498741e-001,0;"
This shows the first 2 results have an overload, but the last 4 are okay.

391

OMICRON CMEngine

4.11.10 inp:ana:clr(<command handle>) / inp:ana:clr(all)


Function

Cancels one or all measurement tasks.

Description

Removes running multimeter command and clears all the related measurement
tasks from the task vector.

Parameters

<command handle>
This is the command handle of the command to be deleted.
all
Using the keyword all as a parameter causes all the currently running multimeter
commands to be deleted.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_NONEXIST_MEASJOB Measurement job does not exist.


Examples:
inp:ana(4,5,6):phase?(1.0)
Result: "1,1;"
inp:ana(4,5,6):rms?(1.0)
Result: "1,2;"
inp:ana:clr(2)
The rms measurement is cleared, phase measurement continues unaffected.

392

String Commands

4.12 Scope Mode Commands

The scope mode commands allow sampling and recording of analog and digital signals and their
storage in the controlling PC.
In scope mode, recording is started by a trigger condition. The measuring DSP can be stopped (no
acquisition is taking place) or waiting for the trigger; in the latter case, acquisition is being performed
continuously, so the pre-trigger cycles can be registered.

393

OMICRON CMEngine

4.12.1 Configuration and Status Commands


This section lists the scope mode configuration and status commands...

394

String Commands

4.12.1.1

inp:avail?(scope|multimeter)

Function

Checks the availability of measuring functions.

Description

Checks whether metering or scope functions are available in the addressed


device. The multimeter function allows measurement of RMS values, while the
scope commands allow sampling and recording of signals.

Answer

The return value contains the device number and an integer representing the
availability of the selected function: 1 means the function is available, 0 means it
is not available.

Example

inp:avail(multimeter)
Result : "1,1;" Multimeter functionality is available.

395

OMICRON CMEngine

4.12.1.2

inp:mode(scope|multimeter)

Function

Sets scope/multimeter mode for the analog inputs.

Description

Sets scope or multimeter mode for the operation of the measuring inputs. When
multimeter is selected, the scope commands are not available; when the scope
mode is selected, the multimeter commands are in their turn not available.

396

String Commands

4.12.1.3

inp:scope:cfg?(maxacq|minblock)

Function

Query the scope configuration.

Description

Use this command to retrieve information of the capabilities of the measurement


DSP in scope mode.
If maxacq is specified, the command returns the number of samples the
acquisition memory can hold. If minblock is specified, the command returns the
amount of data returned with each fetch block.

Answer

The return value contains the device number and an integer value with the
requested information.

Possible Errors

This command may cause the following CMEngine error code:


Error code: CMERR_256_CMD
Explanation: Command requires CMC 256 or higher

Examples

inp:scope:cfg?(maxacq)
Result: 1,1000000;
The acquisition memory can hold one million samples.
inp:scope:cfg?(minblock)
Result: 1,1024;
1024 samples are returned for each fetch command.

See also:
inp:mode(multimeter|scope) on page 396
inp:avail?(multimeter|scope) on page 395
inp:scope:transfer:fetch? on page 411

397

OMICRON CMEngine

4.12.1.4

inp:scope:status?

Function

Request the status of the acquisition.

Description

This command returns information about the acquisition process.

Answer

<dev_id>,<state>,<samples_acquired>,<last_acq_timestamp>;
<state>
String describing the state of the acquisition. It can be one of the following
values:
stop:
There is no acquisition in progress
wait:
The system is waiting for the trigger condition
acquire:
Acquisition is being performed
calculate: Calculations are being performed on the acquired data
<samples_acquired>
Integer containing the number of samples acquired during the present
acquisition. Valid only if <state> is acquire.
<last_acq_timestamp>
This is the value of the measuring DSP chronometer at the moment when the
last acquisition finished recording. It can be used to identify when a new record
has finished recording.

Possible Errors

This command may cause the following CMEngine error code:


Error code: CMERR_NOT_SCOPE_MODE
Explanation: This command is only allowed in scope mode

Examples

inp:scope:status?
Result: 1,stop,0,0;
No acquisition is in progress.
inp:scope:status?
Result: 1,wait,0,3531355;
Waiting for trigger, no samples acquired.
inp:scope:status?
Result: 1,acquire,13821,3546853;
Acquisition is in progress, 13821 samples acquired so far.

See also:
inp:scope:trig:rearm(on|off) on page 404
inp:scope:trig:start on page 405
inp:scope:acquire(<input_mask>,<length>,<pretrigger>,<buff_mode>) on page 399

398

String Commands

4.12.1.5

inp:scope:acquire(<input_mask>,<total_length>,<pretrigger_length>,
<buff_mode>)

Function

Programs the acquisition parameters.

Description

Use this command to program the parameters for the next acquisition. This
command does not start the acquisition, this is the task of the
inp:scope:trig:start command.

Parameters

<input_mask>
Integer number representing the inputs that must be sampled. Bit 0 represents
analog input 1, and bit 9 represents analog input 10. The bits are set if the inputs
must be sampled, cleared if they must not be sampled. Bit 10 enables binary
data acquisition for all the inputs where sampling is enabled.
<total_length>
Total length of the acquisition in seconds (floating point).
<pretrigger_length>
Part of the acquisition reserved for pre-trigger data (floating point). This number
must be smaller or equal than the <length> parameter. The length of the posttrigger data will therefore be equal to <total_length> <pretrigger_length>.
A negative number indicates that the acquisition starts after the trigger event. For
example, if pretrigger_length = -1, this means the acquisition starts 1 second
after the trigger event.
<buff_mode>
Keyword to select the acquisition buffer configuration. The buffer can be
configured as a flat memory extension (keyword full) or it can be split in two
buffers (keyword split). Normal operation is full, split is used when the
trigger automatic rearming is on, to keep the new data from overwriting the
acquisition memory.

Answer

<dev_id>,<input_mask>,<acq_len>;
<input_mask>
Integer number representing the inputs that are sampled. Bit 0 represents analog
input 1, and bit 9 represents analog input 10. The bits are set if the inputs must
be sampled, cleared if they must not be sampled.
<acq_len>
Acquisition length in samples.

Possible Errors

This command may cause the following CMEngine error code:


Error code: CMERR_NOT_SCOPE_MODE
Explanation: This command is only allowed in scope mode.

399

OMICRON CMEngine

Examples

inp:scope:acquire(32,0.5,0.4,full)
Acquisition is configured to read input 6, without binary data, for a total length of
500 ms, 400 ms of which will be pre-trigger data. The buffer is configured as one
single memory unit.

See also:
inp:scope:trig:rearm(on|off) on page 404
inp:scope:trig:start on page 405
inp:scope:status? on page 398

400

String Commands

4.12.2 Trigger Commands


This section lists the scope mode trigger commands...

401

OMICRON CMEngine

4.12.2.1

inp:scope:trig(<channel>,<slope>,<level>)

Function

Programs the simple trigger parameters.

Description

Use this command to program the trigger parameters for the next acquisition.
This command does not start the acquisition process, this is the task of the
inp:scope:trig:start command.

Parameters

<channel>
Integer number representing the input where the trigger condition must be
detected. The input may be configured as analog or binary, and does not have to
be selected for acquisition in the inp:scope:acquire() command.
<slope>
Keyword + or -. For analog inputs, this parameter represents the signal slope
that will fulfill the trigger condition. If the input is configured as binary input, then
the + keyword selects a 0 > 1 transition, while the - keyword selects a 1 > 0
transition.
<level>
Floating point value of the signal level that will fulfill the trigger condition in
analog inputs. In binary inputs, this parameter has no effect. Please note that this
is so even if the input is configured as potential-sensing; in that case, only the
input threshold will determine whether the input is sensing a 1 or a 0.

Answer

<dev_id>,<input_mask>,<acq_len>;
<input_mask>
Integer number representing the inputs that are sampled. Bit 0 represents analog
input 1, and bit 9 represents analog input 10. The bits are set if the inputs must
be sampled, cleared if they must not be sampled.
<acq_len>
Acquisition length in samples.

Possible Errors

This command may cause the following CMEngine error code:


Error code: CMERR_NOT_SCOPE_MODE
Explanation: This command is only allowed in scope mode.

Examples

inp:scope:trig(1,-,0.0)
If input 1 is binary, the trigger will be detected in a 1 to 0 transition. If it is analog,
then the trigger will be detected in a positive-to-negative (negative slope)
transition, at the value of 0 volts.
inp:scope:trig(5,+,25.0)

402

String Commands

If input 5 is binary, the trigger will be detected in a 0 to 1 transition. If it is analog,


then the trigger will be detected when the signal level reaches 25 V in a positive
slope (i.e. on the leading edge of a waveform when the signal reaches 25 V).
See also:
inp:scope:trig:rearm(on|off) on page 404
inp:scope:trig:start on page 405
inp:scope:trig:abort on page 407
inp:scope:trig:force on page 406

403

OMICRON CMEngine

4.12.2.2

inp:scope:trig:rearm(on|off)

Function

Turns the automatic rearm mode on or off.

Description

Use this command to configure the automatic rearming of the trigger. If this
feature is set to on, when an acquisition is finished the system will immediately
begin to look for the next trigger condition. If the feature is off, then the system
will stop acquiring and the trigger will have to be manually restarted (with the
inp:scope:trig:start command).

Possible Errors

This command may cause the following CMEngine error code:


Error code: CMERR_NOT_SCOPE_MODE
Explanation: This command is only allowed in scope mode.

See also:
inp:scope:trig:simple(<channel>,<slope>,<level>) on page 402
inp:scope:trig:start on page 405
inp:scope:trig:abort on page 407
inp:scope:trig:force on page 406

404

String Commands

4.12.2.3

inp:scope:trig:start

Function

Start an acquisition.

Description

Use this command to start an acquisition. When this command is issued, the
system goes into wait mode, looking for the trigger condition that has been
programmed with the inp:scope:trig:simple(<channel>,<slope>,<level>)
command.

Possible Errors

This command may cause the following CMEngine error codes:


Error code: CMERR_NOT_SCOPE_MODE
Explanation: This command is only allowed in scope mode.
Error code:
CMERR_TRANS_START
Explanation: A data transfer is in progress.

See also:
inp:scope:trig:simple(<channel>,<slope>,<level>) on page 402
inp:scope:trig:rearm(on|off) on page 404
inp:scope:trig:abort on page 407
inp:scope:trig:force on page 406

405

OMICRON CMEngine

4.12.2.4

inp:scope:trig:force

Function

Force trigger.

Description

Use this command to force a trigger. When this command is issued, the system
will go into acquire mode immediately without looking for the trigger condition
any longer. The trigger instant will be the moment the command was issued. It is
possible to issue this command when the system is in wait or stop states
there is no need for a previous inp:scope:trig:start command to be issued.

Possible Errors

This command may cause the following CMEngine error codes:


Error code: CMERR_NOT_SCOPE_MODE
Explanation: This command is only allowed in scope mode.
Error code:
CMERR_TRANS_START
Explanation: A data transfer is in progress.

See also:
inp:scope:trig:simple(<channel>,<slope>,<level>) on page 402
inp:scope:trig:rearm(on|off) on page 404
inp:scope:trig:start on page 405
inp:scope:trig:abort on page 407

406

String Commands

4.12.2.5

inp:scope:trig:abort

Function

Cancel acquisition.

Description

This command stops the acquisition immediately aborting any currently recording
acquisition. Use it to stop an acquisition and send the system back to stop
state. This command can be issued at any time and it will be effective
immediately. It is possible to issue this command when the system is in wait or
stop states there is no need for a previous inp:scope:trig:start command to
be issued.

Possible Errors

This command may cause the following CMEngine error codes:


Error code: CMERR_NOT_SCOPE_MODE
Explanation: This command is only allowed in scope mode.
Error code:
CMERR_TRANS_START
Explanation: A data transfer is in progress.

See also:
inp:scope:trig:simple(<channel>,<slope>,<level>) on page 402
inp:scope:trig:rearm(on|off) on page 404
inp:scope:trig:start on page 405
inp:scope:trig:stop on page 408

407

OMICRON CMEngine

4.12.2.6

inp:scope:trig:stop

Function

Cancel acquisition.

Description

This command waits for the currently recording acquisition to stop (if any) and
then goes into stop state, even if the rearm mode is on.

Possible Errors

This command may cause the following CMEngine error codes:


Error code: CMERR_NOT_SCOPE_MODE
Explanation: This command is only allowed in scope mode.
Error code:
CMERR_TRANS_START
Explanation: A data transfer is in progress.

See also:
inp:scope:trig:simple(<channel>,<slope>,<level>) on page 402
inp:scope:trig:rearm(on|off) on page 404
inp:scope:trig:start on page 405
inp:scope:trig:abort on page 407

408

String Commands

4.12.3 Block Transfer Commands


The commands in this section are block transfer commands. After an acquisition is finished, they are
used to transfer data from the CMC test set to a shared memory file, which will later be accessed by
the users application. This method is required, as the amount of data is so large as to make standard
return method (values contained in a string that is returned by the command) impracticable. Any
program that uses these commands needs to support pointers to be able to access the shared
memory file.

409

OMICRON CMEngine

4.12.3.1

inp:scope:transfer:start

Function

Start the data transfer.

Description

Use this command to start a transfer. The data to be transferred are those of the
last acquisition. The user must take care that the acquisition buffer contains valid
data. For that, the command inp:scope:status? should be used.

Possible Errors

This command may cause the following CMEngine error codes:


Error code: CMERR_NOT_SCOPE_MODE
Explanation: This command is only allowed in scope mode.
Error code:
CMERR_TRANS_START
Explanation: A data transfer is in progress.

See also:
inp:scope:transfer:fetch? on page 411
inp:scope:transfer:finish? on page 412

410

String Commands

4.12.3.2

inp:scope:transfer:fetch?

Function

Fetch a block of data from the CMC test set to the shared memory file.

Description

Use this command to acquire a new block of data from the CMC tet set.

Answer

<dev_id>,<samples_transferred>;
<samples_transferred>
Integer value with the cumulative number of samples transferred so far. The user
will know the transfer is finished when two consecutive fetch commands return
the same value. Alternatively, the user may calculate the total number of
samples to be fetched based on the acquisition length, number of channels and
sampling rate, and thus know when the end of the transfer has been reached.
<acq_len>
Acquisition length in samples.

Possible Errors

This command may cause the following CMEngine error codes:


Error code: CMERR_NOT_SCOPE_MODE
Explanation: This command is only allowed in scope mode.
Error code:
CMERR_TRANS_NOT_START
Explanation: Data transfer was not started.

Examples

inp:scope:transfer:start
inp:scope:transfer:fetch?
Returns: 1,1024;
inp:scope:transfer:fetch?
Returns: 1,2048;
...

See also:
inp:scope:transfer:start on page 410
inp:scope:transfer:finish? on page 412

411

OMICRON CMEngine

4.12.3.3

inp:scope:transfer:finish?

Function

Finishes the transfer.

Description

This command stops the transfer process and closes the shared memory file.
The contents of this file are then ready to be accessed by the users application.

Answer

<dev_id>,<file_ID_string>;
<file_ID_string>
Unique ID that can be used to open the shared memory file to access the data.
<acq_len>
Acquisition length in samples.

Possible Errors

This command may cause the following CMEngine error codes:


Error code: CMERR_NOT_SCOPE_MODE
Explanation: This command is only allowed in scope mode.
Error code:
CMERR_TRANS_NOT_START
Explanation: Data transfer was not started.

See also:
inp:scope:transfer:start on page 410
inp:scope:transfer:fetch? on page 411

412

String Commands

4.12.3.4

Example: Acquisition/Transfer Procedure

Make an acquisition of 30 ms, pre-trigger 10 ms, 2 binary inputs, 9 kHz sampling rate.
CMExec: Parsing '1', 'inp:avail?(scope)'
CMExec: Returning '1,1;'
CMExec: Parsing '1', 'inp:mode(scope)'
CMExec: Returning''
CMExec: Parsing '1', 'inp:scope:cfg?(maxacq)'
CMExec: Returning '1,1000000;'
CMExec: Parsing '1', 'inp:scope:cfg?(minblock)'
CMExec: Returning '1,1024;'
CMExec: Parsing '1', 'inp:scope:status?'
CMExec: Returning '1,stop,0,0;'
CMExec: Parsing '1', 'inp:scope:trig(7,+,1.000000e+001)'
CMExec: Returning ''
CMExec: Parsing '1', 'inp:ana:cfg(9481,1.0)'
CMExec: Returning ''
CMExec: Parsing '1', 'inp:scope:acquire(1024,3.000000e-002,1.000000e-002,full)'
CMExec: Returning ''
CMExec: Parsing '1', 'inp:scope:trig:rearm(off)'
CMExec: Returning ''
CMExec: Parsing '1', 'inp:scope:trig:start'
CMExec: Returning ''
CMExec: Parsing '1', 'inp:scope:status?'
CMExec: Returning '1,wait,0,0;'
CMExec: Parsing '1', 'inp:scope:transfer:start'
CMExec: Returning ''
CMExec: Parsing '1', 'inp:scope:transfer:fetch?'
CMExec: Returning '1,284;'
CMExec: Parsing '1', 'inp:scope:transfer:finish?'
CMExec: Returning '1,Omicron Transient Record Shared Memory Area;'
Code Sample: How to Access a Shared Memory File from C++ using the ID String
Open the file using code like this:
HANDLE hMapping = CreateFileMapping((HANDLE)0xFFFFFFFF, NULL,
PAGE_READWRITE, 0, m_nSize, strID);
DWORD dwResult = GetLastError();
if (dwResult != ERROR_ALREADY_EXISTS) return false;
if (hMapping == NULL >> hMapping == INVALID_HANDLE_VALUE) return false;
// Convert the handle into a pointer.
m_p = (DWORD*)MapViewOfFile(hMapping, FILE_MAP_ALL_ACCESS, 0, 0, 0);

413

OMICRON CMEngine

In this code, the strID parameter in the call to CreateFileMapping is the string returned by
int:scope:transfer:finish?.
If binary data is selected it as treated as a separate channel (channel 11).
The layout of the acquisition buffer is as follows:
Each entry is a double word (32 bit).
There is a header where:
word 1 = acquisition length (in samples);
word 2 = bitmap of channels:
Bit

15

14

13

12

11

10

Inp
ut

bin
ary

10

Followed by a block of data for each channel, where each channel is in sequence according to its
number. For example, if you select an acquisition of 2 samples length for channels 2, 6, 7 and the
binary inputs, the buffer would look like this:
word 1:
word 2:
word 3:
word 4:
word 5:
word 6:
word 7:
word 8:
word 9:
word10:

414

0000002
00004C2
00xxxxx
00xxxxx
00xxxxx
00xxxxx
00xxxxx
00xxxxx
00xxxxx
00xxxxx

//
//
//
//
//
//
//
//
//

channels
sample 1
sample 2
sample 1
sample 2
sample 1
sample 2
sample 1
sample 2

2,
of
of
of
of
of
of
of
of

6, 7 & 11
channel 2
channel 2
channel 6
channel 6
channel 7
channel 7
binary inputs
binary inputs

String Commands

4.12.4 Harmonic Commands


The harmonic commands are used to define an acquisition and then perform harmonic analysis on the
captured waves. These commands are then an alternative way to program an acquisition; to actually
start the acquisition, the trigger commands are used in the same way as with the acquisition
commands. After the acquisition and processing are finished, it is possible to retrieve both the
acquired samples, via the block transfer commands, and the result of the harmonic analysis. The latter
can be retrieved through a shared memory file or through the standard string interface.

415

OMICRON CMEngine

4.12.4.1

inp:scope(<input_list>):harm(<req_harmonics>[,<pretrigger>])

Function

Sets the parameters for a harmonic analysis.

Description

This command tells the measuring DSP to configure a acquisition and then carry
out a harmonic analysis on the data of that acquisition. Therefore the parameters
from any previous inp:scope:acquire() command will be overwritten.

Parameters

<input_list>:
This parameter is of type <enumeration> and defines for which channels the
acquisition will take place. The first channel in the list is the reference channel for
the phase of the fundamental.
<req_harmonics>:
Number of harmonics to be calculated (integer). If the parameter is 1, only the
fundamental component is calculated. A value of 2 would request calculation of
the fundamental and the 2nd harmonic, and so on.
Depending on the capacity of the measuring DSP, the actual number of
harmonics calculated may be smaller than the number requested.
<pretrigger>:
This optional floating point value defines the length in seconds of the pre-trigger
time, if it is desired. The defined time must correspond to 2047 samples or fewer.

Answer

<dev_id>,<ref_input>,<input_mask>,<acq_len>;
<ref_input>
Reference input for the phase of the fundamental.
<input_mask>
Integer number representing the inputs for the harmonic analysis. Bit 0
represents analog input 1, and bit 9 represents analog input 10. The bits are set
if the inputs must be sampled, cleared if they must not be sampled.
<acq_len>
Acquisition length of the harmonic analysis.

Possible Errors

This command may cause the following CMEngine error code:


Error code: CMERR_NOT_SCOPE_MODE
Explanation: This command is only allowed in scope mode.

Examples

See also:

416

inp:scope(1,2,3):harm(5, 0.02)
Analysis is requested for inputs 1, 2 and 3; input 1 is phase reference.
Fundamental and harmonics up to 4th order are requested, with a pre-trigger
time of 20 ms.

String Commands

inp:scope:trig:rearm(on|off) on page 404


inp:scope:trig:start on page 405
inp:scope:status? on page 398
inp:scope:acquire() on page 399

417

OMICRON CMEngine

4.12.4.2

inp:scope:harm?(transfer)

Function

Transfer the harmonic data to a shared memory file.

Description

Use this command to transfer the harmonic data from the CMC test set to a
shared memory file. The data to be transferred are those of the last acquisition
with harmonic analysis. Take care that the harmonic analysis buffer contains
valid data. For that, use the command inp:scope:status?.

Answer

<dev_id>,<file_ID_string>;
<file_ID_string>
Unique ID that can be used to open the shared memory file to access the data.

Possible Errors

This command may cause the following CMEngine error code:


Error code: CMERR_NOT_SCOPE_MODE
Explanation: This command is only allowed in scope mode.

See also:
inp:scope:harm?(<channel>,<start_harm>) on page 420
inp:scope:transfer:finish? on page 412

The data block is divided as follows (each entry is a DWORD):


1 No.
Channels

2 No.
Harmonics
Requested

3 Channel #
(1st channel)

4 No.
Harmonics
calculated

5 Status Bits

6
Fundamental
freq.

7 Harm0 Ampl

9 Harm1 Ampl

Channel#
(2nd channel)

No. Harmonics Status bits


calculated

Fundamental
freq.

Harm0 Ampl

etc.

418

Harm0 Phase

9 Harm1 Ampl

10 Harm1
Phase

etc.

Harm1 Ampl

Harm1 Phase

etc.

String Commands

Unlike the <req_harmonics> parameter in the inp:scope:harm() command, the number of harmonics
actually calculated does not include the fundamental Therefore, a value of 0 means that only the
fundamental was calculated, a value of one means that the fundamental and the 2nd harmonic were
calculated, etc. It follows that the number here will be one smaller than the <req_harmonics>
parameter if all requested harmonics were calculated. If the number of harmonics calculated is 1,
then not even the fundamental was calculated.
The amplitude is in Volts or Ampere (depending on the type of the input). The phase of the harmonic
of each channel is always relative to the phase of the fundamental for the same channel, while the
phase for the fundamental is really the phase of the actual signal and relative to the phase of the
fundamental of the reference channel. This means the phase of the fundamental of the reference
channel is always 0.
Note: the fundamental frequency, all amplitudes and all phases are stored as 32 floating point
numbers represented in IEEE 754 format, i.e., in C or C++ cast it to a float to get the value in the
correct format.
Meaning of the status bits:
Bit 2

Bit 1

Bit 0

Frequency out of range

Weak signal

Overload

Overload indicates that the signal exceeded the maximum range of the channel during the
acquisition. Any overload will cause invalid results in the harmonic analysis (because the signal is
"chopped").
Weak signal means that the signal of the channel was below 10% of the range. This will cause the
harmonic analysis to be less accurate.
Frequency out of range means the frequency of the input signal was too high or too low for the given
sampling frequency. The maximum amount of data in the file is 5240 bytes; that is 10 channels, each
of which uses 3 bytes for channel header, and up to a maximum of 64 harmonics. So: (10 *(3 + 2*64))
* sizeof(DWORD) = 5240.

419

OMICRON CMEngine

4.12.4.3

inp:scope:harm?(<channel>,<start_harmonic>)

Function

Get results of the harmonic analysis in string format.

Description

Use this command to return the harmonic data from the CMC test set in string
format. The data to be transferred are those of the last acquisition with harmonic
analysis. Take care that the harmonic analysis buffer contains valid data. For
that, use the command inp:scope:status?. This command will return data for a
maximum of 8 harmonics.

Parameters

<channel>:
Channel to retrieve the harmonics. It must be one of the channels specified in the
<input_list> parameter of the inp:scope:harm() command.
<start_harmonic>:
First harmonic for which the data must be returned. A value of 1 means to begin
with the fundamental data, a value of two with the second harmonics data, etc.
Since the command will return data for a maximum of 8 harmonics, repeated
commands with increasing values of this parameter are required if the number of
calculated harmonics (including the fundamental) is greater than 8
(<req_harmonics> parameter in the inp:scope:harm() command).

Answer

<dev_id>, <calc_harmonics>, <freq_fundamental>,


{<amplitude>, <phase>} ...;
<calc_harmonics>
Number of harmonics that have actually been calculated. The number of
harmonics actually calculated does not include the fundamental, unlike the
<req_harmonics> parameter in the inp:scope:harm() command. Therefore, a
value of 0 means that only the fundamental was calculated, a value of one
means that the fundamental and the 2nd harmonic were calculated, etc. It follows
that the number here will be one smaller than the <req_harmonics> parameter if
all requested harmonics were calculated. If the number of harmonics calculated
is 1, then not even the fundamental was calculated.
<freq_fundamental>
Frequency of the fundamental component. Please note that this value is only
present if the <start_harmonics> parameter is 1 and <calc_harmonics> is
not 1.
<amplitude>,<phase>
A pair of values for each of the calculated harmonics. The first pair carries the
data for <start_harmonics>; there may be a maximum of 8 pairs in the string.

Possible Errors

This command may cause the following CMEngine error code:


Error code:

420

CMERR_NOT_SCOPE_MODE

String Commands

Explanation:
Examples

This command is only allowed in scope mode.

inp:scope(8):harm(16, 0.05)
inp:scope:trig:force
inp:scope:status?
Result: "1,acquire,2048,3531355;"
inp:scope:status?
Result: "1,stop,0,3546853;"
inp:scope:harm?(8,1)
Result: "1,15, 3.000000e+002, 9.984131e+000,-8.221289e+001,
1.413003e-004,-2.477148e+001, 1.065843e-004,-1.069395e
+002,2.923355e-001,8.869141e+001, 3.105849e-004,-4.031860e
+000,2.542064e-004,1.589082e+002, 5.566329e-005,5.515039e
+001,2.153777e-004,1.313086e+002;"
inp:scope:harm?(8,9)
Result: "1,15, 3.461838e-004,-7.493555e+001,1.739971e-004,-1.234102e+002,
2.020113e-004,-4.169141e+001,8.604676e-005,1.682227e
+001,1.222454e-004,1.167246e+002,1.112260e-004,1.773672e+002,
1.260899e-004,1.215469e+002;"

See also:
inp:scope:harm?(transfer) on page 418

421

OMICRON CMEngine

4.13 CB Simulation Commands


From this chapter, please select a CB Simulation command topic of your choice...

422

String Commands

4.13.1 cb:time(<trip>,<close>,<auto>,<52a% trip>,<52b% trip>,<52a%


close>,<52b% close)
Description

Set CB trip, close and auto-reset times and factors for the auxiliary contacts. This
command is only allowed as long as the CB simulation is deactivated.

Parameters

<trip>
Trip time of the circuit breaker in seconds.
<close>
Close time of the circuit breaker in seconds.
<auto>
Time in seconds after that the circuit breaker simulation automatically goes back
to its initial state.
<auto> = 0 disables auto-reset.
<52a% trip>
<52b% trip>
<52a% close>
<52b% close>
Timing of the auxiliary contacts in relation to the trip or close time (e.g., <52a %
trip> = 0.23, means 23% of the trip time).
See diagram below.

423

OMICRON CMEngine

4.13.2 cb:time?
Description

Returns the CB simulation times and factors.

Answer

Returns the values in the same order as specified in the cb:time command.

424

String Commands

4.13.3 cb:def(trip[(<idx>)]|close|cb52a[(<idx>)]|cb52b[(<idx>)]|cb52a or|cb52b


or|cb52a and|cb52b and,<bool_expr>)
Description

Define simulation input or output routing. This command is only allowed as long
as the CB simulation is deactivated.

Parameters

trip[(<idx>)]
close
Defines the routing of the simulation inputs. In case of trip it is possible to add an
index (1, 2, 3) specifying the pole (L1, L2, L3) to operate.
cb52a[(<idx>)]
cb52b[(<idx>)]
Defines the routing of the simulation outputs. It is possible to add an index (1, 2,
3) specifying the pole (L1, L2, L3) to operate.
cb52a or|and
cb52b or|and
Defines the OR or AND routing of the simulation outputs for all poles (L1, L2, L3)
of cb52a|b.
<bool_expr>
Defines the inputs or outputs that are used for the specified function.

425

OMICRON CMEngine

4.13.4 cb:def? (trip[(<idx>)]|close|cb52a[(<idx>)]|cb52b[(<idx>)]|cb52a or|


cb52b or|cb52a and|cb52b and)
Description

Returns the CB simulation input or output routing.

Answer

Returns the <bool_expr> as specified in the cb:def command.

426

String Commands

4.13.5 cb:def(clr)
Description

Clears the simulation input and output routing. This command is only allowed as
long as the CB simulation is deactivated.

427

OMICRON CMEngine

4.13.6 cb:start(on|off)
Description

428

Activates CB simulation and sets CB initial state (on = closed or off = open). Can
also be used to change the CB state when simulation is active.

String Commands

4.13.7 cb:stop
Description

Deactivates CB simulation.

429

OMICRON CMEngine

4.13.8 cb:lock
Description

430

If the CB simulation is currently in state closed or open, it will not respond to


any trigger anymore until cb:free is received. If the simulation is in either the
opening or closing state, it will continue until it reaches the closed or open
state and then lock. If the CB simulation is inactive, this command is ignored.

String Commands

4.13.9 cb:free
Description

Brings the CB simulation from the locked state back to opened or closed. If
the CB simulation is inactive or not locked, this command is ignored.

431

OMICRON CMEngine

4.13.10 cb:status?
Description

Query simulation status. Returns the current state of the state machine and the
initial state (integer state index). If both returned values are zero, the connected
CMC does not support CB simulation.

Answer

The command returns 4 values:


<currentStateL1>,<currentStateL2>,<currentStateL3>,<initialState>
<currentStateL1>,<currentStateL2>,<currentStateL3>:
Current state of L1, L2 an L3 as Integer.
<initialState>:
Initial state of the CB simulation as Integer.
The returned values correspond to the numbers shown in the picture below:

432

String Commands

4.14 Time Synchronization Commands


The CMC test sets offer multiple different options for time synchronization:

Time synchronization via CMIRIG-B.


Only available with network-based CMC test sets; needs the CMIRIG-B accessory.

Time synchronization via PTPv2.


Only available on test sets of type NET-1B or newer; needs an external PTPv2 time source.

Time synchronization via NTP.


Only available with network-based CMC test sets; needs reachable NTP server.

Time synchronization via CMGPS.


Needs CMGPS accessory.

You can use the time synchronization of CMIRIG-B, PTPv2 or CMGPS to use time-triggered signal
outputs for end-to-end tests. Synchronization via NTP is only synchronizing the internal device clock,
for example for the time stamps of GOOSE packets. For further details check the Synchronizing
CMC Test Sets section of the Test Universe Help.
Here is an overview of available time configurations (excluding synchronization via CMGPS). The
numbers in the first column are used by the commands sys:time:cfg? on page 438,
sys:time:cfg(<timeConfiguration>) on page 439, sys:time:def? on page 440 and
sys:time:cfg(<timeConfiguration>) on page 437.
Cfg.

Name

No time configuration selected

Trigger via IRIG-B using a


CMIRIG-B
The CMC test set works as IRIGB decoder. An IRIG-B generator
(a third party product; e.g., a
satellite synchronizing clock) is
connected to the CMC test set's
external Interface input via a
CMIRIG-B. The IRIG-B generator
is connected to IRIG-B/PPS IN,
the test object to PPX OUT, the
CMC test set to CMC.
The trigger is generated from the
received IRIG-B time reference.
The PPX OUT pulse sequence is

Connection diagram example

433

OMICRON CMEngine

Cfg.

Name
in synchronization with the
CMIRIG-B input on IRIG-B/
PPS IN.

IRIG-B Generator Master using


a CMIRIG-B
The CMC test set works as IRIGB generator and provides its
generated time reference to the
CMIRIG-B input CMC. At the
CMIRIG-B output IRIG-B OUT
the time reference is available for
the test object (e.g., a phasor
measurement unit).
The pulse sequence at PPX OUT
(fixed to 1 pulse per second) is in
synchronization with CMC's
internal time base.

IRIG-B Generator following


PPS using a CMIRIG-B
The CMC test set works as IRIGB generator following an external
pulse sequence (1 pulse per
second) fed into the IRIG-B/
PPS IN input. The CMC provides
its generated time reference to
the CMIRIG-B input CMC. At the
CMIRIG-B output IRIG-B OUT,
the time reference is available for
the test object.
The pulse sequence at PPX OUT
(fixed to 1 pulse per second) is in
synchronization with the external
pulse sequence.

434

Connection diagram example

String Commands

Cfg.

Name

Connection diagram example

IRIG-B Generator following


GPS using a CMIRIG-B and a
CMGPS
The CMC test set works as IRIGB generator following a 1 pps
pulse sequence from a CMGPS
synchronization unit fed into the
CMGPS input. The CMC provides
its generated time reference to
the CMIRIG-B input CMC. At the
CMIRIG-B output IRIG-B OUT,
the time reference is available for
the test object.
The pulse sequence at PPX OUT
(fixed to 1 pulse per second) is in
synchronization with the 1 pps
pulse sequence from the CMGPS
synchronization unit.
If you use the CMIRIGB in combination with
the CMGPS
synchronization unit,
make sure to connect
the 100 - 240 VAC/
18 VDC power supply
unit to the CMGPS.
Else, CMEngine cannot
detect the CMGPS.

Trigger via PTPv2


The CMC test set synchronizes
its internal clock to a PTPv2 time
source, and generates trigger
signals based on this internal
clock. Connect a suitable PTPv2
time source to one of the Ethernet
ports ETH1 or ETH2 at the CMC
test set's rear side.

435

OMICRON CMEngine

Cfg.

Name

IRIG-B Generator following


PTPv2 using a CMIRIG-B
The CMC test set works as IRIGB generator following a
synchronization signal from a
PTPv2 time source fed into the
test set's ETH1 or ETH2 Ethernet
port. The CMC provides its
generated time reference to the
CMIRIG-B input CMC. At the
CMIRIG-B output IRIG-B OUT,
the time reference is available for
the test object.

Time-stamping via NTP using


the NTP Client in CMC
The Network Time Protocol (NTP;
a networking protocol for clock
synchronization between
computer systems over data
networks) is a client/server
application. Each device in a
network, such as a workstation,
router, server, etc., that has to be
synchronized with the network
time server must be equipped
with an NTP client software.
In the case of a CMC test set this
is done by the CMC firmware.
Therefore the CMC receives its
time from the networks time
server if it is configured correctly.

436

Connection diagram example

String Commands

4.14.1 sys:time:cfg(<timeConfiguration>)
Function

Sets the specified time configuration for the CMC test set.

Description

With this command it is possible to set the CMC test sets time configuration.
Locking the time source resource is obligatory.

Parameters

<timeConfiguration>:
please check the table in the Time synchronization commands on page 433
topic.

Possible Errors
This command may cause the following CMEngine error codes:

CMERR_OUT_OF_RANGE
Value is out of range (configuration is not available).

CMERR_IRIGB_NOT_LOCKED
The time source resource is not locked.

Example
In this example the "Trigger via PTPv2" configuration is selected.
sys:time:cfg(6)

437

OMICRON CMEngine

4.14.2 sys:time:cfg?
Function

Returns all available time configurations.

Description

With this command it is possible to read the list of available time configurations
(returned in a comma separated string). Time configurations 0 and 8 are always
available.

Answer

The command returns a list of available configuration numbers. For the meaning
of these numbers please check the table in the Time synchronization
commands on page 433 topic.

Example
In this example the time configurations "Not used", "Trigger via PTPv2", "NTP Client" are available.
sys:time:cfg?
Return value: 1,0,6,8;

438

String Commands

4.14.3 sys:time:cfg?(<timeConfiguration>)
Function

Returns information about a time configuration mode.

Description

This command returns additional info about the specified time configuration
mode.

Parameters

<timeConfiguration>:
please check the table in the Time synchronization commands on page 433
topic.

Answer

The command returns a string with the following structure:


<dev_id>,<time_source>;
<time_source>:
enc = IRIG-B encoder is the active time source.
dec = IRIG-B decoder is the active time source.
none = internal clock is the active time source.

439

OMICRON CMEngine

4.14.4 sys:time:def?
Function

Indicates the currently selected time configuration and the connection state of an
IRIG-B device.

Description

With this command it is possible to determine the time configuration currently


selected for the CMC test set, and whether a CMIRIG-B device is connected to
the CMC test set.

Answer

The command returns a string with the following structure:


<dev_id>,<timeConfiguration>,<connectedIRIGB>,connectedIRIGB-External>;
<timeConfiguration>:
please check the table in the Time synchronization commands on page 433
topic.
<connectedIRIGB>:
1 if an IRIG-B box is connected.
0 if no IRIG-B box is connected.
<connectedIRIGB-External>:
1 if a GPS device is connected to the IRIG-B box.
0 if no GPS device is connected to the IRIG-B box.

Example
sys:time:cfg(6)
sys:time:def?
Return value: 1,6,1,0;
The CMC currently is in time configuration mode "Trigger via PTPv2"; a CMIRIG-B device is
connected directly to the CMC.

440

String Commands

4.14.5 sys:time:datetime?
Function

Gets the current date and time (depending on the selected time configuration).

Description

Returns the UTC date/time information. The source of this time is depending on
the selected time configuration.
Cfg.

Answer

Date/time source

System clock of the CMC

IRIG-B decoder time

IRIG-B encoder time

IRIG-B encoder time

IRIG-B encoder time

PTP time

PTP time

System clock of the CMC (may be synchronized to NTP)

This command returns a string with the following structure:


<dev_id>,<year>,<month>,<day>,<hour>,<minute>,<second>,<day of the
year>,<SBS>,<CF>;
The last two fields are only set in IRIG-B modes.
<SBS>:
Straight Binary Seconds (seconds of the day). This is redundant information
to the time (this information is not available in time configuration 0 and 8 and
will always be 0).
<CF>:
The CF value is of type <int>. The IEEE C37.118 control function (CF)
assignment can be found in the IRIG-B documentation (this information is not
available in time configuration 0 and 8 and will always be 0).

441

OMICRON CMEngine

Possible Errors:
This command may cause the following CMEngine error codes:
Error Code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence.

Example:
sys:time:datetime?
Return value: 1,2013,2,26,8,6,41,57,0,0;

442

String Commands

4.14.6 IRIG-B Commands


These commands are used to control the IRIG-B functionality of a device. These commands work on
each network-based CMC device. On other devices the commands return a
"CMERR_IRIGB_NOT_AVAIL" error.
It is possible to write a configuration synchronously or asynchronously to the encoder/decoder. The
synchronous write ensures that the configuration is not written while a new frame is created. The
configuration is accepted after the next pulse per second (PPS) and a frame later the first frame with
that configuration is created.
With an asynchronous write the configuration is accepted immediately and the next frame contains the
configuration. The user has to ensure that it is written outside the forbidden time frame, e.g.,
immediately after a pulse per second (PPS). This could be useful in a sequence immediately after a
successful trigger.
In the left side table of contents find the IRIG-B command of your choice and click the corresponding
entry.

443

OMICRON CMEngine

4.14.6.1

irigb:def?

Function

Indicates whether a CMIRIG-B device has been found on the specified CMC and
returns the selected IRIG-B configuration.

Description

With this command it is possible to determine if a CMIRIG-B device is connected


to the CMC and to read the selected IRIG-B configuration from the device. If a
CMIRIG-B device is detected an additional value indicates whether an external
device (e.g., CMGPS) is connected to the CMIRIG-B device.
IRIG-B functionality is available on each network-based CMC device.
The CMIRIG-B device is not necessary to use IRIG-B.

Answer

The command returns three values:


<cfg_no>,<dev_conn>,<ext_dev_conn>
<cfg_no>:
Configuration number of the selected IRIG-B configuration. 0 means that IRIG-B
is not configured. In this case the two following values are 0.
<dev_conn>:
1 = CMIRIG-B device has been found.
0 = no CMIRIG-B device connected.
<ext_dev_conn>:
1 = external device is connected to the CMIRIG-B device.
0 = no external device is connected to the CMIRIG-B device.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE Command not allowed within sequence.

444

String Commands

4.14.6.2

irigb:enc:cfg(<yyyy>, <mm>, <dd>, <hh>, <mm>, <ss>, <CF>,


<parity_mode>, <mod>, <coded_expr>, <auto_inc>, <write_mode>)
irigb:enc:cfg(<yyyy>, <doy>, <hh>, <mm>, <ss>, <CF>,
<parity_mode>, <mod>, <coded_expr>, <auto_inc>, <write_mode>)

Function

Configures the IRIG-B encoder format and sets the date and time.

Description

This command configures the signal format of the IRIG-B encoder and sets the
date and time.
The <CF> parameter specifies the IEEE C37.118 control function (CF) bits as
shown in the following table.
The <parity_mode> defines the parity calculation method to odd or even.
The <mod> parameter defines the modulation of the IRIG-B signal to PWM
(Pulse width code) or Manchester modulation.
<coded_expression> configures the content of the IRIG-B signal. For details take
a look at the IRIG-B specification.
With the <auto_inc> parameter it is possible to turn the second incrementation of
the encoder off/on. That means if it is off, the encoder stays at the current time.
For normal operation this is always on.
It is possible to write the new configuration to the encoder in two ways:
synchronously (sync) and synchronously (async). Which one should be used
can be defined with the <write_mode> parameter. Details can be found in the
chapter IRIG-B commands on page 443.
In the worst case it can take up to two seconds until the new
configuration takes effect.

Parameters

<yyyy>,<mm>,<dd>,<hh>,<mm>,<ss>:
Time and date to set for the encoder. With the specified date the day of the year
is calculated and set. If the selected coded expression does not contain the year
information (0-3) it is ignored for the IRIG-B signal. The year parameter is only
used to calculate the day of the year.
<yyyy>,<doy>,<hh>,<mm>,<ss>:
Date and time information based on the year and the day of the year. For the day
of the year values between 1 to 366 allowed (leap year). If the selected coded
expression does not contain the year information (0-3) it is ignored for the IRIG-B
signal.
<CF>:
This parameter is of type <int> and specifies the IEEE C37.118 control function
(CF) bits (see above).

445

OMICRON CMEngine

<parity_mode>:
Here you must specify one of the keywords odd or even.
<mod>:
This parameter is of type <int>. Value 0=PWM and 2=Manchester modulation
are allowed.
<coded_expr>:
This parameter is of type <int>. Values from 0 to 7 are allowed. Details can be
found in the IRIG-B specification.
<auto_inc>:
Here you must specify one of the keywords on or off.
<write_mode>:
Here you must specify one of the keywords sync or async.
Bit

Description

IRIG-B Pos. ID

Comment

LSP

P60

Leap Second Pending


(LSP)
Becomes 1s up to 59s
before leap second
insert

LS

P61

Leap Second (LS)


0 = add LS / 1 = delete
LS

DSP

P62

Daylight Saving
Pending (DSP)
Becomes 1s up to 59s
before DST change

DST

P63

Daylight Savings Time


(DST)
Becomes 1 during DST

Time Offset 1

P65

Time Offset binary


Offset from coded
IRIG-B time to UTC
time

Time Offset 2

P66

See bit 4

446

String Commands

Bit

Description

IRIG-B Pos. ID

Comment

Time Offset 4

P67

See bit 4

Time Offset 8

P68

See bit 4

Time Offset sign

P64

Time offset sign0 = +,


1=-

Time Offset-0.5h

P70

0.5h Time Offset


0 = none, 1 =
additional 0.5h time
offset

10

11

12

TimeQuality

P71

Time Quality
4-bit code representing
approx. clock time
error (details in ?????)

13

TimeQuality

P72

See bit 12

14

TimeQuality

P73

See bit 12

15

TimeQuality

P74

See bit 12

16
17

18

19

20

21

22

23

447

OMICRON CMEngine

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IRIGB_NOT_LOCKED Communication error during command execution.


CMERR_INVALID_DATE

The date and time is not valid.

CMERR_IRIGB_NOT_AVAIL

IRIG-B functionality is not available on this device.

See also:
command irigb:enc:cfg? on page 449

448

String Commands

4.14.6.3

irigb:enc:cfg?

Function

Gets the current configuration of the IRIG-B encoder.

Description

This command reads out the current configuration of the IRIG-B encoder.

Answer

The command returns 5 values:


<CF>,<parity_mode>,<mod>,<coded_expr>,<auto_inc>
<CF>:
The value is of type <int>. The IEEE C37.118 control function (CF) assignment
can be found in the following table.
<parity_mode>:
odd or even parity calculation.
<mod>:
This value is of type <int> and can have the value 0 for PWM or 2 Manchester
modulation.
<coded_expr>:
This value is of type <int> and can have a value between 0 and 7. Details can be
found in the IRIG-B specification.
<auto_inc>:
Auto increment on or off.

Bit

Description

IRIG-B Pos. ID

Comment

LSP

P60

Leap Second Pending


(LSP)
Becomes 1s up to 59s
before leap second
insert

LS

P61

Leap Second (LS)


0 = add LS / 1 = delete
LS

DSP

P62

Daylight Saving
Pending (DSP)
Becomes 1s up to 59s
before DST change

449

OMICRON CMEngine

Bit

Description

IRIG-B Pos. ID

Comment

DST

P63

Daylight Savings Time


(DST)
Becomes 1 during DST

Time Offset 1

P65

Time Offset binary


Offset from coded
IRIG-B time to UTC
time

Time Offset 2

P66

See bit 4

Time Offset 4

P67

See bit 4

Time Offset 8

P68

See bit 4

Time Offset sign

P64

Time offset sign0 = +,


1=-

Time Offset-0.5h

P70

0.5h Time Offset


0 = none, 1 =
additional 0.5h time
offset

10

11

12

TimeQuality

P71

Time Quality
4-bit code representing
approx. clock time
error (details
in ??????)

13

TimeQuality

P72

See bit 12

14

TimeQuality

P73

See bit 12

15

TimeQuality

P74

See bit 12

16

17

18

19

450

String Commands

Bit

Description

20

21

22

23

IRIG-B Pos. ID

Comment

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence.

CMERR_IRIGB_NOT_AVAIL IRIG-B functionality is not available on this device.

451

OMICRON CMEngine

4.14.6.4

irigb:enc:datetime?

Function

Gets the current date and time of the IRIG-B encoder.

Description

This command returns the date and time of the IRIG-B encoder independent if it
is running or not. If the encoder date and time was not set the command returns
zero for each value.
The received IEEE C37.118 control function (CF) value and the straight binary
seconds (SBS) value are returned as well. The IEEE C37.118 control function
(CF) value contains the parity bit. With the SBS value it is possible to check the
received time.

Answer

This command returns a string with the following structure:


<dev_id>,<yyyy>,<mm>,<dd>,<hh>,<mm>,<ss>,<doy>,<SBS>,<CF>;
<yyyy>,<mm>,<dd>,<hh>,<mm>,<ss>,<doy>:
Current date and time of the IRIG-B decoder. <doy> is the day of the year.
<SBS>:
Straight Binary Seconds (seconds of the day). Seconds of the day. This is
redundant information to the time.
<CF>:
The CF value is of type <int>. The IEEE C37.118 control function (CF)
assignment can be found in the following table (see below).
Note: If a coded expression is selected that doesn't contain the year information,
the returned values <yyyy>,<mm>,<dd> are calculated based on the year 2000.

Bit

Description

IRIG-B Pos. ID

Comment

LSP

P60

Leap Second Pending


(LSP)
Becomes 1s up to 59s
before leap second
insert

LS

P61

Leap Second (LS)


0 = add LS / 1 = delete
LS

DSP

P62

Daylight Saving
Pending (DSP)

452

String Commands

Bit

Description

IRIG-B Pos. ID

Comment
Becomes 1s up to 59s
before DST change

DST

P63

Daylight Savings Time


(DST)
Becomes 1 during DST

Time Offset 1

P65

Time Offset binary


Offset from coded
IRIG-B time to UTC
time

Time Offset 2

P66

See bit 4

Time Offset 4

P67

See bit 4

Time Offset 8

P68

See bit 4

Time Offset sign

P64

Time offset sign0 = +,


1=-

Time Offset-0.5h

P70

0.5h Time Offset


0 = none, 1 =
additional 0.5h time
offset

10

11

12

TimeQuality

P71

Time Quality
4-bit code representing
approx. clock time
error (details in ?????)

13

TimeQuality

P72

See bit 12

14

TimeQuality

P73

See bit 12

15

TimeQuality

P74

See bit 12

16
17

18

453

OMICRON CMEngine

Bit

Description

19

20

21

22

23

IRIG-B Pos. ID

Comment

Possible Errors:
This command may cause the following CMEngine error codes:

454

Error Code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence.

CMERR_IRIGB_NOT_AVAIL

IRIG-B functionality is not available on this


test set.

String Commands

4.14.6.5

irigb:dec:cfg(<parity_mode>, <mod>, <coded_expr>,


<parity_err_status>, <write_mode>)

Function

Configures the expected IRIG-B decoder format.

Description

This command configures the expected signal format of the IRIG-B decoder.
The <parity_mode> defines the parity calculation method to odd or even.
The <mod> parameter defines the modulation of the IRIG-B signal to PWM
(Pulse width code) or Manchester modulation. Currently only PWM is supported.
With the <parity_err_status> parameter it is possible to turn on/off the reporting
of parity errors in the general status register. A parity error is always reported in
the IRIG-B status register.
It is possible to write the new configuration to the encoder in two ways:
synchronously (sync) and synchronously (async). Which one should be used
can be defined with the <write_mode> parameter. Details can be found in the
chapter IRIG-B commands on page 443.
In worst case it can take up to two seconds until the new configuration
takes effect.

Parameters

<parity_mode>:
Here you must specify one of the keywords odd or even.
<mod>:
This parameter is of type <int>. Only Value 0=PWM is allowed.
<coded_expr>:
This parameter is of type <int>. Values from 0 to 7 are allowed. Details can be
found in the IRIG-B specification.
<parity_err_status>:
Here you must specify one of the keywords on or off.
<write_mode>:
Here you must specify one of the keywords sync or async.

Possible Errors
This command may cause the following CMEngine error codes:

455

OMICRON CMEngine

Error code

Explanation

CMERR_IRIGB_NOT_LOCKED Communication error during command execution.


CMERR_IRIGB_NOT_AVAIL

IRIG-B functionality is not available on this device.

See also:
command irigb:dec:cfg? on page 457

456

String Commands

4.14.6.6

irigb:dec:cfg?

Function

Gets the current configuration of the IRIG-B decoder.

Description

This command reads out the current configuration of the IRIG-B decoder.

Answer

The command returns 4 values:


<parity_mode>,<mod>,<coded_expr>,<parity_err_status>
<parity_mode>:
odd or even parity calculation.
<mod>:
This value is of type <int> and can have the value 0 for PWM or 2 Manchester
modulation.
<coded_expr>:
This value is of type <int> and can have a value between 0 and 7. Details can be
found in the IRIG-B specification.
<parity_err_status>:
Parity error reporting in general status register on or off.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence.

CMERR_IRIGB_NOT_AVAIL IRIG-B functionality is not available on this device.

457

OMICRON CMEngine

4.14.6.7

irigb:dec:scan?

Function

Starts an auto detection of the IRIG-B decoder signal parameters.

Description

This command executes a detection of the IRIG-B decoder signal parameters:


- parity mode
- modulation
- coded expression
The <successful> value shows if the detection was successful or not. After a
successful detection the IRIG-B decoder is configured with the detected
parameter values and a reset of the IRIG-B decoder is performed. In case of an
unsuccessful detection the configuration of the IRIG-B decoder is left unchanged.
If control function (CF) bits are detected the reporting of parity errors in the
general status register is turned on otherwise off.
If you use this command to detect the IRIG-B decoder signal parameters check
always the IRIG-B status register afterwards.

Answer

The command returns 5 values:


<successful>,<parity_mode>,<mod>,<coded_expr>,<parity_err_status>
<successful>:
This value is of type <int>. Value 0="No successful detection" or 1="Detection
was successful".
<parity_mode>:
odd or even parity calculation.
<mod>:
This value is of type <int> and can have the value 0 for PWM or 2 Manchester
modulation.
<coded_expr>:
This value is of type <int> and can have a value between 0 and 7. Details can be
found in the IRIG-B specification.
<parity_err_status>:
Parity error reporting in general status register on or off.

Possible Errors
This command may cause the following CMEngine error codes:

458

String Commands

Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence.

CMERR_IRIGB_NOT_LOCKED Communication error during command execution.


CMERR_IRIGB_NOT_AVAIL

IRIG-B functionality is not available on this device.

459

OMICRON CMEngine

4.14.6.8

irigb:dec:reset

Function

Resets the IRIG-B decoder.

Description

This command executes a reset on the IRIG-B decoder. If the IRIG-B decoder
runs into the error state a reset is needed to get it running again. The status
information is cleared, too.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IRIGB_NOT_LOCKED Communication error during command execution.


CMERR_IRIGB_NOT_AVAIL

IRIG-B functionality is not available on this device.

See also:
command sys:status? on page 128

460

String Commands

4.14.6.9

irigb:dec:sync(<yyyy>, <mm>, <dd>, <hh>, <mm>, <ss>, <rate>,


<write_mode>) / irigb:dec:sync(<yyyy>, <doy>, <hh>, <mm>, <ss>,
<rate>, <write_mode>)

Function

Sets the trigger date, time and pulse rate for the IRIG-B decoder.

Description

This command defines a trigger time for the IRIG-B decoder at which it should
start to send the programmable pulse (PPX) defined with the pulse rate.
The <rate> parameter defines the pulse rate in seconds.
It is possible to write the new configuration to the decoder in two ways:
synchronously (sync) and synchronously (async). Which one should be used
can be defined with the <write_mode> parameter. Details can be found in the
chapter IRIG-B commands on page 443.

Parameters

<yyyy>,<mm>,<dd>,<hh>,<mm>,<ss>:
Time and date to be set for the trigger. If the configured coded expression for the
decoder does not contain the year information (0-3) it is ignored for the trigger.
The year parameter is only used to calculate the day of the year.
<yyyy>,<doy>,<hh>,<mm>,<ss>:
Time and day of the year to be set for the trigger. Values between 1 to 366
allowed (leap year). If the configured coded expression for the decoder does not
contain the year information (0-3) it is ignored for the trigger.
<rate>:
This parameter is of type <int>. Pulse rate in seconds for the programmable
pulse (PPX).
<write_mode>:
Here you must specify one of the keywords sync or async.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IRIGB_NOT_LOCKED Communication error during command execution.


CMERR_INVALID_DATE

The date and time is not valid.

CMERR_IRIGB_NOT_AVAIL

IRIG-B functionality is not available on this device.

461

OMICRON CMEngine

4.14.6.10 irigb:dec:sync?
Function

Gets the current configured trigger start time and the pulse rate.

Description

This command returns the configured start time and pulse rate of the IRIG-B
decoder trigger.

Answer

The command returns 8 values:


<yyyy>,<mm>,<dd>,<doy>,<hh>,<mm>,<ss>,<rate>
<yyyy>,<mm>,<dd>,<doy>,<hh>,<mm>,<ss>:
Current start date and time of the IRIG-B decoder trigger. <doy> is the day of the
year.
<rate>:
Pulse rate in seconds of the programmable pulse (PPX).
If a coded expression is selected which doesn't contain the year
information the returned values <yyyy>, <mm>, <dd> are calculated.

Possible Errors
This command may cause the following CMEngine error codes:
Error code

Explanation

CMERR_IN_SEQ_MODE

Command not allowed within sequence.

CMERR_INVALID_DATE

The date and time is not valid.

CMERR_IRIGB_NOT_AVAIL IRIG-B functionality is not available on this device.

462

String Commands

4.14.7 PTP Commands


These commands are used to control PTPv2 synchronization of a test set. With PTPv2 you are able to
achieve high precision synchronization of sequence with a global time source.
The usage of PTP requires a CMC test set with an installed NET-1B board or newer. CMC 850 and
CMC 353 have such a NET-1B board by default; CMC 356, CMC 256plus and CMC 256-6 can be
upgraded. To learn more about the NET-1B board, refer to the according CMC test set manual.
To use PTPv2 synchronization the CMC needs a connected PTPv2 time source that is properly
configured. To establish the synchronization the PTPv2 time source must use the Power Profile
according to IEEE C37.238-2011 and the settings made via ptp:cfg(...) must match. A viable PTPv2
time source could be, for example, a CMGPS 588.
It is furthermore possible to use PTPv2 as a time source for IRIG-B. In this case you have to configure
the IRIG-B encoder before switching to time mode IRIG-B generator following PTPv2. Once you
have selected such a mode it is not possible to reconfigure the IRIG-B encoder.

463

OMICRON CMEngine

4.14.7.1

ptp:cfg(<domain>,<vlan_id>,<vlan_prio>)

Function

Sets the PTP configuration.

Description

With this command it is possible to set the configuration of the PTP stack.
Locking the time source resource is obligatory.

Parameters

<domain>
PTP domain to use (integer from 0 to 255, CMGPS 588 will always work with
domain 0).
<vlan_id>
VLAN Id of the network (integer from 0 to 4095).
<vlan_prio>
VLAN prio of the network (integer from 0 to 7).

Possible Errors:
This command may cause the following CMEngine error codes:
Error Code

Explanation

CMERR_NOT_SUPPORTED

The test set does not have a NET-1B board


or newer.

CMERR_IRIGB_NOT_LOCKED

The time source resource is not locked.

CMERR_OUT_OF_RANGE

A parameter is out of the allowed range.

Example:
ptp:cfg(4,1,0)
Set domain 4, VLAN id 1 and VLAN prio 0.

464

String Commands

4.14.7.2

ptp:cfg?

Function

Gets the current PTP configuration.

Description

With this command it is possible to get the current configuration of the PTP
stack. Locking the time source resource is obligatory.

Answer

The command returns a string with the following structure:


<dev_id>,<profile>,<transportMechanism>,<domain>,<vlan_id>,<vlan_prio>;
<profile>
Selected PTP profile (will always be "POWER_SYSTEM").
<transportMechanism>
Selected PTP transport mechanism (will always be "IEEE_802_3").
<domain>
PTP domain to use (integer from 0 to 255, CMGPS588 will always work with
domain 0).
<vlan_id>
VLAN id of the network (integer from 0 to 4095).
<vlan_prio>
VLAN prio of the network (integer from 0 to 7).

Possible Errors:
This command may cause the following CMEngine error codes:
Error Code

Explanation

CMERR_NOT_SUPPORTED

The test set does not have a NET-1B board


or newer.

CMERR_IRIGB_NOT_LOCKED

The time source resource is not locked.

Example:
ptp:cfg?
Return value: 1,POWER_SYSTEMS,IEEE_802_3,0,0,4;

465

OMICRON CMEngine

4.14.7.3

ptp:status?

Function

Gets the status of the PTP stack.

Description

This command returns information about the status of the PTP stack like current
PTP grandmaster and its identity and properties. Locking the time source
resource is obligatory.

Answer

The command returns a string with the following structure:


<dev_id>,<stack_status>,<clock_identity>,<clock_class>,<clock_acc>,<mean_p
ath_delay>,<offset_from_master>,<number_of_ports>,{<port_state>};
<stack_status>

STOPPED The PTP stack is stopped.

RUNNING - The PTP stack is running.

<clock_identity>
Displays the clock identity. IEEE 1588-2008, clause 7.5.2.2, requires that
each clock in a PTP network has a unique clock identifier.
<clock_class>
Displays the current clock class of the selected PTP source. The clock class
is broadcast in the corresponding PTP data packets.
Possible values:

PRIMARY_REF_PTP (6)
The clock of the PTP grandmaster is locked to a primary reference time
source, i.e., to the GPS system.

PRIMARY_REF_PTP_HOLDOVER (7)
The clock was previously locked to GPS time but has lost GPS reception. The
internal oscillator is used as the source of time and provides time with the
accuracy given by the clock accuracy parameter.

NOT_IN_SPEC_PTP_A (52)
The clock is not locked to GPS time and is not within its holdover
specification.

SLAVE_ONLY (255)
There is no PTP grandmaster available.

<clock_acc>
Displays the current accuracy of the PTP synchronization with regard to TAI.
See IEEE 1588-2008, clause 7.6.2.5, for details.
<mean_path_delay>

466

String Commands

Displays the maximum time inaccuracy in ns that the PTP device contributes
to the network time inaccuracy. As the CMC uses the PTP "Power Profile",
which uses P2P connection, this will always be 0.
<offset_from_master>
Displays the network time inaccuracy in ns to be transmitted in IEEE C37.238
TLV. See IEEE C37.238-2011, clause 5.13.
<number_of_ports>
Number of Ethernet interfaces of the CMC.
<port_state>
List of port states according to IEEE 1588-2008, table 10.
Possible values include:

FAULTY
There is a problem in the PTP communication. Likely cause is that there are
two (or more) visible PTP clocks not separated via a transparent clock (which
breaks the PTP algorithms specified for the Power Profile).

LISTENING
There is no active PTP grandmaster visible from the given port.

UNCALIBRATED
There is an active PTP grandmaster visible on the given port, but its accuracy
is outside of the standard or the CMC has not yet synchronized its clock to
the PTP grandmaster.

SLAVE
The port is locked to a valid PTP grandmaster.

Possible Errors:
This command may cause the following CMEngine error codes:
Error Code

Explanation

CMERR_IRIGB_NOT_LOCKED

The time source resource is not locked.

CMERR_NOT_SUPPORTED

The test set does not have a NET-1B board


or newer.

CMERR_OTIMED_ERROR

The PTP stack is currently restarting. Try to


query the status again in 2-3 seconds.

467

OMICRON CMEngine

Example:
ptp:status?
Return value: 1,RUNNING,20:b7:c0:ff:fe:00:16:14,PRIMARY_REF_PTP (6),WITHIN_100_NS
(0x21),0,6,2,LISTENING,SLAVE;
The PTP stack is running, there is a PTP grandmaster on the ETH2 interface of the CMC, the
grandmaster has clock identity 20:b7:c0:ff:fe:00:16:14. It has accuracy of 100 ns and is a viable
primary reference time source.

468

String Commands

4.14.8 NTP Commands


These commands can be used to synchronize the system clock of the CMC to an NTP server. These
commands are supported on network-based CMC test sets. NTP synchronization cannot be used to
synchronize outputs as is possible via CMGPS, CMIRIG-B or PTPv2. Furthermore be aware that NTP
time synchronization is not high precision because of the NTP protocol itself, so even if the CMC is
synchronized its time may differ from the NTP server by up to 128 ms.

469

OMICRON CMEngine

4.14.8.1

ntp:cfg(unicast,<ntp_server>,<poll_interval>)

Function

Configures NTP in unicast mode.

Description

With this command it is possible to configure NTP to work in unicast mode and
set the corresponding parameters. Locking the time source resource is
obligatory.
When time configuration NTP client is selected the CMC will try to synchronize
its time with the specified NTP server.

Parameters

<ntp_server>
The NTP server to use.
URL in the example.com format or an IPv4 address of the format
xxx.xxx.xxx.xxx.
<poll_interval>
The NTP server will be polled every 2^<poll_interval> seconds.

Possible Errors:
This command may cause the following CMEngine error codes:
Error Code

Explanation

CMERR_IRIGB_NOT_LOCKED

The time source resource is not locked.

CMERR_OUT_OF_RANGE

Set poll interval is out of range.

Example:
ntp:cfg(unicast,pool.ntp.org,4)

470

String Commands

4.14.8.2

ntp:cfg(multicast,<multicast_address>)

Function

Configures NTP in multicast mode.

Description

With this command it is possible to configure NTP to work in multicast mode and
set the corresponding parameter. Locking the time source resource is obligatory.
When time configuration NTP client is selected, the CMC will try to synchronize
its time listening to the specified multicast address.

Parameters

<multicast_address >
The multicast IP address to listen for.

Possible Errors:
This command may cause the following CMEngine error codes:
Error Code

Explanation

CMERR_IRIGB_NOT_LOCKED

The time source resource is not locked.

Example:
ntp:cfg(multicast,224.0.1.1)

471

OMICRON CMEngine

4.14.8.3

ntp:cfg(broadcast)

Function

Configures NTP in broadcast mode.

Description

With this command it is possible to configure NTP to work in broadcast mode.


Locking the time source resource is obligatory.
When time configuration NTP client is selected, the CMC will try to synchronize
its time listening to broadcasts.

Possible Errors:
This command may cause the following CMEngine error codes:

472

Error Code

Explanation

CMERR_IRIGB_NOT_LOCKED

The time source resource is not locked.

String Commands

4.14.8.4

ntp:status?

Function

Gets the status and configuration of the NTP synchronization.

Description

With this command it is possible to get the status and configuration of the NTP
synchronization. Locking the time source resource is obligatory. This is only
possible when selecting time configuration "NTP client".

Answer

The command returns a string with the following structure:


<dev_id>,<mode>,<host>,<poll_interval>,<stratum>,<status>,<delay>,<offset>,<
dispersion>;
<mode>

UNICAST
NTP is configured in unicast mode.

MULTICAST
NTP is configured in multicast mode.

BROADCAST
NTP is configured in broadcast mode.

<host>
IP address or name of the NTP server/multicast address as configured ("0" in
broadcast mode).
<poll_interval>
Interval how often the server will be polled (only set in unicast mode, "0" for
other modes), if this value is n then the poll interval will be 2n.
<stratum>
Stratum of the NTP source (integer, the lower the value, the better the
source).
The rest of the fields are only set in UNICAST mode, otherwise they are 0.
<status>

UNREACHABLE
Specified NTP server is not available.

SYNCED
CMC is synchronized to NTP server.

UNSYNCED
NTP server is visible, however, the CMC and the NTP are not is sync. This is
a normal state, not an error case. NTP may also react this way if the NTP
server is not available. The result will be a huge stratum.

473

OMICRON CMEngine

<delay>
Path delay of the NTP communication in s.
<offset>
Offset between the CMC clock and the NTP master clock in s.
<dispersion>
Dispersion in s.
Possible Errors:
This command may cause the following CMEngine error codes:
Error Code

Explanation

CMERR_IRIGB_NOT_LOCKED

The time source resource is not locked.

CMERR_OTHER_TP_RUNNING

A different time configuration than "NTP


client" is selected.

Example:
ntp:cfg(UNICAST,"127.0.0.1",4)
sys:time:cfg(8)
ntp:status?
Return value: 1,UNICAST,127.0.0.1,4,16,UNSYNCED,0,0,3992170;

474

String Commands

4.15 Obsolete Commands


This section contains those commands that have been rendered obsolete by the development of
CMEngine. All of them remain operational for code compatibility, but they have been replaced by other
commands that are better, more flexible or more general than they were. The user should avoid using
these commands in new code, and should try to replace them in the existing code whenever possible.
Obsolete Command

Replacement

inp:[ana:]v|i(<input_list>):param?

inp:[ana:]v|i(<input_list>):range?

inp:bin:get?

inp:bin(<inp_mod_idx>):get?

inp:bin[(<input_list>)]:thres(<threshold>)

inp:bin(<inp_mod_idx>,<group_idx>):def(pf|
<thres>)

inp:bin[(<input_list>)]:thres?

inp:bin(<inp_mod_idx>,<group_idx>):def?

inp:bin[(<input_list>)]:def(<threshold>,<range>)

inp:bin(<inp_mod_idx>,<group_idx>):def(pf|
<thres>)

inp:bin[(<input_list>)]:def(pf)

inp:bin(<inp_mod_idx>,<group_idx>):def(pf|
<thres>)

inp:bin[(<input_list>)]:def?

inp:bin(<inp_mod_idx>,<group_idx>):def?

out:bin[(trans)]:on (<output_list>)

out:bin(<out_mod_idx>):on(<output_list>)

out:bin[(trans)]:off (<output_list>)

out:bin(<out_mod_idx>):off(<output_list>)

out:bin[(trans)]:set (<data>)

out:bin(<out_mod_idx>):set(<data>)

out:cfg?(trans)

out:bin:cfg?

irigb:cfg(<cfg_no>)

sys:time:cfg(<timeConfiguration>)

irigb:cfg?

sys:time:cfg?

irigb:cfg?(<cfg_no>)

sys:time:cfg?(<timeConfiguration>)

irigb:datetime?

sys:time:datetime?

475

OMICRON CMEngine

476

Appendix

Appendix

5.1

Syntax Diagrams

More:
System Commands on page 478
Input Commands: Analog on page 479
Input Commands: General, Binary, Counter on page 480
Output Commands on page 481
Sequencer Commands on page 483
Amplifier Commands on page 484
GPS Commands on page 485
IRIG-B Commands on page 486

477

OMICRON CMEngine

5.1.1

478

System Commands

Appendix

5.1.2

Input Commands: Analog

479

OMICRON CMEngine

5.1.3

480

Input Commands: General, Binary, Counter

Appendix

5.1.4

Output Commands

481

OMICRON CMEngine

482

Appendix

5.1.5

Sequencer Commands

483

OMICRON CMEngine

5.1.6

484

Amplifier Commands

Appendix

5.1.7

GPS Commands

485

OMICRON CMEngine

5.1.8

486

IRIG-B Commands

Appendix

5.2

Block diagram of Generators/Outputs of a CMC Test Set

487

OMICRON CMEngine

5.3

IEEE C37.118 control function details

This information is based on the IEEE C37.118-2005 standard "Synchrophasors for power systems".
Please read the Annex F of this standard to get familiar with the control functions.
Time quality indicator code
Binary

Hex

Value (worst case accuracy)

1111

Fault clock failure, time not


reliable

1011

10s

1010

1s

1001

100ms (time within 0.1s)

1000

10ms (time within 0.01s)

0111

1ms (time within 0.001s)

0110

100s (time within 10-4s)

0101

10s (time within 10-5s)

0100

1s (time within 10-6s)

0011

100ns (time within 10-7s)

0010

10ns (time within 10-8s)

0001

1ns (time within 10-9s)

0000

Normal operation, clock locked

488

Support

Support

When you are working with our products we want to provide you with the greatest possible benefits. If
you need any support, we are here to assist you!
24/7 Technical Support - Get Support
www.omicron.at/support
www.omicronusa.com/support
Offering our customers outstanding support is one of our top priorities. At our technical support hotline,
you can reach well-educated technicians for all of your questions. Around the clock competent and
free of charge.
Make use of our 24/7 international technical support hotline: +43 59495 4444.
Additionally, you can find the OMICRON Service Center or OMICRON Sales Partner closest to you at
www.omicron.at or www.omicronusa.com ? Contact.
Customer Area - Stay Informed
www.omicron.at/customer
www.omicronusa.com/customer
The customer area on our website is an international knowledge exchange platform. Download the
latest software updates for all products and share your own experiences in our user forum.
Browse through the Knowledge Library and find application notes, conference papers, articles about
daily working experiences, user manuals and much more.
OMICRON Academy - Learn More
www.omicron.at/academy
www.omicronusa.com/academy
Learn more about your product in one of the training courses offered by the OMICRON Academy.

OMICRON electronics GmbH, Oberes Ried 1, 6833 Klaus, Austria. +43 59495.

489

OMICRON CMEngine

490

Index

Index

A
Amplifier commands (CMEngine).............. 238

CMEngine
Amplifier commands............................. 238
block transfer commands..................... 409
CB Simulation commands.................... 422
Configuration and status commands.... 394
error codes overview.............................. 79
GPS commands................................... 318
Input commands................................... 269
IRIG-B commands................................ 443
Multimeter commands.......................... 371
NTP commands....................................469
Output commands................................ 147
PTP commands.................................... 463
Sampled Values commands.................226
Scope Mode commands.......................393
Sequencer commands......................... 347
string commands.................................. 119
syntax diagrams................................... 477
System commands............................... 123
time synchronization commands.......... 433
what is CMEngine?................................ 17

B
block transfer commands (CMEngine)...... 409

C
CB Simulation commands (CMEngine)..... 422

Configuration and status commands


(CMEngine)............................................... 394

E
error codes overview (CMEngine)............... 79

G
GPS commands (CMEngine).................... 318

491

OMICRON CMEngine

Scope Mode commands (CMEngine)........ 393


Sequencer commands (CMEngine).......... 347

Input commands (CMEngine).................... 269

string commands CMEngine..................... 119

IRIG-B commands (CMEngine)................. 443

System commands (CMEngine)................ 123

library for software developers to


control CMC test sets (CMEngine).............. 17

time synchronization commands


(CMEngine)............................................... 433

M
Multimeter commands (CMEngine)........... 371

N
NTP commands (CMEngine)..................... 469

O
Output commands (CMEngine)................. 147

P
PTP commands (CMEngine)..................... 463

R
Real-time playback functions (CMEngine) 111

S
Sampled Values commands (CMEngine).. 226

492

Das könnte Ihnen auch gefallen