Wingpath to cease trading on 25 October 2025

From 25 October 2025 we will no longer be selling licences for our software products (ModSnmp, ModMultiSim, Modsak, ModSlaveSim, ModMaster and ModTest).

The website will remain operational until at least 2027 for reference purposes, and for the registration and transfer of product licences.

ModSlaveSim help v3.07 - 4.4.2. On button and Off button - a simple latch

Download manual: HTML

4.4.2. On button and Off button - a simple latch

A latch retains its value until it is told to change it. This is achieved in the ModSlaveSim language by using an if then without an else.

The simplest form of latch has an Output that can be 0 or 1, and two inputs: a Set input, which sets the output to 1, and a Reset input, which sets the Output to 0. If the Set and Reset inputs are both 0, the Output retains its last value.

It is similar to having two buttons - one for on and one for off. (Those with an electronics background will know this as a level-triggered RS flip-flop.)

Table 7. Simple latch

Register Address Register Name Statement
$100 Set  
$101 Reset  
$102 Output
if $100 != 0 then 1
else if $101 != 0 then 0