************************************************************************ Media Pro 4000 Brief November 23, 1999 File: SEM4020_STATUS_BR112399.TXT Module: SEM4020 Title: STATUS OF SEM4020 AVAILABLE TO CUES ( LOAD/STATUS/WITH/BYTE) ************************************************************************ c1999 Anitech Systems Incorporated, 25021 Anza Drive, Valencia, CA 91355 Status capability has been added to the SEM code. Only the default driver, the LD88 driver, and the Max MR16 driver take full advantage of this new capability. The status items available from an SEM port are as follows; those that are limited to only the three drivers mentioned are marked with an asterisk. 0 -- status bit array (16 bits) bit 0, change in port bit status bit 4, use error bit 5, timeout error bit 6, protocol error bit 7, resource error bit 8, configuration error 1 -- use error count (byte) 2 -- resource error count (byte) 3 -- protocol error count (byte) 4 -- timeout error count (byte) 5 -- reserved a (long) 6 -- received character count (byte)* 7 -- received character put index (byte, 0 - 31)* 8 -- received characters (up to 32 characters)* The statement used to access these status values is: LOAD [@Vv,@Ii,@Oo] WITH @R0,s,p STATUS n BYTE j-k ; The number n chooses one of the enumerated status values, and the j-k range gives the index for the first and last byte desired from the selected item. For example, to load variable 100 with the timeout error count for port 4 of an SEM in slot 2 of the master ICM (for now, these statements work only in the master): LOAD @V100 WITH @R0,2,4 STATUS 4 BYTE 0-0 ; The 0-0 range indicates that the 0th byte is to be used; this is a single byte item anyway. Another example, move 5 bytes from a received serial stream into the input block for further examination: LOAD @I300 WITH @R0,2,4 STATUS 8 BYTE 7-11 ; The eighth through twelfth received characters will be copied to input block bytes 300 through 304. To see how many characters have been received: LOAD @I400 WITH @R0,2,4 STATUS 6 BYTE 0-0 ; In order to provide a means to align received characters in the receive buffer from its top, any SEND statement to the port will reset the count and put index to 0. If you don't actually wish to send any message to the attached device, you can use SEND "" ;, an empty string. With the LD88 for example, if you were interested in part of the 'ping' response, you would use the SEND "" ; statement to set the counter & index to 0, then wait until you see that the count is non-zero. Then access the received character array to pick out those of interest. If other information from the LD88 is desired, you use the SEND statement to generate the query message, then watch for the response as above. To provide enough time for this, the 'ping' has been slowed to once/second. (In some cases, it is possible to turn off the poll – see individual driver documentation for information about this.) ------------------------------------------------------------------------ Specifications subject to change at any time. The data in this document incorporates proprietary rights of Anitech Systems Inc., 25021 Anza Drive, Valencia, CA 91355 USA. Phone (661) 257-2184 Fax (661) 257-2025 email Mail@Anitech-Systems.com Web http://www.Anitech-Systems.com Any party accepting this document does so in confidence and agrees that it shall not be duplicated in whole or in part, without the consent of ANITECH SYSTEMS. ------------------------------------------------------------------------