Home Free Download Purchase Daqarta Daqarta Features Screen Shots Help Contents Help Index Revision History Articles by the Author About Interstellar Research Daqarta for DOS (Legacy systems only) Contact Us |
|
|
| Previous | Next | |
|
Event Wait Macros
Macros: WaitPause, WaitAvg, WaitChange WaitPause: Normally, macro commands are processed one after the other as fast as possible. That's ideal for setting up a test, but it's often less than ideal when actually collecting and saving data. The problem is that data collection takes a finite amount of time; if, for example, you use Gen=1 to begin stimulus generation and Input=1 to begin acquiring input data, when do you give SaveDQA to save it? You need to wait until data has been acquired and is ready to be saved. One way to do that is by using Single Trigger mode with Pause=0 to unPause and wait for a trigger, followed by WaitPause=1. At this point the macro halts and waits until the trigger event causes Single to enter Pause mode. Then the macro proceeds to save the data. Alternatively, you can set the Averager Frames Request to 1 ( WavgFrames=1 or SpavgFrames=1) and start an average with Avg=1 before giving WaitPause=1. The next trace will satisfy the Frames Request, the averager will Pause, and macro processing will proceed. You can use any Trigger mode, or no triggering at all. (You could use WaitAvg instead of WaitPause... see below.) You can also use WaitPause=1 in untriggered or non-Single triggered modes to allow the operator to specify when to save the data by manually hitting Pause. (Another way to do this is to have one macro that starts the test, and another that saves the data when the operator runs it.) WaitPause=0 does the opposite: It suspends macro processing until unPause. WaitAvg: If the data to be acquired is in the form of a waveform or spectrum average, you could start the average (without Single) with Avg=1 and then give WaitPause=1. Macro command processing will be suspended, and the average will proceed until the requested number of Frames are averaged, which automatically invokes Pause mode. That will cause macro processing to resume, allowing you to save the data to a file. But suppose the operator wants to manually Pause the average midway, and unPause after a noisy truck passes by. WaitPause doesn't distinguish between a Pause due to the average completing and a manual Pause. WaitAvg, on the other hand, completely ignores Pause and waits only for the requested number of frames before proceeding. The average can thus be paused and resumed as many times as needed without affecting the macro operation. Some experiments need a variable amount of averaging, which an operator can judge by eye. The Frames Request can be set fairly high, and the operator can Pause the average when the result is acceptable. But if WaitAvg is in waiting for the requested frames, the macro doesn't resume processing to save the data to a file (for example). Instead, you can supply message text with WaitAvg, such as: Avg=1 ;Start the average WaitAvg="Average IN PROGRESS. Click [x] to end." ;Shows during average Pause=1 ;Stop the average Msg= ;Clear the message A.SaveDQA="AvgData" ;Save the file When the message box is closed, it also causes macro processing to resume. The Pause=1 command is needed to stop the average; it is redundant if the average ran to completion. Similarly, it may sometimes be necessary to abort an average. Manually toggling it off during WaitAvg will again prevent the requested frames from being reached, so the macro will remain suspended. Instead, cancelling the WaitAvg message will result in the average being saved, even if it is unwanted. Alternatively, you can click on the Cancel button in the macro dialog to abort the macro entirely, which may require opening the dialog ( CTRL+F8) if it isn't already open. WaitAvg is best used for highly automated data acquisition, where operator intervention is rarely needed. If the operator will be present anyway, a better approach may be to have a series of separate macros that he runs. One starts the average, and a separate macro pauses it (if not at completion) and saves the file. This approach gives the operator much more control, but still allows a large degree of automation. Further, by doing everything with macro commands (with descriptions as well as descriptive names), even a novice operator can run a complex test. WaitChange: WaitChange=Field5 halts macro processing until the specified Label or Field is changed. This can be used to require an operator to enter necessary information before a test begins. (It does nothing to validate the information, but it does prevent it being skipped.) Having the name or ID number of the device, animal, or subject being tested allows later macro commands to use that as a file name for saving the acquired test data. See Example - File Name Auto-Increment under Macro Variables for details. See also Message Macros ( WaitMsg, WaitMsgAns), Timer Macros. |
Applications:
Frequency response
|
|
GO:
Questions? Comments? Contact us!We respond to ALL inquiries, typically within 24 hrs.INTERSTELLAR RESEARCH: 25 Years of Innovative Instrumentation © Copyright 2007 - 2008 by Interstellar Research All rights reserved |
||