Você está na página 1de 23

REVISIONS

REV By DESCRIPTION SUMMARY OF CHANGES Date


G Lopez ENHANCEMENT ADDED MAXABEAM PROTOCOL 11/3/2010

NOTICE

This document contains proprietary and confidential information of LRAD CORPORATION, INC.
Use of this information is restricted to purposes of interest to LRAD CORPORATION, INC. The
information contained herein is to be neither copied nor disclosed to others, in whole or part,
without the prior written consent of LRAD CORPORATION, INC.

15378 Avenue of Science, San Diego, CA, 92128

Software and Communications Interface Control


Document – LRAD 1000RX

DOC. # 105328-00 REV


G
SHEET 1 of 23
Contents
1.0 Scope ...................................................................................................................................................3
2.0 General Description ............................................................................................................................3
3.0 System Description .............................................................................................................................3
3.1 PTSS Controller ..............................................................................................................................4
3.2 Axis Video Server ...........................................................................................................................4
3.3 Barix Audio Server ..........................................................................................................................4
3.4 LRAD Amps ....................................................................................................................................5
3.5 Lantronix Serial Server....................................................................................................................5
4.0 Communications Protocols .................................................................................................................5
4.1 PTSS Controller ..............................................................................................................................5
4.1.1 General Command Structure: ...................................................................................................5
4.1.3 Integers .....................................................................................................................................6
4.1.4 Control Characters ...................................................................................................................6
4.1.5 Error Codes ..............................................................................................................................6
4.1.7 Coordinate System ...................................................................................................................6
4.1.8 Commands and Responses .......................................................................................................7
4.2 LRAD Serial Attenuation Module (SAM) Protocol ......................................................................14
4.2.1 General Command Structure ..................................................................................................14
4.2.2 Control Characters .................................................................................................................15
4.2.3 Escape Character ....................................................................................................................15
4.2.4 List of Commands ..................................................................................................................15
4.2.5 Get ID Request Response Data Structure Definition .............................................................16
4.2.6 Status Response Sequence Structure ......................................................................................16
4.2.7 Definition of STATUSBITS ..................................................................................................17
4.2.8 LRC Checksum Calculation ...................................................................................................17
4.2.10 Communications Sequence Diagram .....................................................................................18
4.3 Camera Controls ............................................................................................................................18
4.4 Axis Video Streaming ...................................................................................................................19
4.5 Audio Streaming to the Barix ........................................................................................................19
5.0 Programming Notes ..........................................................................................................................19
6.0 Maxabeam Protocol ..........................................................................................................................20
7.0 Appendices ........................................................................................................................................23

15378 Avenue of Science, San DOC. # 105328-00 REV


Diego, CA 92128
G
SHEET 2 of 23
San
1.0 Scope

This document describes the network architecture of the devices in the LRAD 1000-RX as well as the control
protocols for each of the devices in the system. The intended audience is and LRAD system integrator.

2.0 General Description

LRAD 1000-RX is an Acoustic Hailing Device integrated with a mechanical actuation system that allows for the unit
to be aimed and operated via a TCP/IP network connection. The unit consists of various hardware devices which
perform unique functions of the AHD. These hardware devices are connected on a network that is internal to the
LRAD 1000-RX unit.

3.0 System Description

The following photograph identifies the main elements of the LRAD 1000-RX unit.

Camera
Housing Axis Video
Server

Ethernet 6

Amplifier
Pack

Ethernet 2 Barix Audio


Server

Lantronix
Serial Server

Network
Base Switch
Electronics
Module

Ethernet 1
Moxa
Computer
Network
Router
Figure 1: LRAD 1000-RX Main Elements

15378 Avenue of Science, San DOC. # 105328-00 REV


Diego, CA 92128
G
SHEET 3 of 23
San
All of the elements of the LRAD 1000-RX are accessed through a single IP connection to the Pan/Tilt Unit
Electronics Module. This connection goes to a full featured hardware router which is set up to manage the network
connections to the devices in the LRAD. All of the devices on the LRAD‟s internal network can be accessed through
the LRAD‟s single external IP address as shown in the following network diagram:

Camera Housing Amplifier Pack


Axis Video Server. Lantronix Serial Server. Barix Audio Server.
Username: root Username: root Username: (none)
Password: atc Password: (no password) Password: (no password)
IP Address: 172.25.25.61 IP Address: 172.25.25.63 IP Address: 172.25.25.62
Subnet Mask: 255.255.255.0 Subnet Mask: 255.255.255.0 Subnet Mask: 255.255.255.0
Default Gateway: 172.25.25.1 Default Gateway: 172.25.25.1 Default Gateway: 172.25.25.1
Web Server Port: 80 DNS Server: 0.0.0.0 DNS Server: 0.0.0.0
RS-232 Serial Port: 4000 Web port: 80 Web Port: 80
Video Stream Port: 554 Com 1 Port (volume control): 100001 UDP Streaming Listen Port: 3030
Com 1 baud rate: 19200 RTP Receive Port: 4040
Com 2 Port (Maxabeam): 100002 Audio Stream Control Port: 12302
Com 2 baud rate: 9600

Ethernet 5
Ethernet 6 Ethernet 4

Network Switch

Ethernet 2

Base Electronics Module


Moxa Pan/Tilt Control Computer. Network Router.
Username: root Username: root
Password: atc Password: atc
IP Address: 172.25.25.60 IP Address: 192.168.1.140
Subnet Mask: 255.255.255.0 Subnet Mask: 255.255.255.0
Default Gateway: 172.25.25.1 Ethernet 3 Default Gateway: 192.168.1.1 Ethernet 1
DNS Server: 0.0.0.0 DNS Server: 0.0.0.0
Web Port: 80 Moxa Telnet Port: 21
Telnet Port: 21 Moxa FTP Port: 23
FTP Port: 23 Axis Web Server Port: 8061
Pan/Tilt Command Port: 10010 Axis Video Stream Port: 554 Laptop IP Address: 192.168.1.xxx
Axis RS-232 Port (camera): 4000 xxx is an available network address.
Barix Web Server Port: 8062
Barix RTP Port: 4040
Barix UDP Port: 3030
Barix Streaming Control: 12302
Lantronix Web Server Port: 8063
Lantronix COM1 (volume) Port: 10001
Lantronix COM2 (Maxa) Port: 10002

Figure 2: LRAD 1000-RX Network Architecture

The IP address of the PTSS Controller is fixed, therefore, the control PC‟s TCP/IP address must be set to the same
subnet as the PTSS controller in order to connect.

3.1 PTSS Controller

This device serves as the LRAD‟s network router and also runs the application that controls the Pan and Tilt
positioning system. All motion control, position feedback and pan/tilt system monitoring is performed by this
unit using it‟s unique protocol. This device is housed in the Pan/Tilt unit electronics module at the base of
the pan and tilt (see photo above).

3.2 Axis Video Server

This device converts the analog video from the integrated camera and streams the video across the IP
network in MJPEG or MPEG-4 format. This device contains an onboard serial port which is used to control
the camera functions, such as zoom, focus, etc. This device is housed in the IP camera enclosure.

3.3 Barix Audio Server

15378 Avenue of Science, San DOC. # 105328-00 REV


Diego, CA 92128
G
SHEET 4 of 23
San
This device decodes a streamed digital audio file and sends the analog audio to the LRAD amplifiers for
playback through the LRAD unit. It is housed in the Head Unit Electronics Module.

3.4 LRAD Amps

The LRAD amplifiers boost the signal level of the audio that is streamed to the unit. They contain the Serial
Attenuation Module (SAM) which is used to set the volume level of the AHD as well as to monitor the health
of the amplifiers. The SAM is driven by one of the serial ports on the Lantronix Serial Server.

3.5 Lantronix Serial Server

The Lantronix Serial Server provides two serial ports that can be accessed via the network connection. Port
10001 is connected to the LRAD amplifiers and sends the serial communications commands used to
control and monitor the amplifiers. Port 10002 can be used to connect an optional accessory, such as a
Maxabeam Illuminator.

4.0 Communications Protocols

The LRAD 1000-RX contains various devices that can be controlled using each device‟s unique protocol. Control of
a device in an LRAD is achieved by reading and writing each device‟s protocols through the appropriate internet
socket connection. The programmer/integrator must set up these socket connections in their application to match
the IP addresses and ports for each LRAD unit. Each of the serial ports in the LRAD used to communicate with RS-
232 based devices, is also set up as an internet socket to which the serial data is written to and read from.
Hardware settings for the serial ports such as bit rate, flow control, etc. are preset at the factory and should not need
to be changed. For information on setting port hardware settings, consult the user manuals for the Lantronix and
Axis devices in the appendix.

4.1 PTSS Controller

The PTSS Controller performs all functions related to the mechanical positioning of the LRAD 1000-RX.
This device controls the motor drivers for the pan (azimuth) and tilt (elevation) axes and monitors the unit‟s
current position. These commands are read/written to the socket connection at port 10100 on the PTSS
controller‟s IP address.

4.1.1 General Command Structure:

Commands from the host to the pan and tilt shall be structured as follows:
1. Start of message character byte [SOM]
2. Message length byte [MSL]
3. Command number byte [CMD]
4. Command data (variable)
5. End of message character byte [EOM]

Valid commands or queries shall be responded to by the pan and tilt with the following structure:
1. Acknowledge byte [ACK]
2. Message length byte [MSL]
3. Command number byte [CMD]
4. Command data (variable)
5. End of message character byte [EOM]

15378 Avenue of Science, San DOC. # 105328-00 REV


Diego, CA 92128
G
SHEET 5 of 23
San
NOTE: The host application must wait for a response from the PTSS controller before issuing another
command. The response times will vary depending on the command issued and on the state of the PTSS
controller.

Invalid commands or queries shall be responded to by the pan and tilt with the following structure:
1. Not acknowledge byte [NAK]
2. Message length byte [MSL]
3. Command number byte [CMD]
4. Error code byte [ERR]
5. End of message character byte [EOM]
With proper implementation of this protocol, NAKs should not appear during normal operation, however, the
host application should recognize a NAK and respond appropriately (i.e., retries, user notification, etc.).

4.1.2 Message Length [MSL]

The MSL byte denotes the length of the message starting with the command byte [CMD] and ending with
the [EOM] byte.

4.1.3 Integers

Integers are 1, 2, or 4 bytes in length, big-endian, two‟s complement signed integers, depending on the
allowable range for each variable. All multiple byte variables are big-endian ordered.

4.1.4 Control Characters

02h Start of Message [SOM]


03h End of Message [EOM]
06h Acknowledge [ACK]
15h Not Acknowledge [NAK]

4.1.5 Error Codes

70h Corrupted data packet


71h Invalid command
72h Invalid command data
73h Invalid position
74h Unit busy/move in progress
75h Soft limit
76h Hard limit
77h Hardware error
78h Other

4.1.6 Connection Timeout

The PTSS controller will automatically close the socket connection if a “Get Position and Move Status” (40h)
command is not received by the PTSS controller over a ten second period. The client application must
issue this command to the pan/tilt at least once every ten seconds in order to maintain the socket
connection. If the socket connection is closed due to this time out, the client application can re-open the
socket connection and continue operation.

4.1.7 Coordinate System

Positioning of the LRAD 1000-RX is achieved by rotating the hailing device through it‟s vertical and
horizontal axes. The vertical axis is referred to as the pan axis and has an allowable range of +/-210

15378 Avenue of Science, San DOC. # 105328-00 REV


Diego, CA 92128
G
SHEET 6 of 23
San
degrees. The LRAD rotates right and left around this axis. The horizontal axis is referred to as the tilt axis
and has an allowable range of +/-95 degrees. The LRAD rotates up and down around this axis.

The LRAD 1000-RX can operate using two coordinate systems: Machine Absolute Coordinates and User
Offset Coordinates.

Machine Absolute Coordinates are constant for each LRAD. The Machine Zero position in the pan axis is
where the Acoustic Array is centered between the pan axis hard stops. The positive direction in the pan
axis would be in the direction that would move the field of view of the integrated camera to the right. The
Machine Zero position in the tilt axis is where the Acoustic Array is centered between the tilt axis hard stops.
The positive direction in the tilt axis would be in the direction that would move the field of view of the
integrated camera up.

The user has the ability to create a User Offset coordinate system that would reset the units zero
coordinates to a new position upto +/- 107 degrees from the Machine Zero position in the pan axis. This is
useful when trying to measure the angle between two targets or when it is desirable to align the machine‟s
zero position to a known direction, such as a compass heading. The LRAD can also be mounted in an
inverted position (i.e. hung upside down), and the inversion command will “offset” the pan and tilt axis
coordinates by inverting the axes‟ positive and negative directions.

ONCE DEFINED, LIMITS AND SETPOINTS ARE FIXED IN MACHINE ABSOLUTE COORDINATES.
THEY DO NOT CHANGE RELATIVE TO THE MACHINE WHEN USER OFFSETS OR THE INVERSION
BIT ARE CHANGED. WHAT CHANGE ARE THE USER COORDINATES OF THESE POINTS AND, IN
THE CASE OF A LIMIT, THE SIGNS OF THE ASSOCIATED COMMANDED TRAVEL DIRECTIONS.
SIMILARLY, INVERSION DOES NOT RELOCATE THE ORIGIN OF THE USER COORDINATE SYSTEM
RELATIVE TO THE MACHINE.

4.1.8 Commands and Responses

The following table lists all of the LRAD PTSS controller‟s user commands. A “Yes” in the “Affected by
Inversion?” column indicates that the PTSS controller will automatically invert the axes‟ coordinates so that
the programmer does not have to perform any of this conversion in the interface software. This means that
for example a user entered move command of -30 degrees in pan will result in the unit turning to the left by
30 degrees as long as the inversion state is set to match the installation of the unit. The column labeled
“User Offset/Absolute Coords.” denotes whether the coordinates passed by the command will be treated by
the machine as being relative to the Machine Absolute Coordinates or to the User Offset Coordinates set
using commands 29h or 2Ah.

User
Affected Offset/
Command Name by Absolute
Hex Description Inversion? Coords.
20h Jog (pan speed, tilt speed) Yes -
*Immediately accelerates to the entered speed(s)

pan speed = -125 to 125 parts of user-addressable maximum (see 44h)


tilt speed = -125 to 125 parts of user-addressable maximum (see 44h)

Responses:
[ACK],[MSL],[CMD],(pan speed), (tilt speed), [EOM]
[NAK],[MSL],[CMD],[ERR],[EOM]

21h Move to entered coordinates (pan angle, tilt angle) Yes Offset
*Immediately moves to the given coordinates at max acceleration and
speed.

15378 Avenue of Science, San DOC. # 105328-00 REV


Diego, CA 92128
G
SHEET 7 of 23
San
pan angle = -32700 to 32700
tilt angle = -19000 to 19000

Responses:
[ACK],[MSL],[CMD],(pan angle), (tilt angle),[EOM]
[NAK],[MSL],[CMD],[ERR],[EOM]

22h Move to setpoint (setpoint number) No (Abs)


*Immediately moves to the entered setpoint coordinates at max
acceleration and speed.

setpoint number = 0 to 31

Responses:
[ACK],[MSL],[CMD],(setpoint number),[EOM]
[NAK],[MSL],[CMD],[ERR],[EOM]

23h Move incrementally by entered angles (pan angle, tilt angle) Yes -
*Immediately moves by the given angle at max acceleration and speed.

pan angle = -32700 to 32700


tilt angle = -19000 to 19000

Responses:
[ACK],[MSL],[CMD],(pan angle), (tilt angle),[EOM]
[NAK],[MSL],[CMD],[ERR],[EOM]

24h Go to home setpoint No (Abs)


*Immediately moves to setpoint 31 (home).

Responses:
[ACK],[MSL],[CMD],[EOM]
[NAK],[MSL],[CMD],[ERR],[EOM]

25h Go to machine center No (Abs)


*Immediately moves to the machine center in Machine Coordinates.

Responses:
[ACK],[MSL],[CMD],[EOM]
[NAK],[MSL],[CMD],[ERR],[EOM]

26h Save present position as setpoint (setpoint number) No (Abs)


*Assigns current pan and tilt angles to the given setpoint.

setpoint number = 0 to 31

Responses:
[ACK],[MSL],[CMD],(setpoint number),[EOM]
[NAK],[MSL],[CMD],[ERR],[EOM]

27h Save entered coordinates as setpoint (setpoint number, pan angle, tilt Yes Offset
angle)
*Assigns the entered coordinates as a setpoint.

15378 Avenue of Science, San DOC. # 105328-00 REV


Diego, CA 92128
G
SHEET 8 of 23
San
setpoint number = 0 to 31
pan angle = -32700 to 32700
tilt angle = -19000 to 19000

Responses:
[ACK],[MSL],[CMD] ,(setpoint number),(pan angle), (tilt angle), [EOM]
[NAK],[MSL],[CMD],[ERR],[EOM]

28h Save present position as soft limit (soft limit axis and direction) Yes (Abs)
*Creates a soft limit at the present position for the axis and direction
given.

soft limit axis and direction: 00h= CCW, 01h=CW, 02h=DN, 03h=UP in
user coordinates [So if the inversion bit has been set via command
50h, then a value of 01h here makes the present position the limit of
positive rotation as specified by jog or vector commands, which are
in user coordinates. This is negative (CCW) rotation in the machine
absolute reference frame. Should the inversion bit then be cleared,
this limit would continue to apply to negative rotation in the machine
absolute reference frame, which would then also be negative rotation
in the user reference frame.]

Responses:
[ACK],[MSL],[CMD],(soft limit axis and direction),[EOM]
[NAK],[MSL],[CMD],[ERR],[EOM]

29h Save present position as offset center No (Abs)


*Assigns user coordinates of 0,0 to the present position of the unit. All
commands using offset coordinates will now use the present position
as the 0,0 position.

Note: The range of allowable pan and tilt offset centers is ±10700 and
±9500 from machine center respectively. The restricted range of pan
offsets ensures that the coordinates of accessible pan angles stay
within the range allowed by 2-byte signed integer representation. An
input which calls for offset center coordinate(s) beyond the allowable
limits is rejected as out of range.

Responses:
[ACK],[MSL],[CMD],[EOM]
[NAK],[MSL],[CMD],[ERR],[EOM]

2Ah Offset origin of user coordinates incrementally by entered angles (pan Yes Offset
angle, tilt angle)
*Offsets the user coordinate origin by the given angle relative to
machine center.

pan angle = -21400 to 21400


tilt angle = -19000 to 19000
See the note in 29h above as to the ±10700 range of allowable pan
offsets.

Responses:
[ACK],[MSL],[CMD],(pan angle), (tilt angle),[EOM]
[NAK],[MSL],[CMD],[ERR],[EOM]

15378 Avenue of Science, San DOC. # 105328-00 REV


Diego, CA 92128
G
SHEET 9 of 23
San
2Fh Save entered value as soft limit (soft limit axis and direction, angle) Yes Offset
*Assigns a given angle as the soft limit for an axis and direction.

soft limit axis and direction: 00h= CCW, 01h=CW, 02h=DN, 03h=UP in
user coordinates, as described in 30h below.
angle = -32700 to 32700 for pan axis
angle = -19000 to 19000 for tilt axis
Note: An input which calls for a soft limit beyond the machine limits is
interpreted and acknowledged as calling for the nearest allowable
value, in light of any existing offset. For example, a CW soft limit
input of 20000, when the machine is upright and has a user offset of
10000 in the pan axis, is acknowledged as an input of 12000, so that
input value plus offset sum to 22000, the machine pan maximum
limit.

Responses:
[ACK],[MSL],[CMD],(soft limit axis and direction),(angle),[EOM]
[NAK],[MSL],[CMD],[ERR],[EOM]

30h Read soft limit (soft limit axis and direction) Yes Offset
*Returns the soft limit setting for the entered axis and direction in User
Offset Coordinates.

soft limit axis and direction: 00h= CCW, 01h=CW, 02h=DN, 03h=UP in
user coordinates. [So if the inversion bit has been set via command
50h then the CW soft limit reported here is the user coordinate of the
soft limit associated with positive motion commands, which are in
user coordinates. This is negative (CCW) rotation of the pan axis in
the machine absolute reference frame.]

angle = -32700 to 32700 for pan axis


angle =-19000 to 19000 for tilt axis

Responses:
[ACK],[MSL],[CMD],(soft limit axis and direction),(angle),[EOM]
[NAK],[MSL],[CMD],[ERR],[EOM]

31h Read setpoint coordinates (setpoint number) Yes Offset


*Returns the coordinates for the entered setpoint number in User Offset
Coordinates.

setpoint number = 0 to 31
pan angle = -32700 to 32700
tilt angle = -19000 to 19000

Responses:
[ACK],[MSL],[CMD],(setpoint number),(pan angle), (tilt angle),[EOM]
[NAK],[MSL],[CMD],[ERR],[EOM]

32h Read offset angle No Abs


*Returns the location of the origin of user in machine absolute
coordinates

pan angle = -10700 to 10700


tilt angle = -9500 to 9500

15378 Avenue of Science, San DOC. # 105328-00 REV


Diego, CA 92128
G
SHEET 10 of 23
San
Responses:
[ACK],[MSL],[CMD],(pan angle), (tilt angle),[EOM]
[NAK],[MSL],[CMD],[ERR],[EOM]

33h Read inverted status No -


*Returns the value stored for the machine‟s inversion status.

inv status: 00h = upright, 01h = inverted

Responses:
[ACK],[MSL],[CMD],(inv status),[EOM]
[NAK],[MSL],[CMD],[ERR],[EOM]

40h Get position and move status Yes Offset


*Returns machine movement status and position in User Offset
Coordinates.

move status: 00h = move complete, 01h = moving


pan angle = -32700 to 32700
tilt angle = -19000 to 19000

Responses:
[ACK],[MSL],[CMD] ,(move status),(pan angle),(tilt angle),[EOM]
[NAK],[MSL],[CMD],[ERR],[EOM]

41h Get machine status No -


*Returns additional machine status as shown.

Machine status = 32 bits (0= no, 1=yes)


Bit 0: Pan soft limit
Bit 1: Tilt soft limit
Bit 2: Pan limit switch asserted
Bit 3: Tilt limit switch asserted
Bit 4: Pan drive faulted
Bit 5: Tilt drive faulted
Bit 6: Pan motor stall (repeated position errors)
Bit 7: Tilt motor stall
Bit 8: Pan motor controller comms failed
Bit 9: Tilt motor controller comms failed
Bit 10: Fans on
Bit 11: Fan current present
Bits 12 to 19: Enclosure temperature (deg. C) -128 to 127
Bit 20: Internal IP port #1 ping response OK
Bit 21: Internal IP port #2 ping response OK
Bit 22: Internal IP port #3 ping response OK
Bit 23: Internal IP port #4 ping response OK
Bit 24: Internal IP port #5 ping response OK
Bit 25: Internal IP port #6 ping response OK
Bit 26: Internal IP port #7 ping response OK
Bit 27: Internal IP port #8 ping response OK
Bit 28: Pan encoder initialization error
Bit 29: Tilt encoder initialization error
Bits 30 to 31: Not used at the moment (zeroes)

Responses:
[ACK],[MSL],[CMD],(machine status),[EOM]

15378 Avenue of Science, San DOC. # 105328-00 REV


Diego, CA 92128
G
SHEET 11 of 23
San
[NAK],[MSL],[CMD],[ERR],[EOM]

42h Read machine serial no and firmware rev No -


*Returns the serial number and revision of the machine as set by the
factory.

serial no: 8 printable characters


firmware rev: 8 printable characters

Responses:
[ACK],[MSL],[CMD],(serial no),(firmware rev),[EOM]
[NAK],[MSL],[CMD],[ERR],[EOM]

43h Perform reset and self test No -


*Restarts the PTSS controller application and performs self test.

Responses:
[ACK],[MSL],[CMD],[EOM]
[NAK],[MSL],[CMD],[ERR],[EOM]

44h Set max speed (pan speed, tilt speed) No -


*Sets the maximum positioning speed (upto 60 deg/sec max.)

pan speed = 0 to 250 parts of factory maximum


tilt speed = 0 to 250 parts of factory maximum

Responses:
[ACK],[MSL],[CMD],(pan speed),(tilt speed),[EOM]
[NAK],[MSL],[CMD],[ERR],[EOM]
45h Set acceleration (pan accel, tilt accel) No -
*Sets the maximum positioning acceleration (upto 120 deg/sec/sec max
on pan and 60 deg/sec/sec max on tilt).

pan accel = 0 to 250 parts of factory maximum


tilt accel = 0 to 250 parts of factory maximum

Responses:
[ACK],[MSL],[CMD],(pan accel),(tilt accel),[EOM]
[NAK],[MSL],[CMD],[ERR],[EOM]

46h Read machine name No -


*Returns the stored name of the machine.

name: 8 printable characters

Responses:
[ACK],[MSL],[CMD],(name),[EOM]
[NAK],[MSL],[CMD],[ERR],[EOM]

47h Read machine speeds No -


*Returns pan and tilt axis maximum speed settings

pan speed = 0 to 250 parts of factory maximum


tilt speed = 0 to 250 parts of factory maximum

Responses:

15378 Avenue of Science, San DOC. # 105328-00 REV


Diego, CA 92128
G
SHEET 12 of 23
San
[ACK],[MSL],[CMD],(pan speed),(tilt speed),[EOM]
[NAK],[MSL],[CMD],[ERR],[EOM]
48h Read machine accelerations No -
*Returns pan and tilt axis maximum acceleration settings

pan accel = 0 to 250 parts of factory maximum


tilt accel = 0 to 250 parts of factory maximum

Responses:
[ACK],[MSL],[CMD],(pan accel),(tilt accel),[EOM]
[NAK],[MSL],[CMD],[ERR],[EOM]

49h Get drive detail status No -


*Returns additional machine status as shown.

Detail Drive status = 32 bits (0= no, 1=yes)


One for each the pan and tilt axis
Bit 0: The peak drive current has been exceeded
Bit 1: The Elmo drive has detected a hard limit switch inhibit
Bit 2: The low limit switch has been triggered (pan CCW tilt Down)
Bit 3: The high limit switch has been triggered (pan CW tilt Up)
Bit 4: Drive speed tracking exceeded set limit, motor stalled
Bit 5: Drive position tracking exceeded set limit, motor stalled
Bit 6: Internal Elmo configuration error, drive fault
Bit 7: Power supply delivering too little voltage, drive fault
Bit 8: Power supply delivering too much voltage, drive fault
Bit 9: Short circuit in the drive or motor winding, drive fault
Bit 10: Drive temperature exceeded the limit, drive fault
Bit 11: Internal Elmo stack overflow error, drive fault
Bit 12: Internal Elmo CPU error, drive fault
Bit 13: The motor is powered but not moving, motor stalled
Bit 14: The position limit exceeded set limit, motor stalled
Bit 15: Can not start the motor, motor stalled
Bit 16: Internal Elmo program error, drive fault
Bit 17: Stopped by limit, drive fault
Bit 18-31 unused, 0

Responses:
[ACK],[MSL],[CMD],(pan drive status),(tilt drive status),[EOM]
[NAK],[MSL],[CMD],[ERR],[EOM]

4Ah Read machine deceleration (pan decel, tilt decel) No -


*Returns pan and tilt axis maximum deceleration settings

pan decel = 0 to 250 parts of factory maximum


tilt decel = 0 to 250 parts of factory maximum

Responses:
[ACK],[MSL],[CMD],(pan decel),(tilt decel),[EOM]
[NAK],[MSL],[CMD],[ERR],[EOM]

4Bh Set deceleration (pan decel, tilt decel) No -


*Sets the maximum positioning deceleration (upto 120 deg/sec/sec max
on pan and 60 deg/sec/sec max on tilt).

pan decel = 0 to 250 parts of factory maximum

15378 Avenue of Science, San DOC. # 105328-00 REV


Diego, CA 92128
G
SHEET 13 of 23
San
tilt decel = 0 to 250 parts of factory maximum

Responses:
[ACK],[MSL],[CMD], (pan decel),(tilt decel),[EOM]
[NAK],[MSL],[CMD],[ERR],[EOM]

50h Set/clear pan and tilt axis inversion No -


*Sets User Coordinates for upright or inverted mounting.

inv status: 00h = upright, 01h = inverted

Responses:
[ACK],[MSL],[CMD],(inv status),[EOM]
[NAK],[MSL],[CMD],[ERR],[EOM]

51h Clear offset center No Abs


*Returns unit to Machine Absolute Coordinate system.

Responses:
[ACK],[MSL],[CMD],[EOM]
[NAK],[MSL],[CMD],[ERR],[EOM]

60h Clear all setpoints No Abs


*Clears saved coordinates for setpoints 0 to 31.

Responses:
[ACK],[MSL],[CMD],[EOM]
[NAK],[MSL],[CMD],[ERR],[EOM]

61h Clear all soft limits No Abs


*Returns all soft limits to default positions of +/-95 degrees in tilt and +/-
210 degrees in pan.

Responses:
[ACK],[MSL],[CMD],[EOM]
[NAK],[MSL],[CMD],[ERR],[EOM]

65h Immediate stop No -


*Immediately stops any move in progress

Responses:
[ACK],[MSL],[CMD],[EOM]
[NAK],[MSL],[CMD],[ERR],[EOM]

4.2 LRAD Serial Attenuation Module (SAM) Protocol

The SAM module is an RS-232 device that is connected to the Lantronix Ethernet to Serial converter. This
device is used to set the volume level of the LRAD hailing device and to read the status of the amplifiers.
Commands for the SAM are written to/read from the socket connection at port 10001 on the PTSS
controller‟s IP address.

4.2.1 General Command Structure

15378 Avenue of Science, San DOC. # 105328-00 REV


Diego, CA 92128
G
SHEET 14 of 23
San
The general structure of the SAM communications protocol is described below.

From the host to the SAM:


Data Format Bytes
STX 02h 1
Command XXh
Data see special mute/unmute cases
LRC XXh
ETX 03h

Transfers from the host to the SAM will always start with a unique STX (Start of Text) 02H character.

From the SAM to the host:


Data Format Bytes
STX 02h 1
ACK 06h 1
Command XXh 1
see STATUS_RESPONSE_SEQUENCE and
Data GET_ID_REQUEST data definitions

LRC XXh 1
ETX 03h 1

Transfers from the SAM to the host will always start with an STX character and an ACK (acknowledge) 06H
character. The last received command will be returned by the SAM, followed by the current status response
data.

4.2.2 Control Characters

02h Start of Message [SOM]


03h End of Message [EOM]
06h Acknowledge [ACK]
15h Not Acknowledge [NAK]
1Bh Escape Character [ESC]

4.2.3 Escape Character

All zero values and payload bytes that match control characters must be escaped by adding the escape
character 1Bh prior to transmitting the conflicting data byte and setting Bit-7 of the conflicting byte. For
example zero values are not transmitted or received, but are escaped with the two byte sequence: 1Bh,
80h. This action must be performed on all payload bytes, including the LRC. The ESC sequence must be
removed from any command or response prior to calculating the LRC.

4.2.4 List of Commands

The following are the commands that are recognized by the SAM.

Name Description Bytes Command


SAM will return name
GET_ID_REQUEST and revision 1 FEh
SAM will return current
volume level,
GET_STATUS_REQUEST temperature, voltage 1 FDh

15378 Avenue of Science, San DOC. # 105328-00 REV


Diego, CA 92128
G
SHEET 15 of 23
San
SET_MUTE_STATE_REQUES SAM will mute the
T (MUTE, TRUE) amplifiers 2 FCh 01h
SET_MUTE_STATE_REQUES SAM will un-mute the
T (MUTE, FALSE) amplifiers 3 FCh 1Bh 80h
SAM will set the
volume of the Where: XXh =
SET_ATTENUATION_REQUE amplifiers to the two's
ST, ATTENUATION_VALUE (-1 specified setting complement -1
TO -100) between -1 and -100 2 FBh XXh to -100
SAM will set the
SET_ATTENUATION_REQUE volume of the
ST, ATTENUATION_VALUE (0) amplifiers to 0 3 FBh 1Bh 80h
SAM will increase the
volume of the
INCREMENT_ATTENUATION_ amplifiers by one
REQUEST increment 1 FAh
SAM will decrease the
volume of the
DECREMENT_ATTENUATION amplifiers by one
_REQUEST increment 1 F9h

4.2.5 Get ID Request Response Data Structure Definition

The response to the GET_ID_REQUEST command will have the following structure:

Byte Value
1 „A‟
2 „T‟
3 „C‟
4 „L‟
5 „R‟
6 „A‟
7 „D‟
8 „S‟
9 „A‟
10 „M‟
11 „,‟
12 „V‟
13 VERSION_MAJOR
14 „.‟
15 VERSION_MINOR
16 BUILD_LETTER

4.2.6 Status Response Sequence Structure

The response to the GET_STATUS_REQUEST command will have the following structure when the
attenuation value is between -1 and -100:

Byte Value
1 ATTENUATION (-1 TO -100)
2 STATUSBITS
3 5VOLTATCMSB
4 5VOLTADCLSB
5 12VOLTATCMSB

15378 Avenue of Science, San DOC. # 105328-00 REV


Diego, CA 92128
G
SHEET 16 of 23
San
6 12VOLTADCLSB
7 48VOLTATCMSB
8 48VOLTADCLSB
9 DEVICETEMPERATUREADCMSB
10 DEVICETEMPERATUREADCLSB

The response to the GET_STATUS_REQUEST command will have the following structure when the
attenuation value is Zero or Muted:

Byte Value
1 1Bh
2 80h
3 STATUSBITS
4 5VOLTATCMSB
5 5VOLTADCLSB
6 12VOLTATCMSB
7 12VOLTADCLSB
8 48VOLTATCMSB
9 48VOLTADCLSB
10 DEVICETEMPERATUREADCMSB
11 DEVICETEMPERATUREADCLSB

4.2.7 Definition of STATUSBITS

bit 0 nGPIO4 (value is 0 when input is high)


bit 1 nGPIO5 (value is 0 when input is high)
bit 2 Reserved
bit 3 Reserved
bit 4 Reserved
bit 5 Reserved
bit 6 Reserved
bit 7 Mute State (1=muted, 0=unmuted)

4.2.8 LRC Checksum Calculation

The checksum is calculated by XOR‟ing Bytes starting with the first command after the STX Byte and
ending at the last data Byte. The STX and Bytes is not included in the LRC checksum, the ACK byte is
included in the LRC. If all Command and Data Bytes are XOR‟ed and the result is then XOR‟ed with the
LRC byte, the result should be zero.

4.2.9 Operational Ranges

All voltage values coming from the SAM should be within +/- 5% of nominal. Amplifier temperatures above
90C will cause the amplifiers to shut down.

15378 Avenue of Science, San DOC. # 105328-00 REV


Diego, CA 92128
G
SHEET 17 of 23
San
4.2.10 Communications Sequence Diagram

Control LRAD-R
Interface Control Module

User clicks "connect"


button, serial port is
opened and serial I/O
GetIdentificationRequest()
parameters are set.

GetIdentificationResponse()

ID not OK ID OK

Not connected Connected

User sends
"update" request. GetStatusRequest()

GetStatusResponse()

User sends
"mute" request. SetMuteStateRequest()

SetMuteStateResponse()

User sends
volume control
setting. SetAttenuationRequest()

SetAttenuationResponse()

User sends
"increment
volume" request. IncrementAttenuationRequest()

IncrementAttenuationResponse()

User sends
"decrement
volume" request. DecrementAttenuationRequest()

DecrementAttenuationResponse()

4.3 Camera Controls

The LRAD 1000-RX is configured with a SONY FCB-EX 980S camera which can be controlled via RS-232
VISCA commands (“VISCA” is a trademark of Sony Corporation). The control commands for the camera
are written to/read from the socket connection at port 4000 of the PTSS controller‟s IP address, which is
forwarded to the built in serial port of the Axis video server.

15378 Avenue of Science, San DOC. # 105328-00 REV


Diego, CA 92128
G
SHEET 18 of 23
San
A full documented description of the VISCA protocol can be found on pages 39 to 57 of the Sony FCB-EX
980S camera manual, “fcb-ex980-ac4g100121.pdf”

4.4 Axis Video Streaming

The video stream from the LRAD camera can be accessed using a web browser to run the Axis Media
Control applet. This applet can be reached by pointing a browser to the ip address and port of the Axis
server‟s web portal: 10.1.6.99:8061. The first time a user connects to this address, an ActiveX control will
be installed on the user‟s browser.

Optionally, the video stream can be decoded using an IP to analog converter, such as an Axis 292 Video
Decoder.

In addition, MJPEG and MPEG-4 streams can be displayed in a developer‟s application. For more
information on this, consult the Axis 282 Server Manual and the Axis Media Control Manual in the appendix.

4.5 Audio Streaming to the Barix

The Barix device in the LRAD receives and decodes streamed digital audio files in MP3 format. All
hardware settings for this device are set at the factory and do not need to be changed. While this device
contains a volume control as well as other audio controls, they should not be used or altered, since this
could adversely affect the acoustic performance of the AHD. MP3 files written to the socket connection to
Barix device, port 8062 on the PTSS controller, will be automatically played through the LRAD‟s acoustic
array.

In order to stream live audio through a microphone, the audio at the control computer should be converted
into MP3 format. An application such as LAME encoder can be used for this task and is included in ATC‟s
API.

For more information on the streaming protocol for the Barix, please consult the Barix Audio Streaming
Protocol document in the appendix.

5.0 Programming Notes

Since all of the devices in the LRAD use flash memory for storage of persistent parameters, such as soft limits, port
addresses, etc., it is not recommended that these parameters be written unnecessarily, since flash memory does
not have an infinite number of write cycles. Applications should store each device‟s settings in a local file as well,
for backup purposes.

In order to protect the LRAD‟s acoustic array, the unit should be stowed with the face of the array pointing down in
order to avoid dirt and moisture buildup on the grill covering the acoustic drivers. Users should be reminded to stow
the LRAD when exiting the control application or when the system is idle for a long period of time.

Since the LRAD is a very efficient loudspeaker, there will be an audible hiss coming from the array when the SAM is
at full volume and no audio is being streamed to the device. The hiss will be reduced as the volume is decreased.
It is recommended that the LRAD be automatically muted or the volume turned down when no audio is being
played.

15378 Avenue of Science, San DOC. # 105328-00 REV


Diego, CA 92128
G
SHEET 19 of 23
San
6.0 Maxabeam Protocol

The Maxabeam spotlight has an RS-232 connection to an Ethernet to Serial network server found at port
10002.

ASCII Command: Maxa Beam Function:

Beam on, off, level:


BL Beam on low (with 3 second warm-up on high)
BN or B1 Beam on normal (with 3 second warm-up on high)
BH Beam on high
BI Beam intensity increments one level; cycles in the order low, normal, high, low,
normal, high... (no effect if beam off or in strobe mode)
BO or B0 Beam off
B1M Beam on, to setting stored by B0M (strobe settings will be the last used)
B0M Beam off, storing current beam setting (low, normal, high or strobe) in the
searchlight‟s volatile (power-on-dependent) memory

Zoom:
ZI Zoom in
ZO Zoom out
ZS Zoom stop
ZR+ Zoom rate increases
ZR- Zoom rate decreases
ZRS Zoom rate stops changing and is stored in the searchlight's non-volatile memory

Go to zoom positions:
(For these commands, the servo moves to the indicated position at its fastest mechanically possible rate)
GS Go to full programmed spot position (100%)
GF Go to full programmed flood position (0%)
GI Go to programmed initial position
Gxx Go to position xx% of travel, where xx is two digits, from 00 to 99 inclusive

15378 Avenue of Science, San DOC. # 105328-00 REV


Diego, CA 92128
G
SHEET 20 of 23
San
ASCII Command: Maxa Beam Function:

Strobe:
(Strobe-on commands include 3 second warm-up on high if beam was previously off)
SRxx Strobe on at rate (frequency) of xxHz, where xx is two digits, from 01 to 31 inclusive
S1 Strobe on at frequency and duration stored in searchlight, or settings last used since
power-up if different
S0 Strobe off, return to previous non-strobe beam state
S5 Strobe on at 5Hz
S10 Strobe on at 10Hz
S25 Strobe on at 25Hz
S49 or S50 Strobe on at 49Hz (overrides 31Hz limit)
SPxx Set strobe percentage (duration) to xx%, where xx is two digits, from 03 to 63
inclusive
(The following two values are loaded into local memory at power-up)
SSR Store current strobe rate in searchlight‟s non-volatile memory
SSP Store current strobe percentage in searchlight‟s non-volatile memory
(The following strobe commands have no effect unless strobe is on)
SF+ Strobe frequency increases
SF- Strobe frequency decreases
SFS Strobe frequency stops changing and is stored in light's non-volatile memory
SD+ Strobe duration increases
SD- Strobe duration decreases
SDS Strobe duration stops changing and is stored in light's non-volatile memory

Program spot, flood, initial positions:


PZI Zoom in, overriding stored spot limit position
PZO Zoom out, overriding stored flood limit position
PZS Zoom stop
(The following three commands store the current position, given the noted restrictions, in the light's non-volatile
memory)
PZIM Store zoom-in maximum (programmed spot position; cannot be closer than ≈5° to
flood position)
PZOM Store zoom-out maximum (programmed flood position; cannot be closer than ≈5° to
spot position)
PZIP Store initial position (cannot be outside the range from spot to flood)
PRFS Restore factory settings (spot, flood and initial positions)

Write feedback:
WBL Send the beam level/state back to the controller (as "Off", "Off Low-Voltage ", "Low",
"Normal", "High", or "Strobe")
WZP Send the zoom position, as percent of total travel, where 100% = programmed spot
and 0% = programmed flood

15378 Avenue of Science, San DOC. # 105328-00 REV


Diego, CA 92128
G
SHEET 21 of 23
San
ASCII Command: Maxa Beam Function:

Write feedback, cont‟d:


(The following two commands report the current local values, which may not be the values stored in the light’s
non-volatile memory)
WSR Send the strobe rate/frequency in Hz
WSP Send the strobe percentage/duration
WTMP Send the circuit board temperature (in Celsius), signed if negative
WV# Send the interface's firmware version number

Echo commands:
(After executing each of these commands, the searchlight replies back with: the literal command entered (lower-
case letters are translated to upper-case), <cr><lf>) (with no commas or spaces)
EBO Beam off
EBL Beam on low (with 3 second warm-up on high if previously off)
EBH Beam on high
ERxx Beam on strobe (with 3 second warm-up on high if previously off), at xxHz, where xx
is two digits, from 01 to 20 inclusive
EPxx Set strobe percentage (duration) to xx%, where xx is two digits, from 03 to 63
inclusive
EZxx Zoom to position xx% of travel, where xx is two digits, from 00 to 99 inclusive
ESPT Zoom to full programmed spot position (100%)

Echo write commands:


(After executing each of these commands, the searchlight replies back with: the literal command entered (lower-
case letters are translated to upper-case), the information as indicated below, <cr><lf>) (with no commas or
spaces)
EWBS Write the beam state, as one digit, where 0=off, 1= off low-voltage, 2=low, 3=high,
4=strobe, 5=malfunction
EWZP Write the zoom position (percent of total travel), as three digits, from 000 (flood) to
100 (spot)
EWSR Write the current (local memory) strobe rate, in Hz, as two digits
EWSP Write the current (local memory) strobe percentage, as two digits
EWTM Write the circuit board temperature (in Celsius), as three digits, signed if negative
EWV# Write the interface‟s firmware version number, as three digits, the middle one being
a decimal point

Notes:
Port settings: 9600 baud rate, 8 data bits, 1 stop bit, no parity, no flow control.
Port settings can be changed at port 8063 using a web browser if needed.

Commands are not case-sensitive, but must be terminated by carriage-return (ASCII 13); line-feed (ASCII 10) is
ignored. Otherwise, non-exact matches are replied to with “Invalid”. When power is initially applied to the
searchlight, the servo moves to the programmed initial-on position, without the beam being activated, and
"SL<cr><lf>" is sent to the controller.

15378 Avenue of Science, San DOC. # 105328-00 REV


Diego, CA 92128
G
SHEET 22 of 23
San
7.0 Appendices

See attached files:

fcb-ex980-ac10121.pdf : Sony Camera user‟s manual and VISCA protocol document


Axis 282 Server Manual.pdf: User‟s manual for Axis 282 Video Server
Axis Media Control Manual.pdf: User‟s manual for Axis Media Control software
Barix Audio Streaming Protocol.pdf: Barix Streaming Device‟s audio streaming protocol document
UDS 200_UG.pdf: User‟s manual for Lantronix Serial Port Server

15378 Avenue of Science, San DOC. # 105328-00 REV


Diego, CA 92128
G
SHEET 23 of 23
San

Você também pode gostar