GX5296, GX5961, GX5964, File
Sets the control parameters for the specified Step
GtDio6xStepSetControl (nHandle, lStep, nAction, nNextStep, nCondition, nLoopCount, nJumpImmediate, pnStatus)
Name |
Type |
Comments |
nHandle |
SHORT |
Session identifier:● Board handle is used when communicating with the hardware. The Board handle session identifier is returned by calling GtDio6xInitialize or GtDio6xSetupInitialization. ● File handle is used when communicating with a file. The File handle session identifier is returned by calling GtDio6xFileOpen. |
lStep |
LONG |
Step Number to access 0-4095. |
nAction |
SHORT |
Action to be taken if control condition is met:0. GTDIO6X_CONTROL_ACTION_NONE: Disable the jump logic for this step. 1. GTDIO6X_CONTROL_ACTION_JUMP: Jump forces the next step number to be replaced by the specified step number if jump condition is true. 2. GTDIO6X_CONTROL_ACTION_SUBROUTINE: Gosub jumps save the current step number and forces the next sequence step number to be replaced by the specified step number. The Gosub Return flag set true will force the sequence step number to be one more that the saved step number. |
nNextStep |
SHORT |
Sets the Step number to jump to 0-4095.If the jump condition is true, then this step number will be the next step instead of the next sequential step number. The jump action has precedence over the Last Step flag. |
nCondition |
SHORT |
Sets the jump condition for the specified sequence step, jumps can be conditional or unconditional. Conditional jumps require a specified condition to be true in order for the jump to be enabled. Unconditional jumps are always enabled.The selections are:1. GTDIO6X_CONTROL_CONDITION_ALWAYS: Jump always (Unconditional). 2. GTDIO6X_CONTROL_CONDITION_RTC_ERROR_IN_STEP: Jumps if the Real Time Compare detected at least one failure in the step. See comments for details. 3. GTDIO6X_CONTROL_CONDITION_NO_RTC_ERROR_IN_STEP: Jumps if the Real Time Compare did not detect any failures in the step. See comments for details. 4. GTDIO6X_CONTROL_CONDITION_RTC_ERROR_COUNT_NOT_ZERO: Real Time Compare Error Count Not Zero (burst accumulated). See comments for details. 5. GTDIO6X_CONTROL_CONDITION_RTC_ERROR_COUNT_ZERO: RTC Error Count Zero (burst accumulated). Real Time Compare Error Count Zero (burst accumulated), see comments for details. 6. GTDIO6X_CONTROL_CONDITION_JUMP_TRIGGER_0_TRUE: Jump 0 Trigger True. See comments for more details. 7. GTDIO6X_CONTROL_CONDITION_JUMP_TRIGGER_0_FALSE: Jump Trigger 0 False. See comments for more details. 8. GTDIO6X_CONTROL_CONDITION_JUMP_TRIGGER_1_TRUE: Jump Trigger 1 True. See comments for more details. 9. GTDIO6X_CONTROL_CONDITION_JUMP_TRIGGER_1_FALSE: Jump Trigger 1 False. See comments for more details. 10. GTDIO6X_CONTROL_CONDITION_JUMP_TRIGGER_2_TRUE: Jump Trigger 2 True. See comments for more details. 11. GTDIO6X_CONTROL_CONDITION_JUMP_TRIGGER_2_FALSE: Jump Trigger 2 False. See comments for more details. 12. GTDIO6X_CONTROL_CONDITION_JUMP_TRIGGER_3_TRUE: Jump Trigger 3 True. See comments for more details. 13. GTDIO6X_CONTROL_CONDITION_JUMP_TRIGGER_3_FALSE: Jump Trigger 3 False. See comments for more details. |
lLoopCount |
LONG |
Sets a loop count for the currently selected sequence step (0-65536). This loop count indicates how many additional times the jump will be executed by the Sequencer. 0 indicates disabled. The jump logic can be qualified with a loop count. The jump will only occur if the loop counter has not reached its terminal count. |
nLoopCounter |
SHORT |
Sets the 16-bit loop counter assigned to the currently selected sequence step (0-15). One of sixteen 16-bit loop counters. Each loop counter can be set to reload or disable when the terminal count is reached, see the GtDio6xSequencerSetLoopCounterMode API for more details. |
pnJumpImmediate |
PSHORT |
Not Used, pass as 0. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative value on failure. |
Normal sequence step execution proceeds sequentially until the step with the “Last Step” flag set true. Conditional and unconditional jumps and gosubs can be added to allow the user to modify sequence step execution order.
Action:
Two jump types can be set, Normal and Gosub.
● Jump: Forces the next sequence step number to be replaced by the specified step number.
● Gosub jumps save the current step number and forces the next sequence step number to be replaced by the specified step number. The Gosub Return flag set true will force the sequence step number to be one more that the saved step number. For example, if step number 5 and 7 had a gosub to step 10 and step 13 has the gosub return flag set, then the step number sequence starting from 1 would be, 1, 2, 3, 4, 5, 10, 11, 12, 13, 6, 7, 10, 11, 12, 13, 8, 9, …
Jump Condition:
● GTDIO6X_CONTROL_CONDITION_RTC_ERROR_IN_STEP
and GTDIO6X_CONTROL_CONDITION_NO_RTC_ERROR_IN_STEP: The sequence jump
logic includes a pass/fail condition. The pass/fail condition is the combination
of all the valid channel comparator results and the condition enable flag
for the current vector. The condition enable flag for the current vector
is set by calling GtDio6xWriteVectorTestFlagsMemory API and can be enabled/disabled
per vector. This pass/fail condition is then inserted in a 32-bit pipeline.
The contents of the pipeline are ANDED with the contents of the pipeline
mask to generate a pass/fail flag that the sequencer can jump on. Bit
0 is the mask for the first bit in the pipeline and bit 31 is the mask
for the last bit in the pipeline. If no bits are set, raw error is used
for jumping, counting burst errors and logging errors in the error address
memory. GX5961 and GX5964 only. See the GtDio6xRealTimeCompareSetJumpPipelineMask
API for more details. At least one vector in the specified step has to
have its condition vector flag be set. The Real Time Compare condition
vector flag allows the user to determine if any of the expect pattern
codes will cause the conditional jump pass/fail flag to be set if the
expected state is not true. GX5961 and GX5964 only.
See GtDio6xRealTimeCompareSetJumpSource API. GX5961 and GX5964 only.
● GTDIO6X_CONTROL_CONDITION_RTC_ERROR_COUNT_NOT_ZERO and GTDIO6X_CONTROL_CONDITION_RTC_ERROR_COUNT_ZERO: The error vector flag allows the user to determine if any of the expect pattern codes will cause the burst error flag to be set if the expected state is not true. At least one vector in the specified step has to have its error vector flag be set in order to enable the error count. See GtDio6xRealTimeCompareSetJumpSource API.
● GTDIO6X_CONTROL_CONDITION_JUMP_TRIGGER: Four sequence jump triggers are available. The sequence jump triggers are used for conditional jumping/looping. A jump/loop can be based on the true/false state of any of the four sequence jump triggers. For example, if jump trigger 1 test mode is set to 'Low Level', then a jump if trigger 1 true would occur if the selected jump trigger 1 source is low. See the GtDio6xTrigConfigSetJumpTrigger API for more details. The true/false state of the jump triggers is based on the jump trigger test event. If the jump trigger event is set to “Low Level”, then true would indicate the jump trigger signal is low and false would indicate the jump trigger signal is high.
The following configures Step 1 to loop back to itself 5 times unconditionally using loop counter 0, and returns the settings:
SHORT nStatus;
SHORT nType, nStep, nCondition, nLoopCount, nJumpImmediate;
GtDio6xStepSetControl(nHandle, 1, GTDIO6X_CONTROL_ACTION_JUMP, 1, GTDIO6X_CONTROL_CONDITION_ALWAYS, 5, 0 0, &nStatus);
GtDio6xStepGetControl (nHandle, &nType, &nStep, &nCondition, &nLoopCount, &nJumpImmediate, &nStatus);
GtDio6xStepGetControl, GtDio6xStepSetSubroutineReturn, GtDio6xStepGetSubroutineReturn, GtDio6xGetErrorString