:Revision=2
:html
<<
128.158
XMux-Object|XMux
--
The IP object <!RW>XMux controls the crossmultiplexer of the 32x4 series as welll as the RCMux switches (Component tester multiplexer). 

The syntax is identical for both systems.
>>

<<
128.158.2
Procedures of the XMux-Object|Procedures
--
>>
<<
128.158.2.1
XMux.Clear|Clear
--
<!DEF>
procedure <!TW>XMUX.CLEAR (aXMuxCard : address);
<!TXT>
Removes all connections on the crossmultiplexer / RCMux switch<!PW>aXMuxCard.

<!DEF>
procedure <!TW>XMUX.CLEAR (aXMuxAdr : address);
<!TXT>
Removes all connections in the complete row or column if <!PW>aXMuxAdr is a row- or column address.

<!DEF>
procedure <!TW>XMUX.CLEAR (aXMuxRow, aXMuxCol : address);
<!TXT>
Removes the connection specified with the row- and the column addresses. Both addresses must be on the same card. 

<!DEF>
procedure <!TW>XMUX.CLEAR (aXMuxCross : address);
<!TXT>
Removes the connection at the interconnection address. 

<!DEF>
procedure <!TW>XMUX.CLEAR (aXMuxCard : address; rRow, rCol : real);
<!TXT>
Removes the connection between row <!PW>rRow and column <!PW>rCol on the crossmultiplexer / RCMux switch <!PW>aXMuxCard. Here the row and column values are numbners and not addresses!
>>

<<
128.158.2.2
XMux.Set|Set
--
<!DEF>
procedure <!TW>XMUX.SET (aXMuxRow, aXMuxCol : address [; rMode : real [; rDelay : real]]);
<!TXT>
<!DEF>
procedure <!TW>XMUX.SET (aXMuxCross : address [; rMode : real [; rDelay : real]]);
<!TXT>
Makes the connection between the specified row- and the column addresses. Both addresses must be on the same card. Alternativly, an interconnection address can be specified. 

<!DEF>
procedure <!TW>XMUX.SET (aXMuxCard : address, rRow, rCol : real [; rMode : real [; rDelay : real]]);
<!TXT>
Makes a connection on the multiplexer <!PW>aXMuxCard on the crossing of row <!PW>rRow and column <!PW>rCol. Both values are numbers and not addresses.

<!STBL>
<!+>rMode<!+>effect<!>
<!c>0<!>the connection is made immediately and no other connections are effected<!>
<!c>1<!>other connections in the row are removed<!>
<!c>2<!>other connections is the column are removed <!>
<!c>3<!>the combination of 1 and 2<!>
<!ETBL>
If <!PW>rDelay is specified and it is not 0, then <!PW>rDelay ms is waited between the removing and the making of the connection (Break-Before-Make delay).
In this case a pending <!RW>XMux.Store will be aborted (has the same effect as a <!RW>XMux.Send).

If the connection has been already made before the command, then this command does not do anything at all (neither deletion nor waiting).
>>

<<
128.158.2.3
XMux.SetEx|SetEx
--
<!DEF>
procedure <!TW>XMux.SetEx (aCard : address; rGroup : real; sCommand : string);
<!TXT>
Macrocommand: Set/remove connections on a crossmultiplexer / RCMux switch  card and waits

 <!PW>rGroup selects a action group

 <!PW>sCommand has the format:
<!CODE>
<b><!SW>Address,<!SW>Action[,<!SW>Action...][;<!SW>Address,<!SW>Action[,<!SW>Action...]...]</b>
<!TXT>

 <b><!SW>Address</b> defines the whole card, a row, a column or a crossing
<!STBL>
<!><b><!SW>A</b><!>= whole card (All, can only be removed)<!>
<!><b><!SW>Rx</b><!>= Row x  (can only be removed)<!>
<!><b><!SW>Cy</b><!>= Column y (can only be removed)<!>
<!><b><!SW>RxCy</b><!>= Crossing of Row x with Column y<!>
<!ETBL>

 <b><!SW>Action</b> hat the format:
<!CODE>
<b><!SW>nS[|-+] | <!SW>nR | <!SW>nDz </b><i>with n=0..9</i>
<!TXT>

 <b><!SW>n</b> selects a group. Only groups selected with <PW>rGroup will be executed.
<!STBL>
<!><!SW>S </td><td rowspan=2>Set, without regard of other connections</td></tr>
<!><!SW>S. <!>
<!><!SW>S| <!>Set, but remove other connections in the column<!>
<!><!SW>S- <!>Set, but remove other connections in the row<!>
<!><!SW>S+ <!>Set, but remove other connections in row and column<!>
<!><!SW>R <!>Remove<!>
<!><!SW>Dz <!>Delay of z milliseconds<!>
<!ETBL>
Attention:
<ul indent=14>
<li>S is only allowed for crossing!</li>
<li>R is possible for complete rows, columns and cards too</li>
</ul>
</li><br>
<ul indent=14>
<li>if <!PW>rGroup selects no group, nothing happens</li>
<li>if <!PW>sCommand is empty, nothing happens</li>
<li>if no actions are specified, nothing happens</li>
</ul>

Example
<!CODE>
 SetEx (XMUX1, 1, 'R1C3,1s,9r,1d100,9d50');
          !    !    !   !  !  !     +-- if group 9, then delay of 50 ms
          !    !    !   !  !  +-- if group 1, then delay of 100 ms
          !    !    !   !  +-- if group 9, then set crossing
          !    !    !   +-- if group 1, then remove crossing
          !    !    +-- crossing row 1 with column 3
          !    +-- group 1 is active
          +-- crossmultiplexer 1
Since group 1 is activated, the crossing R1C3 will be set and the programm will wait 100 ms!

 SetEx (XMUX1, 2, 'R1,1C);
Nothing will happen, since no action for group 2.

 SetEx (XMUX1, 1, 'R1C3,1s,1d100;R2C4,1s);
Sets crossing R1C3, waits100 ms and sets crossing R2C4.
<!TXT>
>>


<<
128.158.2.4
XMux.Store|Store
--
<!DEF>
procedure <!TW>XMUX.STORE (aXMuxCard : address);
<!TXT>
Lets the crossmultiplexer / RCMux switch  <!PW>aXMuxCard store any change internally instead of realising it immediately.

A <!RW>XMux.Send command will end this state and realize the changes.

Attention: Any Set command with a Brake-Before-Make-Delay will terminate the Store mode immediately to realize the delay!
>>

<<
128.158.2.5
XMux.Send|Send
--
<!DEF>
procedure <!TW>XMUX.SEND (aXMuxCard : address);
<!TXT>
Ends the <!RW>XMux.Store command. Any internally stored change is realized on the card immediately. Future changes will be no longer stored but will be realized directly.
>>

<<
128.158.3
Functions of the XMux-Object|Functions
--
>>
<<
128.158.3.1
XMux.Get|Get
--
<!DEF>
function <!TW>XMUX.GET (aXMuxRow, aXMuxCol : address) : real;
<!TXT>
<!DEF>
function <!TW>XMUX.GET (aXMuxCross : address) : real;
<!TXT>
Returns the state of the specified crossmultiplexer / RCMux switch  crossing.

<!DEF>
function <!TW>XMUX.GET (aXMuxCard : address; rRow, rCol : real) : real;
<!TXT>
Same as above, only are row and column specified as numbers and not adresses.

Result:
1 = connection set
0 = connection open

If the crossmultiplexer / RCMux switch  is in store mode (<!RW>XMux.Stored), the stored state will be returned.
>>

