Home |  Products |  Download |  Contact |  Support |  Orders |  Partners |  Links |   
www.ea4tx.com
 
 
In This Section

Products Home
Antenna Rotator System
Developers Area
ARSWIN API
ARS for DOS API
Download Area


Developers Area - DOS API

The RCI API is a very simple way for accessing the RCI board. The RCI API works like other interfaces such as BPQ for communications applications and KCT for rotator systems. To begin using this software interface, you must first load the RCIPlus.EXE driver. Remember, you must have RCIPLUS.CNF in the same directory as RCIPlus.EXE. To set this configuration file, you'll use the Setup.exe program. You will access the RCI driver through INT 61H (97 decimal). There are 6 functions available, the method employed to use them is to call INT 61H and pass the function value through AH.
List of functions available:

1) Initialize the Interface (AH=0).-

  • Input Registers:
    • AH=0 Init the interface
    • DX=LPT Port

If LPT=0 (DX=0), it means the LPT will use the interrupt value set in the ARS.CNF file. In case you want use a different value, i.e. 278H, set DH=02H and DL=78H or DX=0278H

  • Output Register:
    • AX=RET Always on AX, it will return the Return value.

RET=0 OK, initialized successfully.
RET!=0 Hardware problem (i.e. cable not connected, RCI is turned off, or Board Problem)

  • Purpose:

This function is always the first one to be used. If this function is not used, or if the RET value <> 0, the other functions will not be available to the programmer. Normally DX will be equal to 0. So verify that the RCIPLUS.CNF is correctly configured.
If RET = 0 a timer-tick subroutine is installed, which dies when the stop function is called.

2) Solenoid Relay activation (AH = 1).-

  • Input Registers:
    • AH=1 Relay activation
    • DH=Action Value

=00H Stop all Relays
=01H Brake release (Central Relay-K2 on RCI Board)
=02H Left Relay activation
=04H Right Relay activation

=16H Up Relay activation
=32H Down Relay activation

·        DL= Azimuth/Elevation Rotor

=00H Azimuth Rotor
=01H Elevation Rotor

  • Output Register:
    • AX=RET Ret = Relays' status

RET=0 All relays stopped
RET=1 Brake Relay activated
RET=2 Left Relay activated
RET=4 Right Relay activated
RET=16 Up Relay activated
RET=32 Down Relay activated
RET=FFFFH Error returned (i.e. Init failed)

  • Purpose:

This function is used only if you desire to activate the relays manually. Normally, the AH=4 function will be used in most applications (turn to a point function).

3) Read Antenna Position (AH = 2).-

  • Input Registers:
    • AH=2 Read Antenna Position
    • AL=Mode Mode maybe a Degrees value (0-360) or a Digital value (0-255).

=0 Return the value in Degrees
=1 Return the A/D value.

DH=Sampling number (1-255)

    • DL=Azimuth/Elevation

=0 Use the Azimuth input (J3).
=1 Use the Elevation input (J4).

  • Output Register:
    • AX=RET Ret = Position value

It will be in the range 0-360 for Degree values (AL=0), or of 0-255 for Digital values (AL=1)
RET=FFFFH Error returned. Normally this occurs because the Init failed.

  • Purpose:

This function is useful for obtaining the antenna direction. Normally it will be used with Mode=0 (Degree) but it maybe necessary to know the A/D value for any kind of reason, so use AL=1.
The DH register, the sampling number, is used to average the value read. It works in the following way: if DH=9 the RCI Driver will read 9 times the value and it will average the result. With this feature, any minimum movements caused by the wind, etc. will be discarded.

4) RCI board Status (AH = 3).-

  • Input Register:
    • AH=3 Status
  • Output Register:
    • AX=RET Ret = Relays' Status

RET=0 All relays stopped
RET=1 Brake Relay activated
RET=2 Left Relay activated
RET=4 Right Relay activated
RET=16 Up Relay activated
RET=32 Down Relay activated
RET=FFFFH Error returned. Normally this occurs because the Init failed.

  • Purpose:

This function returns the relays' Status.

5) Turn the rotator to a specific Point (AH = 4).-

  • Input Registers:
    • AH=4 Turn to a Point (Degrees only)
    • AL= Azimuth/Elevation

=0 Use the Azimuth rotor
=1 Use the Elevation rotor

    • DX=Value. The value will range between 0-360 (i.e., to turn to 300 degrees, set DH=01H and DL=2CH).
  • Output Register:
    • AX=RET Return the result

RET=0 Command accepted
RET=FFFFH Error returned. Normally this occurs because the Init failed.

  • Purpose:

This function is used to turn the antenna to a desired point. The value of the point must be in Degrees (0-360).

6) Stop using the interface (AH = 5).-

  • Input Register:
    • AH=5 Stop using the Interface.
  • Output Register:
    • AX=RET Return the result

RET=0 Command accepted
RET=FFFFH Error returned. Normally this occurs because the Init failed.

  • Purpose:

This function notifies the RCI driver to stop using the interface. It also stops the timer-tick subroutine. After using this function, the only function available is the Init function.

You can view a sample program in "C"