:html
<<
128.125
Multiplexer MUX-Object|MUX
--
The IP-object MUX controls the multiplexers of the universal measurement system.
>>
<<
128.125.2
Procedures of the MUX-Object|Procedures
--
>>
<<
128.125.2.1
MUX.Bits|Bits
--
<!DEF>
procedure <!TW>MUX.Bits (aMUXAdr : address: rOperation, rSendIt : real);
<!TXT>
The bits indicated in the address <!PW>aMUXAdr (an address on a MUX5450-card) are combined, as specified in the rOperation, with the current state of the bits of the card.

If <!PW>rSendIt = <!RW>Send, then the data is sent to the card, otherwise it is stored internally.

 <!PW>rOperation can be : <!RW>CLR | <!RW>SET | <!RW>FLIP | <!RW>NOP or 0..3

 <!PW>rSendIt can be    : <!RW>STORE | <!RW>SEND        or 0..1

</ul>

Beispiel
<!CODE>
<!RW>MUX.Bits (<!RW>Mux1_ALL, <!RW>CLR, <!RW>Send);
        //The bits which are entered in <!RW>Mux1_ALL are set to 0.
<!RW>MUX.Bits (<!RW>Mux1_Pattern, <!RW>SET, <!RW>Send);
        //The bits which are entered in <!RW>Mux1_ALL are set to 1.
<!RW>MUX.Bits (<!RW>Mux1_Pattern, <!RW>FLIP, <!RW>Send);
        //The bits which are entered in <!RW>Mux1_ALL are changing her state
<!TXT>

>>
<<
128.125.2.2
MUX.Word|Word
--
<!DEF>
procedure <!TW>MUX.Word (aMUXAdr : address; rSendIt : real);
<!TXT>
The bits indicated in the address <!PW>aMUXAdr (an address on a MUX5450-card) are used as the new state of the card.

If <!PW>rSendIt = <!RW>Send, then the data is sent to the card, otherwise it is stored internally.

 <!PW>rSendIt can be    : <!RW>STORE | <!RW>SEND        or 0..1
>>
<<
128.125.2.3
MUX.BitsEx|BitsEx
--
<!DEF>
procedure <!TW>MUX.BitsEx (rGroup : real; sCommand : string);
<!TXT>
Macrocommand : Sets/clears bits on the MUX-card and waits

 <!PW>rGroup selects an actions group (0..9)
 <!PW>sCommand has the following form:

<!CODE>
<!SW>Address,<!SW>Action[,<!SW>Action...][;<!SW>Address,<!SW>Action[,<!SW>Action...]...]
<!TXT>

 <!SW>Address is an address constant from the address file and must belong to a MUX5450-card. Several address constants can be connected with +, if they belong to the same card.

 <!SW>Action has the following format (n is always the group number 0..9 or 'x') :
<!STBL>
<!>nS<!>Sets the bits<!>
<!>nR<!>Clears the bits<!>
<!>nDz<!>Delay of z milliseconds<!>
<!ETBL>

 <!SW>n indicates the group. Only those actions are executed whose group has been selected via the <!PW>rGroup parameter. 'x' will match any <!PW>rGroup!

<ul indent=12>
<li>if no action is activated via rGroup, nothing happens</li>
<li>if no actions are specified, nothing happens</li>
<li>if sCommand is empty, nothing happens</li>
<li>several address constants and actions can be specified in <!PW>sCommand (separated by ';' ); they will be processed consecutively.</li>
</ul>

Example
<!CODE>
MUX.BitsEx (1, 'MSpg_34_R,1r,9s,1d100,9d50');

The '1' activates Group 1.
The individual parts of sCommand:
'MSpg_34_R' is the address of the processed bits
'1r' if group 1 active, then reset bits 
'9s' if group 9 active, then set bits 
'1d100' if group 1 active, then 100 ms break
'9d50' if group 9 active, then 50 ms break

Since group 1 is active, MSpg_34_R is reset and an idle time of 100 ms is waited!
<!TXT>
>>
<<
128.125.2.4
MUX.Send|Send
---
<!DEF>
procedure <!TW>MUX.Send (aXMuxCard : address);
<!TXT>
Sends any internally stored data from card <!PW>aXMuxCard.
>>
