vssSetSimulationHaltFlag

Set a simulation interruption flag.

Syntax

vssSetSimulationHaltFlag(block,flag)

Inputs

block
The block from where the simulation will be interrupted.
Type: Block
flag
Interruption flag.
1: pause.
2: stop.
3: reinitialize.
Type: integer

Examples

Flag used in an OML Custom Block to stop the simulation.
function OmlBlockFunction(block,flag)
	...
	if flag == vssBlockInitializeFlag

	elseif flag == vssBlockReinitializeFlag

	elseif flag == vssBlockTerminateFlag

	elseif flag == vssBlockOutputUpdateFlag
		...
		if myCondition >= 0
			...
			vssSetSimulationHaltFlag(block,2)
		end
	end
end