DMDX Help.


Output Keyword

<Output N1 [text]>
<o N1 [text]>
<op N1 [text]>
<Output counterN2 [text]>
<o counterN2 [text]>
<op counterN2 [text]>
<Output cN2 [text]>
<o cN2 [text]>
<op cN2 [text]>

variants:
Output Hex Keyword

<OutputHex H [text]>
<ox H [text]>


    O switch alternative that outputs data to the currently installed output port.  Item file must have selected <InputDevice PIO12> or some other device that supports output.  O outputs the word N1 or the value of counter N2 (at item parsing time) to the current output device unless the optional [text] has been used in which case text is the name of an input signal and this keyword becomes a signal based output specification.  When that button is pressed (or released of course if it's a button release signal) the output word is sent within the next millisecond (depending how good your system's millisecond callback is).  Note, no output occurs in the frame the signal based output specification occurs in, only when the signal is received.  If the <RevertOutput> parameter hasn't been used the PIO12 output's will stay latched with that output until either another output request is encountered or the item file is stopped (in which case the lines all float high which is usually seen by other devices as all 1s).   The <OutputHex> variant accepts hexadecimal codes instead of decimal codes, handy for the multi-byte output devices below.

    If the input device PIO12 has been installed then 8 bits of output are provided on port C of the PIO 12 (ports A and B are 16 bits of input). If the PIO12output16 device has been installed 16 bits are output, the lower 8 to port C and the upper 8 to port B (port A is 8 bits of input). If the PIO12output24 device has been installed 24 bits are output, the lower 8 to port C and the middle 8 to port B and the upper 8 to port A (no input bits).

    The counters variants are evaluated at parse time so sequences like the following where data is to be sent to port B instead of port C (when counter 2 is 256) are fine:

<set c1=c2*255><op c1> / <set c1=c2*123><op c1> / <set c1=c2*255><op c1> 

    Using an input signal allows the output bits to follow a keypress with code like this:

<o 0 "+left shift"> <o 255 "-left shift"> 

     Using a revert output parameter like this <ro 250,255> obviates the need for a -buttonname code to reset output lines.

 

Possible with PIO12:

    Port C          

Bit.........Bit

7 6 5 4 3 2 1 0

---------------

0 0 0 0 0 0 0 0                                      <ox 0>      <o 0>

0 0 0 0 0 0 0 1                                      <ox 1>      <o 1>

0 0 0 0 0 0 1 0                                      <ox 2>      <o 2>

0 0 0 0 0 0 1 1                                      <ox 3>      <o 3>

0 0 0 0 1 0 0 0                                      <ox 8>      <o 8>

0 0 0 0 1 0 0 1                                      <ox 9>      <o 9>

0 0 0 0 1 0 1 0                                      <ox a>      <o 10>

0 0 0 0 1 0 1 1                                      <ox b>      <o 11>

0 0 0 0 1 1 0 0                                      <ox c>      <o 12>

0 0 0 0 1 1 0 1                                      <ox d>      <o 13>

0 0 0 0 1 1 1 0                                      <ox e>      <o 14>

0 0 0 0 1 1 1 1                                      <ox f>      <o 15>

0 0 0 1 0 0 0 1                                      <ox 11>     <o 17>

1 0 0 0 0 0 0 0                                      <ox 80>     <o 128>

1 1 1 1 1 1 1 1                                      <ox ff>     <o 255>



Possible with PIO12output16:

    Port C           Port B           

Bit.........Bit  Bit.........Bit

7 6 5 4 3 2 1 0  7 6 5 4 3 2 1 0

---------------  ---------------

0 0 0 0 0 0 0 1  0 0 0 0 0 0 0 0                    <ox 1>    <o 1>

0 0 0 0 0 0 0 0  0 0 0 0 0 0 0 1                    <ox 100>    <o 256>

0 0 0 0 0 0 0 1  0 0 0 0 0 0 0 1                    <ox 101>    <o 257>

1 0 0 0 0 0 0 0  1 0 0 0 0 0 0 0                    <ox 8080>   <o 32896>



Possible with PIO12output24:

    Port C           Port B           Port A

Bit.........Bit  Bit.........Bit  Bit.........Bit

7 6 5 4 3 2 1 0  7 6 5 4 3 2 1 0  7 6 5 4 3 2 1 0

---------------  ---------------  ---------------

0 0 0 0 0 0 0 1  0 0 0 0 0 0 0 0  0 0 0 0 0 0 0 0    <ox 1>      <o 1>

0 0 0 0 0 0 0 0  0 0 0 0 0 0 0 1  0 0 0 0 0 0 0 0    <ox 100>    <o 256> 

0 0 0 0 0 0 0 0  0 0 0 0 0 0 0 0  0 0 0 0 0 0 0 1    <ox 10000>  <o 65536>

0 0 0 0 0 0 0 1  0 0 0 0 0 0 0 1  0 0 0 0 0 0 0 1    <ox 10101>  <o 65793>

1 0 0 0 0 0 0 0  1 0 0 0 0 0 0 0  1 0 0 0 0 0 0 0    <ox 808080> <o 8421504>

1 0 1 0 1 0 1 0  1 0 1 0 1 0 1 0  1 0 1 0 1 0 1 0    <ox aaaaaa> <o 11184810>

 






DMDX Index.