Data AcQuisition And Real-Time AnalysisScope - Spectrum - Spectrogram - Signal Generator
Software for Windows
Science with your Sound Card!
Contact us about
Macro Edit Definition
This is the part of the macro that controls its operation. The Definition is just a list of commands, which may be basic internal Daqarta operation names, or the Names of other macros. You can put one command on each line, or put multiple commands on a line if they are separated by commas or one or more spaces.
Internal Daqarta commands end with an '=' sign and are typically followed by a value or text string, such as:
Values are entered the same as you would enter them manually for the given control. In the above case, you could use 1k instead of 1000 to get the same result.
For text strings that contain spaces or commas, enclose the string in quotes so that Daqarta can find the end properly, as in:
Some strings can extend over multiple lines, using quotes at the overall start and end:
Msg="Multi-line message box. Second line of message. Third line of message."
Some internal commands take multiple parameters separated by commas, and these also must be surrounded by quotes:
MsgBkColr="255,255,0" MsgColr="255,0,0" MsgPos="100,100"
Commands that are the names of other macros must be preceded by '@' and normally not be followed by '=' or any parameters. For example, if you have previously defined _MyMacro you can invoke it from another macro via:
However, you can also run such a macro in a Loop by specifying the number of times you want to repeat it. For example, to repeat 100 times you would use:
You may also add comments to the Definition, in order to document what it is doing. A comment is any text that appears after a semicolon, for the rest of that line.
The Tab key moves among different controls or fields in a dialog. Within the Definition, you can use CTRL+Tab to move to the next tab stop. You may want to use this to space comments away from commands.
You can use CTRL+ALT+D to enter the current date, or CTRL+ALT+T to enter the current time. The Edit Date/Time Preferences menu allows you to specify the date or time format, and whether UTC time or local time will be used.
You can conclude a Definition by clicking on another control, such as Save. For keyboard-only control, the Tab key will conclude entry and move the focus to Save.
Each Definition is limited to about 3000 characters. For ease in reading and maintaining longer macros, it is best if they are subdivided into logical units that can be called as separate macros with meaningful names, such as StartTest or SaveData.
Questions? Comments? Contact us!We respond to ALL inquiries, typically within 24 hrs.
Over 30 Years of Innovative Instrumentation
© Copyright 2007 - 2020 by Interstellar Research
All rights reserved