CM Engine
CM Engine
User Manual
CMEngine
2
CMEngine
Contents
1 Preface ......................................................................................................... 17
1.1 What tasks can be performed using the CM Engine? ......................... 18
1.2 Command overview ............................................................................. 18
1.3 Operating systems and compilers ....................................................... 20
1.4 Accessing the CM Engine from your program ..................................... 21
1.5 Typical program sequence .................................................................. 21
1.6 CM Engine license administration ....................................................... 24
1.7 Handling special cases ........................................................................ 24
2 Programming the CM Engine ..................................................................... 27
2.1 System Overview ................................................................................. 28
2.2 Analog outputs ..................................................................................... 31
2.2.1 Definition and routing of amplifiers ........................................... 32
2.2.2 Amplifier Configurations ............................................................ 35
2.2.3 Defining the signal parameters ................................................. 39
2.3 Binary outputs ...................................................................................... 44
2.4 Analog inputs ....................................................................................... 45
2.5 Binary inputs ........................................................................................ 45
2.6 Using the Input Buffer .......................................................................... 46
2.7 Using the Sequencer ........................................................................... 50
2.8 Counter inputs ..................................................................................... 59
2.9 Circuit Breaker Simulation ................................................................... 62
2.10 System control unit .............................................................................. 65
2.11 The CMC 256 ...................................................................................... 66
2.11.1 Amplifiers .................................................................................. 66
2.11.2 The DC auxiliary output ............................................................ 68
3
CMEngine
4
CMEngine
5
CMEngine
6
CMEngine
7
CMEngine
8
CMEngine
9
CMEngine
10
CMEngine
11
CMEngine
12
CMEngine
13
CMEngine
14
CMEngine
15
CMEngine
16
Preface
1 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.
About CMEngine
The CM Engine is a program library for a software developer to use to conveniently control and
program one or more CMC test systems.
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 CM Engine library to communicate with one or more CMC test
systems connected to the PC or to the notebook computer. The CM Engine 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.
Convention: For the sake of readability, this document uses the abbreviation CMC 256 to
refer to a CMC 256-6 or a CMC 256plus.
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.
17
CMEngine
18
Preface
Execute function
Log functions
Miscellaneous functions
String commands
CM Engine'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 CM Engine.
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.
19
CMEngine
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 CM Engine 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.
Operating systems
CM Engine 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 CM Engine and Test Universe can be found
in a file named Requirements.txt on the Test Universe installation DVD.
Compilers
CM Engine 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.
20
Preface
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 CM Engine.
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.
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
engine.DevScanForNew (False)
Dim deviceList As String
Dim devId As Integer
deviceList = engine.DevGetList(lsAllAssociatedAny)
21
CMEngine
engine.DevLock (devId)
' First, let's find the last comma before the parameter
' For parameter N there are N-1 commas
textpos1 = 0
22
Preface
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
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.
23
CMEngine
[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.
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 CM Engine 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)
24
Preface
Detect these cases by getting the contents of the primary status register with Exec ("sys:status?"):
- or both
are set.
- or both
are set.
is set.
Reactivate a CMC with outputs that are already switched OFF (switch outputs ON again) by the
following calls to CM Engine commands:
case a)
25
CMEngine
case b)
case c)
Get the secondary status register 1 using Exec("sys:status?(1)") until the register contains
a zero (no bits set any more).
For a sample implementation, refer to the EasyDiff sample program provided with CM Engine.
After a new and still unknown CMC is connected to a PC with the CM Engine 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 CM Engine, 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 CM Engine (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.
26
Programming the CM Engine
27
CMEngine
More:
From the CM Engine 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
The sequencer allows internal storage of sequences of commands, which are later executed
internally.
28
Programming the CM Engine
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.
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 45. 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 CM Engine 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 CM Engine, 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.
29
CMEngine
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.
It is not always easy to determine where and why a CM Engine program is failing to perform as
expected. While the error information provided by the CM Engine environment is complete and
detailed, the fact that the CM Engine 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)
30
Programming the CM Engine
The file name can of course be any valid file name in the host operating system. Such a file will
register the CM Engine commands as were actually received, and the CM Engines 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.
31
CMEngine
More:
32
Programming the CM Engine
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 CM Engine 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:
v Voltage amplifier
0.000000E+000 Frequency range: the amplifier is capable of outputting DC voltages, and its
1.000000E+003 maximum frequency is 1 kHz
33
CMEngine
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)
34
Programming the CM Engine
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 CM Engine
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)
35
CMEngine
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:
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.
36
Programming the CM Engine
Maximum Output
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):
37
CMEngine
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. The user would have to wire the CMC as shown in the following graphic:
38
Programming the CM Engine
Please note that the use of adapting resistors is required, for example those in the SPA
device.
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.
39
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
CM Engine 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
40
Programming the CM Engine
perfectly legal 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 CM Engine, 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
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
41
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 CM Engine 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.
42
Programming the CM Engine
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 CM Engine 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
43
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.
44
Programming the CM Engine
45
CMEngine
46
Programming the CM Engine
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 72.
Option Explicit
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
47
CMEngine
engine.DevScanForNew (False)
deviceList = engine.DevGetList(lsAllAssociatedAny)
engine.DevLock (devId)
Frequency = 50
IFault = 3
48
Programming the CM Engine
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
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))
49
CMEngine
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 50.
The Sequencer allows downloading a series of CM Engine 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.
50
Programming the CM Engine
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:
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 out-
of-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
51
CMEngine
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 52 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.
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:
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
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.
52
Programming the CM Engine
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.
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
Dim deviceList As String
Dim devId As Integer
engine.DevScanForNew (False)
deviceList = engine.DevGetList(lsAllAssociatedAny)
53
CMEngine
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
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
' original phase of the wave was 0
result = engine.Exec(devId, "seq:clr")
54
Programming the CM Engine
result = engine.DevUnlock(devId)
GoTo ApplicationEnd
EngineError:
MsgBox Err.Description
Err.Clear
ApplicationEnd:
Set engine = Nothing
End Sub
55
CMEngine
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
engine.DevScanForNew (False)
deviceList = engine.DevGetList(lsAllAssociatedAny)
engine.DevLock (devId)
Frequency = 50
IFault = 3
MaxTFault = 5 ' Maximum fault time is 5 seconds
56
Programming the CM Engine
57
CMEngine
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))
engine.DevUnlock (devId)
GoTo ApplicationEnd
58
Programming the CM Engine
EngineError:
MsgBox Err.Description
Err.Clear
ApplicationEnd:
Set engine = Nothing
End Sub
59
CMEngine
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.
inp:bin(1:1):def(10)
inp:count:get?(bcount(1))
60
Programming the CM Engine
inp:count:get?(bcount(2))
; Run it
seq:exec
#wait 2
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:
61
CMEngine
62
Programming the CM Engine
63
CMEngine
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.
64
Programming the CM Engine
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).
65
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.
"Amplifiers" on page 66
"The DC auxiliary output" on page 68
"The AC analog inputs" on page 69
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 CM Engine 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.
66
Programming the CM Engine
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:
67
CMEngine
Please note that configuration 8 is the only way to set both current triples in parallel to obtain a three-
phase, 25A current triple. The method described for the CMA 156 in section "Handling of external
amplifiers" on page 34 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.
CMC356 test sets needs the ELT-1 option to have the DC auxiliary output available.
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
68
Programming the CM Engine
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.
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.
69
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.
70
Programming the CM Engine
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:
3 Frequency of the first V signal, with 50 periods detection time and 1 volt
trigger level
71
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.
72
Programming the CM Engine
' 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
73
CMEngine
74
Interface Functions
3 Interface Functions
As already described in the chapter "Typical program sequence" on page 21, you can use the
CM Engine's interface functions in your program.
First, the following chapter supplies a quick overview of all error codes that the CM Engine'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 CM Engine.
More:
75
CMEngine
76
Interface Functions
77
CMEngine
78
Interface Functions
79
CMEngine
80
Interface Functions
81
CMEngine
82
Interface Functions
83
CMEngine
84
Interface Functions
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:
85
CMEngine
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 75.
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 115.
86
Interface Functions
For clients using the OLE-Automation interface, only OLE-Automation compatible types are used and
no special declarations are necessary.
Association
"Associated" on page 89
"AssociationMode" on page 89
"DevAssociateAppend" on page 89
"DevAssociateAppendSpecific" on page 90
"DevAssociationCount" on page 90
"DevAssociationInfo" on page 90
"DevAssociationTime" on page 91
"DevAssosciationRequest" on page 91
"DevAssosiationRequestCancel" on page 91
"DevDisassociate" on page 91
"DevDisassociateSpecific" on page 92
"MaxAssociationTime" on page 102
Device
"DevGetList" on page 92
"DeviceAddress" on page 93
"DeviceType" on page 93
"DevLock" on page 93
"DevScanForNew" on page 94
"DevUnlock" on page 95
"Exec" on page 96
"FriendlyName" on page 97
"GetDevIDbyIPAddress" on page 97
"GetOfflineCfg" on page 97
"GetOfflineCfg2" on page 98
"ImgDevTypePrefix" on page 98
"IPAddress" on page 99
"MinReqImgVersion" on page 102
"OutUserApp" on page 102
"ParallelPort" on page 103
"RemoveDevice" on page 104
"ResGetList" on page 104
"ResLock" on page 104
"ResUnlock" on page 105
"SerialNumber" on page 105
"SetLicInfo" on page 106
87
CMEngine
"AddRegDev" on page 89
"RegDevCount" on page 103
"RegDevItemInfo" on page 103
"RegDevItemIPAddress" on page 103
"RemoveRegDev" on page 104
Logging
"LogAppend" on page 99
"LogGetInfo" on page 100
"LogNew" on page 100
"LogSetLevel" on page 101
"LogWrite" on page 101
Engine
"GetStatusText" on page 98
"LanguageForMessages" on page 99
"Version" on page 106
88
Interface Functions
3.3.1 AddRegDev
Parameters IPAddresss
The IP Address of the CMC
3.3.2 Associated
Parameters DevId
The device ID of the CMC
3.3.3 AssociationMode
Parameters DevId
The device ID of the CMC for which the AssociationMode should be returned or
set
3.3.4 DevAssociateAppend
Parameters DevId
The device ID of the CMC to which an associated should be appended
89
CMEngine
3.3.5 DevAssociateAppendSpecific
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
Parameters DevId
The device ID of the CMC
3.3.7 DevAssociationInfo
Parameters DevId
The device ID of the CMC
Index
The association index
90
Interface Functions
3.3.8 DevAssociationTime
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
Parameters DevId
The device ID of the CMC
3.3.10 DevAssosiationRequestCancel
Parameters DevId
The device ID of the CMC
3.3.11 DevDisassociate
Description DisassociateClient
Parameters DevId
The device ID of the CMC
91
CMEngine
3.3.12 DevDisassociateSpecific
Parameters DevId
The device ID of the CMC
MACAddress
The MAC address of the client which should be dissociated
3.3.13 DevGetList
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.
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
92
Interface Functions
3.3.14 DeviceAddress
3.3.15 DeviceType
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
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 CM Engine 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 CM Engine error codes:
93
CMEngine
3.3.17 DevScanForNew
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 CM Engine error codes:
94
Interface Functions
3.3.18 DevUnlock
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 CM Engine error codes:
95
CMEngine
3.3.19 Exec
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 receivers 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".
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 93!
Possible Errors
This command may cause the following CM Engine error codes:
Example:Exec(1,"out:off") - switch OFF all analog outputs of the CMC with DevId 1.
96
Interface Functions
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
Command: Exec(1,"inp:cfg?")
3.3.20 FriendlyName
Parameters DevId
The device ID of the CMC
3.3.21 GetDevIDbyIPAddress
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
Parameters
Return Value
97
CMEngine
3.3.23 GetOfflineCfg2
Description Get output configurations for specified CMC/amplifier(s) combination plus trigger
on overload information
Parameters
Return Value
3.3.24 GetStatusText
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.
3.3.25 ImgDevTypePrefix
Description Get software image device type for specified device type
Parameters
98
Interface Functions
3.3.26 IPAddress
Parameters DevId
The device id of the CMC you are interested
3.3.27 LanguageForMessages
3.3.28 LogAppend
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 101).
Parameters Filename
File name of the log file. The file name is a zero terminated string.
Possible Errors
This command may cause the following CM Engine error codes:
99
CMEngine
3.3.29 LogGetInfo
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
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 CM Engine error codes:
100
Interface Functions
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.
The logging level 2 should not normally be used by an application for the
CM Engine 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 CM Engine error codes:
3.3.32 LogWrite
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 CM Engine error codes:
101
CMEngine
3.3.33 MaxAssociationTime
Parameters DevId
The device id of the CMC from which the MaxAssociationTime should be
returned
3.3.34 MinReqImgVersion
Description Get minimum required version of the software image for the specified device type
Parameters
3.3.35 OutUserApp
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 Error! Reference
source not found.??????.
102
Interface Functions
Possible Errors
This command may cause the following CM Engine error codes:
3.3.36 ParallelPort
Parameters DevId
The device id of the CMC you are interested
3.3.37 RegDevCount
3.3.38 RegDevItemInfo
Parameters
3.3.39 RegDevItemIPAddress
Parameters
103
CMEngine
3.3.40 RemoveDevice
Parameters
3.3.41 RemoveRegDev
Parameters
3.3.42 ResGetList
Parameters ListSelect
DevId
The device ID of the CMC
Return Value
3.3.43 ResLock
Parameters DevId
The device ID of the CMC
ResGroup
ResGroup can have the following values:
rgAnaOut analog outputs
rgAuxDC
104
Interface Functions
rgBinInp
rgBinOut
rgCounter
rgDCInp
rgFirst
rgGPS
rgInternalCmds
rgInvalid
rgJustKeepConn
rgLast
rgMeasDSP
rgMultiInp
rgSampleBuf
rgSeq
rgTransOut
ResIndex
3.3.44 ResUnlock
Parameters DevId
The device ID of the CMC
ResGroup
See function "ResLock" on page 104
3.3.45 SerialNumber
Parameters DevId
The device id of the CMC from which the SerialNumber should be returned
105
CMEngine
3.3.46 SetLicInfo
Parameters DevId
The device id of the CMC from which you want to set the license information
3.3.47 Version
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
Return Value 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)
106
Interface Functions
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:
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:
107
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:
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.
108
Interface Functions
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:
109
CMEngine
The Realtime functions address the generators via their (hardware-dependent) index:
Generator 0 1 2 3 4 5
CMC 56/156 V1 V2 V3 I1 I2 I3
Generator 6 7 8 9 10 11
The generators V4 and IB as well as the low level outputs LL 7-12 (LL out 2) are currently not
supported.
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.
110
Interface Functions
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:
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.
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 CM Engine.
111
CMEngine
3.3.48.1 RealtimeBegin
Parameters DevId
Id of the CMC device to be prepared for real-time playback.
dSampleRate
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 CM Engine error codes:
3.3.48.2 RealtimeEnd
112
Interface Functions
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.
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).
113
CMEngine
3.3.48.4 RealtimeStatus
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
Parameters Channel
Return Value
114
String Commands
4 String Commands
The following chapter explains everything that is important to assemble string commands for the
CM Engine: 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.
Symbol Meaning
| 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.
Symbol Meaning
The special symbols used by the CM Engine in the string answers returned for string commands
containing a question mark are explained with the Exec() interface function.
115
CMEngine
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.
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)
116
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.
117
CMEngine
<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.
<integer>,<integer>, ...
<integer>:<integer>
<float> 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]
118
String Commands
4.4.1 sys:reset
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
CM Engine are set to startup values.
Possible Errors
This command may cause the following CM Engine error codes:
119
CMEngine
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).
bin errors occurred on at least one of the binary inputs or an input has voltage above
250 Volts
120
String Commands
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 CM Engine error codes:
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.
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.
type CMC model information string ("CMC 56" or "CMC151") and model number.
ser Serial number of the 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.
121
CMEngine
Possible Errors
This command may cause the following CM Engine error codes:
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.
When you get the content of a secondary status register, the register content is deleted.
122
String Commands
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.
Bit Meaning
0 Communication errors
123
CMEngine
Bit Meaning
6 CMGPS errors
7 Overload at inputs
9 IRIG-B errors
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
124
String Commands
Bit Meaning
30
31
Bit Meaning
0 Initialization failed
8 Communication interrupted
14
15
16
17
18
19
125
CMEngine
Bit Meaning
20
21
22
23
24
25
26
27
28
29
30
31
Bit Meaning
5 Timeout in AD converter
9 Ground-wire break
126
String Commands
Bit Meaning
15
16
17
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).
127
CMEngine
Bit Meaning
128
String Commands
Bit Meaning
24
25
26
27
28
29
31
Bit Meaning
129
CMEngine
Bit Meaning
24
25
26
27
28
29
30
31
Bit Meaning
130
String Commands
Bit Meaning
24
25
26
131
CMEngine
Bit Meaning
27
28
29
31
Bit Meaning
132
String Commands
Bit Meaning
24
25
26
27
28
29
30
31
Bit Meaning
0 Hardware failure
2 Initialization error
133
CMEngine
Bit Meaning
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
134
String Commands
Bit Meaning
31
Bit Meaning
0 Overload input 1
1 Overload input 2
2 Overload input 3
3 Overload input 4
4 Overload input 5
5 Overload input 6
6 Overload input 7
7 Overload input 8
8 Overload input 9
9 Overload input 10
10
11
12
13
14
15
16
17
18
19
20
135
CMEngine
Bit Meaning
21
22
23
24
25
26
27
28
29
30
31
Bit Meaning
0 A: Supply error
1 A: Range error
5 A: Offset error
10
136
String Commands
Bit Meaning
11
12
13
14
15
16 B: Supply error
17 B: Range error
21 B: Offset error
26
27
28
29
30
31
Bit Meaning
137
CMEngine
Bit Meaning
10
11
12
13
14
15
17
18
19
20
21
22
23
24
138
String Commands
Bit Meaning
25
26
27
28
29
30
139
CMEngine
4.4.6 sys:goose:cfg(<filename>)
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 CM Engine error codes:
4.4.7 sys:goose:cfg?(<filename>)
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).
noconfigfile The CMC did not contain a GOOSE configuration file, thus no file could be
retrieved.
Possible Errors
This command may cause the following CM Engine error codes:
140
String Commands
4.4.8 sys:ptp:on(<port>)
Description With this command you can start the ptp daemon in slave mode on a specific
port.
<port>
0 for the Ethernet port ETH1.
1 for the Ethernet port ETH2.
If the SNTP service is running, it stops before the PTP daemon is started.
Example
The command sys:ptp:on(0) sets the ptp daemon to slave mode on the Ethernet port ETH1.
4.4.9 sys:ptp:off
141
CMEngine
Example
The command sys:ptp:off disables the ptp daemon.
4.4.10 sys:ptp:status?
Description Use this command to get information about the PTP daemon that is running on
the CMC.
Answer The command returns 5 values. All of them are of type <integer>.
<port>, <state>, <version>, <observed_drift>, <observed_offset>
<port>
Use port 0 for the Ethernet port ETH1.
Use port 1 for the Ethernet port ETH2.
<state>
0 - 'initializing',
1 - 'Faulty',
2 - 'Disabled',
3 - 'Listening',
4 - 'Pre Master',
5 - 'Master',
6 - 'Passive',
7 - 'Uncalibrated',
8 - 'Slave'.
<version>
The version can be 1 or 2.
<observed_drift>
Clock drift in nanoseconds per second.
<observed_offset>
Time offset from master in nanoseconds.
Example
The command sys:ptp:status? returns information of the ptp daemon:
142
String Commands
The answer string is, e.g., "1, 0, 8, 1, 0, 0;". This indicates that the Ethernet port ETH1 is used, the
PTP daemon on the CMC is in slave-mode, and there is no drift and no offset.
The answer string is, e.g., "1, 0, 3, 1, 0, 0;". This indicates that the PTP daemon is listening if a master
is available.
Description Use this command to start the SNTP service with a specific time-server and a
refresh rate.
If a SNTP server is already running, this will be refreshed with the new
parameters.
Parameter <time_server_IP>
This parameter is of type <string>
It specifies the IP of the SNTP server.
<refresh_rate>
This parameter is of type <integer>
It defines how often the time is refreshed from the time-server.
The refresh rate is in seconds.
The minimum is 16 s; the maximum is 1024 s.
If the PTP daemon is running, it stops before the SNTP service is started .
Example
The command sys:sntp:on("192.168.0.10", 512) starts the SNTP service using the SNTP server with
the IP address 192.168.0.01, and synchronizes the time every 512 s.
143
CMEngine
4.4.12 sys:sntp:off
CMERR_COMM Error in communication with the SNTP daemon. Detailed information about this
error can be found in the log file.
Example
The command sys:sntp:off disables the SNTP service.
4.4.13 sys:sntp:status?
Description Use this command to get status information about the SNTP service.
Answer The command returns 5 values. The first is the time-server IP or domain name
and is of type <string>. The other 4 values are of type <int>.
<time_server>, <refresh_rate>, <status>, <offset_valid>, <current_offset>
<time_server>
Specifies the IP or domain name of the SNTP server.
<refresh_rate>
Specifies the period in seconds between synchronizations with the SNTP server.
<status>
0 - 'off'
1 - 'running'
<offset_valid>
Indicates whether or not the current offset value is valid.
0 - 'invalid'
1 - 'valid'
<current_offset>
The current offset (in milliseconds) between the device and the time server.
144
String Commands
CMERR_COMM Error in communication with the SNTP daemon. Detailed information about this
error can be found in the log file.
Example
The command sys:sntp:status? returns information about the SNTP service:
The answer string is, e.g., "192.168.0.10,512,1,1,185,109;". This tells you that the time-server is
'192.168.0.10' with a refresh time of 512 s, and that the service is running. The current offset of the
device with reference to the time server is 109 ms and valid.
145
CMEngine
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(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 CM Engine the following amplifier routings are predefined:
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
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 mix-
command (see below). After the startup of CM Engine 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 CM Engine 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.
146
String Commands
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.
Function This command defines the amplitude for the selected signal component of all
generators in <generator_list>.
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>.
147
CMEngine
The newamplitude 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 CM Engine error codes:
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.
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>.
148
String Commands
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 CM Engine error codes:
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 CM Engine error codes:
149
CMEngine
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.
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 new phase 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 CM Engine error codes:
150
String Commands
Function This command defines the waveform <waveform> for the selected signal
component of all generators in <generator_list>.
Description After the startup of CM Engine 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.
151
CMEngine
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 CM Engine error codes:
152
String Commands
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>.
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.
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.
153
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 CM Engine error codes:
CMERR_OUT_OF_CMC_MEM Internal CMC memory exhausted; cannot download and use this
waveform
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.
154
String Commands
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>.
155
CMEngine
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.
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.
<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.
156
String Commands
<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].
<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 CM Engine error codes:
157
CMEngine
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.
158
String Commands
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 CM Engine error codes:
CMERR_OUT_OF_CMC_MEM Internal CMC memory exhausted, cannot download and use this
waveform
159
CMEngine
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.
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>.
160
String Commands
Possible Errors
This command may cause the following CM Engine error codes:
CMERR_OUT_OF_CMC_MEM Internal CMC memory exhausted; cannot download and use this
waveform
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.
161
CMEngine
<user_sig_no>
The parameter is of type <integer>.
Possible Errors
This command may cause the following CM Engine error codes:
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 CM Engine error codes:
162
String Commands
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 CM Engine error codes:
Example:
The following commands
out:ana:i(1):sig(1):wav(sin)
out:ana:i(1):sig(1):a(1)
out:ana:i(1):sig(1):f(50)
163
CMEngine
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)
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).
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 CM Engine error codes:
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 170.
164
String Commands
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 CM Engine error codes:
For another version of the off command see "out:ana:off" on page 171
Example:
out:ana:v(2):off
Switches OFF the 3 generators of the 2nd voltage generator triple of a CMC.
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 CM Engine error codes:
165
CMEngine
For another version of the clr command see "out:ana:clr" on page 173
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.
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>.
166
String Commands
<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.
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.
The settings sig(2), add and mult can only be used when the phase mode is set to abs (see
command out:ana:pmode).
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 CM Engine error codes:
167
CMEngine
CMERR_PMODE_DIFF Operation not possible in diff mode (see "Please note!" above)
4.5.18 out:[ana:]save
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.
168
String Commands
4.5.19 out:[ana:]restore
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.
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 CM Engine error codes:
169
CMEngine
4.5.21 out:[ana:]on
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 CM Engine error codes:
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.
170
String Commands
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 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:
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:
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),
171
CMEngine
generators v(1:2) and v(2:2) are switched off with generator i(2:2) and
generators v(1:3) and v(2:3) are switched off with the generator i(2:3).
<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 CM Engine error codes:
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 171.
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.
172
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).
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 CM Engine 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.
173
CMEngine
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).
Function
Set the phase mode. The phase mode defines the way the CM Engine 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
174
String Commands
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):
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):
175
CMEngine
diff(v|i()) 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.
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 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).
176
String Commands
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
4.5.26 out:[ana:]pmode?
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 CM Engine error codes:
177
CMEngine
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
out:on
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
178
String Commands
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)
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)
179
CMEngine
out:v(1):a(100)
out:on
seq:end
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 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 181
180
String Commands
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 CM Engine error codes:
See also:
"out:[ana:]buf:sam[(lock | free)]" on page 180
"inp:buf:sam(bin, on|off|bin)" on page 257
"inp:buf:get?" on page 259
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
181
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
seq:wait(bin(1),2,0.5,1)
out:step
seq:wait(bin(1), 1, 0.5,0)
out:off
seq:end
......
END DO
182
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.
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.
Possible Errors
This command may cause the following CM Engine error codes:
See also:
"command out:[ana:]sync(off)" on page 184
183
CMEngine
4.5.31 out:[ana:]sync(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.
Possible Errors
This command may cause the following CM Engine error codes:
See also:
"command out:[ana:]sync(ext, +|-)" on page 183
4.5.32 out:[ana:]user:...
Description 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,...).
184
String Commands
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 CM Engine error codes:
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.
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.
185
CMEngine
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.
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.
Possible Errors
This command may cause the following CM Engine error codes:
186
String Commands
CMERR_OUT_OF_CMC_MEM Internal CMC memory for this user-defined signal is full; no free
samples left
See also:
command "out:ana:user:alloc?" on page 185
command "out:ana:user:status?" on page 188
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.
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 CM Engine error codes:
187
CMEngine
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 185
command "out:ana:user:app" on page 185
interface function CMOutUserApp
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.
Possible Errors
This command may cause the following CM Engine error codes:
188
String Commands
4.5.37 out:bin:cfg?
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 189
"out:bin(<out_module_idx>:<group_idx>):cfg?" on page 189
Example:
Command: out:bin:cfg?
Answer: "1,2;"
Device 1 has 2 binary output modules.
4.5.38 out:bin(<out_module_idx>):cfg?
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:
189
CMEngine
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
Hardware Version
The version number of the hardware.
Device Type
Type of device in which the outputs are included. For instance, CMC 256-6, CMB
IO-7, etc.
See also:
"out:bin:cfg?" on page 189
"out:bin(<out_module_idx>:<group_idx>):cfg?" on page 190
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.
4.5.39 out:bin(<out_module_idx>:<group_idx>):cfg?
Description Use this command to get a complete description of each output group within a
given module.
Parameters <out_module_idx>
190
String Commands
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.
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.
191
CMEngine
See also:
"out:bin:cfg?" on page 189
"out:bin(<out_module_idx>):cfg?" on page 189
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;"
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.
192
String Commands
4.5.40 out:bin(<out_module_idx>):on(<output_list>)
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 CM Engine error codes:
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.
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>
193
CMEngine
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 CM Engine error codes:
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.
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.
194
String Commands
BINARY OUTPUTS
Set command 1 2 3 4
out:bin(1):set(0) 0 0 0 0
out:bin(1):set(1) 1 0 0 0
out:bin(1):set(2) 0 1 0 0
out:bin(1):set(3) 1 1 0 0
out:bin(1):set(4) 0 0 1 0
out:bin(1):set(5) 1 0 1 0
out:bin(1):set(6) 0 1 1 0
out:bin(1):set(7) 1 1 1 0
out:bin(1):set(8) 0 0 0 1
out:bin(1):set(9) 1 0 0 1
out:bin(1):set(10) 0 1 0 1
out:bin(1):set(11) 1 1 0 1
out:bin(1):set(12) 0 0 1 1
out:bin(1):set(13) 1 0 1 1
out:bin(1):set(14) 0 1 1 1
out:bin(1):set(15) 1 1 1 1
195
CMEngine
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 CM Engine error codes:
4.5.43 out:bin(<out_module_idx>):get?
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 non-
existing 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 CM Engine error codes:
Example:
Command: out:bin(1):get?
196
String Commands
Answer: "1,1;"
Output 1 in module 1 is "off", all the rest are "on".
4.5.44 out:bin(<out_module_idx>:<group_idx>):name(<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>).
<name>
String enclosed in single or double quotes.
See also:
"out:bin(<out_module_idx>:<group_idx>):name?" on page 197
4.5.45 out:bin(<out_module_idx>:<group_idx>):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>;
197
CMEngine
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.
4.5.46 out:aux:cfg?
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.
4.5.47 out:aux(<idx>):cfg?
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.
198
String Commands
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 CM Engine error codes:
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 199
"out:aux(<idx>):a?" on page 200
4.5.49 out:aux(<idx>):a(<v_dc>)
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.
199
CMEngine
<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 CM Engine error codes:
See also:
"out:aux(<idx>):a?" on page 200 and "out:aux(<idx>):def()" on page 201.
4.5.50 out:aux(<idx>):a?
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 199 and out:aux(<idx>):def().
Example:
200
String Commands
out:aux(1):a(25)
out:aux(1):on
out:aux(1):a?
Return: 1,on,2.500000E+001,2.640000E+002;
4.5.51 out:aux(<idx>):def(<pwr_on_v>)
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 CM Engine error codes:
CMERR_AUX_DC_NOT_LOCKED The VDC auxiliary output is not locked and cannot be accessed
See also:
"out:aux(<idx>):a?" on page 200
Examples:
out:aux(1):def(110)
201
CMEngine
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;
4.5.52 out:aux(<idx>):def?
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 201
"out:aux(<idx>):a?" on page 200
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:
202
String Commands
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.
In the left side table of contents find the sampled values command of your choice and click the
corresponding entry.
203
CMEngine
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 CM Engine error codes:
See also:
command "out:ana:sv:def?" on page 205
204
String Commands
4.6.2 out:[ana:]sv:def?
Description This command reads the current general sampled values settings of the device.
<#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 CM Engine error codes:
See also
command "out:ana:sv:def()" on page 204
205
CMEngine
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.
206
String Commands
<eth_type>:
Type of Ethernet frame as 16bit integer. The default value is 0x88BA.
<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 CM Engine error codes:
See also:
command "out:ana:sv:cfg?(...)" on page 208
207
CMEngine
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.
<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>:
208
String Commands
<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 CM Engine error codes:
See also
command "out:ana:sv:cfg()" on page 206
4.6.5 out:[ana:]sv:off(<sv_idx>)
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 CM Engine error codes:
209
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.
<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>:
210
String Commands
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.
Possible Errors
This command may cause the following CM Engine error codes:
Logical generator Generators in this triple Predefined routing to the following outputs
triple
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.
211
CMEngine
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.
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.
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.
Answer The command without arguments returns a string that contains the CMC's device
number and the number of available configurations of type <integer>.
212
String Commands
<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 CM Engine 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.
213
CMEngine
<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.
214
String Commands
215
CMEngine
216
String Commands
Example:
How to parallel the two current triples of a CMA 156 intelligent current amplifier, to obtain a three-
phase 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 CM Engine error codes:
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 225
"amp:def" on page 222
"amp:route" on page 228
"out:cfg?" on page 212
217
CMEngine
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 CM Engine error codes:
See also:
"amp:cfg?(<amp_id>,addr)" on page 218
"gps:setup:cfg?(firm)" on page 218
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.
Function 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 CM Engine) or undefine
an amplifier. Because of the significant differences across the four variations of
this command, each variation is described separately.
218
String Commands
Function Use this command to provide the parameters of an external amplifier or change
the predefined parameters of an internal amplifier.
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).
219
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>.
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 CM Engine error codes:
220
String Commands
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.
221
CMEngine
Parameters <amp_no>:
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 CM Engine error codes:
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).
222
String Commands
Parameter <amp_no>:
This optional parameter is of type <integer>.
Possible Errors
This command may cause the following CM Engine error codes:
4.7.7 amp:def(off)
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 CM Engine error codes:
Description The number of the desired amplifier can be specified as parameter <amp_no>.
The command then returns the amplifier's parameters.
223
CMEngine
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).
<device_type>
Device type string (OMICRON amplifiers only).
<ser_no>
Serial number (OMICRON amplifiers only).
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.
224
String Commands
Possible Errors
This command may cause the following CM Engine error codes:
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.
225
CMEngine
Possible Errors
This command may cause the following CM Engine error codes:
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 226
command "amp:def" on page 222
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.
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>
226
String Commands
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).
<device_type>
Device type string.
<ser_no>
Serial number (OMICRON amplifiers only).
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 CM Engine error codes:
See also:
command "amp:scan?" on page 225
command "amp:def" on page 218
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;".
227
CMEngine
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.
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).
Possible Errors
This command may cause the following CM Engine error codes:
See also:
"amp:route (v | i (<triple_no>), <amp_no> | clr | clrnooff)" on page 228
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 378 in the appendix).
228
String Commands
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).
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 378 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 Name of the related outputs
in case of an internal in case of an external
amplifier amplifier
229
CMEngine
Amplifier number Name of the related outputs Name of the related outputs
in case of an internal in case of an external
amplifier amplifier
Possible Errors
This command may cause the following CM Engine error codes:
CMERR_KINDS_DONT_MATCH The parameters <triple_no> and <amp_no> are not of the same
generator type (voltage gen./ current gen.)
See also:
command "amp:def" on page 218
command" amp:cfg? [(<cfg_no>)]" on page 212
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.
230
String Commands
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 CM Engine 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 CM Engine error codes:
See also:
command "amp:route" on page 228
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.
Description Use this command to tell the CMC which maximum amplitude (rms) is needed.
The CMC automatically selects the appropriate range.
231
CMEngine
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>.
Possible Errors
This command may cause the following CM Engine error codes:
See also:
command "amp:range?" on page 231
Compatibility: Win32
232
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 CM Engine error codes:
See also:
command "amp:range" on page 231
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
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.
233
CMEngine
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 CM Engine error codes:
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..
234
String Commands
<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 CM Engine error codes:
See also:
command "amp:ctrl" on page 233
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.
4.7.18 amp:reset(<amp_id>)
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 CM Engine error codes:
235
CMEngine
See also:
command "gps:reset" on page 272
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.
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:
236
String Commands
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 CM Engine error codes:
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 268
"inp:ana:dc(on|off)" on page 338
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.
237
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.
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 238
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.
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>:
238
String Commands
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 floating-
point 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 238
Example:
inp:ana:i(1):range(0.001)
Sets the range of the DC current input to 1mA.
4.8.4 inp:bin:cfg?
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 240
"inp:bin(<inp_module_idx>:<group_idx>):cfg?" on page 241
Example:
Command: inp:bin:cfg?
Answer:"1,1;"
Device 1 has 1 binary input module.
239
CMEngine
4.8.5 inp:bin(<inp_module_idx>):cfg?
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
Hardware Version
The version number of the hardware.
Device Type
240
String Commands
Type of device in which the inputs are included. For instance, CMC 256-6, CMB
IO-7, etc.
See also:
"inp:bin:cfg?" on page 239
"inp:bin(<inp_module_idx>:<group_idx>):cfg?" on page 241
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.
4.8.6 inp:bin(<inp_module_idx>:<group_idx>):cfg?
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).
241
CMEngine
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).
Threshold granularity
String indicating the minimum unit for which the threshold is independently
settable. The following values can be returned:
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.
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).
242
String Commands
See also:
"inp:bin:cfg?" on page 239
"inp:bin(<inp_module_idx>):cfg?" on page 240
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.
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
4.8.7 inp:bin(<inp_module_idx>):get?
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.
243
CMEngine
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 CM Engine error codes:
See also:
"inp:bin[(<inp_module_idx>)]:diff(reset)" on page 245
"inp:bin(<inp_module_idx>):diff?" on page 244
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.
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
244
String Commands
See also:
"inp:bin[(<inp_module_idx>)]:diff(reset)" on page 245
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.
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 CM Engine error codes:
See also:
"inp:bin(<inp_module_idx>):diff?" on page 244
245
CMEngine
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.
0 - 3.2 ms 100 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 247
246
String Commands
4.8.11 inp:bin(<inp_module_idx>:<group_idx>):debounce?
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 246
247
CMEngine
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 249
248
String Commands
4.8.13 inp:bin(<inp_module_idx>:<group_idx>):deglitch?
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 248
249
CMEngine
4.8.14 inp:bin(<inp_module_idx>:<group_idx>[:<inp_idx>]):def(pf |
<threshold>)
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.
250
String Commands
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
4.8.15 inp:bin(<inp_module_idx>:<group_idx>[:<inp_idx>]):def?
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 potential-
free 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 250
251
CMEngine
4.8.16 inp:bin(<inp_module_idx>:<group_idx>):name(<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 253
252
String Commands
4.8.17 inp:bin(<inp_module_idx>:<group_idx>):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 252
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";
253
CMEngine
4.8.18 inp:ana(<input_list>):def(v,<range>) /
inp:ana(<input_list>):def(i,<range>,<CTRatio>)
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 CM Engine error codes:
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.
254
String Commands
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.
255
CMEngine
4.8.19 inp:ana(<input_list>):def?
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
256
String Commands
4.8.20 inp:ana(<input_list>):range?
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 254
"inp:ana(<input_list>):def(i,<range>,<CTRatio>)" on page 254
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.
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.
257
CMEngine
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.
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 CM Engine error codes:
258
String Commands
See also:
"inp:buf:sam(ext)" on page 259
"inp:buf:get?" on page 259
4.8.22 inp:buf:sam(ext)
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 259
4.8.23 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 measurement result returned consists of five pieces of information: a type information, a time
information, measurement data, an index and an optional information.
Type information:
The type information is one of the keywords bin, dcv, dci, bcount, ecount, zcross, empty, overrun
or switchoff:
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.
259
CMEngine
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?.
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:
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. CM Engine 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.
Measurement data:
If the type information is dcv or dci, a value of type <float> is returned representing the voltage or
current measured.
If the type information is bin, an <integer> number is returned containing the states of the binary
inputs as bits set or cleared. Bit 0 represents the state of binary input 1, bit 1 represents the state of
binary input 2, etc.
If the type information is zcross an information is returned that denotes the voltage or current
generator that was switched off in its zero crossing. This information contains kind of generator
(voltage/current), the generator triple number and the generator number.
Thus it either has the format v(<triple_no>:<gen>) or i(<triple_no>:<gen>). 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)).
If the type information is bcount or ecount an <integer> number is returned
If the type information is overrun or empty, no valid data is returned.
260
String Commands
Index:
If the type information keyword is dcv or dci the index information is the number of the analog input.
If the type information keyword is bin the index is a signature with the following meaning:
Signature Explanation
2 User-defined signature
3 User-defined signature
4 User-defined signature
5 User-defined signature
6 User-defined signature
7 User-defined signature
8 User-defined signature
9 User-defined signature
Optional information:
The optional information is only for entries of type bcount and ecount. All other entries return - as
optional information. For the counter entries the optional information is zcross if a zero crossing of the
counter produced the entry. Otherwise it is -.
Summary:
The following table is a summary of all type information and their measurement data returned in the
answer string:
261
CMEngine
zcross v(<triple_no>:<gen>) or -
i(<triple_no>:<gen>)
Possible Errors
Example
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.
4.8.24 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. It must be greater than 0.
Answer <dev_id>,<entries_read>{,<type_info>,<time_info>,<meas_data>,<index>,<optio
nal>};
262
String Commands
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 CM Engine error codes:
See also:
"inp:buf:get?" on page 259
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.
4.8.25 inp:buf:clr
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 CM Engine error codes:
263
CMEngine
4.8.26 inp:count:on
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 CM Engine error codes:
See also:
"inp:count:set" on page 265
"inp:count:off" on page 264
"inp:count:clr" on page 264
4.8.27 inp:count:off
Description This command stops the counting of all counters that were started with
inp:count:on.
See also:
"inp:count:on" on page 264
"inp:count:set" on page 265
"inp:count:clr" on page 264
4.8.28 inp:count:clr
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 264
"inp:count:set" on page 265
264
String Commands
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 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 CM Engine error codes:
See also:
"inp:count:join" on page 266
"inp:count:on" on page 264
265
CMEngine
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 CM Engine error codes:
See also:
"inp:count:on" on page 264
266
String Commands
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 CM Engine error codes:
See also:
"inp:count:on" on page 264
"inp:buf:get?" on page 259
4.8.32 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 power-
quality 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>:
267
CMEngine
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:
Where:
newValue is the value of the new result before averaging has been applied
oldValue is the value of the previous, averaged result
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.
4.8.33 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
268
String Commands
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 CM Engine error codes:
See also:
"inp:ana:cfg?(srate|avrg|firm|hard)" on page 269
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.
4.8.34 inp:ana:cfg?(srate|avrg|firm|hard)
Description This command will only work on a CMC 256 or newer test set.
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 CM Engine error codes:
269
CMEngine
See also:
"inp:cfg?[(ecount]]" on page 268
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;"
4.9.1 gps:status?
Description This informs the application what information the CMGPS has obtained from the
satellites and if any special conditions have occurred.
<Status Register>:
16 bit word. Each bit represents the status of a certain aspect of the CMGPS as
shown in the following table.
<Satellites>:
270
String Commands
0 Initializing
1 Time available
3 Height available
5 UTC changed
6 Almanac Saving
7 Almanac Error
8 Antenna Open
9 Antenna Short
10 not used
11 not used
12 not used
13 not used
14 not used
15 not used
Possible Errors
This command may cause the following CM Engine error codes:
CMERR_GPS_BUSY The command was issued when the CMGPS was still initializing, or
processing the previous command.
271
CMEngine
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.
4.9.2 gps:reset
Possible Errors
This command may cause the following CM Engine error codes:
See also:
command "amp:reset(<amp_id>)" on page 235
Example:
Suppose you have connected a CMGPS to the CMC then the command gps:reset will perform a
reset on the GPS device.
4.9.3 gps:sigma?
Description This is a value that indicates how accurate the time pulses are. Normally the
application will not need this information.
272
String Commands
Possible Errors
This command may cause the following CM Engine error codes:
CMERR_GPS_BUSY The command was issued when the CMGPS was still initializing, or
processing the previous command.
4.9.4 gps:pos?
<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 CM Engine error codes:
CMERR_GPS_BUSY The command was issued when the CMGPS was still initializing, or
processing the previous command.
273
CMEngine
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.
<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 CM Engine error codes:
CMERR_GPS_BUSY The command was issued when the CMGPS was still initializing, or
processing the previous command.
Example:
gps:pos(63.2359,-100.3321,423.44)
Sets a position of 63.2359 latitude, -100.3321 longitude, 423.44 meters.
274
String Commands
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.
Possible Errors
This command may cause the following CM Engine error codes:
CMERR_GPS_BUSY The command was issued when the CMGPS was still initializing, or
processing the previous command.
4.9.7 gps:time:timemode?
Description This function returns the time mode which the CMGPS is operating under.
Possible Errors
This command may cause the following CM Engine error codes:
275
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.
<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 CM Engine error codes:
CMERR_GPS_BUSY The command was issued when the CMGPS was still initializing, or
processing the previous command.
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.
<ch>:
Channel (0 or 1)
<rate>:
276
String Commands
<yyyy>,<mm>,<dd>,<hh>,<mm>,<ss>:
Starting time and date of the synchronization pulses.
Possible Errors
This command may cause the following CM Engine error codes:
CMERR_GPS_BUSY The command was issued when the CMGPS was still initializing, or
processing the previous command.
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.
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.
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.
277
CMEngine
<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 CM Engine error codes:
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.
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.
278
String Commands
Possible Errors
This command may cause the following CM Engine error codes:
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)
4.9.12 gps:time:datetime?
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 CM Engine error codes:
CMERR_GPS_BUSY The command was issued when the CMGPS was still initializing, or
processing the previous command.
Example:
279
CMEngine
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.
4.9.13 gps:setup:mode?
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 CM Engine error codes:
CMERR_GPS_BUSY The command was issued when the CMGPS was still initializing, or
processing the previous command.
4.9.14 gps:setup:mode(<accuracy_mode>)
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).
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.
280
String Commands
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 CM Engine error codes:
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.
4.9.15 gps:setup:gmt?
Description This offset is added to the satellite time when the user issues the
gps:time:datetime? command.
Possible Errors
This command may cause the following CM Engine error codes:
281
CMEngine
CMERR_GPS_BUSY The command was issued when the CMGPS was still initializing, or
processing the previous command.
Description This offset is added to the satellite time when the user issues the
gps:time:datetime? command.
<hh>:
Hours. Valid range from -23 to 23.
<mm>:
Minutes. Valid range from 0 to 59.
Possible Errors
This command may cause the following CM Engine error codes:
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).
282
String Commands
gps:setup:gmt(0,0)
Sets offset to Greenwich Mean Time.
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 CM Engine error codes:
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 CM Engine error codes:
283
CMEngine
See also:
command "amp:cfg?(<amp_id>,addr)" on page 218
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.
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.
<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 CM Engine error codes:
284
String Commands
CMERR_GPS_BUSY The command was issued when the CMGPS was still initializing, or
processing the previous command.
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.
4.9.20 gps:setup:pulse?
<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
285
CMEngine
CMERR_GPS_BUSY The command was issued when the CMGPS was still initializing, or
processing the previous command.
4.9.21 gps:setup:cable?
<nsec>:
Specifies the time in nanoseconds.
Possible Errors
This command may cause the following CM Engine error codes:
4.9.22 gps:setup:cable()
Parameter <delay>:
Specifies the time in nanoseconds. Integer between 0 and 999999.
Possible Errors
286
String Commands
4.9.23 gps:setup:save
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.
Possible Errors
This command may cause the following CM Engine error codes:
287
CMEngine
CMERR_GPS_BUSY The command was issued when the CMGPS was still in
initialization, or processing the previous command.
4.10.1 irigb:cfg(<cfg_no>)
Description This command configures the device with the specified IRIG-B configuration. The
following table describes all available configurations.
Parameter <cfg_no>:
The number of the IRIG-B configuration that should be applied.
288
String Commands
If a configuration activates the IRIG-B decoder it could be possible that a reset of the
decoder is needed after the configuration.
Possible Errors
This command may cause the following CM Engine error codes:
289
CMEngine
4.10.2 irigb:cfg?
Description This command updates the list of available IRIG-B configurations and returns it
as comma separated string. The configuration 0 (no configuration selected) is
always included in the returned list.
This command detects hardware changes (removal of connected CMGPS) and updates the
available configurations. If the currently selected configuration is not included any more it
selects configuration 0.
Possible Errors
This command may cause the following CM Engine error codes:
4.10.3 irigb:cfg?(<cfg_no>)
Description This command returns additional information about the IRIG-B configuration.
<irigb_source>:
enc = IRIG-B encoder is the active source.
dec = IRIG-B decoder is the active source.
Possible Errors
This command may cause the following CM Engine error codes:
290
String Commands
4.10.4 irigb:def?
Function Indicates whether a CMIRIG-B device has been found on the specified CMC and
returns the selected IRIG-B configuration.
<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 CM Engine error codes:
291
CMEngine
4.10.5 irigb:datetime?
Function Gets the current date and time of the active IRIG-B source depending on the
selected IRIG-B configuration.
Description This command returns the current date and time of the active IRIG-B source. The
selected IRIG-B configuration defines where the date/time is taken from. If no
configuration is 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.
<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. 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.
292
String Commands
11 0
293
CMEngine
20 0
21 0
22 0
23 0
If a coded expression is selected which doesn't contain the year information the returned
values <yyyy>,<mm>,<dd> are calculated based on the year 2000.
Possible Errors
This command may cause the following CM Engine error codes:
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.
294
String Commands
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).
<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.
295
CMEngine
10 0
11 0
296
String Commands
16
17 0
18 0
19 0
20 0
21 0
22 0
23 0
Possible Errors
This command may cause the following CM Engine error codes:
See also:
command "irigb:enc:cfg?" on page 297
4.10.7 irigb:enc:cfg?
Description This command reads out the current configuration of the IRIG-B encoder.
297
CMEngine
<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.
298
String Commands
10 0
11 0
16 0
17 0
18 0
19 0
20 0
21 0
22 0
299
CMEngine
23 0
Possible Errors
This command may cause the following CM Engine error codes:
Description This command configures the expected signal format of the IRIG-B decoder.
The <mod> parameter defines the modulation of the IRIG-B signal to PWM
(Pulse width code) or Manchester modulation. Currently only PWM is supported.
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.
300
String Commands
<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 CM Engine error codes:
See also:
command "irigb:dec:cfg?" on page 301
4.10.9 irigb:dec:cfg?
Description This command reads out the current configuration of the IRIG-B decoder.
<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.
301
CMEngine
Possible Errors
This command may cause the following CM Engine error codes:
4.10.1 irigb:dec:scan?
0
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.
<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>:
302
String Commands
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 CM Engine error codes:
4.10.1 irigb:dec:reset
1
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 CM Engine error codes:
See also:
command "sys:status?" on page 122
Function Sets the trigger date, time and pulse rate for the IRIG-B decoder.
303
CMEngine
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 288.
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 CM Engine error codes:
4.10.1 irigb:dec:sync?
3
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.
304
String Commands
<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).
Possible Errors
This command may cause the following CM Engine error codes:
Counter Meaning
305
CMEngine
Counter Meaning
You can set this counter to a value in the 0 -
65535 range using the seq:set command.
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.
4.11.1 seq:begin
Function: see command "seq:end" on page 307.
Possible Errors
This command may cause the following CM Engine error codes:
306
String Commands
4.11.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 CM Engine 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.
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?
seq:begin
307
CMEngine
seq:clr
seq:exec
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 CM Engine error codes:
See also:
command "seq:exec" on page 309
308
String Commands
4.11.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 CM Engine error codes:
4.11.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 CM Engine error codes:
See also:
command "seq:stop" on page 311
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.
309
CMEngine
<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 CM Engine error codes:
Function With this command you can add a number to the content of one of the user
modifiable counters.
<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 CM Engine error codes:
310
String Commands
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.
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 CM Engine error codes:
4.11.8 seq:stop
Function:
Stops a currently running sequence. Implies the command out:resetopt.
311
CMEngine
Possible Errors
This command may cause the following CM Engine error codes:
See also:
command "seq:exec" on page 309
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
312
String Commands
The following picture illustrates the effects of the jump distances described above:
313
CMEngine
Parameter <timeout_condition>:
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
314
String Commands
as boolean operators:
not(<bin(X)>): negation of a binary input
and logical AND of 2 expressionsor logical OR of 2 expressions
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
315
CMEngine
If the trigger date and time is in the past the trigger will never happen.
Parameters
Parameter Description
316
String Commands
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.
317
CMEngine
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
318
String Commands
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
319
CMEngine
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
320
String Commands
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
321
CMEngine
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:
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:
322
String Commands
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.
In the left side table of contents find the multimeter command of your choice and click the
corresponding entry.
4.12.1 inp:ana(<input_list>):rms?(<itime>)
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.
323
CMEngine
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 CM Engine error codes:
CMERR_BIN_INPUT Some of the inputs in the input list was configured as binary
input.
See also:
"inp:mode(multimeter|scope)" on page 341
"inp:avail?(multimeter|scope)" on page 341
"inp:ana:get?" on page 336
Examples:
inp:ana(4,5,6):rms?(1.0)
Result: "1,1;"
324
String Commands
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.
4.12.2 inp:ana(<input_list>):peak?(<rtime>)
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 CM Engine error codes:
325
CMEngine
CMERR_BIN_INPUT Some of the inputs in the input list was configured as binary
input.
See also
"inp:mode(multimeter|scope)" on page 341
"inp:avail?(multimeter|scope)" on page 341
"inp:ana:get?" on page 336
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.
326
String Commands
4.12.3 inp:ana(<input_list>):phase?(<itime>)
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 CM Engine error codes:
CMERR_BIN_INPUT Some of the inputs in the input list were configured as binary
input.
See also:
"inp:mode(multimeter|scope)" on page 341
"inp:avail?(multimeter|scope)" on page 341
327
CMEngine
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:
328
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 CM Engine error codes:
CMERR_BIN_INPUT Some of the inputs in the input list were configured as binary
input.
See also:
"inp:mode(multimeter|scope)" on page 341
"inp:avail?(multimeter|scope)" on page 341
"inp:ana:get?" on page 336
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.
329
CMEngine
4.12.5 inp:ana(<input_list>):power?(<itime>)
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.
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>
330
String Commands
<var_validity>
Integer containing the validity flags of the <Reactive_power> measurement.
Possible Errors
This command may cause the following CM Engine error codes:
CMERR_BIN_INPUT Some of the inputs in the input list were configured as binary
input.
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 341
"inp:avail?(multimeter|scope)" on page 341
"inp:ana:get?" on page 336
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
331
CMEngine
4.12.6 inp:ana(<input_list>):sum?(<itime>)
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 CM Engine error codes:
CMERR_BIN_INPUT Some of the inputs in the input list were configured as binary
input.
332
String Commands
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 341
"inp:avail?(multimeter|scope)" on page 341
"inp:ana:get?" on page 336
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
4.12.7 inp:ana(<input_list>):diff?(<itime>)
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.
333
CMEngine
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>
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 CM Engine error codes:
334
String Commands
CMERR_BIN_INPUT Some of the inputs in the input list were configured as binary
input.
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 341
"inp:avail?(multimeter|scope)" on page 341
"inp:ana:get?" on page 336
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
4.12.8 inp:ana:sync
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 CM Engine error codes:
335
CMEngine
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.
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.
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
real time violation overload weak signal not ready already read
336
String Commands
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.
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
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.
337
CMEngine
Description Removes running multimeter command and clears all the related measurement
tasks from the task vector.
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 CM Engine error codes:
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.
4.12.1 inp:ana:dc(on|off)
1
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.
338
String Commands
If you switch off the DC task and you try to read the DC analog inputs
you will get an error.
Parameters on|off
The keyword on switches the dc measurement on, while off switches it off.
Examples:
inp:ana:dc(off)
inp:ana:dc(on)
4.12.1 inp:ana:cal(ac|dc)
2
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.
339
CMEngine
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.
340
String Commands
4.13.1.1 inp:avail?(scope|multimeter)
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.
4.13.1.2 inp:mode(scope|multimeter)
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.
341
CMEngine
4.13.1.3 inp:scope:cfg?(maxacq|minblock)
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 CM Engine 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 341
"inp:avail?(multimeter|scope)" on page 341
"inp:scope:transfer:fetch?" on page 353
342
String Commands
4.13.1.4 inp:scope:status?
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 CM Engine 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 347
"inp:scope:trig:start" on page 348
"inp:scope:acquire(<input_mask>,<length>,<pretrigger>,<buff_mode>)" on page 344
343
CMEngine
4.13.1.5 inp:scope:acquire(<input_mask>,<total_length>,<pretrigger_length>,
<buff_mode>)
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 post-
trigger 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 CM Engine error code:
Error code: CMERR_NOT_SCOPE_MODE
Explanation: This command is only allowed in scope mode.
344
String Commands
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 347
"inp:scope:trig:start" on page 348
"inp:scope:status?" on page 343
345
CMEngine
4.13.2.1 inp:scope:trig:simple(<channel>,<slope>,<level>)
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 CM Engine error code:
Error code: CMERR_NOT_SCOPE_MODE
Explanation: This command is only allowed in scope mode.
Examples inp:trig:simple(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.
346
String Commands
inp:trig:simple(5,+,25.0)
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 347
"inp:scope:trig:start" on page 348
"inp:scope:trig:abort" on page 350
"inp:scope:trig:force" on page 349
4.13.2.2 inp:scope:trig:rearm(on|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 CM Engine 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 346
"inp:scope:trig:start" on page 348
"inp:scope:trig:abort" on page 350
"inp:scope:trig:force" on page 349
347
CMEngine
4.13.2.3 inp:scope:trig:start
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 CM Engine error codes:
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 346
"inp:scope:trig:rearm(on|off)" on page 347
"inp:scope:trig:abort" on page 350
"inp:scope:trig:force" on page 349
348
String Commands
4.13.2.4 inp:scope:trig:force
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 CM Engine error codes:
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 346
"inp:scope:trig:rearm(on|off)" on page 347
"inp:scope:trig:start" on page 348
"inp:scope:trig:abort" on page 350
349
CMEngine
4.13.2.5 inp:scope:trig:abort
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 CM Engine error codes:
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 346
"inp:scope:trig:rearm(on|off)" on page 347
"inp:scope:trig:start" on page 348
"inp:scope:trig:stop" on page 351
350
String Commands
4.13.2.6 inp:scope:trig:stop
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 CM Engine error codes:
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 346
"inp:scope:trig:rearm(on|off)" on page 347
"inp:scope:trig:start" on page 348
"inp:scope:trig:abort" on page 350
351
CMEngine
4.13.3.1 inp:scope:transfer:start
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 CM Engine error codes:
Error code: CMERR_NOT_SCOPE_MODE
Explanation: This command is only allowed in scope mode.
See also:
"inp:scope:transfer:fetch?" on page 353
"inp:scope:transfer:finish?" on page 354
352
String Commands
4.13.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 CM Engine error codes:
Error code: CMERR_NOT_SCOPE_MODE
Explanation: This command is only allowed in scope mode.
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 352
"inp:scope:transfer:finish?" on page 354
353
CMEngine
4.13.3.3 inp:scope:transfer:finish?
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 CM Engine error codes:
Error code: CMERR_NOT_SCOPE_MODE
Explanation: This command is only allowed in scope mode.
See also:
"inp:scope:transfer:start " on page 352
"inp:scope:transfer:fetch?" on page 353
354
String Commands
Code Sample: How to Access a Shared Memory File from C++ using the ID String
355
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 9 8 7 6 5 4 3 2 1 0
Inp - - - - - bin 10 9 8 7 6 5 4 3 2 1
ut ary
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: 0000002
word 2: 00004C2 // channels 2, 6, 7 & 11
word 3: 00xxxxx // sample 1 of channel 2
word 4: 00xxxxx // sample 2 of channel 2
word 5: 00xxxxx // sample 1 of channel 6
word 6: 00xxxxx // sample 2 of channel 6
word 7: 00xxxxx // sample 1 of channel 7
word 8: 00xxxxx // sample 2 of channel 7
word 9: 00xxxxx // sample 1 of binary inputs
word10: 00xxxxx // sample 2 of binary inputs
356
String Commands
4.13.4.1 inp:scope(<input_list>):harm(<req_harmonics>[,<pretrigger>])
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 CM Engine error code:
357
CMEngine
See also:
"inp:scope:trig:rearm(on|off)" on page 347
"inp:scope:trig:start" on page 348
"inp:scope:status?" on page 343
"inp:scope:acquire()" on page 344
4.13.4.2 inp:scope:harm?(transfer)
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 CM Engine 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 361
"inp:scope:transfer:finish?" on page 354
358
String Commands
1 No. 2 No.
Channels Harmonics
Requested
Fundamental Harm0 Ampl Harm0 Phase Harm1 Ampl Harm1 Phase etc.
freq.
etc.
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:
359
CMEngine
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.
360
String Commands
4.13.4.3 inp:scope:harm?(<channel>,<start_harmonic>)
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).
Possible Errors This command may cause the following CM Engine error code:
Error code: CMERR_NOT_SCOPE_MODE
361
CMEngine
See also:
"inp:scope:harm?(transfer)" on page 358
362
String Commands
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.
363
CMEngine
4.14.2 cb:time?
Answer Returns the values in the same order as specified in the cb:time command.
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.
4.14.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.
364
String Commands
4.14.6 cb:start(on|off)
Description 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.
4.14.7 cb:stop
4.14.8 cb:lock
Description 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.
4.14.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.
4.14.1 cb:status?
0
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.
<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:
365
CMEngine
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>)
366
String Commands
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:cfg?(trans) out:bin:cfg?
367
CMEngine
368
Appendix
5 Appendix
5.1 Syntax Diagrams
More:
"System Commands" on page 369
"Input Commands: Analog" on page 370
"Input Commands: General, Binary, Counter" on page 371
"Output Commands" on page 372
"Sequencer Commands" on page 374
"Amplifier Commands" on page 375
"GPS Commands" on page 376
"IRIG-B Commands" on page 377
369
CMEngine
370
Appendix
371
CMEngine
372
Appendix
373
CMEngine
374
Appendix
375
CMEngine
376
Appendix
377
CMEngine
378
Appendix
1011 B 10s
1010 A 1s
379
CMEngine
380
Index
inp.scope.cfg?(maxacq|minblock)............. 342
*** In the CMEngine Index the dot
C
(".") stands for the colons in string CM Engine................................................... 17
commands ***............................................ 115
CMEngine.................................................... 17
A D
access a shared memory file from C+
+ using the ID String.................................. 355 DevGetList................................................... 92
381
CMEngine
382
Index
inp.bin(<inp_module_idx>.<group_idx inp.scope.harm?
>).name?................................................... 253 (<channel>,<start_harmonic>).................. 361
inp.bin(<inp_module_idx>.<group_idx inp.scope.harm?(transfer)......................... 358
>[.<inp_idx>]).def(pf | <threshold>)........... 250
inp.scope.status?....................................... 343
inp.bin(<inp_module_idx>.<group_idx
inp.scope.transfer.fetch?........................... 353
>[.<inp_idx>]).def?..................................... 251
inp.scope.transfer.finish?........................... 354
inp.bin.cfg?................................................ 239
inp.scope.transfer.start.............................. 352
inp.bin[(<inp_module_idx>)].diff(reset)...... 245
inp.scope.trig.abort.................................... 350
inp.buf.clr................................................... 263
inp.scope.trig.force.................................... 349
inp.buf.get?................................................ 259
inp.scope.trig.rearm(on|off)....................... 347
inp.buf.get?(<no_of_entries>)................... 262
inp.scope.trig.simple(<channel>,<slo
inp.buf.sam (<source>, <index>)............... 257
pe>,<level>)............................................... 346
inp.buf.sam (bin, on | off | bin)................... 257
inp.scope.trig.start..................................... 348
inp.buf.sam(ext)......................................... 259
inp.scope.trig.stop..................................... 351
inp.cfg? [(ecount)]...................................... 268
irigb.cfg(<cfg_no>)..................................... 288
inp.cfg?(srate|avrg|firm|hard)..................... 269
irigb.cfg?.................................................... 290
inp.count. get?(bcount |
irigb.cfg?(<cfg_no>)................................... 290
ecount(<counter>)).................................... 267
irigb.datetime?........................................... 292
inp.count.clr............................................... 264
irigb.dec.cfg(<parity_mode>, <mod>,
inp.count.join(bcount |
<coded_expr>, <parity_err_status>,
ecount(<master_counter>), bcount |
<write_mode>)........................................... 300
ecount(<slave_counter>)).......................... 266
irigb.dec.cfg?............................................. 301
inp.count.off............................................... 264
irigb.dec.reset............................................ 303
inp.count.on............................................... 264
irigb.dec.scan?.......................................... 302
inp.count.set(bcount |
ecount(<counter>), <count>, +|-)............... 265 irigb.dec.sync(<yyyy>, <doy>, <hh>,
<mm>, <ss>, <rate>, <write_mode>)........ 303
inp.mode(scope|multimeter)...................... 341
irigb.dec.sync(<yyyy>, <mm>, <dd>,
inp.scope(<input_list>).harm(<req_ha
<hh>, <mm>, <ss>, <rate>,
rmonics>[,<pretrigger>])............................ 357
<write_mode>)........................................... 303
inp.scope.acquire(<input_mask>,<tot
irigb.dec.sync?........................................... 304
al_length>,<pretrigger_length>,<buff_
mode>)...................................................... 344 irigb.def?.................................................... 291
383
CMEngine
384
Index
385
CMEngine
S
seq.add (count(1) | count(2), <rel_steps>) 310
V
Validity conditions...................................... 336
seq.begin................................................... 306
Version...................................................... 106
seq.clr........................................................ 309
seq.end...................................................... 307
seq.exec.................................................... 309
seq.set (loop | count(1) | count(2) |
timer | timeout, <value>)............................ 309
seq.status? (step | loop | count(1) |
count(2) | mem)......................................... 311
seq.stop..................................................... 311
386