USM Sonar Rotator Development and Integration
The USM API provides methods for communicating with a sonar head rotational actuator and/or vertical lift assembly using single or dual lift motors. All motors (rotational or lift) are controlled using UDP datagrams. The datagrams are ASCII comma-delimited messages. Further, the UDP ports are broadcast over 255.255.255.255, allowing the PLC to be configured with static or DHCP IPv4 addressing.
The default networking:
192.168.0.250
5100052000
Available firmware configurations support the following hardware profiles:
It is important to note that all motors are 19-bit absolute-encoded, dual-encoded motors. They always know where they are and can report the following error and resting position of any movement with high-precision (<0.001 degree).
ToDo: Implement a conversion such that the lift motors convert between angular and linear units (as determined by gear ratio)
Coming soon: Pulse Per Second (PPS) integration
When reporting status messages, the PLC sends a UDP datagram to a PC at up to 50 times per second. The message contains the status, position, encoder count, speed, following error, and timestamp for the rotational actuator.
$<header>,<status>,<position>,<encoder>,<speed>,<following_error><timestamp>*<checksum>
$USM_STAT,2,-30.0000,270015,10.0000,0.0150,2025-05-28T16:51:34.231Z*17
<header> STRING<status> INTEGER| Value | Description |
|---|---|
| 0 | idle |
| 1 | programs loading |
| 2 | programs running |
| 3 | programs unloading |
| 4 | reserved |
| 5 | reserved |
| 6 | reserved |
| 7 | reserved |
<position> FLOAT<speed> FLOAT<following_error> FLOAT<timestamp> STRING<checksum> STRING$ and * but not including themPC sends UDP datagrams to PLC asynchronously. The messages contain a command and its operands.
$<header>,<command>,<mode>,<position_a>,<position_b><offset><speed>*<checksum>
$USM_CMD,6,1,-20.0,20.0,5,10*40
<header> STRING<command> INTEGER| Value | Action | Description |
|---|---|---|
| 0 | profile | set the hardware profile |
| 1 | halt | stop the current motor action |
| 2 | home | return to origin |
| 3 | calibrate | if port=51000 then set current position as new home (rotator) if port=52000 then find min/max range using limit switches (lift) |
| 4 | vector to | goto <positon_a> at <speed> |
| 5 | deploy | if port=51000 (reserved) if port=52000 then goto maximum position |
| 6 | sweep zone | goto <positon_a> at <speed>, then goto <positon_b> at same speed, opposite direction |
<mode> INTEGER<command>=0: m = hardware profile
<command>!=0: m = mode [0 - 50], [message output frequency (Hz)]<position_a> FLOAT<position_b> FLOAT<offset> FLOAT<speed> FLOAT<checksum> STRING$ and * but not including them