SAMs



Navigation: Go to End of Page



This requires the SAMs extension to be installed (which will be the case with normal installations of jOrgan).

The SAMs element is a specialized connector with special handling for wikipedia:Stop_action_magnets.

The following example shows the communication between a stop tab (identified by 60) and a switch. The latter knows the usual messages only. All magnets are cancelled after a configurable duration:



             Switch            SAMs          Output        Input     On magnet       On sensor
             ------            ----          ------        -----     ---------       ---------
               :              :              :           :           :             :
               :               ├──────────────>├──on────────────────────>|             :
 ──activate────>├──144,60,127──>│              :           :           :             :
               :               │              :           :           :             :
               :           ┌───┤              :           :           :             :
               : (duration)│  :              :           :           :             :
               :           └──>│              :           :           :             :
               :               ├──144,60,0────>├──cancel────────────────>|             :
               :           ┌──>│              :           :           :             :
               :           │  :              :           :           :             :
               :           └───┤              :           :           :             :
               :               │<───────────────144,60,127──┤<───────────────turned on──┤
 <───activated──┤<──────────────┤              :           :           :             :
               :              :              :           :
               :              :              :           :       Off magnet      Off sensor
               :              :              :           :       ----------      ----------
               :              :              :           :           :             :
               :               ├──────────────>├──on────────────────────>|             :
 ──deactivate──>├──128,60,127──>│              :           :           :             :
               :               │              :           :           :             :
               :           ┌───┤              :           :           :             :
               : (duration)│  :              :           :           :             :
               :           └──>│              :           :           :             :
               :               ├──128,60,0────>├──cancel────────────────>|             :
               :           ┌──>│              :           :           :             :
               :           │  :              :           :           :             :
               :           └───┤              :           :           :             :
               :               │<───────────────128,60,127──┤<──────────────turned off──┤
 <─deactivated──┤<──────────────┤              :           :           :             :
               :              :              :           :           :             :





For this setup the following messages have to be configured (note the tab variable):

Type

MPL

Tab turning on

equal 144, get tab, equal 127

Tab turning off

equal 128, get tab, equal 127

Cancel tab on

set 144, set tab, set 0

Cancel tab off

set 128, set tab, set 0

Tab turned on

equal 144, get tab, equal 127

Tab turned off

equal 128, get tab, equal 127



Properties

duration
The duration after which to cancel magnets.
maximum
The maximum count of magnets to magnetize simultaneously, default is 64.

See connector for further properties.

References

See connector for references.

Referenced from

None.

Messages

All messages to control SAMs:

Tab turning on
Message to intercept as a tab turning on. Variables: tab
Tab turning off
Message to intercept as a tab turning off. Variables: tab
Cancel tab on
Message to cancel a tab on. Variables: tab
Cancel tab off
Message to cancel a tab off. Variables: tab
Tab turned on
Message to intercept as a tab being turned on. Variables: tab
Tab turned off
Message to intercept as a tab being turned off. Variables: tab


Navigation