IBM TJ Watson Research

IBMFlipFlop

IBMFlipFlop.mp4

Description

Two valuators are linked as below. To toggle a 1.0 input event 'pulse' is multiplied by Factor1 and has Offset1 added. This value is then output into the second valuator where it is muliplied by its Factor1. The resulant output is also fed back into the first valuator Offset1. The routing loop is broken and a new value is not output (see VRML routing loops and using timestamps to break them).

The first time 1.0 x -1.0 + 1.0 == 0.0; then in the second valuator 0.0 x -1.0 + 0.0 == 0; The zero is fed back to Offset1 such that...

the second time 1.0 x -1.0 + 0.0 == -1.0; then in the second valuator -1.0 x -1.0 + 0.0 == 1.0; The one is fed back to Offset1, and the initial condition, as depicted below, is re-established.

+--------------------------------------------------------------------+ | | | +=========================+ +=========================+ | | | VALUATOR | | VALUATOR | | | | | | | | | o Factor1 -1.0 | o Factor1 -1.0 | | | | | | | | +--- o Offset1 1.0 | o Offset1 0.0 | | | | | | | | | | | | ----------- o inSFFloat outSFFloat o ----- o inSFFloat outSFFloat o --+--------- | | | | +=========================+ +=========================+

To demonstrate this a rectangle is associated with a TouchSensor and its touchTime is converted, by another valuator, to a fixed float value of 1.0 and fed into the toggle. An output of the second valuator, the outSFBool, is routed the filled field of the Material2D for a Circle.

Screenshot

Snapshot taken after Toggle button clicked once (initially the Circle is not filled). Each time the button is clicked the circle toggles between filled and unfilled.



Back to main index