For loop#
Executes all child tests as often as specified.
Description#
Executes all child tests as often as specified. Child tests can be added by dragging and dropping tests from the test picker onto the For loop test.
Input parameters#
| Parameter | Description |
|---|---|
| Iterations | The number of times the child tests are executed. |
Output parameters#
| Parameter | Description |
|---|---|
| Index | The index of the current iteration |
Example#
Goal:\ Sending a READ? SCPI command to a device to trigger a measurement 6 times every 10 seconds and read back the results.
flowchart TD
subgraph "For loop"
C[Wait] --> D
D[MeasureTrigger] --> B
B[ReadResult]--> C
end
Hardware setup:\ Connect a device (that can process a READ? SCPI commmand) to the computer running Measmatic over TCP/IP.
flowchart LR
A(Measmatic) o---o |TCP/IP| B(Device)
In the device manager add a new generic device to the current test site configuration. Change the name, the IP address and port in the device properties of the device.
Measmatic setup: or \ 1. Add a new For loop to the test sequence by dragging and dropping a For loop from the test picker into the test sequence. Set the Iterations to 6.\ 2. Then add a Send test under the For loop. Select the Device in the Send test and Change the Command to READ?.\ 3. Also add a Receive test under the For loop after the Send test and select the Device in order to receive the results from the device.\ 4. Finally, the Wait test must be added under the For loop after the Receive test. Set the Delay to 10 seconds.\ 5. Execute the test sequence by pressing the Run all tests button.