UMAC Utility for Secondary and Tertiary Mirror Controllers

Adapted from a Paul Grenz email by Mike Wagner, 10-Feb-2012

To communicate with the PMAC chip inside the UMAC controller of the secondary or tertiary, use the pmac program.
Paul's note says it can also be used on the AGw UMACs (1,2,3,4,7,8), but we use a different program, pmacsend for those (see Software/OAControlMainPage).

The pmac program is in /lbt/tcs/current/tcs/bin from any of the mountain obs or tcs machines.

The options are:
pmac -h
    -c [ip] [trigger] [commands] (command) send a command then poll commands using transceive repeatedly.
    -f [ip]                      (flush) flush the PMAC communication.
    -h                           (help) print out this list.
    -i [old ip] [new ip]         (ip) reset the ip address of the PMAC.
    -p [ip] [commands]           (poll) send commands using transceive repeatedly.
    -r [ip]                      (response) get any response buffer from the PMAC.
    -s [ip] [command]            (send) send a line to the PMAC, do not wait for a response.
    -t [ip] [command]            (transceive) send a command, then get a response from the PMAC.
    -u [ip] [filename]           (upload) upload a PMAC firmware file.
    -v                           (version) the current version of the pmac program.  


-c [ip] [trigger] [commands] (command)
This can be used to generate a file filled with responses from the umac to a command.
For example, if you are tracking the position of the legs, you can capture a file with that information for several hours.

-f [ip]
Clears any pending commands.

-i [old ip] [new ip]
This command may work or may not - it is unproven at this point. More testing needs to be done here.

-p [ip] [commands]
Used to send a command to the pmac repeatidly.

-r [ip]
Read the pmac's response buffer.

-s [ip] [command]
Simply send a command and do not wait for a response. flush or a read should be used to clear out the response buffer.

-t [ip] [command]
Send a command, then wait for a response.

-u [ip] [filename]
This uploads the pmac firmware file (a series of commands) into the pmac itself. It will only be stored in volatile memory; any power cycling will erase these settings.
To store the settings permanently, issue a SAVE using the -t option after this command completes correctly.

Troubleshooting

Usually, to test the umac, a ping is used to try to determine whether the machine is reachable over the network. A successful ping does not necessarily indicate that commands can be interpreted by the unit. The pmac program can be used towards this end.

~ >pmac -t "192.168.18.11" "ver"
1.940  ;ACK;
~ > 

In the above example, the transceive option has been used to test whether the umac at IP 192.168.18.11 (the right side secondary) can receive a command and send a response. The ver command is a very safe way to test the communication link, as it does not perform any actions at all; all it does is return the internal pmac version. This is '1.940' as can be seen above. the ACK is normal.

 ~ >pmac -t "192.168.18.11" "#1?"
882000058411;ACK; 

Here we have requested the status bits from axis #1. We have gotten a response which indicates that the axis is in closed loop, no errors, and is in position. The umac manual has a list of codes and their meanings.

 ~ >netconfig start OSS
Starting OSS (v 2.22) on tcs4                               [  OK  ]
~ >
~ >pmac -t "192.168.18.11" "#1?"
Error connecting to PMAC: 'Timed out' - PMAC unit may be powered off,
or be already connected.
~ > 

Here you can see illustrated the fact that the pmac only allows 1 connection at a time . The OSS subsystem is running, and the pmac program fails with an error.
The OSS must be stopped or communication disabled to the UMAC, to use the pmac program.

Good Luck!

-- MichaelWagner - 15 Jun 2012
Topic revision: r2 - 20 Sep 2017, KelleeSummers
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback